generated-configure.sh revision 952:8c50ba0ba497
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637LIBCXX
638LLVM_LIBS
639LLVM_LDFLAGS
640LLVM_CFLAGS
641LLVM_CONFIG
642LIBFFI_LIBS
643LIBFFI_CFLAGS
644STATIC_CXX_SETTING
645LIBDL
646LIBM
647LIBZIP_CAN_USE_MMAP
648USE_EXTERNAL_LIBZ
649USE_EXTERNAL_LIBGIF
650USE_EXTERNAL_LIBJPEG
651ALSA_LIBS
652ALSA_CFLAGS
653FREETYPE_BUNDLE_LIB_PATH
654FREETYPE_LIBS
655FREETYPE_CFLAGS
656CUPS_CFLAGS
657OPENWIN_HOME
658X_EXTRA_LIBS
659X_LIBS
660X_PRE_LIBS
661X_CFLAGS
662XMKMF
663FIXPATH
664CXXFLAGS_DEBUG_SYMBOLS
665CFLAGS_DEBUG_SYMBOLS
666ZIP_DEBUGINFO_FILES
667ENABLE_DEBUG_SYMBOLS
668USING_BROKEN_SUSE_LD
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751TOOLS_DIR_CXX
752POTENTIAL_CXX
753COMPILER_TARGET_BITS_FLAG
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761ac_ct_PROPER_COMPILER_CC
762PROPER_COMPILER_CC
763TOOLS_DIR_CC
764POTENTIAL_CC
765BUILD_LD
766BUILD_CXX
767BUILD_CC
768MSVCR_DLL
769VS_PATH
770VS_LIB
771VS_INCLUDE
772CYGWIN_LINK
773AR_OUT_OPTION
774LD_OUT_OPTION
775EXE_OUT_OPTION
776CC_OUT_OPTION
777BUILD_HOTSPOT
778HOTSPOT_DIST
779BUILD_OUTPUT
780OVERRIDE_SRC_ROOT
781ADD_SRC_ROOT
782JDK_TOPDIR
783NASHORN_TOPDIR
784HOTSPOT_TOPDIR
785JAXWS_TOPDIR
786JAXP_TOPDIR
787CORBA_TOPDIR
788LANGTOOLS_TOPDIR
789BOOT_JDK_JVMARGS
790JAVAC_FLAGS
791BOOT_JDK_SOURCETARGET
792BOOT_JDK
793BOOT_TOOLSJAR
794BOOT_RTJAR
795JAVA_CHECK
796JAVAC_CHECK
797COOKED_BUILD_NUMBER
798JDK_VERSION
799COPYRIGHT_YEAR
800MACOSX_BUNDLE_ID_BASE
801MACOSX_BUNDLE_NAME_BASE
802COMPANY_NAME
803JDK_RC_PLATFORM_NAME
804PRODUCT_SUFFIX
805PRODUCT_NAME
806LAUNCHER_NAME
807MILESTONE
808JDK_BUILD_NUMBER
809JDK_UPDATE_VERSION
810JDK_MICRO_VERSION
811JDK_MINOR_VERSION
812JDK_MAJOR_VERSION
813USER_RELEASE_SUFFIX
814COMPRESS_JARS
815UNLIMITED_CRYPTO
816CACERTS_FILE
817TEST_IN_BUILD
818BUILD_HEADLESS
819SUPPORT_HEADFUL
820SUPPORT_HEADLESS
821BDEPS_FTP
822BDEPS_UNZIP
823OS_VERSION_MICRO
824OS_VERSION_MINOR
825OS_VERSION_MAJOR
826PKG_CONFIG
827CODESIGN
828XATTR
829DSYMUTIL
830IS_GNU_TIME
831TIME
832STAT
833HG
834READELF
835OTOOL
836LDD
837ZIP
838UNZIP
839FIND_DELETE
840MAKE
841CHECK_TOOLSDIR_MAKE
842CHECK_TOOLSDIR_GMAKE
843CHECK_MAKE
844CHECK_GMAKE
845PKGHANDLER
846OUTPUT_ROOT
847CONF_NAME
848SPEC
849BUILD_VARIANT_RELEASE
850DEBUG_CLASSFILES
851FASTDEBUG
852VARIANT
853DEBUG_LEVEL
854MACOSX_UNIVERSAL
855INCLUDE_SA
856JVM_VARIANT_CORE
857JVM_VARIANT_ZEROSHARK
858JVM_VARIANT_ZERO
859JVM_VARIANT_KERNEL
860JVM_VARIANT_MINIMAL1
861JVM_VARIANT_CLIENT
862JVM_VARIANT_SERVER
863JVM_VARIANTS
864JVM_INTERPRETER
865JDK_VARIANT
866SET_OPENJDK
867BUILD_LOG_WRAPPER
868BUILD_LOG_PREVIOUS
869BUILD_LOG
870SYS_ROOT
871PATH_SEP
872SRC_ROOT
873ZERO_ARCHDEF
874DEFINE_CROSS_COMPILE_ARCH
875LP64
876OPENJDK_TARGET_OS_EXPORT_DIR
877OPENJDK_TARGET_OS_API_DIR
878OPENJDK_TARGET_CPU_JLI_CFLAGS
879OPENJDK_TARGET_CPU_OSARCH
880OPENJDK_TARGET_CPU_ISADIR
881OPENJDK_TARGET_CPU_LIBDIR
882OPENJDK_TARGET_CPU_LEGACY_LIB
883OPENJDK_TARGET_CPU_LEGACY
884REQUIRED_OS_VERSION
885REQUIRED_OS_NAME
886COMPILE_TYPE
887OPENJDK_TARGET_CPU_ENDIAN
888OPENJDK_TARGET_CPU_BITS
889OPENJDK_TARGET_CPU_ARCH
890OPENJDK_TARGET_CPU
891OPENJDK_TARGET_OS_API
892OPENJDK_TARGET_OS
893OPENJDK_BUILD_CPU_ENDIAN
894OPENJDK_BUILD_CPU_BITS
895OPENJDK_BUILD_CPU_ARCH
896OPENJDK_BUILD_CPU
897OPENJDK_BUILD_OS_API
898OPENJDK_BUILD_OS
899OPENJDK_BUILD_AUTOCONF_NAME
900OPENJDK_TARGET_AUTOCONF_NAME
901target_os
902target_vendor
903target_cpu
904target
905host_os
906host_vendor
907host_cpu
908host
909build_os
910build_vendor
911build_cpu
912build
913SETFILE
914DF
915READLINK
916CYGPATH
917NAWK
918SED
919FGREP
920EGREP
921GREP
922AWK
923XARGS
924WHICH
925WC
926UNIQ
927UNAME
928TR
929TOUCH
930TEE
931TAR
932TAIL
933SORT
934SH
935RM
936PRINTF
937MV
938MKTEMP
939MKDIR
940LS
941LN
942HEAD
943FIND
944FILE
945EXPR
946ECHO
947DIRNAME
948DIFF
949DATE
950CUT
951CPIO
952CP
953COMM
954CMP
955CHMOD
956CAT
957BASH
958BASENAME
959DATE_WHEN_CONFIGURED
960CONFIGURE_COMMAND_LINE
961CUSTOM_MAKE_DIR
962target_alias
963host_alias
964build_alias
965LIBS
966ECHO_T
967ECHO_N
968ECHO_C
969DEFS
970mandir
971localedir
972libdir
973psdir
974pdfdir
975dvidir
976htmldir
977infodir
978docdir
979oldincludedir
980includedir
981localstatedir
982sharedstatedir
983sysconfdir
984datadir
985datarootdir
986libexecdir
987sbindir
988bindir
989program_transform_name
990prefix
991exec_prefix
992PACKAGE_URL
993PACKAGE_BUGREPORT
994PACKAGE_STRING
995PACKAGE_VERSION
996PACKAGE_TARNAME
997PACKAGE_NAME
998PATH_SEPARATOR
999SHELL'
1000ac_subst_files=''
1001ac_user_opts='
1002enable_option_checking
1003with_custom_make_dir
1004with_target_bits
1005with_sys_root
1006with_tools_dir
1007with_devkit
1008enable_openjdk_only
1009with_jdk_variant
1010with_jvm_interpreter
1011with_jvm_variants
1012enable_debug
1013with_debug_level
1014with_conf_name
1015with_builddeps_conf
1016with_builddeps_server
1017with_builddeps_dir
1018with_builddeps_group
1019enable_headful
1020enable_hotspot_test_in_build
1021with_cacerts_file
1022enable_unlimited_crypto
1023with_milestone
1024with_update_version
1025with_user_release_suffix
1026with_build_number
1027with_boot_jdk
1028with_boot_jdk_jvmargs
1029with_add_source_root
1030with_override_source_root
1031with_adds_and_overrides
1032with_override_langtools
1033with_override_corba
1034with_override_jaxp
1035with_override_jaxws
1036with_override_hotspot
1037with_override_nashorn
1038with_override_jdk
1039with_import_hotspot
1040with_msvcr_dll
1041with_dxsdk
1042with_dxsdk_lib
1043with_dxsdk_include
1044with_jtreg
1045with_extra_cflags
1046with_extra_cxxflags
1047with_extra_ldflags
1048enable_debug_symbols
1049enable_zip_debug_info
1050enable_macosx_runtime_support
1051with_x
1052with_cups
1053with_cups_include
1054with_freetype
1055with_freetype_include
1056with_freetype_lib
1057enable_freetype_bundling
1058with_alsa
1059with_alsa_include
1060with_alsa_lib
1061with_giflib
1062with_zlib
1063with_stdc__lib
1064with_num_cores
1065with_memory_size
1066with_jobs
1067with_sjavac_server_java
1068enable_sjavac
1069enable_precompiled_headers
1070enable_ccache
1071with_ccache_dir
1072'
1073      ac_precious_vars='build_alias
1074host_alias
1075target_alias
1076PKG_CONFIG
1077CC
1078CFLAGS
1079LDFLAGS
1080LIBS
1081CPPFLAGS
1082CXX
1083CXXFLAGS
1084CCC
1085OBJC
1086OBJCFLAGS
1087CPP
1088CXXCPP
1089XMKMF
1090FREETYPE_CFLAGS
1091FREETYPE_LIBS
1092ALSA_CFLAGS
1093ALSA_LIBS
1094LIBFFI_CFLAGS
1095LIBFFI_LIBS'
1096
1097
1098# Initialize some variables set by options.
1099ac_init_help=
1100ac_init_version=false
1101ac_unrecognized_opts=
1102ac_unrecognized_sep=
1103# The variables have the same names as the options, with
1104# dashes changed to underlines.
1105cache_file=/dev/null
1106exec_prefix=NONE
1107no_create=
1108no_recursion=
1109prefix=NONE
1110program_prefix=NONE
1111program_suffix=NONE
1112program_transform_name=s,x,x,
1113silent=
1114site=
1115srcdir=
1116verbose=
1117x_includes=NONE
1118x_libraries=NONE
1119
1120# Installation directory options.
1121# These are left unexpanded so users can "make install exec_prefix=/foo"
1122# and all the variables that are supposed to be based on exec_prefix
1123# by default will actually change.
1124# Use braces instead of parens because sh, perl, etc. also accept them.
1125# (The list follows the same order as the GNU Coding Standards.)
1126bindir='${exec_prefix}/bin'
1127sbindir='${exec_prefix}/sbin'
1128libexecdir='${exec_prefix}/libexec'
1129datarootdir='${prefix}/share'
1130datadir='${datarootdir}'
1131sysconfdir='${prefix}/etc'
1132sharedstatedir='${prefix}/com'
1133localstatedir='${prefix}/var'
1134includedir='${prefix}/include'
1135oldincludedir='/usr/include'
1136docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1137infodir='${datarootdir}/info'
1138htmldir='${docdir}'
1139dvidir='${docdir}'
1140pdfdir='${docdir}'
1141psdir='${docdir}'
1142libdir='${exec_prefix}/lib'
1143localedir='${datarootdir}/locale'
1144mandir='${datarootdir}/man'
1145
1146ac_prev=
1147ac_dashdash=
1148for ac_option
1149do
1150  # If the previous option needs an argument, assign it.
1151  if test -n "$ac_prev"; then
1152    eval $ac_prev=\$ac_option
1153    ac_prev=
1154    continue
1155  fi
1156
1157  case $ac_option in
1158  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1159  *=)   ac_optarg= ;;
1160  *)    ac_optarg=yes ;;
1161  esac
1162
1163  # Accept the important Cygnus configure options, so we can diagnose typos.
1164
1165  case $ac_dashdash$ac_option in
1166  --)
1167    ac_dashdash=yes ;;
1168
1169  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1170    ac_prev=bindir ;;
1171  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1172    bindir=$ac_optarg ;;
1173
1174  -build | --build | --buil | --bui | --bu)
1175    ac_prev=build_alias ;;
1176  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1177    build_alias=$ac_optarg ;;
1178
1179  -cache-file | --cache-file | --cache-fil | --cache-fi \
1180  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1181    ac_prev=cache_file ;;
1182  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1183  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1184    cache_file=$ac_optarg ;;
1185
1186  --config-cache | -C)
1187    cache_file=config.cache ;;
1188
1189  -datadir | --datadir | --datadi | --datad)
1190    ac_prev=datadir ;;
1191  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1192    datadir=$ac_optarg ;;
1193
1194  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1195  | --dataroo | --dataro | --datar)
1196    ac_prev=datarootdir ;;
1197  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1198  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1199    datarootdir=$ac_optarg ;;
1200
1201  -disable-* | --disable-*)
1202    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1203    # Reject names that are not valid shell variable names.
1204    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205      as_fn_error $? "invalid feature name: $ac_useropt"
1206    ac_useropt_orig=$ac_useropt
1207    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208    case $ac_user_opts in
1209      *"
1210"enable_$ac_useropt"
1211"*) ;;
1212      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1213	 ac_unrecognized_sep=', ';;
1214    esac
1215    eval enable_$ac_useropt=no ;;
1216
1217  -docdir | --docdir | --docdi | --doc | --do)
1218    ac_prev=docdir ;;
1219  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1220    docdir=$ac_optarg ;;
1221
1222  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1223    ac_prev=dvidir ;;
1224  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1225    dvidir=$ac_optarg ;;
1226
1227  -enable-* | --enable-*)
1228    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1229    # Reject names that are not valid shell variable names.
1230    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231      as_fn_error $? "invalid feature name: $ac_useropt"
1232    ac_useropt_orig=$ac_useropt
1233    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234    case $ac_user_opts in
1235      *"
1236"enable_$ac_useropt"
1237"*) ;;
1238      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1239	 ac_unrecognized_sep=', ';;
1240    esac
1241    eval enable_$ac_useropt=\$ac_optarg ;;
1242
1243  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1244  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1245  | --exec | --exe | --ex)
1246    ac_prev=exec_prefix ;;
1247  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1248  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1249  | --exec=* | --exe=* | --ex=*)
1250    exec_prefix=$ac_optarg ;;
1251
1252  -gas | --gas | --ga | --g)
1253    # Obsolete; use --with-gas.
1254    with_gas=yes ;;
1255
1256  -help | --help | --hel | --he | -h)
1257    ac_init_help=long ;;
1258  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1259    ac_init_help=recursive ;;
1260  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1261    ac_init_help=short ;;
1262
1263  -host | --host | --hos | --ho)
1264    ac_prev=host_alias ;;
1265  -host=* | --host=* | --hos=* | --ho=*)
1266    host_alias=$ac_optarg ;;
1267
1268  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1269    ac_prev=htmldir ;;
1270  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1271  | --ht=*)
1272    htmldir=$ac_optarg ;;
1273
1274  -includedir | --includedir | --includedi | --included | --include \
1275  | --includ | --inclu | --incl | --inc)
1276    ac_prev=includedir ;;
1277  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1278  | --includ=* | --inclu=* | --incl=* | --inc=*)
1279    includedir=$ac_optarg ;;
1280
1281  -infodir | --infodir | --infodi | --infod | --info | --inf)
1282    ac_prev=infodir ;;
1283  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1284    infodir=$ac_optarg ;;
1285
1286  -libdir | --libdir | --libdi | --libd)
1287    ac_prev=libdir ;;
1288  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1289    libdir=$ac_optarg ;;
1290
1291  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1292  | --libexe | --libex | --libe)
1293    ac_prev=libexecdir ;;
1294  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1295  | --libexe=* | --libex=* | --libe=*)
1296    libexecdir=$ac_optarg ;;
1297
1298  -localedir | --localedir | --localedi | --localed | --locale)
1299    ac_prev=localedir ;;
1300  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1301    localedir=$ac_optarg ;;
1302
1303  -localstatedir | --localstatedir | --localstatedi | --localstated \
1304  | --localstate | --localstat | --localsta | --localst | --locals)
1305    ac_prev=localstatedir ;;
1306  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1307  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1308    localstatedir=$ac_optarg ;;
1309
1310  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1311    ac_prev=mandir ;;
1312  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1313    mandir=$ac_optarg ;;
1314
1315  -nfp | --nfp | --nf)
1316    # Obsolete; use --without-fp.
1317    with_fp=no ;;
1318
1319  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1320  | --no-cr | --no-c | -n)
1321    no_create=yes ;;
1322
1323  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1324  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1325    no_recursion=yes ;;
1326
1327  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1328  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1329  | --oldin | --oldi | --old | --ol | --o)
1330    ac_prev=oldincludedir ;;
1331  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1332  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1333  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1334    oldincludedir=$ac_optarg ;;
1335
1336  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1337    ac_prev=prefix ;;
1338  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1339    prefix=$ac_optarg ;;
1340
1341  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1342  | --program-pre | --program-pr | --program-p)
1343    ac_prev=program_prefix ;;
1344  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1345  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1346    program_prefix=$ac_optarg ;;
1347
1348  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1349  | --program-suf | --program-su | --program-s)
1350    ac_prev=program_suffix ;;
1351  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1352  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1353    program_suffix=$ac_optarg ;;
1354
1355  -program-transform-name | --program-transform-name \
1356  | --program-transform-nam | --program-transform-na \
1357  | --program-transform-n | --program-transform- \
1358  | --program-transform | --program-transfor \
1359  | --program-transfo | --program-transf \
1360  | --program-trans | --program-tran \
1361  | --progr-tra | --program-tr | --program-t)
1362    ac_prev=program_transform_name ;;
1363  -program-transform-name=* | --program-transform-name=* \
1364  | --program-transform-nam=* | --program-transform-na=* \
1365  | --program-transform-n=* | --program-transform-=* \
1366  | --program-transform=* | --program-transfor=* \
1367  | --program-transfo=* | --program-transf=* \
1368  | --program-trans=* | --program-tran=* \
1369  | --progr-tra=* | --program-tr=* | --program-t=*)
1370    program_transform_name=$ac_optarg ;;
1371
1372  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1373    ac_prev=pdfdir ;;
1374  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1375    pdfdir=$ac_optarg ;;
1376
1377  -psdir | --psdir | --psdi | --psd | --ps)
1378    ac_prev=psdir ;;
1379  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1380    psdir=$ac_optarg ;;
1381
1382  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1383  | -silent | --silent | --silen | --sile | --sil)
1384    silent=yes ;;
1385
1386  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1387    ac_prev=sbindir ;;
1388  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1389  | --sbi=* | --sb=*)
1390    sbindir=$ac_optarg ;;
1391
1392  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1393  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1394  | --sharedst | --shareds | --shared | --share | --shar \
1395  | --sha | --sh)
1396    ac_prev=sharedstatedir ;;
1397  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1398  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1399  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1400  | --sha=* | --sh=*)
1401    sharedstatedir=$ac_optarg ;;
1402
1403  -site | --site | --sit)
1404    ac_prev=site ;;
1405  -site=* | --site=* | --sit=*)
1406    site=$ac_optarg ;;
1407
1408  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1409    ac_prev=srcdir ;;
1410  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1411    srcdir=$ac_optarg ;;
1412
1413  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1414  | --syscon | --sysco | --sysc | --sys | --sy)
1415    ac_prev=sysconfdir ;;
1416  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1417  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1418    sysconfdir=$ac_optarg ;;
1419
1420  -target | --target | --targe | --targ | --tar | --ta | --t)
1421    ac_prev=target_alias ;;
1422  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1423    target_alias=$ac_optarg ;;
1424
1425  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1426    verbose=yes ;;
1427
1428  -version | --version | --versio | --versi | --vers | -V)
1429    ac_init_version=: ;;
1430
1431  -with-* | --with-*)
1432    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1433    # Reject names that are not valid shell variable names.
1434    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1435      as_fn_error $? "invalid package name: $ac_useropt"
1436    ac_useropt_orig=$ac_useropt
1437    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1438    case $ac_user_opts in
1439      *"
1440"with_$ac_useropt"
1441"*) ;;
1442      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1443	 ac_unrecognized_sep=', ';;
1444    esac
1445    eval with_$ac_useropt=\$ac_optarg ;;
1446
1447  -without-* | --without-*)
1448    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1449    # Reject names that are not valid shell variable names.
1450    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1451      as_fn_error $? "invalid package name: $ac_useropt"
1452    ac_useropt_orig=$ac_useropt
1453    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1454    case $ac_user_opts in
1455      *"
1456"with_$ac_useropt"
1457"*) ;;
1458      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1459	 ac_unrecognized_sep=', ';;
1460    esac
1461    eval with_$ac_useropt=no ;;
1462
1463  --x)
1464    # Obsolete; use --with-x.
1465    with_x=yes ;;
1466
1467  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1468  | --x-incl | --x-inc | --x-in | --x-i)
1469    ac_prev=x_includes ;;
1470  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1471  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1472    x_includes=$ac_optarg ;;
1473
1474  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1475  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1476    ac_prev=x_libraries ;;
1477  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1478  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1479    x_libraries=$ac_optarg ;;
1480
1481  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1482Try \`$0 --help' for more information"
1483    ;;
1484
1485  *=*)
1486    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1487    # Reject names that are not valid shell variable names.
1488    case $ac_envvar in #(
1489      '' | [0-9]* | *[!_$as_cr_alnum]* )
1490      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1491    esac
1492    eval $ac_envvar=\$ac_optarg
1493    export $ac_envvar ;;
1494
1495  *)
1496    # FIXME: should be removed in autoconf 3.0.
1497    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1498    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1499      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1500    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1501    ;;
1502
1503  esac
1504done
1505
1506if test -n "$ac_prev"; then
1507  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1508  as_fn_error $? "missing argument to $ac_option"
1509fi
1510
1511if test -n "$ac_unrecognized_opts"; then
1512  case $enable_option_checking in
1513    no) ;;
1514    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1515    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1516  esac
1517fi
1518
1519# Check all directory arguments for consistency.
1520for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1521		datadir sysconfdir sharedstatedir localstatedir includedir \
1522		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1523		libdir localedir mandir
1524do
1525  eval ac_val=\$$ac_var
1526  # Remove trailing slashes.
1527  case $ac_val in
1528    */ )
1529      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1530      eval $ac_var=\$ac_val;;
1531  esac
1532  # Be sure to have absolute directory names.
1533  case $ac_val in
1534    [\\/$]* | ?:[\\/]* )  continue;;
1535    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1536  esac
1537  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1538done
1539
1540# There might be people who depend on the old broken behavior: `$host'
1541# used to hold the argument of --host etc.
1542# FIXME: To remove some day.
1543build=$build_alias
1544host=$host_alias
1545target=$target_alias
1546
1547# FIXME: To remove some day.
1548if test "x$host_alias" != x; then
1549  if test "x$build_alias" = x; then
1550    cross_compiling=maybe
1551  elif test "x$build_alias" != "x$host_alias"; then
1552    cross_compiling=yes
1553  fi
1554fi
1555
1556ac_tool_prefix=
1557test -n "$host_alias" && ac_tool_prefix=$host_alias-
1558
1559test "$silent" = yes && exec 6>/dev/null
1560
1561
1562ac_pwd=`pwd` && test -n "$ac_pwd" &&
1563ac_ls_di=`ls -di .` &&
1564ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1565  as_fn_error $? "working directory cannot be determined"
1566test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1567  as_fn_error $? "pwd does not report name of working directory"
1568
1569
1570# Find the source files, if location was not specified.
1571if test -z "$srcdir"; then
1572  ac_srcdir_defaulted=yes
1573  # Try the directory containing this script, then the parent directory.
1574  ac_confdir=`$as_dirname -- "$as_myself" ||
1575$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1576	 X"$as_myself" : 'X\(//\)[^/]' \| \
1577	 X"$as_myself" : 'X\(//\)$' \| \
1578	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1579$as_echo X"$as_myself" |
1580    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1581	    s//\1/
1582	    q
1583	  }
1584	  /^X\(\/\/\)[^/].*/{
1585	    s//\1/
1586	    q
1587	  }
1588	  /^X\(\/\/\)$/{
1589	    s//\1/
1590	    q
1591	  }
1592	  /^X\(\/\).*/{
1593	    s//\1/
1594	    q
1595	  }
1596	  s/.*/./; q'`
1597  srcdir=$ac_confdir
1598  if test ! -r "$srcdir/$ac_unique_file"; then
1599    srcdir=..
1600  fi
1601else
1602  ac_srcdir_defaulted=no
1603fi
1604if test ! -r "$srcdir/$ac_unique_file"; then
1605  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1606  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1607fi
1608ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1609ac_abs_confdir=`(
1610	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1611	pwd)`
1612# When building in place, set srcdir=.
1613if test "$ac_abs_confdir" = "$ac_pwd"; then
1614  srcdir=.
1615fi
1616# Remove unnecessary trailing slashes from srcdir.
1617# Double slashes in file names in object file debugging info
1618# mess up M-x gdb in Emacs.
1619case $srcdir in
1620*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1621esac
1622for ac_var in $ac_precious_vars; do
1623  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1624  eval ac_env_${ac_var}_value=\$${ac_var}
1625  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1626  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1627done
1628
1629#
1630# Report the --help message.
1631#
1632if test "$ac_init_help" = "long"; then
1633  # Omit some internal or obsolete options to make the list less imposing.
1634  # This message is too long to be a string in the A/UX 3.1 sh.
1635  cat <<_ACEOF
1636\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1637
1638Usage: $0 [OPTION]... [VAR=VALUE]...
1639
1640To assign environment variables (e.g., CC, CFLAGS...), specify them as
1641VAR=VALUE.  See below for descriptions of some of the useful variables.
1642
1643Defaults for the options are specified in brackets.
1644
1645Configuration:
1646  -h, --help              display this help and exit
1647      --help=short        display options specific to this package
1648      --help=recursive    display the short help of all the included packages
1649  -V, --version           display version information and exit
1650  -q, --quiet, --silent   do not print \`checking ...' messages
1651      --cache-file=FILE   cache test results in FILE [disabled]
1652  -C, --config-cache      alias for \`--cache-file=config.cache'
1653  -n, --no-create         do not create output files
1654      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1655
1656Installation directories:
1657  --prefix=PREFIX         install architecture-independent files in PREFIX
1658                          [$ac_default_prefix]
1659  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1660                          [PREFIX]
1661
1662By default, \`make install' will install all the files in
1663\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1664an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1665for instance \`--prefix=\$HOME'.
1666
1667For better control, use the options below.
1668
1669Fine tuning of the installation directories:
1670  --bindir=DIR            user executables [EPREFIX/bin]
1671  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1672  --libexecdir=DIR        program executables [EPREFIX/libexec]
1673  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1674  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1675  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1676  --libdir=DIR            object code libraries [EPREFIX/lib]
1677  --includedir=DIR        C header files [PREFIX/include]
1678  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1679  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1680  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1681  --infodir=DIR           info documentation [DATAROOTDIR/info]
1682  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1683  --mandir=DIR            man documentation [DATAROOTDIR/man]
1684  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1685  --htmldir=DIR           html documentation [DOCDIR]
1686  --dvidir=DIR            dvi documentation [DOCDIR]
1687  --pdfdir=DIR            pdf documentation [DOCDIR]
1688  --psdir=DIR             ps documentation [DOCDIR]
1689_ACEOF
1690
1691  cat <<\_ACEOF
1692
1693X features:
1694  --x-includes=DIR    X include files are in DIR
1695  --x-libraries=DIR   X library files are in DIR
1696
1697System types:
1698  --build=BUILD     configure for building on BUILD [guessed]
1699  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1700  --target=TARGET   configure for building compilers for TARGET [HOST]
1701_ACEOF
1702fi
1703
1704if test -n "$ac_init_help"; then
1705  case $ac_init_help in
1706     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1707   esac
1708  cat <<\_ACEOF
1709
1710Optional Features:
1711  --disable-option-checking  ignore unrecognized --enable/--with options
1712  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1713  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1714  --enable-openjdk-only   suppress building custom source even if present
1715                          [disabled]
1716  --enable-debug          set the debug level to fastdebug (shorthand for
1717                          --with-debug-level=fastdebug) [disabled]
1718  --disable-headful       disable building headful support (graphical UI
1719                          support) [enabled]
1720  --enable-hotspot-test-in-build
1721                          run the Queens test after Hotspot build [disabled]
1722  --enable-unlimited-crypto
1723                          Enable unlimited crypto policy [disabled]
1724  --disable-debug-symbols disable generation of debug symbols [enabled]
1725  --disable-zip-debug-info
1726                          disable zipping of debug-info files [enabled]
1727  --enable-macosx-runtime-support
1728                          Deprecated. Option is kept for backwards
1729                          compatibility and is ignored
1730  --disable-freetype-bundling
1731                          disable bundling of the freetype library with the
1732                          build result [enabled on Windows or when using
1733                          --with-freetype, disabled otherwise]
1734  --enable-sjavac         use sjavac to do fast incremental compiles
1735                          [disabled]
1736  --disable-precompiled-headers
1737                          disable using precompiled headers when compiling C++
1738                          [enabled]
1739  --disable-ccache        disable using ccache to speed up recompilations
1740                          [enabled]
1741
1742Optional Packages:
1743  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1744  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1745  --with-custom-make-dir  use this directory for custom build/make files
1746  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1747                          support it), e.g. --with-target-bits=32 [guessed]
1748  --with-sys-root         pass this sys-root to the compilers and tools (for
1749                          cross-compiling)
1750  --with-tools-dir        search this directory for compilers and tools (for
1751                          cross-compiling)
1752  --with-devkit           use this directory as base for tools-dir and
1753                          sys-root (for cross-compiling)
1754  --with-jdk-variant      JDK variant to build (normal) [normal]
1755  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1756  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1757                          client, minimal1, kernel, zero, zeroshark, core)
1758                          [server]
1759  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1760                          [release]
1761  --with-conf-name        use this as the name of the configuration [generated
1762                          from important configuration options]
1763  --with-builddeps-conf   use this configuration file for the builddeps
1764  --with-builddeps-server download and use build dependencies from this server
1765                          url
1766  --with-builddeps-dir    store downloaded build dependencies here
1767                          [/localhome/builddeps]
1768  --with-builddeps-group  chgrp the downloaded build dependencies to this
1769                          group
1770  --with-cacerts-file     specify alternative cacerts file
1771  --with-milestone        Set milestone value for build [internal]
1772  --with-update-version   Set update version value for build [b00]
1773  --with-user-release-suffix
1774                          Add a custom string to the version string if build
1775                          number isn't set.[username_builddateb00]
1776  --with-build-number     Set build number value for build [b00]
1777  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1778  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1779                          invocations of the Boot JDK, overriding the default
1780                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1781                          -enableassertions"
1782  --with-add-source-root  for each and every source directory, look in this
1783                          additional source root for the same directory; if it
1784                          exists and have files in it, include it in the build
1785  --with-override-source-root
1786                          for each and every source directory, look in this
1787                          override source root for the same directory; if it
1788                          exists, use that directory instead and ignore the
1789                          directory in the original source root
1790  --with-adds-and-overrides
1791                          use the subdirs 'adds' and 'overrides' in the
1792                          specified directory as add-source-root and
1793                          override-source-root
1794  --with-override-langtools
1795                          use this langtools dir for the build
1796  --with-override-corba   use this corba dir for the build
1797  --with-override-jaxp    use this jaxp dir for the build
1798  --with-override-jaxws   use this jaxws dir for the build
1799  --with-override-hotspot use this hotspot dir for the build
1800  --with-override-nashorn use this nashorn dir for the build
1801  --with-override-jdk     use this jdk dir for the build
1802  --with-import-hotspot   import hotspot binaries from this jdk image or
1803                          hotspot build dist dir instead of building from
1804                          source
1805  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1806                          only) [probed]
1807  --with-dxsdk            Deprecated. Option is kept for backwards
1808                          compatibility and is ignored
1809  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1810                          compatibility and is ignored
1811  --with-dxsdk-include    Deprecated. Option is kept for backwards
1812                          compatibility and is ignored
1813  --with-jtreg            Regression Test Harness [probed]
1814  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1815  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1816  --with-extra-ldflags    extra flags to be used when linking jdk
1817  --with-x                use the X Window System
1818  --with-cups             specify prefix directory for the cups package
1819                          (expecting the headers under PATH/include)
1820  --with-cups-include     specify directory for the cups include files
1821  --with-freetype         specify prefix directory for the freetype package
1822                          (expecting the libraries under PATH/lib and the
1823                          headers under PATH/include)
1824  --with-freetype-include specify directory for the freetype include files
1825  --with-freetype-lib     specify directory for the freetype library
1826  --with-alsa             specify prefix directory for the alsa package
1827                          (expecting the libraries under PATH/lib and the
1828                          headers under PATH/include)
1829  --with-alsa-include     specify directory for the alsa include files
1830  --with-alsa-lib         specify directory for the alsa library
1831  --with-giflib           use giflib from build system or OpenJDK source
1832                          (system, bundled) [bundled]
1833  --with-zlib             use zlib from build system or OpenJDK source
1834                          (system, bundled) [bundled]
1835  --with-stdc++lib=<static>,<dynamic>,<default>
1836                          force linking of the C++ runtime on Linux to either
1837                          static or dynamic, default is static with dynamic as
1838                          fallback
1839  --with-num-cores        number of cores in the build system, e.g.
1840                          --with-num-cores=8 [probed]
1841  --with-memory-size      memory (in MB) available in the build system, e.g.
1842                          --with-memory-size=1024 [probed]
1843  --with-jobs             number of parallel jobs to let make run [calculated
1844                          based on cores and memory]
1845  --with-sjavac-server-java
1846                          use this java binary for running the sjavac
1847                          background server [Boot JDK java]
1848  --with-ccache-dir       where to store ccache files [~/.ccache]
1849
1850Some influential environment variables:
1851  PKG_CONFIG  path to pkg-config utility
1852  CC          C compiler command
1853  CFLAGS      C compiler flags
1854  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1855              nonstandard directory <lib dir>
1856  LIBS        libraries to pass to the linker, e.g. -l<library>
1857  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1858              you have headers in a nonstandard directory <include dir>
1859  CXX         C++ compiler command
1860  CXXFLAGS    C++ compiler flags
1861  OBJC        Objective C compiler command
1862  OBJCFLAGS   Objective C compiler flags
1863  CPP         C preprocessor
1864  CXXCPP      C++ preprocessor
1865  XMKMF       Path to xmkmf, Makefile generator for X Window System
1866  FREETYPE_CFLAGS
1867              C compiler flags for FREETYPE, overriding pkg-config
1868  FREETYPE_LIBS
1869              linker flags for FREETYPE, overriding pkg-config
1870  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1871  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1872  LIBFFI_CFLAGS
1873              C compiler flags for LIBFFI, overriding pkg-config
1874  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1875
1876Use these variables to override the choices made by `configure' or to help
1877it to find libraries and programs with nonstandard names/locations.
1878
1879Report bugs to <build-dev@openjdk.java.net>.
1880OpenJDK home page: <http://openjdk.java.net>.
1881_ACEOF
1882ac_status=$?
1883fi
1884
1885if test "$ac_init_help" = "recursive"; then
1886  # If there are subdirs, report their specific --help.
1887  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1888    test -d "$ac_dir" ||
1889      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1890      continue
1891    ac_builddir=.
1892
1893case "$ac_dir" in
1894.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1895*)
1896  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1897  # A ".." for each directory in $ac_dir_suffix.
1898  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1899  case $ac_top_builddir_sub in
1900  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1901  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1902  esac ;;
1903esac
1904ac_abs_top_builddir=$ac_pwd
1905ac_abs_builddir=$ac_pwd$ac_dir_suffix
1906# for backward compatibility:
1907ac_top_builddir=$ac_top_build_prefix
1908
1909case $srcdir in
1910  .)  # We are building in place.
1911    ac_srcdir=.
1912    ac_top_srcdir=$ac_top_builddir_sub
1913    ac_abs_top_srcdir=$ac_pwd ;;
1914  [\\/]* | ?:[\\/]* )  # Absolute name.
1915    ac_srcdir=$srcdir$ac_dir_suffix;
1916    ac_top_srcdir=$srcdir
1917    ac_abs_top_srcdir=$srcdir ;;
1918  *) # Relative name.
1919    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1920    ac_top_srcdir=$ac_top_build_prefix$srcdir
1921    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1922esac
1923ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1924
1925    cd "$ac_dir" || { ac_status=$?; continue; }
1926    # Check for guested configure.
1927    if test -f "$ac_srcdir/configure.gnu"; then
1928      echo &&
1929      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1930    elif test -f "$ac_srcdir/configure"; then
1931      echo &&
1932      $SHELL "$ac_srcdir/configure" --help=recursive
1933    else
1934      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1935    fi || ac_status=$?
1936    cd "$ac_pwd" || { ac_status=$?; break; }
1937  done
1938fi
1939
1940test -n "$ac_init_help" && exit $ac_status
1941if $ac_init_version; then
1942  cat <<\_ACEOF
1943OpenJDK configure jdk8
1944generated by GNU Autoconf 2.69
1945
1946Copyright (C) 2012 Free Software Foundation, Inc.
1947This configure script is free software; the Free Software Foundation
1948gives unlimited permission to copy, distribute and modify it.
1949_ACEOF
1950  exit
1951fi
1952
1953## ------------------------ ##
1954## Autoconf initialization. ##
1955## ------------------------ ##
1956
1957# ac_fn_c_try_compile LINENO
1958# --------------------------
1959# Try to compile conftest.$ac_ext, and return whether this succeeded.
1960ac_fn_c_try_compile ()
1961{
1962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963  rm -f conftest.$ac_objext
1964  if { { ac_try="$ac_compile"
1965case "(($ac_try" in
1966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967  *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971  (eval "$ac_compile") 2>conftest.err
1972  ac_status=$?
1973  if test -s conftest.err; then
1974    grep -v '^ *+' conftest.err >conftest.er1
1975    cat conftest.er1 >&5
1976    mv -f conftest.er1 conftest.err
1977  fi
1978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979  test $ac_status = 0; } && {
1980	 test -z "$ac_c_werror_flag" ||
1981	 test ! -s conftest.err
1982       } && test -s conftest.$ac_objext; then :
1983  ac_retval=0
1984else
1985  $as_echo "$as_me: failed program was:" >&5
1986sed 's/^/| /' conftest.$ac_ext >&5
1987
1988	ac_retval=1
1989fi
1990  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1991  as_fn_set_status $ac_retval
1992
1993} # ac_fn_c_try_compile
1994
1995# ac_fn_cxx_try_compile LINENO
1996# ----------------------------
1997# Try to compile conftest.$ac_ext, and return whether this succeeded.
1998ac_fn_cxx_try_compile ()
1999{
2000  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001  rm -f conftest.$ac_objext
2002  if { { ac_try="$ac_compile"
2003case "(($ac_try" in
2004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2005  *) ac_try_echo=$ac_try;;
2006esac
2007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2008$as_echo "$ac_try_echo"; } >&5
2009  (eval "$ac_compile") 2>conftest.err
2010  ac_status=$?
2011  if test -s conftest.err; then
2012    grep -v '^ *+' conftest.err >conftest.er1
2013    cat conftest.er1 >&5
2014    mv -f conftest.er1 conftest.err
2015  fi
2016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2017  test $ac_status = 0; } && {
2018	 test -z "$ac_cxx_werror_flag" ||
2019	 test ! -s conftest.err
2020       } && test -s conftest.$ac_objext; then :
2021  ac_retval=0
2022else
2023  $as_echo "$as_me: failed program was:" >&5
2024sed 's/^/| /' conftest.$ac_ext >&5
2025
2026	ac_retval=1
2027fi
2028  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029  as_fn_set_status $ac_retval
2030
2031} # ac_fn_cxx_try_compile
2032
2033# ac_fn_objc_try_compile LINENO
2034# -----------------------------
2035# Try to compile conftest.$ac_ext, and return whether this succeeded.
2036ac_fn_objc_try_compile ()
2037{
2038  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039  rm -f conftest.$ac_objext
2040  if { { ac_try="$ac_compile"
2041case "(($ac_try" in
2042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2043  *) ac_try_echo=$ac_try;;
2044esac
2045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2046$as_echo "$ac_try_echo"; } >&5
2047  (eval "$ac_compile") 2>conftest.err
2048  ac_status=$?
2049  if test -s conftest.err; then
2050    grep -v '^ *+' conftest.err >conftest.er1
2051    cat conftest.er1 >&5
2052    mv -f conftest.er1 conftest.err
2053  fi
2054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2055  test $ac_status = 0; } && {
2056	 test -z "$ac_objc_werror_flag" ||
2057	 test ! -s conftest.err
2058       } && test -s conftest.$ac_objext; then :
2059  ac_retval=0
2060else
2061  $as_echo "$as_me: failed program was:" >&5
2062sed 's/^/| /' conftest.$ac_ext >&5
2063
2064	ac_retval=1
2065fi
2066  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067  as_fn_set_status $ac_retval
2068
2069} # ac_fn_objc_try_compile
2070
2071# ac_fn_c_try_cpp LINENO
2072# ----------------------
2073# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2074ac_fn_c_try_cpp ()
2075{
2076  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2077  if { { ac_try="$ac_cpp conftest.$ac_ext"
2078case "(($ac_try" in
2079  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2080  *) ac_try_echo=$ac_try;;
2081esac
2082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2083$as_echo "$ac_try_echo"; } >&5
2084  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2085  ac_status=$?
2086  if test -s conftest.err; then
2087    grep -v '^ *+' conftest.err >conftest.er1
2088    cat conftest.er1 >&5
2089    mv -f conftest.er1 conftest.err
2090  fi
2091  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2092  test $ac_status = 0; } > conftest.i && {
2093	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2094	 test ! -s conftest.err
2095       }; then :
2096  ac_retval=0
2097else
2098  $as_echo "$as_me: failed program was:" >&5
2099sed 's/^/| /' conftest.$ac_ext >&5
2100
2101    ac_retval=1
2102fi
2103  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2104  as_fn_set_status $ac_retval
2105
2106} # ac_fn_c_try_cpp
2107
2108# ac_fn_cxx_try_cpp LINENO
2109# ------------------------
2110# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2111ac_fn_cxx_try_cpp ()
2112{
2113  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114  if { { ac_try="$ac_cpp conftest.$ac_ext"
2115case "(($ac_try" in
2116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2117  *) ac_try_echo=$ac_try;;
2118esac
2119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2120$as_echo "$ac_try_echo"; } >&5
2121  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2122  ac_status=$?
2123  if test -s conftest.err; then
2124    grep -v '^ *+' conftest.err >conftest.er1
2125    cat conftest.er1 >&5
2126    mv -f conftest.er1 conftest.err
2127  fi
2128  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2129  test $ac_status = 0; } > conftest.i && {
2130	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2131	 test ! -s conftest.err
2132       }; then :
2133  ac_retval=0
2134else
2135  $as_echo "$as_me: failed program was:" >&5
2136sed 's/^/| /' conftest.$ac_ext >&5
2137
2138    ac_retval=1
2139fi
2140  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141  as_fn_set_status $ac_retval
2142
2143} # ac_fn_cxx_try_cpp
2144
2145# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2146# ---------------------------------------------------------
2147# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2148# the include files in INCLUDES and setting the cache variable VAR
2149# accordingly.
2150ac_fn_cxx_check_header_mongrel ()
2151{
2152  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153  if eval \${$3+:} false; then :
2154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2155$as_echo_n "checking for $2... " >&6; }
2156if eval \${$3+:} false; then :
2157  $as_echo_n "(cached) " >&6
2158fi
2159eval ac_res=\$$3
2160	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2161$as_echo "$ac_res" >&6; }
2162else
2163  # Is the header compilable?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2165$as_echo_n "checking $2 usability... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168$4
2169#include <$2>
2170_ACEOF
2171if ac_fn_cxx_try_compile "$LINENO"; then :
2172  ac_header_compiler=yes
2173else
2174  ac_header_compiler=no
2175fi
2176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2178$as_echo "$ac_header_compiler" >&6; }
2179
2180# Is the header present?
2181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2182$as_echo_n "checking $2 presence... " >&6; }
2183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h.  */
2185#include <$2>
2186_ACEOF
2187if ac_fn_cxx_try_cpp "$LINENO"; then :
2188  ac_header_preproc=yes
2189else
2190  ac_header_preproc=no
2191fi
2192rm -f conftest.err conftest.i conftest.$ac_ext
2193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2194$as_echo "$ac_header_preproc" >&6; }
2195
2196# So?  What about this header?
2197case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2198  yes:no: )
2199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2200$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2201    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2202$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2203    ;;
2204  no:yes:* )
2205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2206$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2208$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2209    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2210$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2212$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2214$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2215( $as_echo "## ----------------------------------------- ##
2216## Report this to build-dev@openjdk.java.net ##
2217## ----------------------------------------- ##"
2218     ) | sed "s/^/$as_me: WARNING:     /" >&2
2219    ;;
2220esac
2221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2222$as_echo_n "checking for $2... " >&6; }
2223if eval \${$3+:} false; then :
2224  $as_echo_n "(cached) " >&6
2225else
2226  eval "$3=\$ac_header_compiler"
2227fi
2228eval ac_res=\$$3
2229	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
2231fi
2232  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233
2234} # ac_fn_cxx_check_header_mongrel
2235
2236# ac_fn_cxx_try_run LINENO
2237# ------------------------
2238# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2239# that executables *can* be run.
2240ac_fn_cxx_try_run ()
2241{
2242  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243  if { { ac_try="$ac_link"
2244case "(($ac_try" in
2245  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2246  *) ac_try_echo=$ac_try;;
2247esac
2248eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2249$as_echo "$ac_try_echo"; } >&5
2250  (eval "$ac_link") 2>&5
2251  ac_status=$?
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2254  { { case "(($ac_try" in
2255  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2256  *) ac_try_echo=$ac_try;;
2257esac
2258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2259$as_echo "$ac_try_echo"; } >&5
2260  (eval "$ac_try") 2>&5
2261  ac_status=$?
2262  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2263  test $ac_status = 0; }; }; then :
2264  ac_retval=0
2265else
2266  $as_echo "$as_me: program exited with status $ac_status" >&5
2267       $as_echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270       ac_retval=$ac_status
2271fi
2272  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2273  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274  as_fn_set_status $ac_retval
2275
2276} # ac_fn_cxx_try_run
2277
2278# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2279# ---------------------------------------------------------
2280# Tests whether HEADER exists and can be compiled using the include files in
2281# INCLUDES, setting the cache variable VAR accordingly.
2282ac_fn_cxx_check_header_compile ()
2283{
2284  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286$as_echo_n "checking for $2... " >&6; }
2287if eval \${$3+:} false; then :
2288  $as_echo_n "(cached) " >&6
2289else
2290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293#include <$2>
2294_ACEOF
2295if ac_fn_cxx_try_compile "$LINENO"; then :
2296  eval "$3=yes"
2297else
2298  eval "$3=no"
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301fi
2302eval ac_res=\$$3
2303	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306
2307} # ac_fn_cxx_check_header_compile
2308
2309# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2310# ----------------------------------------------
2311# Tries to find the compile-time value of EXPR in a program that includes
2312# INCLUDES, setting VAR accordingly. Returns whether the value could be
2313# computed
2314ac_fn_cxx_compute_int ()
2315{
2316  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317  if test "$cross_compiling" = yes; then
2318    # Depending upon the size, compute the lo and hi bounds.
2319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) >= 0)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_lo=0 ac_mid=0
2335  while :; do
2336    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h.  */
2338$4
2339int
2340main ()
2341{
2342static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2343test_array [0] = 0;
2344return test_array [0];
2345
2346  ;
2347  return 0;
2348}
2349_ACEOF
2350if ac_fn_cxx_try_compile "$LINENO"; then :
2351  ac_hi=$ac_mid; break
2352else
2353  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2354			if test $ac_lo -le $ac_mid; then
2355			  ac_lo= ac_hi=
2356			  break
2357			fi
2358			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361  done
2362else
2363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) < 0)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_hi=-1 ac_mid=-1
2379  while :; do
2380    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h.  */
2382$4
2383int
2384main ()
2385{
2386static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2387test_array [0] = 0;
2388return test_array [0];
2389
2390  ;
2391  return 0;
2392}
2393_ACEOF
2394if ac_fn_cxx_try_compile "$LINENO"; then :
2395  ac_lo=$ac_mid; break
2396else
2397  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2398			if test $ac_mid -le $ac_hi; then
2399			  ac_lo= ac_hi=
2400			  break
2401			fi
2402			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405  done
2406else
2407  ac_lo= ac_hi=
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412# Binary search between lo and hi bounds.
2413while test "x$ac_lo" != "x$ac_hi"; do
2414  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h.  */
2417$4
2418int
2419main ()
2420{
2421static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2422test_array [0] = 0;
2423return test_array [0];
2424
2425  ;
2426  return 0;
2427}
2428_ACEOF
2429if ac_fn_cxx_try_compile "$LINENO"; then :
2430  ac_hi=$ac_mid
2431else
2432  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2433fi
2434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435done
2436case $ac_lo in #((
2437?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2438'') ac_retval=1 ;;
2439esac
2440  else
2441    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442/* end confdefs.h.  */
2443$4
2444static long int longval () { return $2; }
2445static unsigned long int ulongval () { return $2; }
2446#include <stdio.h>
2447#include <stdlib.h>
2448int
2449main ()
2450{
2451
2452  FILE *f = fopen ("conftest.val", "w");
2453  if (! f)
2454    return 1;
2455  if (($2) < 0)
2456    {
2457      long int i = longval ();
2458      if (i != ($2))
2459	return 1;
2460      fprintf (f, "%ld", i);
2461    }
2462  else
2463    {
2464      unsigned long int i = ulongval ();
2465      if (i != ($2))
2466	return 1;
2467      fprintf (f, "%lu", i);
2468    }
2469  /* Do not output a trailing newline, as this causes \r\n confusion
2470     on some platforms.  */
2471  return ferror (f) || fclose (f) != 0;
2472
2473  ;
2474  return 0;
2475}
2476_ACEOF
2477if ac_fn_cxx_try_run "$LINENO"; then :
2478  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2479else
2480  ac_retval=1
2481fi
2482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2483  conftest.$ac_objext conftest.beam conftest.$ac_ext
2484rm -f conftest.val
2485
2486  fi
2487  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488  as_fn_set_status $ac_retval
2489
2490} # ac_fn_cxx_compute_int
2491
2492# ac_fn_cxx_try_link LINENO
2493# -------------------------
2494# Try to link conftest.$ac_ext, and return whether this succeeded.
2495ac_fn_cxx_try_link ()
2496{
2497  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2498  rm -f conftest.$ac_objext conftest$ac_exeext
2499  if { { ac_try="$ac_link"
2500case "(($ac_try" in
2501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502  *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506  (eval "$ac_link") 2>conftest.err
2507  ac_status=$?
2508  if test -s conftest.err; then
2509    grep -v '^ *+' conftest.err >conftest.er1
2510    cat conftest.er1 >&5
2511    mv -f conftest.er1 conftest.err
2512  fi
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; } && {
2515	 test -z "$ac_cxx_werror_flag" ||
2516	 test ! -s conftest.err
2517       } && test -s conftest$ac_exeext && {
2518	 test "$cross_compiling" = yes ||
2519	 test -x conftest$ac_exeext
2520       }; then :
2521  ac_retval=0
2522else
2523  $as_echo "$as_me: failed program was:" >&5
2524sed 's/^/| /' conftest.$ac_ext >&5
2525
2526	ac_retval=1
2527fi
2528  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2529  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2530  # interfere with the next link command; also delete a directory that is
2531  # left behind by Apple's compiler.  We do this before executing the actions.
2532  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2533  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534  as_fn_set_status $ac_retval
2535
2536} # ac_fn_cxx_try_link
2537
2538# ac_fn_cxx_check_func LINENO FUNC VAR
2539# ------------------------------------
2540# Tests whether FUNC exists, setting the cache variable VAR accordingly
2541ac_fn_cxx_check_func ()
2542{
2543  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550/* end confdefs.h.  */
2551/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2552   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2553#define $2 innocuous_$2
2554
2555/* System header to define __stub macros and hopefully few prototypes,
2556    which can conflict with char $2 (); below.
2557    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2558    <limits.h> exists even on freestanding compilers.  */
2559
2560#ifdef __STDC__
2561# include <limits.h>
2562#else
2563# include <assert.h>
2564#endif
2565
2566#undef $2
2567
2568/* Override any GCC internal prototype to avoid an error.
2569   Use char because int might match the return type of a GCC
2570   builtin and then its argument prototype would still apply.  */
2571#ifdef __cplusplus
2572extern "C"
2573#endif
2574char $2 ();
2575/* The GNU C library defines this for functions which it implements
2576    to always fail with ENOSYS.  Some functions are actually named
2577    something starting with __ and the normal name is an alias.  */
2578#if defined __stub_$2 || defined __stub___$2
2579choke me
2580#endif
2581
2582int
2583main ()
2584{
2585return $2 ();
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_link "$LINENO"; then :
2591  eval "$3=yes"
2592else
2593  eval "$3=no"
2594fi
2595rm -f core conftest.err conftest.$ac_objext \
2596    conftest$ac_exeext conftest.$ac_ext
2597fi
2598eval ac_res=\$$3
2599	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600$as_echo "$ac_res" >&6; }
2601  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602
2603} # ac_fn_cxx_check_func
2604
2605# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2606# -------------------------------------------------------
2607# Tests whether HEADER exists and can be compiled using the include files in
2608# INCLUDES, setting the cache variable VAR accordingly.
2609ac_fn_c_check_header_compile ()
2610{
2611  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613$as_echo_n "checking for $2... " >&6; }
2614if eval \${$3+:} false; then :
2615  $as_echo_n "(cached) " >&6
2616else
2617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620#include <$2>
2621_ACEOF
2622if ac_fn_c_try_compile "$LINENO"; then :
2623  eval "$3=yes"
2624else
2625  eval "$3=no"
2626fi
2627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2628fi
2629eval ac_res=\$$3
2630	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2631$as_echo "$ac_res" >&6; }
2632  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2633
2634} # ac_fn_c_check_header_compile
2635cat >config.log <<_ACEOF
2636This file contains any messages produced by compilers while
2637running configure, to aid debugging if configure makes a mistake.
2638
2639It was created by OpenJDK $as_me jdk8, which was
2640generated by GNU Autoconf 2.69.  Invocation command line was
2641
2642  $ $0 $@
2643
2644_ACEOF
2645exec 5>>config.log
2646{
2647cat <<_ASUNAME
2648## --------- ##
2649## Platform. ##
2650## --------- ##
2651
2652hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2653uname -m = `(uname -m) 2>/dev/null || echo unknown`
2654uname -r = `(uname -r) 2>/dev/null || echo unknown`
2655uname -s = `(uname -s) 2>/dev/null || echo unknown`
2656uname -v = `(uname -v) 2>/dev/null || echo unknown`
2657
2658/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2659/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2660
2661/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2662/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2663/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2664/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2665/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2666/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2667/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2668
2669_ASUNAME
2670
2671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2672for as_dir in $PATH
2673do
2674  IFS=$as_save_IFS
2675  test -z "$as_dir" && as_dir=.
2676    $as_echo "PATH: $as_dir"
2677  done
2678IFS=$as_save_IFS
2679
2680} >&5
2681
2682cat >&5 <<_ACEOF
2683
2684
2685## ----------- ##
2686## Core tests. ##
2687## ----------- ##
2688
2689_ACEOF
2690
2691
2692# Keep a trace of the command line.
2693# Strip out --no-create and --no-recursion so they do not pile up.
2694# Strip out --silent because we don't want to record it for future runs.
2695# Also quote any args containing shell meta-characters.
2696# Make two passes to allow for proper duplicate-argument suppression.
2697ac_configure_args=
2698ac_configure_args0=
2699ac_configure_args1=
2700ac_must_keep_next=false
2701for ac_pass in 1 2
2702do
2703  for ac_arg
2704  do
2705    case $ac_arg in
2706    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2707    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2708    | -silent | --silent | --silen | --sile | --sil)
2709      continue ;;
2710    *\'*)
2711      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2712    esac
2713    case $ac_pass in
2714    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2715    2)
2716      as_fn_append ac_configure_args1 " '$ac_arg'"
2717      if test $ac_must_keep_next = true; then
2718	ac_must_keep_next=false # Got value, back to normal.
2719      else
2720	case $ac_arg in
2721	  *=* | --config-cache | -C | -disable-* | --disable-* \
2722	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2723	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2724	  | -with-* | --with-* | -without-* | --without-* | --x)
2725	    case "$ac_configure_args0 " in
2726	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2727	    esac
2728	    ;;
2729	  -* ) ac_must_keep_next=true ;;
2730	esac
2731      fi
2732      as_fn_append ac_configure_args " '$ac_arg'"
2733      ;;
2734    esac
2735  done
2736done
2737{ ac_configure_args0=; unset ac_configure_args0;}
2738{ ac_configure_args1=; unset ac_configure_args1;}
2739
2740# When interrupted or exit'd, cleanup temporary files, and complete
2741# config.log.  We remove comments because anyway the quotes in there
2742# would cause problems or look ugly.
2743# WARNING: Use '\'' to represent an apostrophe within the trap.
2744# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2745trap 'exit_status=$?
2746  # Save into config.log some information that might help in debugging.
2747  {
2748    echo
2749
2750    $as_echo "## ---------------- ##
2751## Cache variables. ##
2752## ---------------- ##"
2753    echo
2754    # The following way of writing the cache mishandles newlines in values,
2755(
2756  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2757    eval ac_val=\$$ac_var
2758    case $ac_val in #(
2759    *${as_nl}*)
2760      case $ac_var in #(
2761      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2762$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2763      esac
2764      case $ac_var in #(
2765      _ | IFS | as_nl) ;; #(
2766      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2767      *) { eval $ac_var=; unset $ac_var;} ;;
2768      esac ;;
2769    esac
2770  done
2771  (set) 2>&1 |
2772    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2773    *${as_nl}ac_space=\ *)
2774      sed -n \
2775	"s/'\''/'\''\\\\'\'''\''/g;
2776	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2777      ;; #(
2778    *)
2779      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2780      ;;
2781    esac |
2782    sort
2783)
2784    echo
2785
2786    $as_echo "## ----------------- ##
2787## Output variables. ##
2788## ----------------- ##"
2789    echo
2790    for ac_var in $ac_subst_vars
2791    do
2792      eval ac_val=\$$ac_var
2793      case $ac_val in
2794      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2795      esac
2796      $as_echo "$ac_var='\''$ac_val'\''"
2797    done | sort
2798    echo
2799
2800    if test -n "$ac_subst_files"; then
2801      $as_echo "## ------------------- ##
2802## File substitutions. ##
2803## ------------------- ##"
2804      echo
2805      for ac_var in $ac_subst_files
2806      do
2807	eval ac_val=\$$ac_var
2808	case $ac_val in
2809	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2810	esac
2811	$as_echo "$ac_var='\''$ac_val'\''"
2812      done | sort
2813      echo
2814    fi
2815
2816    if test -s confdefs.h; then
2817      $as_echo "## ----------- ##
2818## confdefs.h. ##
2819## ----------- ##"
2820      echo
2821      cat confdefs.h
2822      echo
2823    fi
2824    test "$ac_signal" != 0 &&
2825      $as_echo "$as_me: caught signal $ac_signal"
2826    $as_echo "$as_me: exit $exit_status"
2827  } >&5
2828  rm -f core *.core core.conftest.* &&
2829    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2830    exit $exit_status
2831' 0
2832for ac_signal in 1 2 13 15; do
2833  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2834done
2835ac_signal=0
2836
2837# confdefs.h avoids OS command line length limits that DEFS can exceed.
2838rm -f -r conftest* confdefs.h
2839
2840$as_echo "/* confdefs.h */" > confdefs.h
2841
2842# Predefined preprocessor variables.
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_NAME "$PACKAGE_NAME"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2850_ACEOF
2851
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_VERSION "$PACKAGE_VERSION"
2854_ACEOF
2855
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_STRING "$PACKAGE_STRING"
2858_ACEOF
2859
2860cat >>confdefs.h <<_ACEOF
2861#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2862_ACEOF
2863
2864cat >>confdefs.h <<_ACEOF
2865#define PACKAGE_URL "$PACKAGE_URL"
2866_ACEOF
2867
2868
2869# Let the site file select an alternate cache file if it wants to.
2870# Prefer an explicitly selected file to automatically selected ones.
2871ac_site_file1=NONE
2872ac_site_file2=NONE
2873if test -n "$CONFIG_SITE"; then
2874  # We do not want a PATH search for config.site.
2875  case $CONFIG_SITE in #((
2876    -*)  ac_site_file1=./$CONFIG_SITE;;
2877    */*) ac_site_file1=$CONFIG_SITE;;
2878    *)   ac_site_file1=./$CONFIG_SITE;;
2879  esac
2880elif test "x$prefix" != xNONE; then
2881  ac_site_file1=$prefix/share/config.site
2882  ac_site_file2=$prefix/etc/config.site
2883else
2884  ac_site_file1=$ac_default_prefix/share/config.site
2885  ac_site_file2=$ac_default_prefix/etc/config.site
2886fi
2887for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2888do
2889  test "x$ac_site_file" = xNONE && continue
2890  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2891    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2892$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2893    sed 's/^/| /' "$ac_site_file" >&5
2894    . "$ac_site_file" \
2895      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2897as_fn_error $? "failed to load site script $ac_site_file
2898See \`config.log' for more details" "$LINENO" 5; }
2899  fi
2900done
2901
2902if test -r "$cache_file"; then
2903  # Some versions of bash will fail to source /dev/null (special files
2904  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2905  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2906    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2907$as_echo "$as_me: loading cache $cache_file" >&6;}
2908    case $cache_file in
2909      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2910      *)                      . "./$cache_file";;
2911    esac
2912  fi
2913else
2914  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2915$as_echo "$as_me: creating cache $cache_file" >&6;}
2916  >$cache_file
2917fi
2918
2919# Check that the precious variables saved in the cache have kept the same
2920# value.
2921ac_cache_corrupted=false
2922for ac_var in $ac_precious_vars; do
2923  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2924  eval ac_new_set=\$ac_env_${ac_var}_set
2925  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2926  eval ac_new_val=\$ac_env_${ac_var}_value
2927  case $ac_old_set,$ac_new_set in
2928    set,)
2929      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2930$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2931      ac_cache_corrupted=: ;;
2932    ,set)
2933      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2934$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2935      ac_cache_corrupted=: ;;
2936    ,);;
2937    *)
2938      if test "x$ac_old_val" != "x$ac_new_val"; then
2939	# differences in whitespace do not lead to failure.
2940	ac_old_val_w=`echo x $ac_old_val`
2941	ac_new_val_w=`echo x $ac_new_val`
2942	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2943	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2944$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2945	  ac_cache_corrupted=:
2946	else
2947	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2948$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2949	  eval $ac_var=\$ac_old_val
2950	fi
2951	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2952$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2953	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2954$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2955      fi;;
2956  esac
2957  # Pass precious variables to config.status.
2958  if test "$ac_new_set" = set; then
2959    case $ac_new_val in
2960    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2961    *) ac_arg=$ac_var=$ac_new_val ;;
2962    esac
2963    case " $ac_configure_args " in
2964      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2965      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2966    esac
2967  fi
2968done
2969if $ac_cache_corrupted; then
2970  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2972  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2973$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2974  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2975fi
2976## -------------------- ##
2977## Main body of script. ##
2978## -------------------- ##
2979
2980ac_ext=c
2981ac_cpp='$CPP $CPPFLAGS'
2982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2984ac_compiler_gnu=$ac_cv_c_compiler_gnu
2985
2986
2987
2988ac_aux_dir=
2989for ac_dir in build-aux "$srcdir"/build-aux; do
2990  if test -f "$ac_dir/install-sh"; then
2991    ac_aux_dir=$ac_dir
2992    ac_install_sh="$ac_aux_dir/install-sh -c"
2993    break
2994  elif test -f "$ac_dir/install.sh"; then
2995    ac_aux_dir=$ac_dir
2996    ac_install_sh="$ac_aux_dir/install.sh -c"
2997    break
2998  elif test -f "$ac_dir/shtool"; then
2999    ac_aux_dir=$ac_dir
3000    ac_install_sh="$ac_aux_dir/shtool install -c"
3001    break
3002  fi
3003done
3004if test -z "$ac_aux_dir"; then
3005  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3006fi
3007
3008# These three variables are undocumented and unsupported,
3009# and are intended to be withdrawn in a future Autoconf release.
3010# They can cause serious problems if a builder's source tree is in a directory
3011# whose full name contains unusual characters.
3012ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3013ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3014ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3015
3016
3017# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3018
3019#
3020# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3021# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3022#
3023# This code is free software; you can redistribute it and/or modify it
3024# under the terms of the GNU General Public License version 2 only, as
3025# published by the Free Software Foundation.  Oracle designates this
3026# particular file as subject to the "Classpath" exception as provided
3027# by Oracle in the LICENSE file that accompanied this code.
3028#
3029# This code is distributed in the hope that it will be useful, but WITHOUT
3030# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3031# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3032# version 2 for more details (a copy is included in the LICENSE file that
3033# accompanied this code).
3034#
3035# You should have received a copy of the GNU General Public License version
3036# 2 along with this work; if not, write to the Free Software Foundation,
3037# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3038#
3039# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3040# or visit www.oracle.com if you need additional information or have any
3041# questions.
3042#
3043
3044#
3045# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3046#
3047# This program is free software; you can redistribute it and/or modify
3048# it under the terms of the GNU General Public License as published by
3049# the Free Software Foundation; either version 2 of the License, or
3050# (at your option) any later version.
3051#
3052# This program is distributed in the hope that it will be useful, but
3053# WITHOUT ANY WARRANTY; without even the implied warranty of
3054# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3055# General Public License for more details.
3056#
3057# You should have received a copy of the GNU General Public License
3058# along with this program; if not, write to the Free Software
3059# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3060#
3061# As a special exception to the GNU General Public License, if you
3062# distribute this file as part of a program that contains a
3063# configuration script generated by Autoconf, you may include it under
3064# the same distribution terms that you use for the rest of that program.
3065
3066# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3067# ----------------------------------
3068# PKG_PROG_PKG_CONFIG
3069
3070# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3071#
3072# Check to see whether a particular set of modules exists.  Similar
3073# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3074#
3075#
3076# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3077# this or PKG_CHECK_MODULES is called, or make sure to call
3078# PKG_CHECK_EXISTS manually
3079# --------------------------------------------------------------
3080
3081
3082
3083# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3084# ---------------------------------------------
3085# _PKG_CONFIG
3086
3087# _PKG_SHORT_ERRORS_SUPPORTED
3088# -----------------------------
3089# _PKG_SHORT_ERRORS_SUPPORTED
3090
3091
3092# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3093# [ACTION-IF-NOT-FOUND])
3094#
3095#
3096# Note that if there is a possibility the first call to
3097# PKG_CHECK_MODULES might not happen, you should be sure to include an
3098# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3099#
3100#
3101# --------------------------------------------------------------
3102# PKG_CHECK_MODULES
3103
3104
3105# Include these first...
3106#
3107# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3108# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3109#
3110# This code is free software; you can redistribute it and/or modify it
3111# under the terms of the GNU General Public License version 2 only, as
3112# published by the Free Software Foundation.  Oracle designates this
3113# particular file as subject to the "Classpath" exception as provided
3114# by Oracle in the LICENSE file that accompanied this code.
3115#
3116# This code is distributed in the hope that it will be useful, but WITHOUT
3117# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3118# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3119# version 2 for more details (a copy is included in the LICENSE file that
3120# accompanied this code).
3121#
3122# You should have received a copy of the GNU General Public License version
3123# 2 along with this work; if not, write to the Free Software Foundation,
3124# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3125#
3126# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3127# or visit www.oracle.com if you need additional information or have any
3128# questions.
3129#
3130
3131# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3132# If so, then append $1 to $2 \
3133# Also set JVM_ARG_OK to true/false depending on outcome.
3134
3135
3136# Appends a string to a path variable, only adding the : when needed.
3137
3138
3139# This will make sure the given variable points to a full and proper
3140# path. This means:
3141# 1) There will be no spaces in the path. On posix platforms,
3142#    spaces in the path will result in an error. On Windows,
3143#    the path will be rewritten using short-style to be space-free.
3144# 2) The path will be absolute, and it will be in unix-style (on
3145#     cygwin).
3146# $1: The name of the variable to fix
3147
3148
3149# This will make sure the given variable points to a executable
3150# with a full and proper path. This means:
3151# 1) There will be no spaces in the path. On posix platforms,
3152#    spaces in the path will result in an error. On Windows,
3153#    the path will be rewritten using short-style to be space-free.
3154# 2) The path will be absolute, and it will be in unix-style (on
3155#     cygwin).
3156# Any arguments given to the executable is preserved.
3157# If the input variable does not have a directory specification, then
3158# it need to be in the PATH.
3159# $1: The name of the variable to fix
3160
3161
3162
3163
3164# Register a --with argument but mark it as deprecated
3165# $1: The name of the with argument to deprecate, not including --with-
3166
3167
3168# Register a --enable argument but mark it as deprecated
3169# $1: The name of the with argument to deprecate, not including --enable-
3170# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3171
3172
3173
3174
3175# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3176# $1: variable to check
3177# $2: executable name to print in warning (optional)
3178
3179
3180# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3181# Arguments as AC_PATH_PROG:
3182# $1: variable to set
3183# $2: executable name to look for
3184
3185
3186# Setup the most fundamental tools that relies on not much else to set up,
3187# but is used by much of the early bootstrap code.
3188
3189
3190# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3191
3192
3193
3194
3195
3196
3197
3198#%%% Simple tools %%%
3199
3200# Check if we have found a usable version of make
3201# $1: the path to a potential make binary (or empty)
3202# $2: the description on how we found this
3203
3204
3205# Goes looking for a usable version of GNU make.
3206
3207
3208
3209
3210
3211
3212# Check if build directory is on local disk. If not possible to determine,
3213# we prefer to claim it's local.
3214# Argument 1: directory to test
3215# Argument 2: what to do if it is on local disk
3216# Argument 3: what to do otherwise (remote disk or failure)
3217
3218
3219# Check that source files have basic read permissions set. This might
3220# not be the case in cygwin in certain conditions.
3221
3222
3223
3224
3225#
3226# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3228#
3229# This code is free software; you can redistribute it and/or modify it
3230# under the terms of the GNU General Public License version 2 only, as
3231# published by the Free Software Foundation.  Oracle designates this
3232# particular file as subject to the "Classpath" exception as provided
3233# by Oracle in the LICENSE file that accompanied this code.
3234#
3235# This code is distributed in the hope that it will be useful, but WITHOUT
3236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3238# version 2 for more details (a copy is included in the LICENSE file that
3239# accompanied this code).
3240#
3241# You should have received a copy of the GNU General Public License version
3242# 2 along with this work; if not, write to the Free Software Foundation,
3243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3244#
3245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3246# or visit www.oracle.com if you need additional information or have any
3247# questions.
3248#
3249
3250
3251
3252
3253
3254# Helper function which possibly converts a path using DOS-style short mode.
3255# If so, the updated path is stored in $new_path.
3256# $1: The path to check
3257
3258
3259# Helper function which possibly converts a path using DOS-style short mode.
3260# If so, the updated path is stored in $new_path.
3261# $1: The path to check
3262
3263
3264# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3265# and could probably be heavily simplified. However, all changes in this
3266# area tend to need lot of testing in different scenarios, and in lack of
3267# proper unit testing, cleaning this up has not been deemed worth the effort
3268# at the moment.
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3279
3280
3281
3282
3283#
3284# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3285# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3286#
3287# This code is free software; you can redistribute it and/or modify it
3288# under the terms of the GNU General Public License version 2 only, as
3289# published by the Free Software Foundation.  Oracle designates this
3290# particular file as subject to the "Classpath" exception as provided
3291# by Oracle in the LICENSE file that accompanied this code.
3292#
3293# This code is distributed in the hope that it will be useful, but WITHOUT
3294# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3295# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3296# version 2 for more details (a copy is included in the LICENSE file that
3297# accompanied this code).
3298#
3299# You should have received a copy of the GNU General Public License version
3300# 2 along with this work; if not, write to the Free Software Foundation,
3301# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3302#
3303# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3304# or visit www.oracle.com if you need additional information or have any
3305# questions.
3306#
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318# ... then the rest
3319#
3320# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3321# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3322#
3323# This code is free software; you can redistribute it and/or modify it
3324# under the terms of the GNU General Public License version 2 only, as
3325# published by the Free Software Foundation.  Oracle designates this
3326# particular file as subject to the "Classpath" exception as provided
3327# by Oracle in the LICENSE file that accompanied this code.
3328#
3329# This code is distributed in the hope that it will be useful, but WITHOUT
3330# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3331# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3332# version 2 for more details (a copy is included in the LICENSE file that
3333# accompanied this code).
3334#
3335# You should have received a copy of the GNU General Public License version
3336# 2 along with this work; if not, write to the Free Software Foundation,
3337# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3338#
3339# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3340# or visit www.oracle.com if you need additional information or have any
3341# questions.
3342#
3343
3344# Execute the check given as argument, and verify the result
3345# If the Boot JDK was previously found, do nothing
3346# $1 A command line (typically autoconf macro) to execute
3347
3348
3349# Test: Is bootjdk explicitely set by command line arguments?
3350
3351
3352# Test: Is bootjdk available from builddeps?
3353
3354
3355# Test: Is $JAVA_HOME set?
3356
3357
3358# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3359
3360
3361# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3362
3363
3364# Look for a jdk in the given path. If there are multiple, try to select the newest.
3365# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3366# $1 = Path to directory containing jdk installations.
3367# $2 = String to append to the found JDK directory to get the proper JDK home
3368
3369
3370# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3371# environmental variable as base for where to look.
3372# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3373
3374
3375# Test: Is there a JDK installed in default, well-known locations?
3376
3377
3378# Check that a command-line tool in the Boot JDK is correct
3379# $1 = name of variable to assign
3380# $2 = name of binary
3381
3382
3383###############################################################################
3384#
3385# We need a Boot JDK to bootstrap the build.
3386#
3387
3388
3389
3390
3391
3392#
3393# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3394# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3395#
3396# This code is free software; you can redistribute it and/or modify it
3397# under the terms of the GNU General Public License version 2 only, as
3398# published by the Free Software Foundation.  Oracle designates this
3399# particular file as subject to the "Classpath" exception as provided
3400# by Oracle in the LICENSE file that accompanied this code.
3401#
3402# This code is distributed in the hope that it will be useful, but WITHOUT
3403# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3404# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3405# version 2 for more details (a copy is included in the LICENSE file that
3406# accompanied this code).
3407#
3408# You should have received a copy of the GNU General Public License version
3409# 2 along with this work; if not, write to the Free Software Foundation,
3410# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3411#
3412# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3413# or visit www.oracle.com if you need additional information or have any
3414# questions.
3415#
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436#
3437# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3438# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3439#
3440# This code is free software; you can redistribute it and/or modify it
3441# under the terms of the GNU General Public License version 2 only, as
3442# published by the Free Software Foundation.  Oracle designates this
3443# particular file as subject to the "Classpath" exception as provided
3444# by Oracle in the LICENSE file that accompanied this code.
3445#
3446# This code is distributed in the hope that it will be useful, but WITHOUT
3447# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3448# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3449# version 2 for more details (a copy is included in the LICENSE file that
3450# accompanied this code).
3451#
3452# You should have received a copy of the GNU General Public License version
3453# 2 along with this work; if not, write to the Free Software Foundation,
3454# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3455#
3456# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3457# or visit www.oracle.com if you need additional information or have any
3458# questions.
3459#
3460
3461
3462
3463
3464
3465cygwin_help() {
3466  case $1 in
3467    unzip)
3468      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3469      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3470      ;;
3471    zip)
3472      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3473      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3474      ;;
3475    make)
3476      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3478      ;;
3479    freetype)
3480      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3481        HELP_MSG="To install freetype, run:
3482wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3483chmod +x /tmp/freetype-setup.exe
3484/tmp/freetype-setup.exe
3485Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3486After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3487      else
3488        HELP_MSG="You need to build a 64-bit version of freetype.
3489This is not readily available.
3490You can find source code and build instructions on
3491http://www.freetype.org/
3492If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3493      fi
3494      ;;
3495  esac
3496}
3497
3498msys_help() {
3499  PKGHANDLER_COMMAND=""
3500}
3501
3502apt_help() {
3503  case $1 in
3504    devkit)
3505      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3506    openjdk)
3507      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3508    alsa)
3509      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3510    cups)
3511      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3512    freetype)
3513      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3514    pulse)
3515      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3516    x11)
3517      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3518    ccache)
3519      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3520  esac
3521}
3522
3523yum_help() {
3524  case $1 in
3525    devkit)
3526      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3527    openjdk)
3528      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3529    alsa)
3530      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3531    cups)
3532      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3533    freetype)
3534      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3535    pulse)
3536      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3537    x11)
3538      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3539    ccache)
3540      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3541  esac
3542}
3543
3544port_help() {
3545  PKGHANDLER_COMMAND=""
3546}
3547
3548pkgutil_help() {
3549  PKGHANDLER_COMMAND=""
3550}
3551
3552pkgadd_help() {
3553  PKGHANDLER_COMMAND=""
3554}
3555
3556
3557
3558#
3559# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3560# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561#
3562# This code is free software; you can redistribute it and/or modify it
3563# under the terms of the GNU General Public License version 2 only, as
3564# published by the Free Software Foundation.  Oracle designates this
3565# particular file as subject to the "Classpath" exception as provided
3566# by Oracle in the LICENSE file that accompanied this code.
3567#
3568# This code is distributed in the hope that it will be useful, but WITHOUT
3569# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571# version 2 for more details (a copy is included in the LICENSE file that
3572# accompanied this code).
3573#
3574# You should have received a copy of the GNU General Public License version
3575# 2 along with this work; if not, write to the Free Software Foundation,
3576# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577#
3578# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579# or visit www.oracle.com if you need additional information or have any
3580# questions.
3581#
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592###############################################################################
3593#
3594# Should we build only OpenJDK even if closed sources are present?
3595#
3596
3597
3598
3599
3600###############################################################################
3601#
3602# Setup version numbers
3603#
3604
3605
3606
3607
3608
3609
3610# Support for customization of the build process. Some build files
3611# will include counterparts from this location, if they exist. This allows
3612# for a degree of customization of the build targets and the rules/recipes
3613# to create them
3614
3615# Check whether --with-custom-make-dir was given.
3616if test "${with_custom_make_dir+set}" = set; then :
3617  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3618fi
3619
3620
3621
3622#
3623# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3625#
3626# This code is free software; you can redistribute it and/or modify it
3627# under the terms of the GNU General Public License version 2 only, as
3628# published by the Free Software Foundation.  Oracle designates this
3629# particular file as subject to the "Classpath" exception as provided
3630# by Oracle in the LICENSE file that accompanied this code.
3631#
3632# This code is distributed in the hope that it will be useful, but WITHOUT
3633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3635# version 2 for more details (a copy is included in the LICENSE file that
3636# accompanied this code).
3637#
3638# You should have received a copy of the GNU General Public License version
3639# 2 along with this work; if not, write to the Free Software Foundation,
3640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3641#
3642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3643# or visit www.oracle.com if you need additional information or have any
3644# questions.
3645#
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663#
3664# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3665# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3666#
3667# This code is free software; you can redistribute it and/or modify it
3668# under the terms of the GNU General Public License version 2 only, as
3669# published by the Free Software Foundation.  Oracle designates this
3670# particular file as subject to the "Classpath" exception as provided
3671# by Oracle in the LICENSE file that accompanied this code.
3672#
3673# This code is distributed in the hope that it will be useful, but WITHOUT
3674# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3675# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3676# version 2 for more details (a copy is included in the LICENSE file that
3677# accompanied this code).
3678#
3679# You should have received a copy of the GNU General Public License version
3680# 2 along with this work; if not, write to the Free Software Foundation,
3681# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3682#
3683# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3684# or visit www.oracle.com if you need additional information or have any
3685# questions.
3686#
3687
3688# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3689# Converts autoconf style CPU name to OpenJDK style, into
3690# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3691
3692
3693# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3694# Converts autoconf style OS name to OpenJDK style, into
3695# VAR_OS and VAR_OS_API.
3696
3697
3698# Expects $host_os $host_cpu $build_os and $build_cpu
3699# and $with_target_bits to have been setup!
3700#
3701# Translate the standard triplet(quadruplet) definition
3702# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3703# OPENJDK_BUILD_OS, etc.
3704
3705
3706# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3707# accordingly. Must be done after setting up build and target system, but before
3708# doing anything else with these values.
3709
3710
3711# Setup the legacy variables, for controlling the old makefiles.
3712#
3713
3714
3715
3716
3717#%%% Build and target systems %%%
3718
3719
3720
3721
3722# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3723# Add -mX to various FLAGS variables.
3724
3725
3726
3727
3728
3729
3730#
3731# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759
3760
3761
3762#
3763# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787# $1 = compiler to test (CC or CXX)
3788# $2 = human readable name of compiler (C or C++)
3789
3790
3791
3792
3793
3794# $1 = compiler to test (CC or CXX)
3795# $2 = human readable name of compiler (C or C++)
3796# $3 = list of compiler names to search for
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3811#                                   [RUN-IF-FALSE])
3812# ------------------------------------------------------------
3813# Check that the c and c++ compilers support an argument
3814
3815
3816
3817
3818# Setup the JTREG paths
3819
3820
3821#
3822# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824#
3825# This code is free software; you can redistribute it and/or modify it
3826# under the terms of the GNU General Public License version 2 only, as
3827# published by the Free Software Foundation.  Oracle designates this
3828# particular file as subject to the "Classpath" exception as provided
3829# by Oracle in the LICENSE file that accompanied this code.
3830#
3831# This code is distributed in the hope that it will be useful, but WITHOUT
3832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834# version 2 for more details (a copy is included in the LICENSE file that
3835# accompanied this code).
3836#
3837# You should have received a copy of the GNU General Public License version
3838# 2 along with this work; if not, write to the Free Software Foundation,
3839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840#
3841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842# or visit www.oracle.com if you need additional information or have any
3843# questions.
3844#
3845
3846
3847
3848
3849
3850
3851
3852# Check if the VS env variables were setup prior to running configure.
3853# If not, then find vcvarsall.bat and run it automatically, and integrate
3854# the set env variables into the spec file.
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865# This line needs to be here, verbatim, after all includes and the dummy hook
3866# definitions. It is replaced with custom functionality when building
3867# custom sources.
3868#CUSTOM_AUTOCONF_INCLUDE
3869
3870# Do not change or remove the following line, it is needed for consistency checks:
3871DATE_WHEN_GENERATED=1390947033
3872
3873###############################################################################
3874#
3875# Initialization / Boot-strapping
3876#
3877# The bootstrapping process needs to solve the "chicken or the egg" problem,
3878# thus it jumps back and forth, each time gaining something needed later on.
3879#
3880###############################################################################
3881
3882# Basic initialization that must happen first of all
3883
3884  # Save the original command line. This is passed to us by the wrapper configure script.
3885
3886  DATE_WHEN_CONFIGURED=`LANG=C date`
3887
3888  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3889$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3890  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3891$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3892
3893
3894
3895  # Start with tools that do not need have cross compilation support
3896  # and can be expected to be found in the default PATH. These tools are
3897  # used by configure. Nor are these tools expected to be found in the
3898  # devkit from the builddeps server either, since they are
3899  # needed to download the devkit.
3900
3901  # First are all the simple required tools.
3902
3903  for ac_prog in basename
3904do
3905  # Extract the first word of "$ac_prog", so it can be a program name with args.
3906set dummy $ac_prog; ac_word=$2
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908$as_echo_n "checking for $ac_word... " >&6; }
3909if ${ac_cv_path_BASENAME+:} false; then :
3910  $as_echo_n "(cached) " >&6
3911else
3912  case $BASENAME in
3913  [\\/]* | ?:[\\/]*)
3914  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3915  ;;
3916  *)
3917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3918for as_dir in $PATH
3919do
3920  IFS=$as_save_IFS
3921  test -z "$as_dir" && as_dir=.
3922    for ac_exec_ext in '' $ac_executable_extensions; do
3923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3924    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3926    break 2
3927  fi
3928done
3929  done
3930IFS=$as_save_IFS
3931
3932  ;;
3933esac
3934fi
3935BASENAME=$ac_cv_path_BASENAME
3936if test -n "$BASENAME"; then
3937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3938$as_echo "$BASENAME" >&6; }
3939else
3940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941$as_echo "no" >&6; }
3942fi
3943
3944
3945  test -n "$BASENAME" && break
3946done
3947
3948
3949  if test "x$BASENAME" = x; then
3950    if test "xbasename" = x; then
3951      PROG_NAME=basename
3952    else
3953      PROG_NAME=basename
3954    fi
3955    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3956$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3957    as_fn_error $? "Cannot continue" "$LINENO" 5
3958  fi
3959
3960
3961
3962  for ac_prog in bash
3963do
3964  # Extract the first word of "$ac_prog", so it can be a program name with args.
3965set dummy $ac_prog; ac_word=$2
3966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967$as_echo_n "checking for $ac_word... " >&6; }
3968if ${ac_cv_path_BASH+:} false; then :
3969  $as_echo_n "(cached) " >&6
3970else
3971  case $BASH in
3972  [\\/]* | ?:[\\/]*)
3973  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3974  ;;
3975  *)
3976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3977for as_dir in $PATH
3978do
3979  IFS=$as_save_IFS
3980  test -z "$as_dir" && as_dir=.
3981    for ac_exec_ext in '' $ac_executable_extensions; do
3982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3983    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3985    break 2
3986  fi
3987done
3988  done
3989IFS=$as_save_IFS
3990
3991  ;;
3992esac
3993fi
3994BASH=$ac_cv_path_BASH
3995if test -n "$BASH"; then
3996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3997$as_echo "$BASH" >&6; }
3998else
3999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000$as_echo "no" >&6; }
4001fi
4002
4003
4004  test -n "$BASH" && break
4005done
4006
4007
4008  if test "x$BASH" = x; then
4009    if test "xbash" = x; then
4010      PROG_NAME=bash
4011    else
4012      PROG_NAME=bash
4013    fi
4014    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4015$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4016    as_fn_error $? "Cannot continue" "$LINENO" 5
4017  fi
4018
4019
4020
4021  for ac_prog in cat
4022do
4023  # Extract the first word of "$ac_prog", so it can be a program name with args.
4024set dummy $ac_prog; ac_word=$2
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026$as_echo_n "checking for $ac_word... " >&6; }
4027if ${ac_cv_path_CAT+:} false; then :
4028  $as_echo_n "(cached) " >&6
4029else
4030  case $CAT in
4031  [\\/]* | ?:[\\/]*)
4032  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4033  ;;
4034  *)
4035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4036for as_dir in $PATH
4037do
4038  IFS=$as_save_IFS
4039  test -z "$as_dir" && as_dir=.
4040    for ac_exec_ext in '' $ac_executable_extensions; do
4041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4042    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4044    break 2
4045  fi
4046done
4047  done
4048IFS=$as_save_IFS
4049
4050  ;;
4051esac
4052fi
4053CAT=$ac_cv_path_CAT
4054if test -n "$CAT"; then
4055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4056$as_echo "$CAT" >&6; }
4057else
4058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059$as_echo "no" >&6; }
4060fi
4061
4062
4063  test -n "$CAT" && break
4064done
4065
4066
4067  if test "x$CAT" = x; then
4068    if test "xcat" = x; then
4069      PROG_NAME=cat
4070    else
4071      PROG_NAME=cat
4072    fi
4073    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4075    as_fn_error $? "Cannot continue" "$LINENO" 5
4076  fi
4077
4078
4079
4080  for ac_prog in chmod
4081do
4082  # Extract the first word of "$ac_prog", so it can be a program name with args.
4083set dummy $ac_prog; ac_word=$2
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4085$as_echo_n "checking for $ac_word... " >&6; }
4086if ${ac_cv_path_CHMOD+:} false; then :
4087  $as_echo_n "(cached) " >&6
4088else
4089  case $CHMOD in
4090  [\\/]* | ?:[\\/]*)
4091  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4092  ;;
4093  *)
4094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4095for as_dir in $PATH
4096do
4097  IFS=$as_save_IFS
4098  test -z "$as_dir" && as_dir=.
4099    for ac_exec_ext in '' $ac_executable_extensions; do
4100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4101    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4103    break 2
4104  fi
4105done
4106  done
4107IFS=$as_save_IFS
4108
4109  ;;
4110esac
4111fi
4112CHMOD=$ac_cv_path_CHMOD
4113if test -n "$CHMOD"; then
4114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4115$as_echo "$CHMOD" >&6; }
4116else
4117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4118$as_echo "no" >&6; }
4119fi
4120
4121
4122  test -n "$CHMOD" && break
4123done
4124
4125
4126  if test "x$CHMOD" = x; then
4127    if test "xchmod" = x; then
4128      PROG_NAME=chmod
4129    else
4130      PROG_NAME=chmod
4131    fi
4132    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4134    as_fn_error $? "Cannot continue" "$LINENO" 5
4135  fi
4136
4137
4138
4139  for ac_prog in cmp
4140do
4141  # Extract the first word of "$ac_prog", so it can be a program name with args.
4142set dummy $ac_prog; ac_word=$2
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144$as_echo_n "checking for $ac_word... " >&6; }
4145if ${ac_cv_path_CMP+:} false; then :
4146  $as_echo_n "(cached) " >&6
4147else
4148  case $CMP in
4149  [\\/]* | ?:[\\/]*)
4150  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4151  ;;
4152  *)
4153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154for as_dir in $PATH
4155do
4156  IFS=$as_save_IFS
4157  test -z "$as_dir" && as_dir=.
4158    for ac_exec_ext in '' $ac_executable_extensions; do
4159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4160    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4162    break 2
4163  fi
4164done
4165  done
4166IFS=$as_save_IFS
4167
4168  ;;
4169esac
4170fi
4171CMP=$ac_cv_path_CMP
4172if test -n "$CMP"; then
4173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4174$as_echo "$CMP" >&6; }
4175else
4176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4177$as_echo "no" >&6; }
4178fi
4179
4180
4181  test -n "$CMP" && break
4182done
4183
4184
4185  if test "x$CMP" = x; then
4186    if test "xcmp" = x; then
4187      PROG_NAME=cmp
4188    else
4189      PROG_NAME=cmp
4190    fi
4191    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4193    as_fn_error $? "Cannot continue" "$LINENO" 5
4194  fi
4195
4196
4197
4198  for ac_prog in comm
4199do
4200  # Extract the first word of "$ac_prog", so it can be a program name with args.
4201set dummy $ac_prog; ac_word=$2
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4203$as_echo_n "checking for $ac_word... " >&6; }
4204if ${ac_cv_path_COMM+:} false; then :
4205  $as_echo_n "(cached) " >&6
4206else
4207  case $COMM in
4208  [\\/]* | ?:[\\/]*)
4209  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4210  ;;
4211  *)
4212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215  IFS=$as_save_IFS
4216  test -z "$as_dir" && as_dir=.
4217    for ac_exec_ext in '' $ac_executable_extensions; do
4218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4219    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4221    break 2
4222  fi
4223done
4224  done
4225IFS=$as_save_IFS
4226
4227  ;;
4228esac
4229fi
4230COMM=$ac_cv_path_COMM
4231if test -n "$COMM"; then
4232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4233$as_echo "$COMM" >&6; }
4234else
4235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4236$as_echo "no" >&6; }
4237fi
4238
4239
4240  test -n "$COMM" && break
4241done
4242
4243
4244  if test "x$COMM" = x; then
4245    if test "xcomm" = x; then
4246      PROG_NAME=comm
4247    else
4248      PROG_NAME=comm
4249    fi
4250    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4251$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4252    as_fn_error $? "Cannot continue" "$LINENO" 5
4253  fi
4254
4255
4256
4257  for ac_prog in cp
4258do
4259  # Extract the first word of "$ac_prog", so it can be a program name with args.
4260set dummy $ac_prog; ac_word=$2
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4262$as_echo_n "checking for $ac_word... " >&6; }
4263if ${ac_cv_path_CP+:} false; then :
4264  $as_echo_n "(cached) " >&6
4265else
4266  case $CP in
4267  [\\/]* | ?:[\\/]*)
4268  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4269  ;;
4270  *)
4271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274  IFS=$as_save_IFS
4275  test -z "$as_dir" && as_dir=.
4276    for ac_exec_ext in '' $ac_executable_extensions; do
4277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4278    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4280    break 2
4281  fi
4282done
4283  done
4284IFS=$as_save_IFS
4285
4286  ;;
4287esac
4288fi
4289CP=$ac_cv_path_CP
4290if test -n "$CP"; then
4291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4292$as_echo "$CP" >&6; }
4293else
4294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4295$as_echo "no" >&6; }
4296fi
4297
4298
4299  test -n "$CP" && break
4300done
4301
4302
4303  if test "x$CP" = x; then
4304    if test "xcp" = x; then
4305      PROG_NAME=cp
4306    else
4307      PROG_NAME=cp
4308    fi
4309    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4311    as_fn_error $? "Cannot continue" "$LINENO" 5
4312  fi
4313
4314
4315
4316  for ac_prog in cpio
4317do
4318  # Extract the first word of "$ac_prog", so it can be a program name with args.
4319set dummy $ac_prog; ac_word=$2
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4321$as_echo_n "checking for $ac_word... " >&6; }
4322if ${ac_cv_path_CPIO+:} false; then :
4323  $as_echo_n "(cached) " >&6
4324else
4325  case $CPIO in
4326  [\\/]* | ?:[\\/]*)
4327  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4328  ;;
4329  *)
4330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4331for as_dir in $PATH
4332do
4333  IFS=$as_save_IFS
4334  test -z "$as_dir" && as_dir=.
4335    for ac_exec_ext in '' $ac_executable_extensions; do
4336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4337    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4339    break 2
4340  fi
4341done
4342  done
4343IFS=$as_save_IFS
4344
4345  ;;
4346esac
4347fi
4348CPIO=$ac_cv_path_CPIO
4349if test -n "$CPIO"; then
4350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4351$as_echo "$CPIO" >&6; }
4352else
4353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4354$as_echo "no" >&6; }
4355fi
4356
4357
4358  test -n "$CPIO" && break
4359done
4360
4361
4362  if test "x$CPIO" = x; then
4363    if test "xcpio" = x; then
4364      PROG_NAME=cpio
4365    else
4366      PROG_NAME=cpio
4367    fi
4368    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4369$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4370    as_fn_error $? "Cannot continue" "$LINENO" 5
4371  fi
4372
4373
4374
4375  for ac_prog in cut
4376do
4377  # Extract the first word of "$ac_prog", so it can be a program name with args.
4378set dummy $ac_prog; ac_word=$2
4379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4380$as_echo_n "checking for $ac_word... " >&6; }
4381if ${ac_cv_path_CUT+:} false; then :
4382  $as_echo_n "(cached) " >&6
4383else
4384  case $CUT in
4385  [\\/]* | ?:[\\/]*)
4386  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4387  ;;
4388  *)
4389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH
4391do
4392  IFS=$as_save_IFS
4393  test -z "$as_dir" && as_dir=.
4394    for ac_exec_ext in '' $ac_executable_extensions; do
4395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4396    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4398    break 2
4399  fi
4400done
4401  done
4402IFS=$as_save_IFS
4403
4404  ;;
4405esac
4406fi
4407CUT=$ac_cv_path_CUT
4408if test -n "$CUT"; then
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4410$as_echo "$CUT" >&6; }
4411else
4412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4413$as_echo "no" >&6; }
4414fi
4415
4416
4417  test -n "$CUT" && break
4418done
4419
4420
4421  if test "x$CUT" = x; then
4422    if test "xcut" = x; then
4423      PROG_NAME=cut
4424    else
4425      PROG_NAME=cut
4426    fi
4427    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4428$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4429    as_fn_error $? "Cannot continue" "$LINENO" 5
4430  fi
4431
4432
4433
4434  for ac_prog in date
4435do
4436  # Extract the first word of "$ac_prog", so it can be a program name with args.
4437set dummy $ac_prog; ac_word=$2
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439$as_echo_n "checking for $ac_word... " >&6; }
4440if ${ac_cv_path_DATE+:} false; then :
4441  $as_echo_n "(cached) " >&6
4442else
4443  case $DATE in
4444  [\\/]* | ?:[\\/]*)
4445  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4446  ;;
4447  *)
4448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449for as_dir in $PATH
4450do
4451  IFS=$as_save_IFS
4452  test -z "$as_dir" && as_dir=.
4453    for ac_exec_ext in '' $ac_executable_extensions; do
4454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4455    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4457    break 2
4458  fi
4459done
4460  done
4461IFS=$as_save_IFS
4462
4463  ;;
4464esac
4465fi
4466DATE=$ac_cv_path_DATE
4467if test -n "$DATE"; then
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4469$as_echo "$DATE" >&6; }
4470else
4471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4472$as_echo "no" >&6; }
4473fi
4474
4475
4476  test -n "$DATE" && break
4477done
4478
4479
4480  if test "x$DATE" = x; then
4481    if test "xdate" = x; then
4482      PROG_NAME=date
4483    else
4484      PROG_NAME=date
4485    fi
4486    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4487$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4488    as_fn_error $? "Cannot continue" "$LINENO" 5
4489  fi
4490
4491
4492
4493  for ac_prog in gdiff diff
4494do
4495  # Extract the first word of "$ac_prog", so it can be a program name with args.
4496set dummy $ac_prog; ac_word=$2
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498$as_echo_n "checking for $ac_word... " >&6; }
4499if ${ac_cv_path_DIFF+:} false; then :
4500  $as_echo_n "(cached) " >&6
4501else
4502  case $DIFF in
4503  [\\/]* | ?:[\\/]*)
4504  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4505  ;;
4506  *)
4507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH
4509do
4510  IFS=$as_save_IFS
4511  test -z "$as_dir" && as_dir=.
4512    for ac_exec_ext in '' $ac_executable_extensions; do
4513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4514    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4516    break 2
4517  fi
4518done
4519  done
4520IFS=$as_save_IFS
4521
4522  ;;
4523esac
4524fi
4525DIFF=$ac_cv_path_DIFF
4526if test -n "$DIFF"; then
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4528$as_echo "$DIFF" >&6; }
4529else
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4531$as_echo "no" >&6; }
4532fi
4533
4534
4535  test -n "$DIFF" && break
4536done
4537
4538
4539  if test "x$DIFF" = x; then
4540    if test "xgdiff diff" = x; then
4541      PROG_NAME=diff
4542    else
4543      PROG_NAME=gdiff diff
4544    fi
4545    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4546$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4547    as_fn_error $? "Cannot continue" "$LINENO" 5
4548  fi
4549
4550
4551
4552  for ac_prog in dirname
4553do
4554  # Extract the first word of "$ac_prog", so it can be a program name with args.
4555set dummy $ac_prog; ac_word=$2
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557$as_echo_n "checking for $ac_word... " >&6; }
4558if ${ac_cv_path_DIRNAME+:} false; then :
4559  $as_echo_n "(cached) " >&6
4560else
4561  case $DIRNAME in
4562  [\\/]* | ?:[\\/]*)
4563  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4564  ;;
4565  *)
4566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in $PATH
4568do
4569  IFS=$as_save_IFS
4570  test -z "$as_dir" && as_dir=.
4571    for ac_exec_ext in '' $ac_executable_extensions; do
4572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4573    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575    break 2
4576  fi
4577done
4578  done
4579IFS=$as_save_IFS
4580
4581  ;;
4582esac
4583fi
4584DIRNAME=$ac_cv_path_DIRNAME
4585if test -n "$DIRNAME"; then
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4587$as_echo "$DIRNAME" >&6; }
4588else
4589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590$as_echo "no" >&6; }
4591fi
4592
4593
4594  test -n "$DIRNAME" && break
4595done
4596
4597
4598  if test "x$DIRNAME" = x; then
4599    if test "xdirname" = x; then
4600      PROG_NAME=dirname
4601    else
4602      PROG_NAME=dirname
4603    fi
4604    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4605$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4606    as_fn_error $? "Cannot continue" "$LINENO" 5
4607  fi
4608
4609
4610
4611  for ac_prog in echo
4612do
4613  # Extract the first word of "$ac_prog", so it can be a program name with args.
4614set dummy $ac_prog; ac_word=$2
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
4617if ${ac_cv_path_ECHO+:} false; then :
4618  $as_echo_n "(cached) " >&6
4619else
4620  case $ECHO in
4621  [\\/]* | ?:[\\/]*)
4622  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4623  ;;
4624  *)
4625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626for as_dir in $PATH
4627do
4628  IFS=$as_save_IFS
4629  test -z "$as_dir" && as_dir=.
4630    for ac_exec_ext in '' $ac_executable_extensions; do
4631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634    break 2
4635  fi
4636done
4637  done
4638IFS=$as_save_IFS
4639
4640  ;;
4641esac
4642fi
4643ECHO=$ac_cv_path_ECHO
4644if test -n "$ECHO"; then
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4646$as_echo "$ECHO" >&6; }
4647else
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649$as_echo "no" >&6; }
4650fi
4651
4652
4653  test -n "$ECHO" && break
4654done
4655
4656
4657  if test "x$ECHO" = x; then
4658    if test "xecho" = x; then
4659      PROG_NAME=echo
4660    else
4661      PROG_NAME=echo
4662    fi
4663    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4664$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4665    as_fn_error $? "Cannot continue" "$LINENO" 5
4666  fi
4667
4668
4669
4670  for ac_prog in expr
4671do
4672  # Extract the first word of "$ac_prog", so it can be a program name with args.
4673set dummy $ac_prog; ac_word=$2
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
4676if ${ac_cv_path_EXPR+:} false; then :
4677  $as_echo_n "(cached) " >&6
4678else
4679  case $EXPR in
4680  [\\/]* | ?:[\\/]*)
4681  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4682  ;;
4683  *)
4684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in $PATH
4686do
4687  IFS=$as_save_IFS
4688  test -z "$as_dir" && as_dir=.
4689    for ac_exec_ext in '' $ac_executable_extensions; do
4690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693    break 2
4694  fi
4695done
4696  done
4697IFS=$as_save_IFS
4698
4699  ;;
4700esac
4701fi
4702EXPR=$ac_cv_path_EXPR
4703if test -n "$EXPR"; then
4704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4705$as_echo "$EXPR" >&6; }
4706else
4707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711
4712  test -n "$EXPR" && break
4713done
4714
4715
4716  if test "x$EXPR" = x; then
4717    if test "xexpr" = x; then
4718      PROG_NAME=expr
4719    else
4720      PROG_NAME=expr
4721    fi
4722    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4723$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4724    as_fn_error $? "Cannot continue" "$LINENO" 5
4725  fi
4726
4727
4728
4729  for ac_prog in file
4730do
4731  # Extract the first word of "$ac_prog", so it can be a program name with args.
4732set dummy $ac_prog; ac_word=$2
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734$as_echo_n "checking for $ac_word... " >&6; }
4735if ${ac_cv_path_FILE+:} false; then :
4736  $as_echo_n "(cached) " >&6
4737else
4738  case $FILE in
4739  [\\/]* | ?:[\\/]*)
4740  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4741  ;;
4742  *)
4743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746  IFS=$as_save_IFS
4747  test -z "$as_dir" && as_dir=.
4748    for ac_exec_ext in '' $ac_executable_extensions; do
4749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4750    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4752    break 2
4753  fi
4754done
4755  done
4756IFS=$as_save_IFS
4757
4758  ;;
4759esac
4760fi
4761FILE=$ac_cv_path_FILE
4762if test -n "$FILE"; then
4763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4764$as_echo "$FILE" >&6; }
4765else
4766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767$as_echo "no" >&6; }
4768fi
4769
4770
4771  test -n "$FILE" && break
4772done
4773
4774
4775  if test "x$FILE" = x; then
4776    if test "xfile" = x; then
4777      PROG_NAME=file
4778    else
4779      PROG_NAME=file
4780    fi
4781    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4782$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4783    as_fn_error $? "Cannot continue" "$LINENO" 5
4784  fi
4785
4786
4787
4788  for ac_prog in find
4789do
4790  # Extract the first word of "$ac_prog", so it can be a program name with args.
4791set dummy $ac_prog; ac_word=$2
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793$as_echo_n "checking for $ac_word... " >&6; }
4794if ${ac_cv_path_FIND+:} false; then :
4795  $as_echo_n "(cached) " >&6
4796else
4797  case $FIND in
4798  [\\/]* | ?:[\\/]*)
4799  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4800  ;;
4801  *)
4802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4803for as_dir in $PATH
4804do
4805  IFS=$as_save_IFS
4806  test -z "$as_dir" && as_dir=.
4807    for ac_exec_ext in '' $ac_executable_extensions; do
4808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4809    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4811    break 2
4812  fi
4813done
4814  done
4815IFS=$as_save_IFS
4816
4817  ;;
4818esac
4819fi
4820FIND=$ac_cv_path_FIND
4821if test -n "$FIND"; then
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4823$as_echo "$FIND" >&6; }
4824else
4825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828
4829
4830  test -n "$FIND" && break
4831done
4832
4833
4834  if test "x$FIND" = x; then
4835    if test "xfind" = x; then
4836      PROG_NAME=find
4837    else
4838      PROG_NAME=find
4839    fi
4840    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4841$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4842    as_fn_error $? "Cannot continue" "$LINENO" 5
4843  fi
4844
4845
4846
4847  for ac_prog in head
4848do
4849  # Extract the first word of "$ac_prog", so it can be a program name with args.
4850set dummy $ac_prog; ac_word=$2
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4852$as_echo_n "checking for $ac_word... " >&6; }
4853if ${ac_cv_path_HEAD+:} false; then :
4854  $as_echo_n "(cached) " >&6
4855else
4856  case $HEAD in
4857  [\\/]* | ?:[\\/]*)
4858  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4859  ;;
4860  *)
4861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862for as_dir in $PATH
4863do
4864  IFS=$as_save_IFS
4865  test -z "$as_dir" && as_dir=.
4866    for ac_exec_ext in '' $ac_executable_extensions; do
4867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4868    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4870    break 2
4871  fi
4872done
4873  done
4874IFS=$as_save_IFS
4875
4876  ;;
4877esac
4878fi
4879HEAD=$ac_cv_path_HEAD
4880if test -n "$HEAD"; then
4881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4882$as_echo "$HEAD" >&6; }
4883else
4884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885$as_echo "no" >&6; }
4886fi
4887
4888
4889  test -n "$HEAD" && break
4890done
4891
4892
4893  if test "x$HEAD" = x; then
4894    if test "xhead" = x; then
4895      PROG_NAME=head
4896    else
4897      PROG_NAME=head
4898    fi
4899    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4901    as_fn_error $? "Cannot continue" "$LINENO" 5
4902  fi
4903
4904
4905
4906  for ac_prog in ln
4907do
4908  # Extract the first word of "$ac_prog", so it can be a program name with args.
4909set dummy $ac_prog; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if ${ac_cv_path_LN+:} false; then :
4913  $as_echo_n "(cached) " >&6
4914else
4915  case $LN in
4916  [\\/]* | ?:[\\/]*)
4917  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4918  ;;
4919  *)
4920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in $PATH
4922do
4923  IFS=$as_save_IFS
4924  test -z "$as_dir" && as_dir=.
4925    for ac_exec_ext in '' $ac_executable_extensions; do
4926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4927    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929    break 2
4930  fi
4931done
4932  done
4933IFS=$as_save_IFS
4934
4935  ;;
4936esac
4937fi
4938LN=$ac_cv_path_LN
4939if test -n "$LN"; then
4940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4941$as_echo "$LN" >&6; }
4942else
4943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947
4948  test -n "$LN" && break
4949done
4950
4951
4952  if test "x$LN" = x; then
4953    if test "xln" = x; then
4954      PROG_NAME=ln
4955    else
4956      PROG_NAME=ln
4957    fi
4958    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4960    as_fn_error $? "Cannot continue" "$LINENO" 5
4961  fi
4962
4963
4964
4965  for ac_prog in ls
4966do
4967  # Extract the first word of "$ac_prog", so it can be a program name with args.
4968set dummy $ac_prog; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_LS+:} false; then :
4972  $as_echo_n "(cached) " >&6
4973else
4974  case $LS in
4975  [\\/]* | ?:[\\/]*)
4976  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4977  ;;
4978  *)
4979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982  IFS=$as_save_IFS
4983  test -z "$as_dir" && as_dir=.
4984    for ac_exec_ext in '' $ac_executable_extensions; do
4985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988    break 2
4989  fi
4990done
4991  done
4992IFS=$as_save_IFS
4993
4994  ;;
4995esac
4996fi
4997LS=$ac_cv_path_LS
4998if test -n "$LS"; then
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5000$as_echo "$LS" >&6; }
5001else
5002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006
5007  test -n "$LS" && break
5008done
5009
5010
5011  if test "x$LS" = x; then
5012    if test "xls" = x; then
5013      PROG_NAME=ls
5014    else
5015      PROG_NAME=ls
5016    fi
5017    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5018$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5019    as_fn_error $? "Cannot continue" "$LINENO" 5
5020  fi
5021
5022
5023
5024  for ac_prog in mkdir
5025do
5026  # Extract the first word of "$ac_prog", so it can be a program name with args.
5027set dummy $ac_prog; ac_word=$2
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if ${ac_cv_path_MKDIR+:} false; then :
5031  $as_echo_n "(cached) " >&6
5032else
5033  case $MKDIR in
5034  [\\/]* | ?:[\\/]*)
5035  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5036  ;;
5037  *)
5038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041  IFS=$as_save_IFS
5042  test -z "$as_dir" && as_dir=.
5043    for ac_exec_ext in '' $ac_executable_extensions; do
5044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047    break 2
5048  fi
5049done
5050  done
5051IFS=$as_save_IFS
5052
5053  ;;
5054esac
5055fi
5056MKDIR=$ac_cv_path_MKDIR
5057if test -n "$MKDIR"; then
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5059$as_echo "$MKDIR" >&6; }
5060else
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065
5066  test -n "$MKDIR" && break
5067done
5068
5069
5070  if test "x$MKDIR" = x; then
5071    if test "xmkdir" = x; then
5072      PROG_NAME=mkdir
5073    else
5074      PROG_NAME=mkdir
5075    fi
5076    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5077$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5078    as_fn_error $? "Cannot continue" "$LINENO" 5
5079  fi
5080
5081
5082
5083  for ac_prog in mktemp
5084do
5085  # Extract the first word of "$ac_prog", so it can be a program name with args.
5086set dummy $ac_prog; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if ${ac_cv_path_MKTEMP+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092  case $MKTEMP in
5093  [\\/]* | ?:[\\/]*)
5094  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5095  ;;
5096  *)
5097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100  IFS=$as_save_IFS
5101  test -z "$as_dir" && as_dir=.
5102    for ac_exec_ext in '' $ac_executable_extensions; do
5103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106    break 2
5107  fi
5108done
5109  done
5110IFS=$as_save_IFS
5111
5112  ;;
5113esac
5114fi
5115MKTEMP=$ac_cv_path_MKTEMP
5116if test -n "$MKTEMP"; then
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5118$as_echo "$MKTEMP" >&6; }
5119else
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125  test -n "$MKTEMP" && break
5126done
5127
5128
5129  if test "x$MKTEMP" = x; then
5130    if test "xmktemp" = x; then
5131      PROG_NAME=mktemp
5132    else
5133      PROG_NAME=mktemp
5134    fi
5135    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5136$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5137    as_fn_error $? "Cannot continue" "$LINENO" 5
5138  fi
5139
5140
5141
5142  for ac_prog in mv
5143do
5144  # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_path_MV+:} false; then :
5149  $as_echo_n "(cached) " >&6
5150else
5151  case $MV in
5152  [\\/]* | ?:[\\/]*)
5153  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5154  ;;
5155  *)
5156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159  IFS=$as_save_IFS
5160  test -z "$as_dir" && as_dir=.
5161    for ac_exec_ext in '' $ac_executable_extensions; do
5162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5163    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165    break 2
5166  fi
5167done
5168  done
5169IFS=$as_save_IFS
5170
5171  ;;
5172esac
5173fi
5174MV=$ac_cv_path_MV
5175if test -n "$MV"; then
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5177$as_echo "$MV" >&6; }
5178else
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
5181fi
5182
5183
5184  test -n "$MV" && break
5185done
5186
5187
5188  if test "x$MV" = x; then
5189    if test "xmv" = x; then
5190      PROG_NAME=mv
5191    else
5192      PROG_NAME=mv
5193    fi
5194    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5196    as_fn_error $? "Cannot continue" "$LINENO" 5
5197  fi
5198
5199
5200
5201  for ac_prog in printf
5202do
5203  # Extract the first word of "$ac_prog", so it can be a program name with args.
5204set dummy $ac_prog; ac_word=$2
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206$as_echo_n "checking for $ac_word... " >&6; }
5207if ${ac_cv_path_PRINTF+:} false; then :
5208  $as_echo_n "(cached) " >&6
5209else
5210  case $PRINTF in
5211  [\\/]* | ?:[\\/]*)
5212  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5213  ;;
5214  *)
5215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
5218  IFS=$as_save_IFS
5219  test -z "$as_dir" && as_dir=.
5220    for ac_exec_ext in '' $ac_executable_extensions; do
5221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224    break 2
5225  fi
5226done
5227  done
5228IFS=$as_save_IFS
5229
5230  ;;
5231esac
5232fi
5233PRINTF=$ac_cv_path_PRINTF
5234if test -n "$PRINTF"; then
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5236$as_echo "$PRINTF" >&6; }
5237else
5238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239$as_echo "no" >&6; }
5240fi
5241
5242
5243  test -n "$PRINTF" && break
5244done
5245
5246
5247  if test "x$PRINTF" = x; then
5248    if test "xprintf" = x; then
5249      PROG_NAME=printf
5250    else
5251      PROG_NAME=printf
5252    fi
5253    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5254$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5255    as_fn_error $? "Cannot continue" "$LINENO" 5
5256  fi
5257
5258
5259
5260  for ac_prog in rm
5261do
5262  # Extract the first word of "$ac_prog", so it can be a program name with args.
5263set dummy $ac_prog; ac_word=$2
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265$as_echo_n "checking for $ac_word... " >&6; }
5266if ${ac_cv_path_RM+:} false; then :
5267  $as_echo_n "(cached) " >&6
5268else
5269  case $RM in
5270  [\\/]* | ?:[\\/]*)
5271  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5272  ;;
5273  *)
5274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275for as_dir in $PATH
5276do
5277  IFS=$as_save_IFS
5278  test -z "$as_dir" && as_dir=.
5279    for ac_exec_ext in '' $ac_executable_extensions; do
5280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5281    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5283    break 2
5284  fi
5285done
5286  done
5287IFS=$as_save_IFS
5288
5289  ;;
5290esac
5291fi
5292RM=$ac_cv_path_RM
5293if test -n "$RM"; then
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5295$as_echo "$RM" >&6; }
5296else
5297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298$as_echo "no" >&6; }
5299fi
5300
5301
5302  test -n "$RM" && break
5303done
5304
5305
5306  if test "x$RM" = x; then
5307    if test "xrm" = x; then
5308      PROG_NAME=rm
5309    else
5310      PROG_NAME=rm
5311    fi
5312    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5313$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5314    as_fn_error $? "Cannot continue" "$LINENO" 5
5315  fi
5316
5317
5318
5319  for ac_prog in sh
5320do
5321  # Extract the first word of "$ac_prog", so it can be a program name with args.
5322set dummy $ac_prog; ac_word=$2
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5324$as_echo_n "checking for $ac_word... " >&6; }
5325if ${ac_cv_path_SH+:} false; then :
5326  $as_echo_n "(cached) " >&6
5327else
5328  case $SH in
5329  [\\/]* | ?:[\\/]*)
5330  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5331  ;;
5332  *)
5333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5334for as_dir in $PATH
5335do
5336  IFS=$as_save_IFS
5337  test -z "$as_dir" && as_dir=.
5338    for ac_exec_ext in '' $ac_executable_extensions; do
5339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5340    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5342    break 2
5343  fi
5344done
5345  done
5346IFS=$as_save_IFS
5347
5348  ;;
5349esac
5350fi
5351SH=$ac_cv_path_SH
5352if test -n "$SH"; then
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5354$as_echo "$SH" >&6; }
5355else
5356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359
5360
5361  test -n "$SH" && break
5362done
5363
5364
5365  if test "x$SH" = x; then
5366    if test "xsh" = x; then
5367      PROG_NAME=sh
5368    else
5369      PROG_NAME=sh
5370    fi
5371    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5372$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5373    as_fn_error $? "Cannot continue" "$LINENO" 5
5374  fi
5375
5376
5377
5378  for ac_prog in sort
5379do
5380  # Extract the first word of "$ac_prog", so it can be a program name with args.
5381set dummy $ac_prog; ac_word=$2
5382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5383$as_echo_n "checking for $ac_word... " >&6; }
5384if ${ac_cv_path_SORT+:} false; then :
5385  $as_echo_n "(cached) " >&6
5386else
5387  case $SORT in
5388  [\\/]* | ?:[\\/]*)
5389  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5390  ;;
5391  *)
5392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH
5394do
5395  IFS=$as_save_IFS
5396  test -z "$as_dir" && as_dir=.
5397    for ac_exec_ext in '' $ac_executable_extensions; do
5398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5399    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5401    break 2
5402  fi
5403done
5404  done
5405IFS=$as_save_IFS
5406
5407  ;;
5408esac
5409fi
5410SORT=$ac_cv_path_SORT
5411if test -n "$SORT"; then
5412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5413$as_echo "$SORT" >&6; }
5414else
5415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5416$as_echo "no" >&6; }
5417fi
5418
5419
5420  test -n "$SORT" && break
5421done
5422
5423
5424  if test "x$SORT" = x; then
5425    if test "xsort" = x; then
5426      PROG_NAME=sort
5427    else
5428      PROG_NAME=sort
5429    fi
5430    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5431$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5432    as_fn_error $? "Cannot continue" "$LINENO" 5
5433  fi
5434
5435
5436
5437  for ac_prog in tail
5438do
5439  # Extract the first word of "$ac_prog", so it can be a program name with args.
5440set dummy $ac_prog; ac_word=$2
5441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442$as_echo_n "checking for $ac_word... " >&6; }
5443if ${ac_cv_path_TAIL+:} false; then :
5444  $as_echo_n "(cached) " >&6
5445else
5446  case $TAIL in
5447  [\\/]* | ?:[\\/]*)
5448  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5449  ;;
5450  *)
5451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
5454  IFS=$as_save_IFS
5455  test -z "$as_dir" && as_dir=.
5456    for ac_exec_ext in '' $ac_executable_extensions; do
5457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460    break 2
5461  fi
5462done
5463  done
5464IFS=$as_save_IFS
5465
5466  ;;
5467esac
5468fi
5469TAIL=$ac_cv_path_TAIL
5470if test -n "$TAIL"; then
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5472$as_echo "$TAIL" >&6; }
5473else
5474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475$as_echo "no" >&6; }
5476fi
5477
5478
5479  test -n "$TAIL" && break
5480done
5481
5482
5483  if test "x$TAIL" = x; then
5484    if test "xtail" = x; then
5485      PROG_NAME=tail
5486    else
5487      PROG_NAME=tail
5488    fi
5489    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5490$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5491    as_fn_error $? "Cannot continue" "$LINENO" 5
5492  fi
5493
5494
5495
5496  for ac_prog in tar
5497do
5498  # Extract the first word of "$ac_prog", so it can be a program name with args.
5499set dummy $ac_prog; ac_word=$2
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5501$as_echo_n "checking for $ac_word... " >&6; }
5502if ${ac_cv_path_TAR+:} false; then :
5503  $as_echo_n "(cached) " >&6
5504else
5505  case $TAR in
5506  [\\/]* | ?:[\\/]*)
5507  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5508  ;;
5509  *)
5510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5511for as_dir in $PATH
5512do
5513  IFS=$as_save_IFS
5514  test -z "$as_dir" && as_dir=.
5515    for ac_exec_ext in '' $ac_executable_extensions; do
5516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5517    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5519    break 2
5520  fi
5521done
5522  done
5523IFS=$as_save_IFS
5524
5525  ;;
5526esac
5527fi
5528TAR=$ac_cv_path_TAR
5529if test -n "$TAR"; then
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5531$as_echo "$TAR" >&6; }
5532else
5533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534$as_echo "no" >&6; }
5535fi
5536
5537
5538  test -n "$TAR" && break
5539done
5540
5541
5542  if test "x$TAR" = x; then
5543    if test "xtar" = x; then
5544      PROG_NAME=tar
5545    else
5546      PROG_NAME=tar
5547    fi
5548    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5549$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5550    as_fn_error $? "Cannot continue" "$LINENO" 5
5551  fi
5552
5553
5554
5555  for ac_prog in tee
5556do
5557  # Extract the first word of "$ac_prog", so it can be a program name with args.
5558set dummy $ac_prog; ac_word=$2
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560$as_echo_n "checking for $ac_word... " >&6; }
5561if ${ac_cv_path_TEE+:} false; then :
5562  $as_echo_n "(cached) " >&6
5563else
5564  case $TEE in
5565  [\\/]* | ?:[\\/]*)
5566  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5567  ;;
5568  *)
5569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5570for as_dir in $PATH
5571do
5572  IFS=$as_save_IFS
5573  test -z "$as_dir" && as_dir=.
5574    for ac_exec_ext in '' $ac_executable_extensions; do
5575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5576    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5578    break 2
5579  fi
5580done
5581  done
5582IFS=$as_save_IFS
5583
5584  ;;
5585esac
5586fi
5587TEE=$ac_cv_path_TEE
5588if test -n "$TEE"; then
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5590$as_echo "$TEE" >&6; }
5591else
5592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593$as_echo "no" >&6; }
5594fi
5595
5596
5597  test -n "$TEE" && break
5598done
5599
5600
5601  if test "x$TEE" = x; then
5602    if test "xtee" = x; then
5603      PROG_NAME=tee
5604    else
5605      PROG_NAME=tee
5606    fi
5607    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5608$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5609    as_fn_error $? "Cannot continue" "$LINENO" 5
5610  fi
5611
5612
5613
5614  for ac_prog in touch
5615do
5616  # Extract the first word of "$ac_prog", so it can be a program name with args.
5617set dummy $ac_prog; ac_word=$2
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
5620if ${ac_cv_path_TOUCH+:} false; then :
5621  $as_echo_n "(cached) " >&6
5622else
5623  case $TOUCH in
5624  [\\/]* | ?:[\\/]*)
5625  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5626  ;;
5627  *)
5628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5629for as_dir in $PATH
5630do
5631  IFS=$as_save_IFS
5632  test -z "$as_dir" && as_dir=.
5633    for ac_exec_ext in '' $ac_executable_extensions; do
5634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5635    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5637    break 2
5638  fi
5639done
5640  done
5641IFS=$as_save_IFS
5642
5643  ;;
5644esac
5645fi
5646TOUCH=$ac_cv_path_TOUCH
5647if test -n "$TOUCH"; then
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5649$as_echo "$TOUCH" >&6; }
5650else
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5652$as_echo "no" >&6; }
5653fi
5654
5655
5656  test -n "$TOUCH" && break
5657done
5658
5659
5660  if test "x$TOUCH" = x; then
5661    if test "xtouch" = x; then
5662      PROG_NAME=touch
5663    else
5664      PROG_NAME=touch
5665    fi
5666    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5667$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5668    as_fn_error $? "Cannot continue" "$LINENO" 5
5669  fi
5670
5671
5672
5673  for ac_prog in tr
5674do
5675  # Extract the first word of "$ac_prog", so it can be a program name with args.
5676set dummy $ac_prog; ac_word=$2
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5678$as_echo_n "checking for $ac_word... " >&6; }
5679if ${ac_cv_path_TR+:} false; then :
5680  $as_echo_n "(cached) " >&6
5681else
5682  case $TR in
5683  [\\/]* | ?:[\\/]*)
5684  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5685  ;;
5686  *)
5687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5688for as_dir in $PATH
5689do
5690  IFS=$as_save_IFS
5691  test -z "$as_dir" && as_dir=.
5692    for ac_exec_ext in '' $ac_executable_extensions; do
5693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5694    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5696    break 2
5697  fi
5698done
5699  done
5700IFS=$as_save_IFS
5701
5702  ;;
5703esac
5704fi
5705TR=$ac_cv_path_TR
5706if test -n "$TR"; then
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5708$as_echo "$TR" >&6; }
5709else
5710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
5712fi
5713
5714
5715  test -n "$TR" && break
5716done
5717
5718
5719  if test "x$TR" = x; then
5720    if test "xtr" = x; then
5721      PROG_NAME=tr
5722    else
5723      PROG_NAME=tr
5724    fi
5725    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5726$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5727    as_fn_error $? "Cannot continue" "$LINENO" 5
5728  fi
5729
5730
5731
5732  for ac_prog in uname
5733do
5734  # Extract the first word of "$ac_prog", so it can be a program name with args.
5735set dummy $ac_prog; ac_word=$2
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737$as_echo_n "checking for $ac_word... " >&6; }
5738if ${ac_cv_path_UNAME+:} false; then :
5739  $as_echo_n "(cached) " >&6
5740else
5741  case $UNAME in
5742  [\\/]* | ?:[\\/]*)
5743  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5744  ;;
5745  *)
5746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749  IFS=$as_save_IFS
5750  test -z "$as_dir" && as_dir=.
5751    for ac_exec_ext in '' $ac_executable_extensions; do
5752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5753    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5755    break 2
5756  fi
5757done
5758  done
5759IFS=$as_save_IFS
5760
5761  ;;
5762esac
5763fi
5764UNAME=$ac_cv_path_UNAME
5765if test -n "$UNAME"; then
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5767$as_echo "$UNAME" >&6; }
5768else
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5770$as_echo "no" >&6; }
5771fi
5772
5773
5774  test -n "$UNAME" && break
5775done
5776
5777
5778  if test "x$UNAME" = x; then
5779    if test "xuname" = x; then
5780      PROG_NAME=uname
5781    else
5782      PROG_NAME=uname
5783    fi
5784    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5785$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5786    as_fn_error $? "Cannot continue" "$LINENO" 5
5787  fi
5788
5789
5790
5791  for ac_prog in uniq
5792do
5793  # Extract the first word of "$ac_prog", so it can be a program name with args.
5794set dummy $ac_prog; ac_word=$2
5795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796$as_echo_n "checking for $ac_word... " >&6; }
5797if ${ac_cv_path_UNIQ+:} false; then :
5798  $as_echo_n "(cached) " >&6
5799else
5800  case $UNIQ in
5801  [\\/]* | ?:[\\/]*)
5802  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5803  ;;
5804  *)
5805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5806for as_dir in $PATH
5807do
5808  IFS=$as_save_IFS
5809  test -z "$as_dir" && as_dir=.
5810    for ac_exec_ext in '' $ac_executable_extensions; do
5811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5812    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5814    break 2
5815  fi
5816done
5817  done
5818IFS=$as_save_IFS
5819
5820  ;;
5821esac
5822fi
5823UNIQ=$ac_cv_path_UNIQ
5824if test -n "$UNIQ"; then
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5826$as_echo "$UNIQ" >&6; }
5827else
5828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829$as_echo "no" >&6; }
5830fi
5831
5832
5833  test -n "$UNIQ" && break
5834done
5835
5836
5837  if test "x$UNIQ" = x; then
5838    if test "xuniq" = x; then
5839      PROG_NAME=uniq
5840    else
5841      PROG_NAME=uniq
5842    fi
5843    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5844$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5845    as_fn_error $? "Cannot continue" "$LINENO" 5
5846  fi
5847
5848
5849
5850  for ac_prog in wc
5851do
5852  # Extract the first word of "$ac_prog", so it can be a program name with args.
5853set dummy $ac_prog; ac_word=$2
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855$as_echo_n "checking for $ac_word... " >&6; }
5856if ${ac_cv_path_WC+:} false; then :
5857  $as_echo_n "(cached) " >&6
5858else
5859  case $WC in
5860  [\\/]* | ?:[\\/]*)
5861  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5862  ;;
5863  *)
5864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5865for as_dir in $PATH
5866do
5867  IFS=$as_save_IFS
5868  test -z "$as_dir" && as_dir=.
5869    for ac_exec_ext in '' $ac_executable_extensions; do
5870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5871    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5873    break 2
5874  fi
5875done
5876  done
5877IFS=$as_save_IFS
5878
5879  ;;
5880esac
5881fi
5882WC=$ac_cv_path_WC
5883if test -n "$WC"; then
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5885$as_echo "$WC" >&6; }
5886else
5887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888$as_echo "no" >&6; }
5889fi
5890
5891
5892  test -n "$WC" && break
5893done
5894
5895
5896  if test "x$WC" = x; then
5897    if test "xwc" = x; then
5898      PROG_NAME=wc
5899    else
5900      PROG_NAME=wc
5901    fi
5902    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5903$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5904    as_fn_error $? "Cannot continue" "$LINENO" 5
5905  fi
5906
5907
5908
5909  for ac_prog in which
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_WHICH+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $WHICH in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941WHICH=$ac_cv_path_WHICH
5942if test -n "$WHICH"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5944$as_echo "$WHICH" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$WHICH" && break
5952done
5953
5954
5955  if test "x$WHICH" = x; then
5956    if test "xwhich" = x; then
5957      PROG_NAME=which
5958    else
5959      PROG_NAME=which
5960    fi
5961    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5962$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5963    as_fn_error $? "Cannot continue" "$LINENO" 5
5964  fi
5965
5966
5967
5968  for ac_prog in xargs
5969do
5970  # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if ${ac_cv_path_XARGS+:} false; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  case $XARGS in
5978  [\\/]* | ?:[\\/]*)
5979  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5980  ;;
5981  *)
5982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985  IFS=$as_save_IFS
5986  test -z "$as_dir" && as_dir=.
5987    for ac_exec_ext in '' $ac_executable_extensions; do
5988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991    break 2
5992  fi
5993done
5994  done
5995IFS=$as_save_IFS
5996
5997  ;;
5998esac
5999fi
6000XARGS=$ac_cv_path_XARGS
6001if test -n "$XARGS"; then
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6003$as_echo "$XARGS" >&6; }
6004else
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010  test -n "$XARGS" && break
6011done
6012
6013
6014  if test "x$XARGS" = x; then
6015    if test "xxargs" = x; then
6016      PROG_NAME=xargs
6017    else
6018      PROG_NAME=xargs
6019    fi
6020    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6021$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6022    as_fn_error $? "Cannot continue" "$LINENO" 5
6023  fi
6024
6025
6026
6027  # Then required tools that require some special treatment.
6028  for ac_prog in gawk mawk nawk awk
6029do
6030  # Extract the first word of "$ac_prog", so it can be a program name with args.
6031set dummy $ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_prog_AWK+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  if test -n "$AWK"; then
6038  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6039else
6040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_prog_AWK="$ac_prog"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055fi
6056fi
6057AWK=$ac_cv_prog_AWK
6058if test -n "$AWK"; then
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6060$as_echo "$AWK" >&6; }
6061else
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064fi
6065
6066
6067  test -n "$AWK" && break
6068done
6069
6070
6071  if test "x$AWK" = x; then
6072    if test "x" = x; then
6073      PROG_NAME=awk
6074    else
6075      PROG_NAME=
6076    fi
6077    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6078$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6079    as_fn_error $? "Cannot continue" "$LINENO" 5
6080  fi
6081
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6083$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6084if ${ac_cv_path_GREP+:} false; then :
6085  $as_echo_n "(cached) " >&6
6086else
6087  if test -z "$GREP"; then
6088  ac_path_GREP_found=false
6089  # Loop through the user's path and test for each of PROGNAME-LIST
6090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6092do
6093  IFS=$as_save_IFS
6094  test -z "$as_dir" && as_dir=.
6095    for ac_prog in grep ggrep; do
6096    for ac_exec_ext in '' $ac_executable_extensions; do
6097      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6098      as_fn_executable_p "$ac_path_GREP" || continue
6099# Check for GNU ac_path_GREP and select it if it is found.
6100  # Check for GNU $ac_path_GREP
6101case `"$ac_path_GREP" --version 2>&1` in
6102*GNU*)
6103  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6104*)
6105  ac_count=0
6106  $as_echo_n 0123456789 >"conftest.in"
6107  while :
6108  do
6109    cat "conftest.in" "conftest.in" >"conftest.tmp"
6110    mv "conftest.tmp" "conftest.in"
6111    cp "conftest.in" "conftest.nl"
6112    $as_echo 'GREP' >> "conftest.nl"
6113    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6114    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6115    as_fn_arith $ac_count + 1 && ac_count=$as_val
6116    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6117      # Best one so far, save it but keep looking for a better one
6118      ac_cv_path_GREP="$ac_path_GREP"
6119      ac_path_GREP_max=$ac_count
6120    fi
6121    # 10*(2^10) chars as input seems more than enough
6122    test $ac_count -gt 10 && break
6123  done
6124  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6125esac
6126
6127      $ac_path_GREP_found && break 3
6128    done
6129  done
6130  done
6131IFS=$as_save_IFS
6132  if test -z "$ac_cv_path_GREP"; then
6133    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6134  fi
6135else
6136  ac_cv_path_GREP=$GREP
6137fi
6138
6139fi
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6141$as_echo "$ac_cv_path_GREP" >&6; }
6142 GREP="$ac_cv_path_GREP"
6143
6144
6145
6146  if test "x$GREP" = x; then
6147    if test "x" = x; then
6148      PROG_NAME=grep
6149    else
6150      PROG_NAME=
6151    fi
6152    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6153$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6154    as_fn_error $? "Cannot continue" "$LINENO" 5
6155  fi
6156
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6158$as_echo_n "checking for egrep... " >&6; }
6159if ${ac_cv_path_EGREP+:} false; then :
6160  $as_echo_n "(cached) " >&6
6161else
6162  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6163   then ac_cv_path_EGREP="$GREP -E"
6164   else
6165     if test -z "$EGREP"; then
6166  ac_path_EGREP_found=false
6167  # Loop through the user's path and test for each of PROGNAME-LIST
6168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6170do
6171  IFS=$as_save_IFS
6172  test -z "$as_dir" && as_dir=.
6173    for ac_prog in egrep; do
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6176      as_fn_executable_p "$ac_path_EGREP" || continue
6177# Check for GNU ac_path_EGREP and select it if it is found.
6178  # Check for GNU $ac_path_EGREP
6179case `"$ac_path_EGREP" --version 2>&1` in
6180*GNU*)
6181  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6182*)
6183  ac_count=0
6184  $as_echo_n 0123456789 >"conftest.in"
6185  while :
6186  do
6187    cat "conftest.in" "conftest.in" >"conftest.tmp"
6188    mv "conftest.tmp" "conftest.in"
6189    cp "conftest.in" "conftest.nl"
6190    $as_echo 'EGREP' >> "conftest.nl"
6191    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6192    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6193    as_fn_arith $ac_count + 1 && ac_count=$as_val
6194    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6195      # Best one so far, save it but keep looking for a better one
6196      ac_cv_path_EGREP="$ac_path_EGREP"
6197      ac_path_EGREP_max=$ac_count
6198    fi
6199    # 10*(2^10) chars as input seems more than enough
6200    test $ac_count -gt 10 && break
6201  done
6202  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6203esac
6204
6205      $ac_path_EGREP_found && break 3
6206    done
6207  done
6208  done
6209IFS=$as_save_IFS
6210  if test -z "$ac_cv_path_EGREP"; then
6211    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6212  fi
6213else
6214  ac_cv_path_EGREP=$EGREP
6215fi
6216
6217   fi
6218fi
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6220$as_echo "$ac_cv_path_EGREP" >&6; }
6221 EGREP="$ac_cv_path_EGREP"
6222
6223
6224
6225  if test "x$EGREP" = x; then
6226    if test "x" = x; then
6227      PROG_NAME=egrep
6228    else
6229      PROG_NAME=
6230    fi
6231    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6233    as_fn_error $? "Cannot continue" "$LINENO" 5
6234  fi
6235
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6237$as_echo_n "checking for fgrep... " >&6; }
6238if ${ac_cv_path_FGREP+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6242   then ac_cv_path_FGREP="$GREP -F"
6243   else
6244     if test -z "$FGREP"; then
6245  ac_path_FGREP_found=false
6246  # Loop through the user's path and test for each of PROGNAME-LIST
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_prog in fgrep; do
6253    for ac_exec_ext in '' $ac_executable_extensions; do
6254      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6255      as_fn_executable_p "$ac_path_FGREP" || continue
6256# Check for GNU ac_path_FGREP and select it if it is found.
6257  # Check for GNU $ac_path_FGREP
6258case `"$ac_path_FGREP" --version 2>&1` in
6259*GNU*)
6260  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6261*)
6262  ac_count=0
6263  $as_echo_n 0123456789 >"conftest.in"
6264  while :
6265  do
6266    cat "conftest.in" "conftest.in" >"conftest.tmp"
6267    mv "conftest.tmp" "conftest.in"
6268    cp "conftest.in" "conftest.nl"
6269    $as_echo 'FGREP' >> "conftest.nl"
6270    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6272    as_fn_arith $ac_count + 1 && ac_count=$as_val
6273    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6274      # Best one so far, save it but keep looking for a better one
6275      ac_cv_path_FGREP="$ac_path_FGREP"
6276      ac_path_FGREP_max=$ac_count
6277    fi
6278    # 10*(2^10) chars as input seems more than enough
6279    test $ac_count -gt 10 && break
6280  done
6281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6282esac
6283
6284      $ac_path_FGREP_found && break 3
6285    done
6286  done
6287  done
6288IFS=$as_save_IFS
6289  if test -z "$ac_cv_path_FGREP"; then
6290    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6291  fi
6292else
6293  ac_cv_path_FGREP=$FGREP
6294fi
6295
6296   fi
6297fi
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6299$as_echo "$ac_cv_path_FGREP" >&6; }
6300 FGREP="$ac_cv_path_FGREP"
6301
6302
6303
6304  if test "x$FGREP" = x; then
6305    if test "x" = x; then
6306      PROG_NAME=fgrep
6307    else
6308      PROG_NAME=
6309    fi
6310    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6311$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6312    as_fn_error $? "Cannot continue" "$LINENO" 5
6313  fi
6314
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6316$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6317if ${ac_cv_path_SED+:} false; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6321     for ac_i in 1 2 3 4 5 6 7; do
6322       ac_script="$ac_script$as_nl$ac_script"
6323     done
6324     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6325     { ac_script=; unset ac_script;}
6326     if test -z "$SED"; then
6327  ac_path_SED_found=false
6328  # Loop through the user's path and test for each of PROGNAME-LIST
6329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332  IFS=$as_save_IFS
6333  test -z "$as_dir" && as_dir=.
6334    for ac_prog in sed gsed; do
6335    for ac_exec_ext in '' $ac_executable_extensions; do
6336      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6337      as_fn_executable_p "$ac_path_SED" || continue
6338# Check for GNU ac_path_SED and select it if it is found.
6339  # Check for GNU $ac_path_SED
6340case `"$ac_path_SED" --version 2>&1` in
6341*GNU*)
6342  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6343*)
6344  ac_count=0
6345  $as_echo_n 0123456789 >"conftest.in"
6346  while :
6347  do
6348    cat "conftest.in" "conftest.in" >"conftest.tmp"
6349    mv "conftest.tmp" "conftest.in"
6350    cp "conftest.in" "conftest.nl"
6351    $as_echo '' >> "conftest.nl"
6352    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6353    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6354    as_fn_arith $ac_count + 1 && ac_count=$as_val
6355    if test $ac_count -gt ${ac_path_SED_max-0}; then
6356      # Best one so far, save it but keep looking for a better one
6357      ac_cv_path_SED="$ac_path_SED"
6358      ac_path_SED_max=$ac_count
6359    fi
6360    # 10*(2^10) chars as input seems more than enough
6361    test $ac_count -gt 10 && break
6362  done
6363  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6364esac
6365
6366      $ac_path_SED_found && break 3
6367    done
6368  done
6369  done
6370IFS=$as_save_IFS
6371  if test -z "$ac_cv_path_SED"; then
6372    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6373  fi
6374else
6375  ac_cv_path_SED=$SED
6376fi
6377
6378fi
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6380$as_echo "$ac_cv_path_SED" >&6; }
6381 SED="$ac_cv_path_SED"
6382  rm -f conftest.sed
6383
6384
6385  if test "x$SED" = x; then
6386    if test "x" = x; then
6387      PROG_NAME=sed
6388    else
6389      PROG_NAME=
6390    fi
6391    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6392$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6393    as_fn_error $? "Cannot continue" "$LINENO" 5
6394  fi
6395
6396
6397  for ac_prog in nawk gawk awk
6398do
6399  # Extract the first word of "$ac_prog", so it can be a program name with args.
6400set dummy $ac_prog; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_path_NAWK+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $NAWK in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429NAWK=$ac_cv_path_NAWK
6430if test -n "$NAWK"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6432$as_echo "$NAWK" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439  test -n "$NAWK" && break
6440done
6441
6442
6443  if test "x$NAWK" = x; then
6444    if test "x" = x; then
6445      PROG_NAME=nawk
6446    else
6447      PROG_NAME=
6448    fi
6449    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6450$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6451    as_fn_error $? "Cannot continue" "$LINENO" 5
6452  fi
6453
6454
6455  # Always force rm.
6456  RM="$RM -f"
6457
6458  # pwd behaves differently on various platforms and some don't support the -L flag.
6459  # Always use the bash builtin pwd to get uniform behavior.
6460  THEPWDCMD=pwd
6461
6462  # These are not required on all platforms
6463  # Extract the first word of "cygpath", so it can be a program name with args.
6464set dummy cygpath; ac_word=$2
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466$as_echo_n "checking for $ac_word... " >&6; }
6467if ${ac_cv_path_CYGPATH+:} false; then :
6468  $as_echo_n "(cached) " >&6
6469else
6470  case $CYGPATH in
6471  [\\/]* | ?:[\\/]*)
6472  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6473  ;;
6474  *)
6475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476for as_dir in $PATH
6477do
6478  IFS=$as_save_IFS
6479  test -z "$as_dir" && as_dir=.
6480    for ac_exec_ext in '' $ac_executable_extensions; do
6481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6482    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484    break 2
6485  fi
6486done
6487  done
6488IFS=$as_save_IFS
6489
6490  ;;
6491esac
6492fi
6493CYGPATH=$ac_cv_path_CYGPATH
6494if test -n "$CYGPATH"; then
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6496$as_echo "$CYGPATH" >&6; }
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502
6503  # Extract the first word of "readlink", so it can be a program name with args.
6504set dummy readlink; ac_word=$2
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506$as_echo_n "checking for $ac_word... " >&6; }
6507if ${ac_cv_path_READLINK+:} false; then :
6508  $as_echo_n "(cached) " >&6
6509else
6510  case $READLINK in
6511  [\\/]* | ?:[\\/]*)
6512  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6513  ;;
6514  *)
6515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518  IFS=$as_save_IFS
6519  test -z "$as_dir" && as_dir=.
6520    for ac_exec_ext in '' $ac_executable_extensions; do
6521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524    break 2
6525  fi
6526done
6527  done
6528IFS=$as_save_IFS
6529
6530  ;;
6531esac
6532fi
6533READLINK=$ac_cv_path_READLINK
6534if test -n "$READLINK"; then
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6536$as_echo "$READLINK" >&6; }
6537else
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543  # Extract the first word of "df", so it can be a program name with args.
6544set dummy df; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_path_DF+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $DF in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6553  ;;
6554  *)
6555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in $PATH
6557do
6558  IFS=$as_save_IFS
6559  test -z "$as_dir" && as_dir=.
6560    for ac_exec_ext in '' $ac_executable_extensions; do
6561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564    break 2
6565  fi
6566done
6567  done
6568IFS=$as_save_IFS
6569
6570  ;;
6571esac
6572fi
6573DF=$ac_cv_path_DF
6574if test -n "$DF"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6576$as_echo "$DF" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583  # Extract the first word of "SetFile", so it can be a program name with args.
6584set dummy SetFile; ac_word=$2
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586$as_echo_n "checking for $ac_word... " >&6; }
6587if ${ac_cv_path_SETFILE+:} false; then :
6588  $as_echo_n "(cached) " >&6
6589else
6590  case $SETFILE in
6591  [\\/]* | ?:[\\/]*)
6592  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6593  ;;
6594  *)
6595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596for as_dir in $PATH
6597do
6598  IFS=$as_save_IFS
6599  test -z "$as_dir" && as_dir=.
6600    for ac_exec_ext in '' $ac_executable_extensions; do
6601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604    break 2
6605  fi
6606done
6607  done
6608IFS=$as_save_IFS
6609
6610  ;;
6611esac
6612fi
6613SETFILE=$ac_cv_path_SETFILE
6614if test -n "$SETFILE"; then
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6616$as_echo "$SETFILE" >&6; }
6617else
6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619$as_echo "no" >&6; }
6620fi
6621
6622
6623
6624
6625# Now we can determine OpenJDK build and target platforms. This is required to
6626# have early on.
6627# Make sure we can run config.sub.
6628$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6629  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6630
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6632$as_echo_n "checking build system type... " >&6; }
6633if ${ac_cv_build+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  ac_build_alias=$build_alias
6637test "x$ac_build_alias" = x &&
6638  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6639test "x$ac_build_alias" = x &&
6640  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6641ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6642  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6643
6644fi
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6646$as_echo "$ac_cv_build" >&6; }
6647case $ac_cv_build in
6648*-*-*) ;;
6649*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6650esac
6651build=$ac_cv_build
6652ac_save_IFS=$IFS; IFS='-'
6653set x $ac_cv_build
6654shift
6655build_cpu=$1
6656build_vendor=$2
6657shift; shift
6658# Remember, the first character of IFS is used to create $*,
6659# except with old shells:
6660build_os=$*
6661IFS=$ac_save_IFS
6662case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6663
6664
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6666$as_echo_n "checking host system type... " >&6; }
6667if ${ac_cv_host+:} false; then :
6668  $as_echo_n "(cached) " >&6
6669else
6670  if test "x$host_alias" = x; then
6671  ac_cv_host=$ac_cv_build
6672else
6673  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6674    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6675fi
6676
6677fi
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6679$as_echo "$ac_cv_host" >&6; }
6680case $ac_cv_host in
6681*-*-*) ;;
6682*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6683esac
6684host=$ac_cv_host
6685ac_save_IFS=$IFS; IFS='-'
6686set x $ac_cv_host
6687shift
6688host_cpu=$1
6689host_vendor=$2
6690shift; shift
6691# Remember, the first character of IFS is used to create $*,
6692# except with old shells:
6693host_os=$*
6694IFS=$ac_save_IFS
6695case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6696
6697
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6699$as_echo_n "checking target system type... " >&6; }
6700if ${ac_cv_target+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  if test "x$target_alias" = x; then
6704  ac_cv_target=$ac_cv_host
6705else
6706  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6707    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6708fi
6709
6710fi
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6712$as_echo "$ac_cv_target" >&6; }
6713case $ac_cv_target in
6714*-*-*) ;;
6715*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6716esac
6717target=$ac_cv_target
6718ac_save_IFS=$IFS; IFS='-'
6719set x $ac_cv_target
6720shift
6721target_cpu=$1
6722target_vendor=$2
6723shift; shift
6724# Remember, the first character of IFS is used to create $*,
6725# except with old shells:
6726target_os=$*
6727IFS=$ac_save_IFS
6728case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6729
6730
6731# The aliases save the names the user supplied, while $host etc.
6732# will get canonicalized.
6733test -n "$target_alias" &&
6734  test "$program_prefix$program_suffix$program_transform_name" = \
6735    NONENONEs,x,x, &&
6736  program_prefix=${target_alias}-
6737
6738  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6739  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6740  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6741  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6742  # to use the configure naming style.
6743
6744
6745
6746
6747
6748  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6749  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6750  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6751  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6752  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6753  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6754
6755
6756
6757  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6758
6759  case "$build_os" in
6760    *linux*)
6761      VAR_OS=linux
6762      VAR_OS_API=posix
6763      VAR_OS_ENV=linux
6764      ;;
6765    *solaris*)
6766      VAR_OS=solaris
6767      VAR_OS_API=posix
6768      VAR_OS_ENV=solaris
6769      ;;
6770    *darwin*)
6771      VAR_OS=macosx
6772      VAR_OS_API=posix
6773      VAR_OS_ENV=macosx
6774      ;;
6775    *bsd*)
6776      VAR_OS=bsd
6777      VAR_OS_API=posix
6778      VAR_OS_ENV=bsd
6779      ;;
6780    *cygwin*)
6781      VAR_OS=windows
6782      VAR_OS_API=winapi
6783      VAR_OS_ENV=windows.cygwin
6784      ;;
6785    *mingw*)
6786      VAR_OS=windows
6787      VAR_OS_API=winapi
6788      VAR_OS_ENV=windows.msys
6789      ;;
6790    *aix*)
6791      VAR_OS=aix
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=aix
6794      ;;
6795    *)
6796      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6797      ;;
6798  esac
6799
6800
6801  # First argument is the cpu name from the trip/quad
6802  case "$build_cpu" in
6803    x86_64)
6804      VAR_CPU=x86_64
6805      VAR_CPU_ARCH=x86
6806      VAR_CPU_BITS=64
6807      VAR_CPU_ENDIAN=little
6808      ;;
6809    i?86)
6810      VAR_CPU=x86
6811      VAR_CPU_ARCH=x86
6812      VAR_CPU_BITS=32
6813      VAR_CPU_ENDIAN=little
6814      ;;
6815    arm*)
6816      VAR_CPU=arm
6817      VAR_CPU_ARCH=arm
6818      VAR_CPU_BITS=32
6819      VAR_CPU_ENDIAN=little
6820      ;;
6821    powerpc)
6822      VAR_CPU=ppc
6823      VAR_CPU_ARCH=ppc
6824      VAR_CPU_BITS=32
6825      VAR_CPU_ENDIAN=big
6826      ;;
6827    powerpc64)
6828      VAR_CPU=ppc64
6829      VAR_CPU_ARCH=ppc
6830      VAR_CPU_BITS=64
6831      VAR_CPU_ENDIAN=big
6832      ;;
6833    s390)
6834      VAR_CPU=s390
6835      VAR_CPU_ARCH=s390
6836      VAR_CPU_BITS=32
6837      VAR_CPU_ENDIAN=big
6838      ;;
6839    s390x)
6840      VAR_CPU=s390x
6841      VAR_CPU_ARCH=s390
6842      VAR_CPU_BITS=64
6843      VAR_CPU_ENDIAN=big
6844      ;;
6845    sparc)
6846      VAR_CPU=sparc
6847      VAR_CPU_ARCH=sparc
6848      VAR_CPU_BITS=32
6849      VAR_CPU_ENDIAN=big
6850      ;;
6851    sparcv9)
6852      VAR_CPU=sparcv9
6853      VAR_CPU_ARCH=sparc
6854      VAR_CPU_BITS=64
6855      VAR_CPU_ENDIAN=big
6856      ;;
6857    *)
6858      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6859      ;;
6860  esac
6861
6862  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6863  OPENJDK_BUILD_OS="$VAR_OS"
6864  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6865  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6866  OPENJDK_BUILD_CPU="$VAR_CPU"
6867  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6868  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6869  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6870
6871
6872
6873
6874
6875
6876
6877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6878$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6880$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6881
6882  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6883
6884  case "$host_os" in
6885    *linux*)
6886      VAR_OS=linux
6887      VAR_OS_API=posix
6888      VAR_OS_ENV=linux
6889      ;;
6890    *solaris*)
6891      VAR_OS=solaris
6892      VAR_OS_API=posix
6893      VAR_OS_ENV=solaris
6894      ;;
6895    *darwin*)
6896      VAR_OS=macosx
6897      VAR_OS_API=posix
6898      VAR_OS_ENV=macosx
6899      ;;
6900    *bsd*)
6901      VAR_OS=bsd
6902      VAR_OS_API=posix
6903      VAR_OS_ENV=bsd
6904      ;;
6905    *cygwin*)
6906      VAR_OS=windows
6907      VAR_OS_API=winapi
6908      VAR_OS_ENV=windows.cygwin
6909      ;;
6910    *mingw*)
6911      VAR_OS=windows
6912      VAR_OS_API=winapi
6913      VAR_OS_ENV=windows.msys
6914      ;;
6915    *aix*)
6916      VAR_OS=aix
6917      VAR_OS_API=posix
6918      VAR_OS_ENV=aix
6919      ;;
6920    *)
6921      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6922      ;;
6923  esac
6924
6925
6926  # First argument is the cpu name from the trip/quad
6927  case "$host_cpu" in
6928    x86_64)
6929      VAR_CPU=x86_64
6930      VAR_CPU_ARCH=x86
6931      VAR_CPU_BITS=64
6932      VAR_CPU_ENDIAN=little
6933      ;;
6934    i?86)
6935      VAR_CPU=x86
6936      VAR_CPU_ARCH=x86
6937      VAR_CPU_BITS=32
6938      VAR_CPU_ENDIAN=little
6939      ;;
6940    arm*)
6941      VAR_CPU=arm
6942      VAR_CPU_ARCH=arm
6943      VAR_CPU_BITS=32
6944      VAR_CPU_ENDIAN=little
6945      ;;
6946    powerpc)
6947      VAR_CPU=ppc
6948      VAR_CPU_ARCH=ppc
6949      VAR_CPU_BITS=32
6950      VAR_CPU_ENDIAN=big
6951      ;;
6952    powerpc64)
6953      VAR_CPU=ppc64
6954      VAR_CPU_ARCH=ppc
6955      VAR_CPU_BITS=64
6956      VAR_CPU_ENDIAN=big
6957      ;;
6958    s390)
6959      VAR_CPU=s390
6960      VAR_CPU_ARCH=s390
6961      VAR_CPU_BITS=32
6962      VAR_CPU_ENDIAN=big
6963      ;;
6964    s390x)
6965      VAR_CPU=s390x
6966      VAR_CPU_ARCH=s390
6967      VAR_CPU_BITS=64
6968      VAR_CPU_ENDIAN=big
6969      ;;
6970    sparc)
6971      VAR_CPU=sparc
6972      VAR_CPU_ARCH=sparc
6973      VAR_CPU_BITS=32
6974      VAR_CPU_ENDIAN=big
6975      ;;
6976    sparcv9)
6977      VAR_CPU=sparcv9
6978      VAR_CPU_ARCH=sparc
6979      VAR_CPU_BITS=64
6980      VAR_CPU_ENDIAN=big
6981      ;;
6982    *)
6983      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6984      ;;
6985  esac
6986
6987  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6988  OPENJDK_TARGET_OS="$VAR_OS"
6989  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6990  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6991  OPENJDK_TARGET_CPU="$VAR_CPU"
6992  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6993  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6994  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6995
6996
6997
6998
6999
7000
7001
7002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7003$as_echo_n "checking openjdk-target os-cpu... " >&6; }
7004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7005$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7006
7007
7008
7009# Check whether --with-target-bits was given.
7010if test "${with_target_bits+set}" = set; then :
7011  withval=$with_target_bits;
7012fi
7013
7014
7015  # We have three types of compiles:
7016  # native  == normal compilation, target system == build system
7017  # cross   == traditional cross compilation, target system != build system; special toolchain needed
7018  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7019  #
7020  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7021    # We're doing a proper cross-compilation
7022    COMPILE_TYPE="cross"
7023  else
7024    COMPILE_TYPE="native"
7025  fi
7026
7027  if test "x$with_target_bits" != x; then
7028    if test "x$COMPILE_TYPE" = "xcross"; then
7029      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7030    fi
7031
7032    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7033      # A reduced build is requested
7034      COMPILE_TYPE="reduced"
7035      OPENJDK_TARGET_CPU_BITS=32
7036      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7037        OPENJDK_TARGET_CPU=x86
7038      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7039        OPENJDK_TARGET_CPU=sparc
7040      else
7041        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7042      fi
7043    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7044      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
7045    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7046      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7047$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7048    else
7049      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7050    fi
7051  fi
7052
7053
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7055$as_echo_n "checking compilation type... " >&6; }
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7057$as_echo "$COMPILE_TYPE" >&6; }
7058
7059
7060  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7061    REQUIRED_OS_NAME=SunOS
7062    REQUIRED_OS_VERSION=5.10
7063  fi
7064  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7065    REQUIRED_OS_NAME=Linux
7066    REQUIRED_OS_VERSION=2.6
7067  fi
7068  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7069    REQUIRED_OS_NAME=Windows
7070    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7071      REQUIRED_OS_VERSION=5.2
7072    else
7073      REQUIRED_OS_VERSION=5.1
7074    fi
7075  fi
7076  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7077    REQUIRED_OS_NAME=Darwin
7078    REQUIRED_OS_VERSION=11.2
7079  fi
7080
7081
7082
7083
7084
7085  # Also store the legacy naming of the cpu.
7086  # Ie i586 and amd64 instead of x86 and x86_64
7087  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7088  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7089    OPENJDK_TARGET_CPU_LEGACY="i586"
7090  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7091    # On all platforms except MacOSX replace x86_64 with amd64.
7092    OPENJDK_TARGET_CPU_LEGACY="amd64"
7093  fi
7094
7095
7096  # And the second legacy naming of the cpu.
7097  # Ie i386 and amd64 instead of x86 and x86_64.
7098  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7099  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7100    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7101  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7102    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7103  fi
7104
7105
7106  # This is the name of the cpu (but using i386 and amd64 instead of
7107  # x86 and x86_64, respectively), preceeded by a /, to be used when
7108  # locating libraries. On macosx, it's empty, though.
7109  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111    OPENJDK_TARGET_CPU_LIBDIR=""
7112  fi
7113
7114
7115  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7116  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7117  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7118  OPENJDK_TARGET_CPU_ISADIR=""
7119  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7120    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7121      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7122    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7123      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7124    fi
7125  fi
7126
7127
7128  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7129  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7130  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7131    # On linux only, we replace x86 with i386.
7132    OPENJDK_TARGET_CPU_OSARCH="i386"
7133  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7134    # On all platforms except macosx, we replace x86_64 with amd64.
7135    OPENJDK_TARGET_CPU_OSARCH="amd64"
7136  fi
7137
7138
7139  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7140  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7141    OPENJDK_TARGET_CPU_JLI="i386"
7142  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7143    # On all platforms except macosx, we replace x86_64 with amd64.
7144    OPENJDK_TARGET_CPU_JLI="amd64"
7145  fi
7146  # Now setup the -D flags for building libjli.
7147  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7148  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7149    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7150      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7151    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7152      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7153    fi
7154  fi
7155
7156
7157  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7158  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7159    OPENJDK_TARGET_OS_API_DIR="solaris"
7160  fi
7161  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7162    OPENJDK_TARGET_OS_API_DIR="windows"
7163  fi
7164
7165
7166  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7167      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7168  else
7169      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7170  fi
7171
7172
7173  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7174    A_LP64="LP64:="
7175    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7176    # unpack200.exe
7177    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7178      ADD_LP64="-D_LP64=1"
7179    fi
7180  fi
7181  LP64=$A_LP64
7182
7183
7184  if test "x$COMPILE_TYPE" = "xcross"; then
7185    # FIXME: ... or should this include reduced builds..?
7186    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7187  else
7188    DEFINE_CROSS_COMPILE_ARCH=""
7189  fi
7190
7191
7192  # ZERO_ARCHDEF is used to enable architecture-specific code
7193  case "${OPENJDK_TARGET_CPU}" in
7194    ppc*)    ZERO_ARCHDEF=PPC   ;;
7195    s390*)   ZERO_ARCHDEF=S390  ;;
7196    sparc*)  ZERO_ARCHDEF=SPARC ;;
7197    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7198    x86)     ZERO_ARCHDEF=IA32  ;;
7199    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7200  esac
7201
7202
7203
7204
7205# Continue setting up basic stuff. Most remaining code require fundamental tools.
7206
7207  # Locate the directory of this script.
7208  SCRIPT="$0"
7209  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7210
7211  # Where is the source? It is located two levels above the configure script.
7212  CURDIR="$PWD"
7213  cd "$AUTOCONF_DIR/../.."
7214  SRC_ROOT="`$THEPWDCMD -L`"
7215
7216  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7217    PATH_SEP=";"
7218
7219  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7220  if test $SRC_ROOT_LENGTH -gt 100; then
7221    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7222  fi
7223
7224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7226$as_echo_n "checking cygwin release... " >&6; }
7227    CYGWIN_VERSION=`$UNAME -r`
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7229$as_echo "$CYGWIN_VERSION" >&6; }
7230    WINDOWS_ENV_VENDOR='cygwin'
7231    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7232
7233    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7234    if test "x$CYGWIN_VERSION_OK" = x; then
7235      { $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
7236$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;}
7237      as_fn_error $? "Cannot continue" "$LINENO" 5
7238    fi
7239    if test "x$CYGPATH" = x; then
7240      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7241    fi
7242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7243$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7244    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7245    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7246    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7247    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7249$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7250    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7251    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7252    if test "x$test_cygdrive_prefix" = x; then
7253      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7254    fi
7255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7257$as_echo_n "checking msys release... " >&6; }
7258    MSYS_VERSION=`$UNAME -r`
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7260$as_echo "$MSYS_VERSION" >&6; }
7261
7262    WINDOWS_ENV_VENDOR='msys'
7263    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7264
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7266$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7267    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7268    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7269
7270  windows_path="$MSYS_ROOT_PATH"
7271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7272    unix_path=`$CYGPATH -u "$windows_path"`
7273    MSYS_ROOT_PATH="$unix_path"
7274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7276    MSYS_ROOT_PATH="$unix_path"
7277  fi
7278
7279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7280$as_echo "$MSYS_ROOT_PATH" >&6; }
7281    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7282  else
7283    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7284  fi
7285
7286  # Test if windows or unix (cygwin/msys) find is first in path.
7287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7288$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7289  FIND_BINARY_OUTPUT=`find --version 2>&1`
7290  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7292$as_echo "unix style" >&6; }
7293  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7295$as_echo "Windows" >&6; }
7296    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7297$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7298    { $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
7299$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7300    as_fn_error $? "Cannot continue" "$LINENO" 5
7301  else
7302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7303$as_echo "unknown" >&6; }
7304    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7305$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7306  fi
7307
7308  else
7309    PATH_SEP=":"
7310  fi
7311
7312
7313
7314  cd "$CURDIR"
7315
7316
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318
7319  # Input might be given as Windows format, start by converting to
7320  # unix format.
7321  path="$SRC_ROOT"
7322  new_path=`$CYGPATH -u "$path"`
7323
7324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327  # "foo.exe" is OK but "foo" is an error.
7328  #
7329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330  # It is also a way to make sure we got the proper file name for the real test later on.
7331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332  if test "x$test_shortpath" = x; then
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7334$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7335    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7336  fi
7337
7338  # Call helper function which possibly converts this using DOS-style short mode.
7339  # If so, the updated path is stored in $new_path.
7340
7341  input_path="$new_path"
7342  # Check if we need to convert this using DOS-style short mode. If the path
7343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344  # take no chances and rewrite it.
7345  # Note: m4 eats our [], so we need to use [ and ] instead.
7346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347  if test "x$has_forbidden_chars" != x; then
7348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352      # Going to short mode and back again did indeed matter. Since short mode is
7353      # case insensitive, let's make it lowercase to improve readability.
7354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355      # Now convert it back to Unix-stile (cygpath)
7356      input_path=`$CYGPATH -u "$shortmode_path"`
7357      new_path="$input_path"
7358    fi
7359  fi
7360
7361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362  if test "x$test_cygdrive_prefix" = x; then
7363    # As a simple fix, exclude /usr/bin since it's not a real path.
7364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366      # a path prefixed by /cygdrive for fixpath to work.
7367      new_path="$CYGWIN_ROOT_PATH$input_path"
7368    fi
7369  fi
7370
7371
7372  if test "x$path" != "x$new_path"; then
7373    SRC_ROOT="$new_path"
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7375$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7376  fi
7377
7378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379
7380  path="$SRC_ROOT"
7381  has_colon=`$ECHO $path | $GREP ^.:`
7382  new_path="$path"
7383  if test "x$has_colon" = x; then
7384    # Not in mixed or Windows style, start by that.
7385    new_path=`cmd //c echo $path`
7386  fi
7387
7388
7389  input_path="$new_path"
7390  # Check if we need to convert this using DOS-style short mode. If the path
7391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392  # take no chances and rewrite it.
7393  # Note: m4 eats our [], so we need to use [ and ] instead.
7394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395  if test "x$has_forbidden_chars" != x; then
7396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398  fi
7399
7400
7401  windows_path="$new_path"
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403    unix_path=`$CYGPATH -u "$windows_path"`
7404    new_path="$unix_path"
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407    new_path="$unix_path"
7408  fi
7409
7410  if test "x$path" != "x$new_path"; then
7411    SRC_ROOT="$new_path"
7412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7413$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7414  fi
7415
7416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418
7419  else
7420    # We're on a posix platform. Hooray! :)
7421    path="$SRC_ROOT"
7422    has_space=`$ECHO "$path" | $GREP " "`
7423    if test "x$has_space" != x; then
7424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7425$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7427    fi
7428
7429    # Use eval to expand a potential ~
7430    eval path="$path"
7431    if test ! -f "$path" && test ! -d "$path"; then
7432      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7433    fi
7434
7435    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7436  fi
7437
7438
7439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7440
7441  # Input might be given as Windows format, start by converting to
7442  # unix format.
7443  path="$CURDIR"
7444  new_path=`$CYGPATH -u "$path"`
7445
7446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7449  # "foo.exe" is OK but "foo" is an error.
7450  #
7451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7452  # It is also a way to make sure we got the proper file name for the real test later on.
7453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7454  if test "x$test_shortpath" = x; then
7455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7456$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7457    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7458  fi
7459
7460  # Call helper function which possibly converts this using DOS-style short mode.
7461  # If so, the updated path is stored in $new_path.
7462
7463  input_path="$new_path"
7464  # Check if we need to convert this using DOS-style short mode. If the path
7465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7466  # take no chances and rewrite it.
7467  # Note: m4 eats our [], so we need to use [ and ] instead.
7468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7469  if test "x$has_forbidden_chars" != x; then
7470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7474      # Going to short mode and back again did indeed matter. Since short mode is
7475      # case insensitive, let's make it lowercase to improve readability.
7476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7477      # Now convert it back to Unix-stile (cygpath)
7478      input_path=`$CYGPATH -u "$shortmode_path"`
7479      new_path="$input_path"
7480    fi
7481  fi
7482
7483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7484  if test "x$test_cygdrive_prefix" = x; then
7485    # As a simple fix, exclude /usr/bin since it's not a real path.
7486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7488      # a path prefixed by /cygdrive for fixpath to work.
7489      new_path="$CYGWIN_ROOT_PATH$input_path"
7490    fi
7491  fi
7492
7493
7494  if test "x$path" != "x$new_path"; then
7495    CURDIR="$new_path"
7496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7497$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7498  fi
7499
7500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7501
7502  path="$CURDIR"
7503  has_colon=`$ECHO $path | $GREP ^.:`
7504  new_path="$path"
7505  if test "x$has_colon" = x; then
7506    # Not in mixed or Windows style, start by that.
7507    new_path=`cmd //c echo $path`
7508  fi
7509
7510
7511  input_path="$new_path"
7512  # Check if we need to convert this using DOS-style short mode. If the path
7513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7514  # take no chances and rewrite it.
7515  # Note: m4 eats our [], so we need to use [ and ] instead.
7516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7517  if test "x$has_forbidden_chars" != x; then
7518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7520  fi
7521
7522
7523  windows_path="$new_path"
7524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7525    unix_path=`$CYGPATH -u "$windows_path"`
7526    new_path="$unix_path"
7527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7529    new_path="$unix_path"
7530  fi
7531
7532  if test "x$path" != "x$new_path"; then
7533    CURDIR="$new_path"
7534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7535$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7536  fi
7537
7538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7540
7541  else
7542    # We're on a posix platform. Hooray! :)
7543    path="$CURDIR"
7544    has_space=`$ECHO "$path" | $GREP " "`
7545    if test "x$has_space" != x; then
7546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7547$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7549    fi
7550
7551    # Use eval to expand a potential ~
7552    eval path="$path"
7553    if test ! -f "$path" && test ! -d "$path"; then
7554      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7555    fi
7556
7557    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7558  fi
7559
7560
7561  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7562    # Add extra search paths on solaris for utilities like ar and as etc...
7563    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7564  fi
7565
7566  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7567  # is not correct.
7568
7569# Check whether --with-sys-root was given.
7570if test "${with_sys_root+set}" = set; then :
7571  withval=$with_sys_root;
7572fi
7573
7574
7575  if test "x$with_sys_root" != x; then
7576    SYS_ROOT=$with_sys_root
7577  else
7578    SYS_ROOT=/
7579  fi
7580
7581
7582
7583# Check whether --with-tools-dir was given.
7584if test "${with_tools_dir+set}" = set; then :
7585  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7586
7587fi
7588
7589
7590
7591# Check whether --with-devkit was given.
7592if test "${with_devkit+set}" = set; then :
7593  withval=$with_devkit;
7594        if test "x$with_sys_root" != x; then
7595          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7596        fi
7597
7598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7599
7600  # Input might be given as Windows format, start by converting to
7601  # unix format.
7602  path="$with_devkit"
7603  new_path=`$CYGPATH -u "$path"`
7604
7605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7608  # "foo.exe" is OK but "foo" is an error.
7609  #
7610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7611  # It is also a way to make sure we got the proper file name for the real test later on.
7612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7613  if test "x$test_shortpath" = x; then
7614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7615$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7616    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7617  fi
7618
7619  # Call helper function which possibly converts this using DOS-style short mode.
7620  # If so, the updated path is stored in $new_path.
7621
7622  input_path="$new_path"
7623  # Check if we need to convert this using DOS-style short mode. If the path
7624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7625  # take no chances and rewrite it.
7626  # Note: m4 eats our [], so we need to use [ and ] instead.
7627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7628  if test "x$has_forbidden_chars" != x; then
7629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7633      # Going to short mode and back again did indeed matter. Since short mode is
7634      # case insensitive, let's make it lowercase to improve readability.
7635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7636      # Now convert it back to Unix-stile (cygpath)
7637      input_path=`$CYGPATH -u "$shortmode_path"`
7638      new_path="$input_path"
7639    fi
7640  fi
7641
7642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7643  if test "x$test_cygdrive_prefix" = x; then
7644    # As a simple fix, exclude /usr/bin since it's not a real path.
7645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7647      # a path prefixed by /cygdrive for fixpath to work.
7648      new_path="$CYGWIN_ROOT_PATH$input_path"
7649    fi
7650  fi
7651
7652
7653  if test "x$path" != "x$new_path"; then
7654    with_devkit="$new_path"
7655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7656$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7657  fi
7658
7659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7660
7661  path="$with_devkit"
7662  has_colon=`$ECHO $path | $GREP ^.:`
7663  new_path="$path"
7664  if test "x$has_colon" = x; then
7665    # Not in mixed or Windows style, start by that.
7666    new_path=`cmd //c echo $path`
7667  fi
7668
7669
7670  input_path="$new_path"
7671  # Check if we need to convert this using DOS-style short mode. If the path
7672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7673  # take no chances and rewrite it.
7674  # Note: m4 eats our [], so we need to use [ and ] instead.
7675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7676  if test "x$has_forbidden_chars" != x; then
7677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7679  fi
7680
7681
7682  windows_path="$new_path"
7683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7684    unix_path=`$CYGPATH -u "$windows_path"`
7685    new_path="$unix_path"
7686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7688    new_path="$unix_path"
7689  fi
7690
7691  if test "x$path" != "x$new_path"; then
7692    with_devkit="$new_path"
7693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7694$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7695  fi
7696
7697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7699
7700  else
7701    # We're on a posix platform. Hooray! :)
7702    path="$with_devkit"
7703    has_space=`$ECHO "$path" | $GREP " "`
7704    if test "x$has_space" != x; then
7705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7706$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7707      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7708    fi
7709
7710    # Use eval to expand a potential ~
7711    eval path="$path"
7712    if test ! -f "$path" && test ! -d "$path"; then
7713      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7714    fi
7715
7716    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7717  fi
7718
7719
7720  if test "x$TOOLS_DIR" = x; then
7721    TOOLS_DIR="$with_devkit/bin"
7722  else
7723    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7724  fi
7725
7726        if test -d "$with_devkit/$host_alias/libc"; then
7727          SYS_ROOT=$with_devkit/$host_alias/libc
7728        elif test -d "$with_devkit/$host/sys-root"; then
7729          SYS_ROOT=$with_devkit/$host/sys-root
7730        fi
7731
7732fi
7733
7734
7735
7736  # Setup default logging of stdout and stderr to build.log in the output root.
7737  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7738  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7739  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7740
7741
7742
7743
7744
7745# Check if it's a pure open build or if custom sources are to be used.
7746
7747  # Check whether --enable-openjdk-only was given.
7748if test "${enable_openjdk_only+set}" = set; then :
7749  enableval=$enable_openjdk_only;
7750else
7751  enable_openjdk_only="no"
7752fi
7753
7754
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7756$as_echo_n "checking for presence of closed sources... " >&6; }
7757  if test -d "$SRC_ROOT/jdk/src/closed"; then
7758    CLOSED_SOURCE_PRESENT=yes
7759  else
7760    CLOSED_SOURCE_PRESENT=no
7761  fi
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7763$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7764
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7766$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7767  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7769$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7770
7771  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7772    OPENJDK=true
7773    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7774      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7775$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7776    fi
7777  else
7778    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7779      OPENJDK=true
7780    else
7781      OPENJDK=false
7782    fi
7783  fi
7784
7785  if test "x$OPENJDK" = "xtrue"; then
7786    SET_OPENJDK="OPENJDK=true"
7787  fi
7788
7789
7790
7791
7792# These are needed to be able to create a configuration name (and thus the output directory)
7793
7794  ###############################################################################
7795  #
7796  # Check which variant of the JDK that we want to build.
7797  # Currently we have:
7798  #    normal:   standard edition
7799  # but the custom make system may add other variants
7800  #
7801  # Effectively the JDK variant gives a name to a specific set of
7802  # modules to compile into the JDK. In the future, these modules
7803  # might even be Jigsaw modules.
7804  #
7805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7806$as_echo_n "checking which variant of the JDK to build... " >&6; }
7807
7808# Check whether --with-jdk-variant was given.
7809if test "${with_jdk_variant+set}" = set; then :
7810  withval=$with_jdk_variant;
7811fi
7812
7813
7814  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7815    JDK_VARIANT="normal"
7816  else
7817    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7818  fi
7819
7820
7821
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7823$as_echo "$JDK_VARIANT" >&6; }
7824
7825
7826###############################################################################
7827#
7828# Check which interpreter of the JVM we want to build.
7829# Currently we have:
7830#    template: Template interpreter (the default)
7831#    cpp     : C++ interpreter
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7833$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7834
7835# Check whether --with-jvm-interpreter was given.
7836if test "${with_jvm_interpreter+set}" = set; then :
7837  withval=$with_jvm_interpreter;
7838fi
7839
7840
7841if test "x$with_jvm_interpreter" = x; then
7842     with_jvm_interpreter="template"
7843fi
7844
7845JVM_INTERPRETER="$with_jvm_interpreter"
7846
7847if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7848   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7849fi
7850
7851
7852
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7854$as_echo "$with_jvm_interpreter" >&6; }
7855
7856
7857
7858  ###############################################################################
7859  #
7860  # Check which variants of the JVM that we want to build.
7861  # Currently we have:
7862  #    server: normal interpreter and a tiered C1/C2 compiler
7863  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7864  #    minimal1: reduced form of client with optional VM services and features stripped out
7865  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7866  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7867  #    zero: no machine code interpreter, no compiler
7868  #    zeroshark: zero interpreter and shark/llvm compiler backend
7869#    core: interpreter only, no compiler (only works on some platforms)
7870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7871$as_echo_n "checking which variants of the JVM to build... " >&6; }
7872
7873# Check whether --with-jvm-variants was given.
7874if test "${with_jvm_variants+set}" = set; then :
7875  withval=$with_jvm_variants;
7876fi
7877
7878
7879  if test "x$with_jvm_variants" = x; then
7880    with_jvm_variants="server"
7881  fi
7882
7883  JVM_VARIANTS=",$with_jvm_variants,"
7884  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7885
7886  if test "x$TEST_VARIANTS" != "x,"; then
7887     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7888  fi
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7890$as_echo "$with_jvm_variants" >&6; }
7891
7892  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7893  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7894  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7895  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7896  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7897  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7898  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7899
7900  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7901    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7902      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7903    fi
7904  fi
7905  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7906    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7907      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7908    fi
7909  fi
7910  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7911    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7912      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7913    fi
7914  fi
7915
7916  # Replace the commas with AND for use in the build directory name.
7917  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7918  COUNT_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/' -e 's/core,/1/'`
7919  if test "x$COUNT_VARIANTS" != "x,1"; then
7920    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7921  else
7922    BUILDING_MULTIPLE_JVM_VARIANTS=no
7923  fi
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934  INCLUDE_SA=true
7935  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7936    INCLUDE_SA=false
7937  fi
7938  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7939    INCLUDE_SA=false
7940  fi
7941  if test "x$VAR_CPU" = xppc64 ; then
7942    INCLUDE_SA=false
7943  fi
7944
7945
7946  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7947    MACOSX_UNIVERSAL="true"
7948  fi
7949
7950
7951
7952
7953  ###############################################################################
7954  #
7955  # Set the debug level
7956  #    release: no debug information, all optimizations, no asserts.
7957  #    fastdebug: debug information (-g), all optimizations, all asserts
7958  #    slowdebug: debug information (-g), no optimizations, all asserts
7959  #
7960  DEBUG_LEVEL="release"
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7962$as_echo_n "checking which debug level to use... " >&6; }
7963  # Check whether --enable-debug was given.
7964if test "${enable_debug+set}" = set; then :
7965  enableval=$enable_debug;
7966        ENABLE_DEBUG="${enableval}"
7967        DEBUG_LEVEL="fastdebug"
7968
7969else
7970  ENABLE_DEBUG="no"
7971fi
7972
7973
7974
7975# Check whether --with-debug-level was given.
7976if test "${with_debug_level+set}" = set; then :
7977  withval=$with_debug_level;
7978        DEBUG_LEVEL="${withval}"
7979        if test "x$ENABLE_DEBUG" = xyes; then
7980          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7981        fi
7982
7983fi
7984
7985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7986$as_echo "$DEBUG_LEVEL" >&6; }
7987
7988  if test "x$DEBUG_LEVEL" != xrelease && \
7989      test "x$DEBUG_LEVEL" != xfastdebug && \
7990      test "x$DEBUG_LEVEL" != xslowdebug; then
7991    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7992  fi
7993
7994
7995  ###############################################################################
7996  #
7997  # Setup legacy vars/targets and new vars to deal with different debug levels.
7998  #
7999
8000  case $DEBUG_LEVEL in
8001    release )
8002      VARIANT="OPT"
8003      FASTDEBUG="false"
8004      DEBUG_CLASSFILES="false"
8005      BUILD_VARIANT_RELEASE=""
8006      HOTSPOT_DEBUG_LEVEL="product"
8007      HOTSPOT_EXPORT="product"
8008      ;;
8009    fastdebug )
8010      VARIANT="DBG"
8011      FASTDEBUG="true"
8012      DEBUG_CLASSFILES="true"
8013      BUILD_VARIANT_RELEASE="-fastdebug"
8014      HOTSPOT_DEBUG_LEVEL="fastdebug"
8015      HOTSPOT_EXPORT="fastdebug"
8016      ;;
8017    slowdebug )
8018      VARIANT="DBG"
8019      FASTDEBUG="false"
8020      DEBUG_CLASSFILES="true"
8021      BUILD_VARIANT_RELEASE="-debug"
8022      HOTSPOT_DEBUG_LEVEL="jvmg"
8023      HOTSPOT_EXPORT="debug"
8024      ;;
8025  esac
8026
8027  #####
8028  # Generate the legacy makefile targets for hotspot.
8029  # The hotspot api for selecting the build artifacts, really, needs to be improved.
8030  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8031  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8032  # But until then ...
8033  HOTSPOT_TARGET=""
8034
8035  if test "x$JVM_VARIANT_SERVER" = xtrue; then
8036    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8037  fi
8038
8039  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8040    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8041  fi
8042
8043  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8044    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8045  fi
8046
8047  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8048    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8049  fi
8050
8051  if test "x$JVM_VARIANT_ZERO" = xtrue; then
8052    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8053  fi
8054
8055  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8056    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8057  fi
8058
8059  if test "x$JVM_VARIANT_CORE" = xtrue; then
8060    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8061  fi
8062
8063  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8064
8065  # On Macosx universal binaries are produced, but they only contain
8066  # 64 bit intel. This invalidates control of which jvms are built
8067  # from configure, but only server is valid anyway. Fix this
8068  # when hotspot makefiles are rewritten.
8069  if test "x$MACOSX_UNIVERSAL" = xtrue; then
8070    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8071  fi
8072
8073  #####
8074
8075
8076
8077
8078
8079
8080
8081
8082# With basic setup done, call the custom early hook.
8083
8084
8085# To properly create a configuration name, we need to have the OpenJDK target
8086# and options (variants and debug level) parsed.
8087
8088
8089
8090# Check whether --with-conf-name was given.
8091if test "${with_conf_name+set}" = set; then :
8092  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8093fi
8094
8095
8096  # Test from where we are running configure, in or outside of src root.
8097  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8098      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8099      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8100    # We are running configure from the src root.
8101    # Create a default ./build/target-variant-debuglevel output root.
8102    if test "x${CONF_NAME}" = x; then
8103      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8104    fi
8105    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8106    $MKDIR -p "$OUTPUT_ROOT"
8107    if test ! -d "$OUTPUT_ROOT"; then
8108      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8109    fi
8110  else
8111    # We are running configure from outside of the src dir.
8112    # Then use the current directory as output dir!
8113    # If configuration is situated in normal build directory, just use the build
8114    # directory name as configuration name, otherwise use the complete path.
8115    if test "x${CONF_NAME}" = x; then
8116      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8117    fi
8118    OUTPUT_ROOT="$CURDIR"
8119
8120    # WARNING: This might be a bad thing to do. You need to be sure you want to
8121    # have a configuration in this directory. Do some sanity checks!
8122
8123    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8124      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8125      # other files
8126      files_present=`$LS $OUTPUT_ROOT`
8127      # Configure has already touched config.log and confdefs.h in the current dir when this check
8128      # is performed.
8129      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8130      | $TR -d '\n'`
8131      if test "x$filtered_files" != x; then
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8133$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8135$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8137$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8138        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8139$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8140        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8141$as_echo "$as_me: seriously mess up just about everything." >&6;}
8142        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8143$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8144        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8145$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8146        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8147      fi
8148    fi
8149  fi
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8151$as_echo_n "checking what configuration name to use... " >&6; }
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8153$as_echo "$CONF_NAME" >&6; }
8154
8155
8156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8157
8158  # Input might be given as Windows format, start by converting to
8159  # unix format.
8160  path="$OUTPUT_ROOT"
8161  new_path=`$CYGPATH -u "$path"`
8162
8163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8166  # "foo.exe" is OK but "foo" is an error.
8167  #
8168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8169  # It is also a way to make sure we got the proper file name for the real test later on.
8170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8171  if test "x$test_shortpath" = x; then
8172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8173$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8174    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8175  fi
8176
8177  # Call helper function which possibly converts this using DOS-style short mode.
8178  # If so, the updated path is stored in $new_path.
8179
8180  input_path="$new_path"
8181  # Check if we need to convert this using DOS-style short mode. If the path
8182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8183  # take no chances and rewrite it.
8184  # Note: m4 eats our [], so we need to use [ and ] instead.
8185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8186  if test "x$has_forbidden_chars" != x; then
8187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8191      # Going to short mode and back again did indeed matter. Since short mode is
8192      # case insensitive, let's make it lowercase to improve readability.
8193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8194      # Now convert it back to Unix-stile (cygpath)
8195      input_path=`$CYGPATH -u "$shortmode_path"`
8196      new_path="$input_path"
8197    fi
8198  fi
8199
8200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8201  if test "x$test_cygdrive_prefix" = x; then
8202    # As a simple fix, exclude /usr/bin since it's not a real path.
8203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8205      # a path prefixed by /cygdrive for fixpath to work.
8206      new_path="$CYGWIN_ROOT_PATH$input_path"
8207    fi
8208  fi
8209
8210
8211  if test "x$path" != "x$new_path"; then
8212    OUTPUT_ROOT="$new_path"
8213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8214$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8215  fi
8216
8217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8218
8219  path="$OUTPUT_ROOT"
8220  has_colon=`$ECHO $path | $GREP ^.:`
8221  new_path="$path"
8222  if test "x$has_colon" = x; then
8223    # Not in mixed or Windows style, start by that.
8224    new_path=`cmd //c echo $path`
8225  fi
8226
8227
8228  input_path="$new_path"
8229  # Check if we need to convert this using DOS-style short mode. If the path
8230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8231  # take no chances and rewrite it.
8232  # Note: m4 eats our [], so we need to use [ and ] instead.
8233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8234  if test "x$has_forbidden_chars" != x; then
8235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8237  fi
8238
8239
8240  windows_path="$new_path"
8241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8242    unix_path=`$CYGPATH -u "$windows_path"`
8243    new_path="$unix_path"
8244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8246    new_path="$unix_path"
8247  fi
8248
8249  if test "x$path" != "x$new_path"; then
8250    OUTPUT_ROOT="$new_path"
8251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8252$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8253  fi
8254
8255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8257
8258  else
8259    # We're on a posix platform. Hooray! :)
8260    path="$OUTPUT_ROOT"
8261    has_space=`$ECHO "$path" | $GREP " "`
8262    if test "x$has_space" != x; then
8263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8264$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8265      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8266    fi
8267
8268    # Use eval to expand a potential ~
8269    eval path="$path"
8270    if test ! -f "$path" && test ! -d "$path"; then
8271      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8272    fi
8273
8274    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8275  fi
8276
8277
8278  SPEC=$OUTPUT_ROOT/spec.gmk
8279
8280  CONF_NAME=$CONF_NAME
8281
8282  OUTPUT_ROOT=$OUTPUT_ROOT
8283
8284
8285  # Most of the probed defines are put into config.h
8286  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8287
8288  # The spec.gmk file contains all variables for the make system.
8289  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8290
8291  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8292  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8293
8294  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8295  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8296
8297  # The compare.sh is used to compare the build output to other builds.
8298  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8299
8300  # Spec.sh is currently used by compare-objects.sh
8301  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8302
8303  # The generated Makefile knows where the spec.gmk is and where the source is.
8304  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8305  # which will look for generated configurations
8306  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8307
8308
8309  # Save the arguments given to us
8310  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8311
8312
8313# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8314
8315  for ac_prog in apt-get yum port pkgutil pkgadd
8316do
8317  # Extract the first word of "$ac_prog", so it can be a program name with args.
8318set dummy $ac_prog; ac_word=$2
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320$as_echo_n "checking for $ac_word... " >&6; }
8321if ${ac_cv_prog_PKGHANDLER+:} false; then :
8322  $as_echo_n "(cached) " >&6
8323else
8324  if test -n "$PKGHANDLER"; then
8325  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8326else
8327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330  IFS=$as_save_IFS
8331  test -z "$as_dir" && as_dir=.
8332    for ac_exec_ext in '' $ac_executable_extensions; do
8333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8334    ac_cv_prog_PKGHANDLER="$ac_prog"
8335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8336    break 2
8337  fi
8338done
8339  done
8340IFS=$as_save_IFS
8341
8342fi
8343fi
8344PKGHANDLER=$ac_cv_prog_PKGHANDLER
8345if test -n "$PKGHANDLER"; then
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8347$as_echo "$PKGHANDLER" >&6; }
8348else
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350$as_echo "no" >&6; }
8351fi
8352
8353
8354  test -n "$PKGHANDLER" && break
8355done
8356
8357
8358
8359# Setup tools that requires more complex handling, or that is not needed by the configure script.
8360
8361
8362  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8363  if test "x$MAKE" != x; then
8364    # User has supplied a make, test it.
8365    if test ! -f "$MAKE"; then
8366      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8367    fi
8368
8369  MAKE_CANDIDATE=""$MAKE""
8370  DESCRIPTION="user supplied MAKE=$MAKE"
8371  if test "x$MAKE_CANDIDATE" != x; then
8372    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8373$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8374    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8375    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8376    if test "x$IS_GNU_MAKE" = x; then
8377      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8378$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8379    else
8380      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8381      if test "x$IS_MODERN_MAKE" = x; then
8382        { $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
8383$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;}
8384      else
8385        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8386          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8387            MAKE_EXPECTED_ENV='cygwin'
8388          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8389            MAKE_EXPECTED_ENV='msys'
8390          else
8391            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8392          fi
8393          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8394          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8395        else
8396          # Not relevant for non-Windows
8397          IS_MAKE_CORRECT_ENV=true
8398        fi
8399        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8400          { $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
8401$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;}
8402        else
8403          FOUND_MAKE=$MAKE_CANDIDATE
8404
8405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8406
8407  # First separate the path from the arguments. This will split at the first
8408  # space.
8409  complete="$FOUND_MAKE"
8410  path="${complete%% *}"
8411  tmp="$complete EOL"
8412  arguments="${tmp#* }"
8413
8414  # Input might be given as Windows format, start by converting to
8415  # unix format.
8416  new_path=`$CYGPATH -u "$path"`
8417
8418  # Now try to locate executable using which
8419  new_path=`$WHICH "$new_path" 2> /dev/null`
8420  # bat and cmd files are not always considered executable in cygwin causing which
8421  # to not find them
8422  if test "x$new_path" = x \
8423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8425    new_path=`$CYGPATH -u "$path"`
8426  fi
8427  if test "x$new_path" = x; then
8428    # Oops. Which didn't find the executable.
8429    # The splitting of arguments from the executable at a space might have been incorrect,
8430    # since paths with space are more likely in Windows. Give it another try with the whole
8431    # argument.
8432    path="$complete"
8433    arguments="EOL"
8434    new_path=`$CYGPATH -u "$path"`
8435    new_path=`$WHICH "$new_path" 2> /dev/null`
8436    # bat and cmd files are not always considered executable in cygwin causing which
8437    # to not find them
8438    if test "x$new_path" = x \
8439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8441      new_path=`$CYGPATH -u "$path"`
8442    fi
8443    if test "x$new_path" = x; then
8444      # It's still not found. Now this is an unrecoverable error.
8445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8447      has_space=`$ECHO "$complete" | $GREP " "`
8448      if test "x$has_space" != x; then
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8451      fi
8452      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8453    fi
8454  fi
8455
8456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8459  # "foo.exe" is OK but "foo" is an error.
8460  #
8461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8462  # It is also a way to make sure we got the proper file name for the real test later on.
8463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8464  if test "x$test_shortpath" = x; then
8465    # Short path failed, file does not exist as specified.
8466    # Try adding .exe or .cmd
8467    if test -f "${new_path}.exe"; then
8468      input_to_shortpath="${new_path}.exe"
8469    elif test -f "${new_path}.cmd"; then
8470      input_to_shortpath="${new_path}.cmd"
8471    else
8472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8477    fi
8478  else
8479    input_to_shortpath="$new_path"
8480  fi
8481
8482  # Call helper function which possibly converts this using DOS-style short mode.
8483  # If so, the updated path is stored in $new_path.
8484  new_path="$input_to_shortpath"
8485
8486  input_path="$input_to_shortpath"
8487  # Check if we need to convert this using DOS-style short mode. If the path
8488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8489  # take no chances and rewrite it.
8490  # Note: m4 eats our [], so we need to use [ and ] instead.
8491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8492  if test "x$has_forbidden_chars" != x; then
8493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8497      # Going to short mode and back again did indeed matter. Since short mode is
8498      # case insensitive, let's make it lowercase to improve readability.
8499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8500      # Now convert it back to Unix-stile (cygpath)
8501      input_path=`$CYGPATH -u "$shortmode_path"`
8502      new_path="$input_path"
8503    fi
8504  fi
8505
8506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8507  if test "x$test_cygdrive_prefix" = x; then
8508    # As a simple fix, exclude /usr/bin since it's not a real path.
8509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8511      # a path prefixed by /cygdrive for fixpath to work.
8512      new_path="$CYGWIN_ROOT_PATH$input_path"
8513    fi
8514  fi
8515
8516  # remove trailing .exe if any
8517  new_path="${new_path/%.exe/}"
8518
8519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8520
8521  # First separate the path from the arguments. This will split at the first
8522  # space.
8523  complete="$FOUND_MAKE"
8524  path="${complete%% *}"
8525  tmp="$complete EOL"
8526  arguments="${tmp#* }"
8527
8528  # Input might be given as Windows format, start by converting to
8529  # unix format.
8530  new_path="$path"
8531
8532  windows_path="$new_path"
8533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8534    unix_path=`$CYGPATH -u "$windows_path"`
8535    new_path="$unix_path"
8536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8538    new_path="$unix_path"
8539  fi
8540
8541
8542  # Now try to locate executable using which
8543  new_path=`$WHICH "$new_path" 2> /dev/null`
8544
8545  if test "x$new_path" = x; then
8546    # Oops. Which didn't find the executable.
8547    # The splitting of arguments from the executable at a space might have been incorrect,
8548    # since paths with space are more likely in Windows. Give it another try with the whole
8549    # argument.
8550    path="$complete"
8551    arguments="EOL"
8552    new_path="$path"
8553
8554  windows_path="$new_path"
8555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8556    unix_path=`$CYGPATH -u "$windows_path"`
8557    new_path="$unix_path"
8558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8560    new_path="$unix_path"
8561  fi
8562
8563
8564    new_path=`$WHICH "$new_path" 2> /dev/null`
8565
8566    if test "x$new_path" = x; then
8567      # It's still not found. Now this is an unrecoverable error.
8568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8570      has_space=`$ECHO "$complete" | $GREP " "`
8571      if test "x$has_space" != x; then
8572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8574      fi
8575      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8576    fi
8577  fi
8578
8579  # Now new_path has a complete unix path to the binary
8580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8581    # Keep paths in /bin as-is, but remove trailing .exe if any
8582    new_path="${new_path/%.exe/}"
8583    # Do not save /bin paths to all_fixpath_prefixes!
8584  else
8585    # Not in mixed or Windows style, start by that.
8586    new_path=`cmd //c echo $new_path`
8587
8588  input_path="$new_path"
8589  # Check if we need to convert this using DOS-style short mode. If the path
8590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8591  # take no chances and rewrite it.
8592  # Note: m4 eats our [], so we need to use [ and ] instead.
8593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8594  if test "x$has_forbidden_chars" != x; then
8595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8597  fi
8598
8599    # Output is in $new_path
8600
8601  windows_path="$new_path"
8602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8603    unix_path=`$CYGPATH -u "$windows_path"`
8604    new_path="$unix_path"
8605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8607    new_path="$unix_path"
8608  fi
8609
8610    # remove trailing .exe if any
8611    new_path="${new_path/%.exe/}"
8612
8613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8615  fi
8616
8617  else
8618    # We're on a posix platform. Hooray! :)
8619    # First separate the path from the arguments. This will split at the first
8620    # space.
8621    complete="$FOUND_MAKE"
8622    path="${complete%% *}"
8623    tmp="$complete EOL"
8624    arguments="${tmp#* }"
8625
8626    # Cannot rely on the command "which" here since it doesn't always work.
8627    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8628    if test -z "$is_absolute_path"; then
8629      # Path to executable is not absolute. Find it.
8630      IFS_save="$IFS"
8631      IFS=:
8632      for p in $PATH; do
8633        if test -f "$p/$path" && test -x "$p/$path"; then
8634          new_path="$p/$path"
8635          break
8636        fi
8637      done
8638      IFS="$IFS_save"
8639    else
8640      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8641$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8642      new_path="$path"
8643    fi
8644
8645    if test "x$new_path" = x; then
8646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8648      has_space=`$ECHO "$complete" | $GREP " "`
8649      if test "x$has_space" != x; then
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8652      fi
8653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8654    fi
8655  fi
8656
8657  # Now join together the path and the arguments once again
8658  if test "x$arguments" != xEOL; then
8659    new_complete="$new_path ${arguments% *}"
8660  else
8661    new_complete="$new_path"
8662  fi
8663
8664  if test "x$complete" != "x$new_complete"; then
8665    FOUND_MAKE="$new_complete"
8666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8667$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8668  fi
8669
8670        fi
8671      fi
8672    fi
8673  fi
8674
8675    if test "x$FOUND_MAKE" = x; then
8676      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8677    fi
8678  else
8679    # Try our hardest to locate a correct version of GNU make
8680    for ac_prog in gmake
8681do
8682  # Extract the first word of "$ac_prog", so it can be a program name with args.
8683set dummy $ac_prog; ac_word=$2
8684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8685$as_echo_n "checking for $ac_word... " >&6; }
8686if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8687  $as_echo_n "(cached) " >&6
8688else
8689  case $CHECK_GMAKE in
8690  [\\/]* | ?:[\\/]*)
8691  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8692  ;;
8693  *)
8694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8695for as_dir in $PATH
8696do
8697  IFS=$as_save_IFS
8698  test -z "$as_dir" && as_dir=.
8699    for ac_exec_ext in '' $ac_executable_extensions; do
8700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8701    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8703    break 2
8704  fi
8705done
8706  done
8707IFS=$as_save_IFS
8708
8709  ;;
8710esac
8711fi
8712CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8713if test -n "$CHECK_GMAKE"; then
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8715$as_echo "$CHECK_GMAKE" >&6; }
8716else
8717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718$as_echo "no" >&6; }
8719fi
8720
8721
8722  test -n "$CHECK_GMAKE" && break
8723done
8724
8725
8726  MAKE_CANDIDATE=""$CHECK_GMAKE""
8727  DESCRIPTION="gmake in PATH"
8728  if test "x$MAKE_CANDIDATE" != x; then
8729    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8730$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8731    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8732    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8733    if test "x$IS_GNU_MAKE" = x; then
8734      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8735$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8736    else
8737      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8738      if test "x$IS_MODERN_MAKE" = x; then
8739        { $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
8740$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;}
8741      else
8742        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8743          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8744            MAKE_EXPECTED_ENV='cygwin'
8745          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8746            MAKE_EXPECTED_ENV='msys'
8747          else
8748            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8749          fi
8750          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8751          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8752        else
8753          # Not relevant for non-Windows
8754          IS_MAKE_CORRECT_ENV=true
8755        fi
8756        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8757          { $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
8758$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;}
8759        else
8760          FOUND_MAKE=$MAKE_CANDIDATE
8761
8762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8763
8764  # First separate the path from the arguments. This will split at the first
8765  # space.
8766  complete="$FOUND_MAKE"
8767  path="${complete%% *}"
8768  tmp="$complete EOL"
8769  arguments="${tmp#* }"
8770
8771  # Input might be given as Windows format, start by converting to
8772  # unix format.
8773  new_path=`$CYGPATH -u "$path"`
8774
8775  # Now try to locate executable using which
8776  new_path=`$WHICH "$new_path" 2> /dev/null`
8777  # bat and cmd files are not always considered executable in cygwin causing which
8778  # to not find them
8779  if test "x$new_path" = x \
8780      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8781      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8782    new_path=`$CYGPATH -u "$path"`
8783  fi
8784  if test "x$new_path" = x; then
8785    # Oops. Which didn't find the executable.
8786    # The splitting of arguments from the executable at a space might have been incorrect,
8787    # since paths with space are more likely in Windows. Give it another try with the whole
8788    # argument.
8789    path="$complete"
8790    arguments="EOL"
8791    new_path=`$CYGPATH -u "$path"`
8792    new_path=`$WHICH "$new_path" 2> /dev/null`
8793    # bat and cmd files are not always considered executable in cygwin causing which
8794    # to not find them
8795    if test "x$new_path" = x \
8796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8798      new_path=`$CYGPATH -u "$path"`
8799    fi
8800    if test "x$new_path" = x; then
8801      # It's still not found. Now this is an unrecoverable error.
8802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8803$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8804      has_space=`$ECHO "$complete" | $GREP " "`
8805      if test "x$has_space" != x; then
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8808      fi
8809      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8810    fi
8811  fi
8812
8813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8816  # "foo.exe" is OK but "foo" is an error.
8817  #
8818  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8819  # It is also a way to make sure we got the proper file name for the real test later on.
8820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8821  if test "x$test_shortpath" = x; then
8822    # Short path failed, file does not exist as specified.
8823    # Try adding .exe or .cmd
8824    if test -f "${new_path}.exe"; then
8825      input_to_shortpath="${new_path}.exe"
8826    elif test -f "${new_path}.cmd"; then
8827      input_to_shortpath="${new_path}.cmd"
8828    else
8829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8831      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8832$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8834    fi
8835  else
8836    input_to_shortpath="$new_path"
8837  fi
8838
8839  # Call helper function which possibly converts this using DOS-style short mode.
8840  # If so, the updated path is stored in $new_path.
8841  new_path="$input_to_shortpath"
8842
8843  input_path="$input_to_shortpath"
8844  # Check if we need to convert this using DOS-style short mode. If the path
8845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8846  # take no chances and rewrite it.
8847  # Note: m4 eats our [], so we need to use [ and ] instead.
8848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8849  if test "x$has_forbidden_chars" != x; then
8850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8854      # Going to short mode and back again did indeed matter. Since short mode is
8855      # case insensitive, let's make it lowercase to improve readability.
8856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8857      # Now convert it back to Unix-stile (cygpath)
8858      input_path=`$CYGPATH -u "$shortmode_path"`
8859      new_path="$input_path"
8860    fi
8861  fi
8862
8863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8864  if test "x$test_cygdrive_prefix" = x; then
8865    # As a simple fix, exclude /usr/bin since it's not a real path.
8866    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8868      # a path prefixed by /cygdrive for fixpath to work.
8869      new_path="$CYGWIN_ROOT_PATH$input_path"
8870    fi
8871  fi
8872
8873  # remove trailing .exe if any
8874  new_path="${new_path/%.exe/}"
8875
8876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8877
8878  # First separate the path from the arguments. This will split at the first
8879  # space.
8880  complete="$FOUND_MAKE"
8881  path="${complete%% *}"
8882  tmp="$complete EOL"
8883  arguments="${tmp#* }"
8884
8885  # Input might be given as Windows format, start by converting to
8886  # unix format.
8887  new_path="$path"
8888
8889  windows_path="$new_path"
8890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8891    unix_path=`$CYGPATH -u "$windows_path"`
8892    new_path="$unix_path"
8893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8895    new_path="$unix_path"
8896  fi
8897
8898
8899  # Now try to locate executable using which
8900  new_path=`$WHICH "$new_path" 2> /dev/null`
8901
8902  if test "x$new_path" = x; then
8903    # Oops. Which didn't find the executable.
8904    # The splitting of arguments from the executable at a space might have been incorrect,
8905    # since paths with space are more likely in Windows. Give it another try with the whole
8906    # argument.
8907    path="$complete"
8908    arguments="EOL"
8909    new_path="$path"
8910
8911  windows_path="$new_path"
8912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8913    unix_path=`$CYGPATH -u "$windows_path"`
8914    new_path="$unix_path"
8915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8917    new_path="$unix_path"
8918  fi
8919
8920
8921    new_path=`$WHICH "$new_path" 2> /dev/null`
8922
8923    if test "x$new_path" = x; then
8924      # It's still not found. Now this is an unrecoverable error.
8925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8926$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8927      has_space=`$ECHO "$complete" | $GREP " "`
8928      if test "x$has_space" != x; then
8929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8931      fi
8932      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8933    fi
8934  fi
8935
8936  # Now new_path has a complete unix path to the binary
8937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8938    # Keep paths in /bin as-is, but remove trailing .exe if any
8939    new_path="${new_path/%.exe/}"
8940    # Do not save /bin paths to all_fixpath_prefixes!
8941  else
8942    # Not in mixed or Windows style, start by that.
8943    new_path=`cmd //c echo $new_path`
8944
8945  input_path="$new_path"
8946  # Check if we need to convert this using DOS-style short mode. If the path
8947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8948  # take no chances and rewrite it.
8949  # Note: m4 eats our [], so we need to use [ and ] instead.
8950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8951  if test "x$has_forbidden_chars" != x; then
8952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8954  fi
8955
8956    # Output is in $new_path
8957
8958  windows_path="$new_path"
8959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8960    unix_path=`$CYGPATH -u "$windows_path"`
8961    new_path="$unix_path"
8962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8964    new_path="$unix_path"
8965  fi
8966
8967    # remove trailing .exe if any
8968    new_path="${new_path/%.exe/}"
8969
8970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8972  fi
8973
8974  else
8975    # We're on a posix platform. Hooray! :)
8976    # First separate the path from the arguments. This will split at the first
8977    # space.
8978    complete="$FOUND_MAKE"
8979    path="${complete%% *}"
8980    tmp="$complete EOL"
8981    arguments="${tmp#* }"
8982
8983    # Cannot rely on the command "which" here since it doesn't always work.
8984    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8985    if test -z "$is_absolute_path"; then
8986      # Path to executable is not absolute. Find it.
8987      IFS_save="$IFS"
8988      IFS=:
8989      for p in $PATH; do
8990        if test -f "$p/$path" && test -x "$p/$path"; then
8991          new_path="$p/$path"
8992          break
8993        fi
8994      done
8995      IFS="$IFS_save"
8996    else
8997      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8998$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8999      new_path="$path"
9000    fi
9001
9002    if test "x$new_path" = x; then
9003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9005      has_space=`$ECHO "$complete" | $GREP " "`
9006      if test "x$has_space" != x; then
9007        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9009      fi
9010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9011    fi
9012  fi
9013
9014  # Now join together the path and the arguments once again
9015  if test "x$arguments" != xEOL; then
9016    new_complete="$new_path ${arguments% *}"
9017  else
9018    new_complete="$new_path"
9019  fi
9020
9021  if test "x$complete" != "x$new_complete"; then
9022    FOUND_MAKE="$new_complete"
9023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9024$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9025  fi
9026
9027        fi
9028      fi
9029    fi
9030  fi
9031
9032
9033    if test "x$FOUND_MAKE" = x; then
9034      for ac_prog in make
9035do
9036  # Extract the first word of "$ac_prog", so it can be a program name with args.
9037set dummy $ac_prog; ac_word=$2
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9039$as_echo_n "checking for $ac_word... " >&6; }
9040if ${ac_cv_path_CHECK_MAKE+:} false; then :
9041  $as_echo_n "(cached) " >&6
9042else
9043  case $CHECK_MAKE in
9044  [\\/]* | ?:[\\/]*)
9045  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9046  ;;
9047  *)
9048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049for as_dir in $PATH
9050do
9051  IFS=$as_save_IFS
9052  test -z "$as_dir" && as_dir=.
9053    for ac_exec_ext in '' $ac_executable_extensions; do
9054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9055    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9057    break 2
9058  fi
9059done
9060  done
9061IFS=$as_save_IFS
9062
9063  ;;
9064esac
9065fi
9066CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9067if test -n "$CHECK_MAKE"; then
9068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9069$as_echo "$CHECK_MAKE" >&6; }
9070else
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072$as_echo "no" >&6; }
9073fi
9074
9075
9076  test -n "$CHECK_MAKE" && break
9077done
9078
9079
9080  MAKE_CANDIDATE=""$CHECK_MAKE""
9081  DESCRIPTION="make in PATH"
9082  if test "x$MAKE_CANDIDATE" != x; then
9083    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9084$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9085    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9086    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9087    if test "x$IS_GNU_MAKE" = x; then
9088      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9089$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9090    else
9091      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9092      if test "x$IS_MODERN_MAKE" = x; then
9093        { $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
9094$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;}
9095      else
9096        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9097          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9098            MAKE_EXPECTED_ENV='cygwin'
9099          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9100            MAKE_EXPECTED_ENV='msys'
9101          else
9102            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9103          fi
9104          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9105          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9106        else
9107          # Not relevant for non-Windows
9108          IS_MAKE_CORRECT_ENV=true
9109        fi
9110        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9111          { $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
9112$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;}
9113        else
9114          FOUND_MAKE=$MAKE_CANDIDATE
9115
9116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9117
9118  # First separate the path from the arguments. This will split at the first
9119  # space.
9120  complete="$FOUND_MAKE"
9121  path="${complete%% *}"
9122  tmp="$complete EOL"
9123  arguments="${tmp#* }"
9124
9125  # Input might be given as Windows format, start by converting to
9126  # unix format.
9127  new_path=`$CYGPATH -u "$path"`
9128
9129  # Now try to locate executable using which
9130  new_path=`$WHICH "$new_path" 2> /dev/null`
9131  # bat and cmd files are not always considered executable in cygwin causing which
9132  # to not find them
9133  if test "x$new_path" = x \
9134      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9135      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9136    new_path=`$CYGPATH -u "$path"`
9137  fi
9138  if test "x$new_path" = x; then
9139    # Oops. Which didn't find the executable.
9140    # The splitting of arguments from the executable at a space might have been incorrect,
9141    # since paths with space are more likely in Windows. Give it another try with the whole
9142    # argument.
9143    path="$complete"
9144    arguments="EOL"
9145    new_path=`$CYGPATH -u "$path"`
9146    new_path=`$WHICH "$new_path" 2> /dev/null`
9147    # bat and cmd files are not always considered executable in cygwin causing which
9148    # to not find them
9149    if test "x$new_path" = x \
9150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9152      new_path=`$CYGPATH -u "$path"`
9153    fi
9154    if test "x$new_path" = x; then
9155      # It's still not found. Now this is an unrecoverable error.
9156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9157$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9158      has_space=`$ECHO "$complete" | $GREP " "`
9159      if test "x$has_space" != x; then
9160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9162      fi
9163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9164    fi
9165  fi
9166
9167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9170  # "foo.exe" is OK but "foo" is an error.
9171  #
9172  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9173  # It is also a way to make sure we got the proper file name for the real test later on.
9174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9175  if test "x$test_shortpath" = x; then
9176    # Short path failed, file does not exist as specified.
9177    # Try adding .exe or .cmd
9178    if test -f "${new_path}.exe"; then
9179      input_to_shortpath="${new_path}.exe"
9180    elif test -f "${new_path}.cmd"; then
9181      input_to_shortpath="${new_path}.cmd"
9182    else
9183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9184$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9187      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9188    fi
9189  else
9190    input_to_shortpath="$new_path"
9191  fi
9192
9193  # Call helper function which possibly converts this using DOS-style short mode.
9194  # If so, the updated path is stored in $new_path.
9195  new_path="$input_to_shortpath"
9196
9197  input_path="$input_to_shortpath"
9198  # Check if we need to convert this using DOS-style short mode. If the path
9199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9200  # take no chances and rewrite it.
9201  # Note: m4 eats our [], so we need to use [ and ] instead.
9202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9203  if test "x$has_forbidden_chars" != x; then
9204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9208      # Going to short mode and back again did indeed matter. Since short mode is
9209      # case insensitive, let's make it lowercase to improve readability.
9210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9211      # Now convert it back to Unix-stile (cygpath)
9212      input_path=`$CYGPATH -u "$shortmode_path"`
9213      new_path="$input_path"
9214    fi
9215  fi
9216
9217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9218  if test "x$test_cygdrive_prefix" = x; then
9219    # As a simple fix, exclude /usr/bin since it's not a real path.
9220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9222      # a path prefixed by /cygdrive for fixpath to work.
9223      new_path="$CYGWIN_ROOT_PATH$input_path"
9224    fi
9225  fi
9226
9227  # remove trailing .exe if any
9228  new_path="${new_path/%.exe/}"
9229
9230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9231
9232  # First separate the path from the arguments. This will split at the first
9233  # space.
9234  complete="$FOUND_MAKE"
9235  path="${complete%% *}"
9236  tmp="$complete EOL"
9237  arguments="${tmp#* }"
9238
9239  # Input might be given as Windows format, start by converting to
9240  # unix format.
9241  new_path="$path"
9242
9243  windows_path="$new_path"
9244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9245    unix_path=`$CYGPATH -u "$windows_path"`
9246    new_path="$unix_path"
9247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9249    new_path="$unix_path"
9250  fi
9251
9252
9253  # Now try to locate executable using which
9254  new_path=`$WHICH "$new_path" 2> /dev/null`
9255
9256  if test "x$new_path" = x; then
9257    # Oops. Which didn't find the executable.
9258    # The splitting of arguments from the executable at a space might have been incorrect,
9259    # since paths with space are more likely in Windows. Give it another try with the whole
9260    # argument.
9261    path="$complete"
9262    arguments="EOL"
9263    new_path="$path"
9264
9265  windows_path="$new_path"
9266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9267    unix_path=`$CYGPATH -u "$windows_path"`
9268    new_path="$unix_path"
9269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9271    new_path="$unix_path"
9272  fi
9273
9274
9275    new_path=`$WHICH "$new_path" 2> /dev/null`
9276
9277    if test "x$new_path" = x; then
9278      # It's still not found. Now this is an unrecoverable error.
9279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9281      has_space=`$ECHO "$complete" | $GREP " "`
9282      if test "x$has_space" != x; then
9283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9285      fi
9286      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9287    fi
9288  fi
9289
9290  # Now new_path has a complete unix path to the binary
9291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9292    # Keep paths in /bin as-is, but remove trailing .exe if any
9293    new_path="${new_path/%.exe/}"
9294    # Do not save /bin paths to all_fixpath_prefixes!
9295  else
9296    # Not in mixed or Windows style, start by that.
9297    new_path=`cmd //c echo $new_path`
9298
9299  input_path="$new_path"
9300  # Check if we need to convert this using DOS-style short mode. If the path
9301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9302  # take no chances and rewrite it.
9303  # Note: m4 eats our [], so we need to use [ and ] instead.
9304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9305  if test "x$has_forbidden_chars" != x; then
9306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9308  fi
9309
9310    # Output is in $new_path
9311
9312  windows_path="$new_path"
9313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9314    unix_path=`$CYGPATH -u "$windows_path"`
9315    new_path="$unix_path"
9316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9318    new_path="$unix_path"
9319  fi
9320
9321    # remove trailing .exe if any
9322    new_path="${new_path/%.exe/}"
9323
9324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9326  fi
9327
9328  else
9329    # We're on a posix platform. Hooray! :)
9330    # First separate the path from the arguments. This will split at the first
9331    # space.
9332    complete="$FOUND_MAKE"
9333    path="${complete%% *}"
9334    tmp="$complete EOL"
9335    arguments="${tmp#* }"
9336
9337    # Cannot rely on the command "which" here since it doesn't always work.
9338    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9339    if test -z "$is_absolute_path"; then
9340      # Path to executable is not absolute. Find it.
9341      IFS_save="$IFS"
9342      IFS=:
9343      for p in $PATH; do
9344        if test -f "$p/$path" && test -x "$p/$path"; then
9345          new_path="$p/$path"
9346          break
9347        fi
9348      done
9349      IFS="$IFS_save"
9350    else
9351      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9352$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9353      new_path="$path"
9354    fi
9355
9356    if test "x$new_path" = x; then
9357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9359      has_space=`$ECHO "$complete" | $GREP " "`
9360      if test "x$has_space" != x; then
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9362$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9363      fi
9364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9365    fi
9366  fi
9367
9368  # Now join together the path and the arguments once again
9369  if test "x$arguments" != xEOL; then
9370    new_complete="$new_path ${arguments% *}"
9371  else
9372    new_complete="$new_path"
9373  fi
9374
9375  if test "x$complete" != "x$new_complete"; then
9376    FOUND_MAKE="$new_complete"
9377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9378$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9379  fi
9380
9381        fi
9382      fi
9383    fi
9384  fi
9385
9386    fi
9387
9388    if test "x$FOUND_MAKE" = x; then
9389      if test "x$TOOLS_DIR" != x; then
9390        # We have a tools-dir, check that as well before giving up.
9391        OLD_PATH=$PATH
9392        PATH=$TOOLS_DIR:$PATH
9393        for ac_prog in gmake
9394do
9395  # Extract the first word of "$ac_prog", so it can be a program name with args.
9396set dummy $ac_prog; ac_word=$2
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398$as_echo_n "checking for $ac_word... " >&6; }
9399if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9400  $as_echo_n "(cached) " >&6
9401else
9402  case $CHECK_TOOLSDIR_GMAKE in
9403  [\\/]* | ?:[\\/]*)
9404  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9405  ;;
9406  *)
9407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408for as_dir in $PATH
9409do
9410  IFS=$as_save_IFS
9411  test -z "$as_dir" && as_dir=.
9412    for ac_exec_ext in '' $ac_executable_extensions; do
9413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416    break 2
9417  fi
9418done
9419  done
9420IFS=$as_save_IFS
9421
9422  ;;
9423esac
9424fi
9425CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9426if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9428$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9429else
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431$as_echo "no" >&6; }
9432fi
9433
9434
9435  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9436done
9437
9438
9439  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9440  DESCRIPTION="gmake in tools-dir"
9441  if test "x$MAKE_CANDIDATE" != x; then
9442    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9443$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9444    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9445    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9446    if test "x$IS_GNU_MAKE" = x; then
9447      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9448$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9449    else
9450      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9451      if test "x$IS_MODERN_MAKE" = x; then
9452        { $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
9453$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;}
9454      else
9455        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9456          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9457            MAKE_EXPECTED_ENV='cygwin'
9458          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9459            MAKE_EXPECTED_ENV='msys'
9460          else
9461            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9462          fi
9463          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9464          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9465        else
9466          # Not relevant for non-Windows
9467          IS_MAKE_CORRECT_ENV=true
9468        fi
9469        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9470          { $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
9471$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;}
9472        else
9473          FOUND_MAKE=$MAKE_CANDIDATE
9474
9475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9476
9477  # First separate the path from the arguments. This will split at the first
9478  # space.
9479  complete="$FOUND_MAKE"
9480  path="${complete%% *}"
9481  tmp="$complete EOL"
9482  arguments="${tmp#* }"
9483
9484  # Input might be given as Windows format, start by converting to
9485  # unix format.
9486  new_path=`$CYGPATH -u "$path"`
9487
9488  # Now try to locate executable using which
9489  new_path=`$WHICH "$new_path" 2> /dev/null`
9490  # bat and cmd files are not always considered executable in cygwin causing which
9491  # to not find them
9492  if test "x$new_path" = x \
9493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9495    new_path=`$CYGPATH -u "$path"`
9496  fi
9497  if test "x$new_path" = x; then
9498    # Oops. Which didn't find the executable.
9499    # The splitting of arguments from the executable at a space might have been incorrect,
9500    # since paths with space are more likely in Windows. Give it another try with the whole
9501    # argument.
9502    path="$complete"
9503    arguments="EOL"
9504    new_path=`$CYGPATH -u "$path"`
9505    new_path=`$WHICH "$new_path" 2> /dev/null`
9506    # bat and cmd files are not always considered executable in cygwin causing which
9507    # to not find them
9508    if test "x$new_path" = x \
9509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9511      new_path=`$CYGPATH -u "$path"`
9512    fi
9513    if test "x$new_path" = x; then
9514      # It's still not found. Now this is an unrecoverable error.
9515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9517      has_space=`$ECHO "$complete" | $GREP " "`
9518      if test "x$has_space" != x; then
9519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9521      fi
9522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9523    fi
9524  fi
9525
9526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9529  # "foo.exe" is OK but "foo" is an error.
9530  #
9531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9532  # It is also a way to make sure we got the proper file name for the real test later on.
9533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9534  if test "x$test_shortpath" = x; then
9535    # Short path failed, file does not exist as specified.
9536    # Try adding .exe or .cmd
9537    if test -f "${new_path}.exe"; then
9538      input_to_shortpath="${new_path}.exe"
9539    elif test -f "${new_path}.cmd"; then
9540      input_to_shortpath="${new_path}.cmd"
9541    else
9542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9543$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9546      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9547    fi
9548  else
9549    input_to_shortpath="$new_path"
9550  fi
9551
9552  # Call helper function which possibly converts this using DOS-style short mode.
9553  # If so, the updated path is stored in $new_path.
9554  new_path="$input_to_shortpath"
9555
9556  input_path="$input_to_shortpath"
9557  # Check if we need to convert this using DOS-style short mode. If the path
9558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9559  # take no chances and rewrite it.
9560  # Note: m4 eats our [], so we need to use [ and ] instead.
9561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9562  if test "x$has_forbidden_chars" != x; then
9563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9567      # Going to short mode and back again did indeed matter. Since short mode is
9568      # case insensitive, let's make it lowercase to improve readability.
9569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9570      # Now convert it back to Unix-stile (cygpath)
9571      input_path=`$CYGPATH -u "$shortmode_path"`
9572      new_path="$input_path"
9573    fi
9574  fi
9575
9576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9577  if test "x$test_cygdrive_prefix" = x; then
9578    # As a simple fix, exclude /usr/bin since it's not a real path.
9579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9581      # a path prefixed by /cygdrive for fixpath to work.
9582      new_path="$CYGWIN_ROOT_PATH$input_path"
9583    fi
9584  fi
9585
9586  # remove trailing .exe if any
9587  new_path="${new_path/%.exe/}"
9588
9589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9590
9591  # First separate the path from the arguments. This will split at the first
9592  # space.
9593  complete="$FOUND_MAKE"
9594  path="${complete%% *}"
9595  tmp="$complete EOL"
9596  arguments="${tmp#* }"
9597
9598  # Input might be given as Windows format, start by converting to
9599  # unix format.
9600  new_path="$path"
9601
9602  windows_path="$new_path"
9603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9604    unix_path=`$CYGPATH -u "$windows_path"`
9605    new_path="$unix_path"
9606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9608    new_path="$unix_path"
9609  fi
9610
9611
9612  # Now try to locate executable using which
9613  new_path=`$WHICH "$new_path" 2> /dev/null`
9614
9615  if test "x$new_path" = x; then
9616    # Oops. Which didn't find the executable.
9617    # The splitting of arguments from the executable at a space might have been incorrect,
9618    # since paths with space are more likely in Windows. Give it another try with the whole
9619    # argument.
9620    path="$complete"
9621    arguments="EOL"
9622    new_path="$path"
9623
9624  windows_path="$new_path"
9625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9626    unix_path=`$CYGPATH -u "$windows_path"`
9627    new_path="$unix_path"
9628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9630    new_path="$unix_path"
9631  fi
9632
9633
9634    new_path=`$WHICH "$new_path" 2> /dev/null`
9635
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  # Now new_path has a complete unix path to the binary
9650  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9651    # Keep paths in /bin as-is, but remove trailing .exe if any
9652    new_path="${new_path/%.exe/}"
9653    # Do not save /bin paths to all_fixpath_prefixes!
9654  else
9655    # Not in mixed or Windows style, start by that.
9656    new_path=`cmd //c echo $new_path`
9657
9658  input_path="$new_path"
9659  # Check if we need to convert this using DOS-style short mode. If the path
9660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9661  # take no chances and rewrite it.
9662  # Note: m4 eats our [], so we need to use [ and ] instead.
9663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9664  if test "x$has_forbidden_chars" != x; then
9665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9667  fi
9668
9669    # Output is in $new_path
9670
9671  windows_path="$new_path"
9672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9673    unix_path=`$CYGPATH -u "$windows_path"`
9674    new_path="$unix_path"
9675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9677    new_path="$unix_path"
9678  fi
9679
9680    # remove trailing .exe if any
9681    new_path="${new_path/%.exe/}"
9682
9683    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9684    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9685  fi
9686
9687  else
9688    # We're on a posix platform. Hooray! :)
9689    # First separate the path from the arguments. This will split at the first
9690    # space.
9691    complete="$FOUND_MAKE"
9692    path="${complete%% *}"
9693    tmp="$complete EOL"
9694    arguments="${tmp#* }"
9695
9696    # Cannot rely on the command "which" here since it doesn't always work.
9697    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9698    if test -z "$is_absolute_path"; then
9699      # Path to executable is not absolute. Find it.
9700      IFS_save="$IFS"
9701      IFS=:
9702      for p in $PATH; do
9703        if test -f "$p/$path" && test -x "$p/$path"; then
9704          new_path="$p/$path"
9705          break
9706        fi
9707      done
9708      IFS="$IFS_save"
9709    else
9710      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9711$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9712      new_path="$path"
9713    fi
9714
9715    if test "x$new_path" = x; then
9716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9717$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9718      has_space=`$ECHO "$complete" | $GREP " "`
9719      if test "x$has_space" != x; then
9720        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9721$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9722      fi
9723      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9724    fi
9725  fi
9726
9727  # Now join together the path and the arguments once again
9728  if test "x$arguments" != xEOL; then
9729    new_complete="$new_path ${arguments% *}"
9730  else
9731    new_complete="$new_path"
9732  fi
9733
9734  if test "x$complete" != "x$new_complete"; then
9735    FOUND_MAKE="$new_complete"
9736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9737$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9738  fi
9739
9740        fi
9741      fi
9742    fi
9743  fi
9744
9745        if test "x$FOUND_MAKE" = x; then
9746          for ac_prog in make
9747do
9748  # Extract the first word of "$ac_prog", so it can be a program name with args.
9749set dummy $ac_prog; ac_word=$2
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751$as_echo_n "checking for $ac_word... " >&6; }
9752if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9753  $as_echo_n "(cached) " >&6
9754else
9755  case $CHECK_TOOLSDIR_MAKE in
9756  [\\/]* | ?:[\\/]*)
9757  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9758  ;;
9759  *)
9760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9761for as_dir in $PATH
9762do
9763  IFS=$as_save_IFS
9764  test -z "$as_dir" && as_dir=.
9765    for ac_exec_ext in '' $ac_executable_extensions; do
9766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9767    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9769    break 2
9770  fi
9771done
9772  done
9773IFS=$as_save_IFS
9774
9775  ;;
9776esac
9777fi
9778CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9779if test -n "$CHECK_TOOLSDIR_MAKE"; then
9780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9781$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9782else
9783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
9785fi
9786
9787
9788  test -n "$CHECK_TOOLSDIR_MAKE" && break
9789done
9790
9791
9792  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9793  DESCRIPTION="make in tools-dir"
9794  if test "x$MAKE_CANDIDATE" != x; then
9795    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9796$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9797    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9798    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9799    if test "x$IS_GNU_MAKE" = x; then
9800      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9801$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9802    else
9803      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9804      if test "x$IS_MODERN_MAKE" = x; then
9805        { $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
9806$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;}
9807      else
9808        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9809          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9810            MAKE_EXPECTED_ENV='cygwin'
9811          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9812            MAKE_EXPECTED_ENV='msys'
9813          else
9814            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9815          fi
9816          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9817          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9818        else
9819          # Not relevant for non-Windows
9820          IS_MAKE_CORRECT_ENV=true
9821        fi
9822        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9823          { $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
9824$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;}
9825        else
9826          FOUND_MAKE=$MAKE_CANDIDATE
9827
9828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9829
9830  # First separate the path from the arguments. This will split at the first
9831  # space.
9832  complete="$FOUND_MAKE"
9833  path="${complete%% *}"
9834  tmp="$complete EOL"
9835  arguments="${tmp#* }"
9836
9837  # Input might be given as Windows format, start by converting to
9838  # unix format.
9839  new_path=`$CYGPATH -u "$path"`
9840
9841  # Now try to locate executable using which
9842  new_path=`$WHICH "$new_path" 2> /dev/null`
9843  # bat and cmd files are not always considered executable in cygwin causing which
9844  # to not find them
9845  if test "x$new_path" = x \
9846      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9847      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9848    new_path=`$CYGPATH -u "$path"`
9849  fi
9850  if test "x$new_path" = x; then
9851    # Oops. Which didn't find the executable.
9852    # The splitting of arguments from the executable at a space might have been incorrect,
9853    # since paths with space are more likely in Windows. Give it another try with the whole
9854    # argument.
9855    path="$complete"
9856    arguments="EOL"
9857    new_path=`$CYGPATH -u "$path"`
9858    new_path=`$WHICH "$new_path" 2> /dev/null`
9859    # bat and cmd files are not always considered executable in cygwin causing which
9860    # to not find them
9861    if test "x$new_path" = x \
9862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9864      new_path=`$CYGPATH -u "$path"`
9865    fi
9866    if test "x$new_path" = x; then
9867      # It's still not found. Now this is an unrecoverable error.
9868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9870      has_space=`$ECHO "$complete" | $GREP " "`
9871      if test "x$has_space" != x; then
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9874      fi
9875      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9876    fi
9877  fi
9878
9879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9882  # "foo.exe" is OK but "foo" is an error.
9883  #
9884  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9885  # It is also a way to make sure we got the proper file name for the real test later on.
9886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9887  if test "x$test_shortpath" = x; then
9888    # Short path failed, file does not exist as specified.
9889    # Try adding .exe or .cmd
9890    if test -f "${new_path}.exe"; then
9891      input_to_shortpath="${new_path}.exe"
9892    elif test -f "${new_path}.cmd"; then
9893      input_to_shortpath="${new_path}.cmd"
9894    else
9895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9896$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9897      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9898$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9899      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9900    fi
9901  else
9902    input_to_shortpath="$new_path"
9903  fi
9904
9905  # Call helper function which possibly converts this using DOS-style short mode.
9906  # If so, the updated path is stored in $new_path.
9907  new_path="$input_to_shortpath"
9908
9909  input_path="$input_to_shortpath"
9910  # Check if we need to convert this using DOS-style short mode. If the path
9911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9912  # take no chances and rewrite it.
9913  # Note: m4 eats our [], so we need to use [ and ] instead.
9914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9915  if test "x$has_forbidden_chars" != x; then
9916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9920      # Going to short mode and back again did indeed matter. Since short mode is
9921      # case insensitive, let's make it lowercase to improve readability.
9922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9923      # Now convert it back to Unix-stile (cygpath)
9924      input_path=`$CYGPATH -u "$shortmode_path"`
9925      new_path="$input_path"
9926    fi
9927  fi
9928
9929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9930  if test "x$test_cygdrive_prefix" = x; then
9931    # As a simple fix, exclude /usr/bin since it's not a real path.
9932    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9934      # a path prefixed by /cygdrive for fixpath to work.
9935      new_path="$CYGWIN_ROOT_PATH$input_path"
9936    fi
9937  fi
9938
9939  # remove trailing .exe if any
9940  new_path="${new_path/%.exe/}"
9941
9942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9943
9944  # First separate the path from the arguments. This will split at the first
9945  # space.
9946  complete="$FOUND_MAKE"
9947  path="${complete%% *}"
9948  tmp="$complete EOL"
9949  arguments="${tmp#* }"
9950
9951  # Input might be given as Windows format, start by converting to
9952  # unix format.
9953  new_path="$path"
9954
9955  windows_path="$new_path"
9956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9957    unix_path=`$CYGPATH -u "$windows_path"`
9958    new_path="$unix_path"
9959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9961    new_path="$unix_path"
9962  fi
9963
9964
9965  # Now try to locate executable using which
9966  new_path=`$WHICH "$new_path" 2> /dev/null`
9967
9968  if test "x$new_path" = x; then
9969    # Oops. Which didn't find the executable.
9970    # The splitting of arguments from the executable at a space might have been incorrect,
9971    # since paths with space are more likely in Windows. Give it another try with the whole
9972    # argument.
9973    path="$complete"
9974    arguments="EOL"
9975    new_path="$path"
9976
9977  windows_path="$new_path"
9978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9979    unix_path=`$CYGPATH -u "$windows_path"`
9980    new_path="$unix_path"
9981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9983    new_path="$unix_path"
9984  fi
9985
9986
9987    new_path=`$WHICH "$new_path" 2> /dev/null`
9988
9989    if test "x$new_path" = x; then
9990      # It's still not found. Now this is an unrecoverable error.
9991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9992$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9993      has_space=`$ECHO "$complete" | $GREP " "`
9994      if test "x$has_space" != x; then
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9997      fi
9998      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9999    fi
10000  fi
10001
10002  # Now new_path has a complete unix path to the binary
10003  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10004    # Keep paths in /bin as-is, but remove trailing .exe if any
10005    new_path="${new_path/%.exe/}"
10006    # Do not save /bin paths to all_fixpath_prefixes!
10007  else
10008    # Not in mixed or Windows style, start by that.
10009    new_path=`cmd //c echo $new_path`
10010
10011  input_path="$new_path"
10012  # Check if we need to convert this using DOS-style short mode. If the path
10013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10014  # take no chances and rewrite it.
10015  # Note: m4 eats our [], so we need to use [ and ] instead.
10016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10017  if test "x$has_forbidden_chars" != x; then
10018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10020  fi
10021
10022    # Output is in $new_path
10023
10024  windows_path="$new_path"
10025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10026    unix_path=`$CYGPATH -u "$windows_path"`
10027    new_path="$unix_path"
10028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10030    new_path="$unix_path"
10031  fi
10032
10033    # remove trailing .exe if any
10034    new_path="${new_path/%.exe/}"
10035
10036    # Save the first 10 bytes of this path to the storage, so fixpath can work.
10037    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10038  fi
10039
10040  else
10041    # We're on a posix platform. Hooray! :)
10042    # First separate the path from the arguments. This will split at the first
10043    # space.
10044    complete="$FOUND_MAKE"
10045    path="${complete%% *}"
10046    tmp="$complete EOL"
10047    arguments="${tmp#* }"
10048
10049    # Cannot rely on the command "which" here since it doesn't always work.
10050    is_absolute_path=`$ECHO "$path" | $GREP ^/`
10051    if test -z "$is_absolute_path"; then
10052      # Path to executable is not absolute. Find it.
10053      IFS_save="$IFS"
10054      IFS=:
10055      for p in $PATH; do
10056        if test -f "$p/$path" && test -x "$p/$path"; then
10057          new_path="$p/$path"
10058          break
10059        fi
10060      done
10061      IFS="$IFS_save"
10062    else
10063      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10064$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10065      new_path="$path"
10066    fi
10067
10068    if test "x$new_path" = x; then
10069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10070$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10071      has_space=`$ECHO "$complete" | $GREP " "`
10072      if test "x$has_space" != x; then
10073        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10075      fi
10076      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10077    fi
10078  fi
10079
10080  # Now join together the path and the arguments once again
10081  if test "x$arguments" != xEOL; then
10082    new_complete="$new_path ${arguments% *}"
10083  else
10084    new_complete="$new_path"
10085  fi
10086
10087  if test "x$complete" != "x$new_complete"; then
10088    FOUND_MAKE="$new_complete"
10089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10090$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10091  fi
10092
10093        fi
10094      fi
10095    fi
10096  fi
10097
10098        fi
10099        PATH=$OLD_PATH
10100      fi
10101    fi
10102
10103    if test "x$FOUND_MAKE" = x; then
10104      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
10105    fi
10106  fi
10107
10108  MAKE=$FOUND_MAKE
10109
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10111$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10112
10113
10114
10115  # Test if find supports -delete
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10117$as_echo_n "checking if find supports -delete... " >&6; }
10118  FIND_DELETE="-delete"
10119
10120  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10121
10122  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10123
10124  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10125  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10126    # No, it does not.
10127    rm $DELETEDIR/TestIfFindSupportsDelete
10128    FIND_DELETE="-exec rm \{\} \+"
10129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131  else
10132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10133$as_echo "yes" >&6; }
10134  fi
10135  rmdir $DELETEDIR
10136
10137
10138
10139  # These tools might not be installed by default,
10140  # need hint on how to install them.
10141
10142  for ac_prog in unzip
10143do
10144  # Extract the first word of "$ac_prog", so it can be a program name with args.
10145set dummy $ac_prog; ac_word=$2
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147$as_echo_n "checking for $ac_word... " >&6; }
10148if ${ac_cv_path_UNZIP+:} false; then :
10149  $as_echo_n "(cached) " >&6
10150else
10151  case $UNZIP in
10152  [\\/]* | ?:[\\/]*)
10153  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10154  ;;
10155  *)
10156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157for as_dir in $PATH
10158do
10159  IFS=$as_save_IFS
10160  test -z "$as_dir" && as_dir=.
10161    for ac_exec_ext in '' $ac_executable_extensions; do
10162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10163    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165    break 2
10166  fi
10167done
10168  done
10169IFS=$as_save_IFS
10170
10171  ;;
10172esac
10173fi
10174UNZIP=$ac_cv_path_UNZIP
10175if test -n "$UNZIP"; then
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10177$as_echo "$UNZIP" >&6; }
10178else
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180$as_echo "no" >&6; }
10181fi
10182
10183
10184  test -n "$UNZIP" && break
10185done
10186
10187
10188  if test "x$UNZIP" = x; then
10189    if test "xunzip" = x; then
10190      PROG_NAME=unzip
10191    else
10192      PROG_NAME=unzip
10193    fi
10194    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10196    as_fn_error $? "Cannot continue" "$LINENO" 5
10197  fi
10198
10199
10200
10201  for ac_prog in zip
10202do
10203  # Extract the first word of "$ac_prog", so it can be a program name with args.
10204set dummy $ac_prog; ac_word=$2
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10206$as_echo_n "checking for $ac_word... " >&6; }
10207if ${ac_cv_path_ZIP+:} false; then :
10208  $as_echo_n "(cached) " >&6
10209else
10210  case $ZIP in
10211  [\\/]* | ?:[\\/]*)
10212  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10213  ;;
10214  *)
10215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216for as_dir in $PATH
10217do
10218  IFS=$as_save_IFS
10219  test -z "$as_dir" && as_dir=.
10220    for ac_exec_ext in '' $ac_executable_extensions; do
10221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10222    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10224    break 2
10225  fi
10226done
10227  done
10228IFS=$as_save_IFS
10229
10230  ;;
10231esac
10232fi
10233ZIP=$ac_cv_path_ZIP
10234if test -n "$ZIP"; then
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10236$as_echo "$ZIP" >&6; }
10237else
10238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10239$as_echo "no" >&6; }
10240fi
10241
10242
10243  test -n "$ZIP" && break
10244done
10245
10246
10247  if test "x$ZIP" = x; then
10248    if test "xzip" = x; then
10249      PROG_NAME=zip
10250    else
10251      PROG_NAME=zip
10252    fi
10253    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10254$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10255    as_fn_error $? "Cannot continue" "$LINENO" 5
10256  fi
10257
10258
10259
10260  # Non-required basic tools
10261
10262  # Extract the first word of "ldd", so it can be a program name with args.
10263set dummy ldd; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_LDD+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $LDD in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292LDD=$ac_cv_path_LDD
10293if test -n "$LDD"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10295$as_echo "$LDD" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302  if test "x$LDD" = "x"; then
10303    # List shared lib dependencies is used for
10304    # debug output and checking for forbidden dependencies.
10305    # We can build without it.
10306    LDD="true"
10307  fi
10308  # Extract the first word of "otool", so it can be a program name with args.
10309set dummy otool; ac_word=$2
10310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10311$as_echo_n "checking for $ac_word... " >&6; }
10312if ${ac_cv_path_OTOOL+:} false; then :
10313  $as_echo_n "(cached) " >&6
10314else
10315  case $OTOOL in
10316  [\\/]* | ?:[\\/]*)
10317  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10318  ;;
10319  *)
10320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10321for as_dir in $PATH
10322do
10323  IFS=$as_save_IFS
10324  test -z "$as_dir" && as_dir=.
10325    for ac_exec_ext in '' $ac_executable_extensions; do
10326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10327    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10329    break 2
10330  fi
10331done
10332  done
10333IFS=$as_save_IFS
10334
10335  ;;
10336esac
10337fi
10338OTOOL=$ac_cv_path_OTOOL
10339if test -n "$OTOOL"; then
10340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10341$as_echo "$OTOOL" >&6; }
10342else
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
10345fi
10346
10347
10348  if test "x$OTOOL" = "x"; then
10349    OTOOL="true"
10350  fi
10351  for ac_prog in readelf greadelf
10352do
10353  # Extract the first word of "$ac_prog", so it can be a program name with args.
10354set dummy $ac_prog; ac_word=$2
10355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10356$as_echo_n "checking for $ac_word... " >&6; }
10357if ${ac_cv_path_READELF+:} false; then :
10358  $as_echo_n "(cached) " >&6
10359else
10360  case $READELF in
10361  [\\/]* | ?:[\\/]*)
10362  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10363  ;;
10364  *)
10365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10366for as_dir in $PATH
10367do
10368  IFS=$as_save_IFS
10369  test -z "$as_dir" && as_dir=.
10370    for ac_exec_ext in '' $ac_executable_extensions; do
10371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10372    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10374    break 2
10375  fi
10376done
10377  done
10378IFS=$as_save_IFS
10379
10380  ;;
10381esac
10382fi
10383READELF=$ac_cv_path_READELF
10384if test -n "$READELF"; then
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10386$as_echo "$READELF" >&6; }
10387else
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10389$as_echo "no" >&6; }
10390fi
10391
10392
10393  test -n "$READELF" && break
10394done
10395
10396  # Extract the first word of "hg", so it can be a program name with args.
10397set dummy hg; ac_word=$2
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399$as_echo_n "checking for $ac_word... " >&6; }
10400if ${ac_cv_path_HG+:} false; then :
10401  $as_echo_n "(cached) " >&6
10402else
10403  case $HG in
10404  [\\/]* | ?:[\\/]*)
10405  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10406  ;;
10407  *)
10408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10409for as_dir in $PATH
10410do
10411  IFS=$as_save_IFS
10412  test -z "$as_dir" && as_dir=.
10413    for ac_exec_ext in '' $ac_executable_extensions; do
10414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10415    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10417    break 2
10418  fi
10419done
10420  done
10421IFS=$as_save_IFS
10422
10423  ;;
10424esac
10425fi
10426HG=$ac_cv_path_HG
10427if test -n "$HG"; then
10428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10429$as_echo "$HG" >&6; }
10430else
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432$as_echo "no" >&6; }
10433fi
10434
10435
10436  # Extract the first word of "stat", so it can be a program name with args.
10437set dummy stat; ac_word=$2
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439$as_echo_n "checking for $ac_word... " >&6; }
10440if ${ac_cv_path_STAT+:} false; then :
10441  $as_echo_n "(cached) " >&6
10442else
10443  case $STAT in
10444  [\\/]* | ?:[\\/]*)
10445  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10446  ;;
10447  *)
10448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10449for as_dir in $PATH
10450do
10451  IFS=$as_save_IFS
10452  test -z "$as_dir" && as_dir=.
10453    for ac_exec_ext in '' $ac_executable_extensions; do
10454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10455    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10457    break 2
10458  fi
10459done
10460  done
10461IFS=$as_save_IFS
10462
10463  ;;
10464esac
10465fi
10466STAT=$ac_cv_path_STAT
10467if test -n "$STAT"; then
10468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10469$as_echo "$STAT" >&6; }
10470else
10471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
10473fi
10474
10475
10476  # Extract the first word of "time", so it can be a program name with args.
10477set dummy time; ac_word=$2
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479$as_echo_n "checking for $ac_word... " >&6; }
10480if ${ac_cv_path_TIME+:} false; then :
10481  $as_echo_n "(cached) " >&6
10482else
10483  case $TIME in
10484  [\\/]* | ?:[\\/]*)
10485  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10486  ;;
10487  *)
10488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489for as_dir in $PATH
10490do
10491  IFS=$as_save_IFS
10492  test -z "$as_dir" && as_dir=.
10493    for ac_exec_ext in '' $ac_executable_extensions; do
10494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10495    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497    break 2
10498  fi
10499done
10500  done
10501IFS=$as_save_IFS
10502
10503  ;;
10504esac
10505fi
10506TIME=$ac_cv_path_TIME
10507if test -n "$TIME"; then
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10509$as_echo "$TIME" >&6; }
10510else
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
10513fi
10514
10515
10516  # Check if it's GNU time
10517  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10518  if test "x$IS_GNU_TIME" != x; then
10519    IS_GNU_TIME=yes
10520  else
10521    IS_GNU_TIME=no
10522  fi
10523
10524
10525  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10526
10527  for ac_prog in comm
10528do
10529  # Extract the first word of "$ac_prog", so it can be a program name with args.
10530set dummy $ac_prog; ac_word=$2
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10532$as_echo_n "checking for $ac_word... " >&6; }
10533if ${ac_cv_path_COMM+:} false; then :
10534  $as_echo_n "(cached) " >&6
10535else
10536  case $COMM in
10537  [\\/]* | ?:[\\/]*)
10538  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10539  ;;
10540  *)
10541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10542for as_dir in $PATH
10543do
10544  IFS=$as_save_IFS
10545  test -z "$as_dir" && as_dir=.
10546    for ac_exec_ext in '' $ac_executable_extensions; do
10547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10548    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10550    break 2
10551  fi
10552done
10553  done
10554IFS=$as_save_IFS
10555
10556  ;;
10557esac
10558fi
10559COMM=$ac_cv_path_COMM
10560if test -n "$COMM"; then
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10562$as_echo "$COMM" >&6; }
10563else
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566fi
10567
10568
10569  test -n "$COMM" && break
10570done
10571
10572
10573  if test "x$COMM" = x; then
10574    if test "xcomm" = x; then
10575      PROG_NAME=comm
10576    else
10577      PROG_NAME=comm
10578    fi
10579    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10580$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10581    as_fn_error $? "Cannot continue" "$LINENO" 5
10582  fi
10583
10584
10585  fi
10586
10587  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10588
10589  for ac_prog in dsymutil
10590do
10591  # Extract the first word of "$ac_prog", so it can be a program name with args.
10592set dummy $ac_prog; ac_word=$2
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594$as_echo_n "checking for $ac_word... " >&6; }
10595if ${ac_cv_path_DSYMUTIL+:} false; then :
10596  $as_echo_n "(cached) " >&6
10597else
10598  case $DSYMUTIL in
10599  [\\/]* | ?:[\\/]*)
10600  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10601  ;;
10602  *)
10603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604for as_dir in $PATH
10605do
10606  IFS=$as_save_IFS
10607  test -z "$as_dir" && as_dir=.
10608    for ac_exec_ext in '' $ac_executable_extensions; do
10609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10610    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612    break 2
10613  fi
10614done
10615  done
10616IFS=$as_save_IFS
10617
10618  ;;
10619esac
10620fi
10621DSYMUTIL=$ac_cv_path_DSYMUTIL
10622if test -n "$DSYMUTIL"; then
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10624$as_echo "$DSYMUTIL" >&6; }
10625else
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
10628fi
10629
10630
10631  test -n "$DSYMUTIL" && break
10632done
10633
10634
10635  if test "x$DSYMUTIL" = x; then
10636    if test "xdsymutil" = x; then
10637      PROG_NAME=dsymutil
10638    else
10639      PROG_NAME=dsymutil
10640    fi
10641    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10642$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10643    as_fn_error $? "Cannot continue" "$LINENO" 5
10644  fi
10645
10646
10647
10648  for ac_prog in xattr
10649do
10650  # Extract the first word of "$ac_prog", so it can be a program name with args.
10651set dummy $ac_prog; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_path_XATTR+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  case $XATTR in
10658  [\\/]* | ?:[\\/]*)
10659  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10660  ;;
10661  *)
10662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665  IFS=$as_save_IFS
10666  test -z "$as_dir" && as_dir=.
10667    for ac_exec_ext in '' $ac_executable_extensions; do
10668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671    break 2
10672  fi
10673done
10674  done
10675IFS=$as_save_IFS
10676
10677  ;;
10678esac
10679fi
10680XATTR=$ac_cv_path_XATTR
10681if test -n "$XATTR"; then
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10683$as_echo "$XATTR" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688
10689
10690  test -n "$XATTR" && break
10691done
10692
10693
10694  if test "x$XATTR" = x; then
10695    if test "xxattr" = x; then
10696      PROG_NAME=xattr
10697    else
10698      PROG_NAME=xattr
10699    fi
10700    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10701$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10702    as_fn_error $? "Cannot continue" "$LINENO" 5
10703  fi
10704
10705
10706    # Extract the first word of "codesign", so it can be a program name with args.
10707set dummy codesign; ac_word=$2
10708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10709$as_echo_n "checking for $ac_word... " >&6; }
10710if ${ac_cv_path_CODESIGN+:} false; then :
10711  $as_echo_n "(cached) " >&6
10712else
10713  case $CODESIGN in
10714  [\\/]* | ?:[\\/]*)
10715  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10716  ;;
10717  *)
10718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10719for as_dir in $PATH
10720do
10721  IFS=$as_save_IFS
10722  test -z "$as_dir" && as_dir=.
10723    for ac_exec_ext in '' $ac_executable_extensions; do
10724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10725    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10727    break 2
10728  fi
10729done
10730  done
10731IFS=$as_save_IFS
10732
10733  ;;
10734esac
10735fi
10736CODESIGN=$ac_cv_path_CODESIGN
10737if test -n "$CODESIGN"; then
10738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10739$as_echo "$CODESIGN" >&6; }
10740else
10741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
10743fi
10744
10745
10746    if test "x$CODESIGN" != "x"; then
10747      # Verify that the openjdk_codesign certificate is present
10748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10749$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10750      rm -f codesign-testfile
10751      touch codesign-testfile
10752      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10753      rm -f codesign-testfile
10754      if test "x$CODESIGN" = x; then
10755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757      else
10758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10759$as_echo "yes" >&6; }
10760      fi
10761    fi
10762  fi
10763
10764
10765# Check if pkg-config is available.
10766
10767
10768if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10769	if test -n "$ac_tool_prefix"; then
10770  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10771set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10773$as_echo_n "checking for $ac_word... " >&6; }
10774if ${ac_cv_path_PKG_CONFIG+:} false; then :
10775  $as_echo_n "(cached) " >&6
10776else
10777  case $PKG_CONFIG in
10778  [\\/]* | ?:[\\/]*)
10779  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10780  ;;
10781  *)
10782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10783for as_dir in $PATH
10784do
10785  IFS=$as_save_IFS
10786  test -z "$as_dir" && as_dir=.
10787    for ac_exec_ext in '' $ac_executable_extensions; do
10788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10789    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10791    break 2
10792  fi
10793done
10794  done
10795IFS=$as_save_IFS
10796
10797  ;;
10798esac
10799fi
10800PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10801if test -n "$PKG_CONFIG"; then
10802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10803$as_echo "$PKG_CONFIG" >&6; }
10804else
10805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10806$as_echo "no" >&6; }
10807fi
10808
10809
10810fi
10811if test -z "$ac_cv_path_PKG_CONFIG"; then
10812  ac_pt_PKG_CONFIG=$PKG_CONFIG
10813  # Extract the first word of "pkg-config", so it can be a program name with args.
10814set dummy pkg-config; ac_word=$2
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10816$as_echo_n "checking for $ac_word... " >&6; }
10817if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10818  $as_echo_n "(cached) " >&6
10819else
10820  case $ac_pt_PKG_CONFIG in
10821  [\\/]* | ?:[\\/]*)
10822  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10823  ;;
10824  *)
10825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826for as_dir in $PATH
10827do
10828  IFS=$as_save_IFS
10829  test -z "$as_dir" && as_dir=.
10830    for ac_exec_ext in '' $ac_executable_extensions; do
10831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10832    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10834    break 2
10835  fi
10836done
10837  done
10838IFS=$as_save_IFS
10839
10840  ;;
10841esac
10842fi
10843ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10844if test -n "$ac_pt_PKG_CONFIG"; then
10845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10846$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10847else
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
10850fi
10851
10852  if test "x$ac_pt_PKG_CONFIG" = x; then
10853    PKG_CONFIG=""
10854  else
10855    case $cross_compiling:$ac_tool_warned in
10856yes:)
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10859ac_tool_warned=yes ;;
10860esac
10861    PKG_CONFIG=$ac_pt_PKG_CONFIG
10862  fi
10863else
10864  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10865fi
10866
10867fi
10868if test -n "$PKG_CONFIG"; then
10869	_pkg_min_version=0.9.0
10870	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10871$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10872	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10873		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10874$as_echo "yes" >&6; }
10875	else
10876		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10877$as_echo "no" >&6; }
10878		PKG_CONFIG=""
10879	fi
10880
10881fi
10882
10883# After basic tools have been setup, we can check build os specific details.
10884
10885  ###############################################################################
10886
10887  # Note that this is the build platform OS version!
10888
10889  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10890  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10891  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10892  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10893
10894
10895
10896
10897
10898# Setup builddeps, for automatic downloading of tools we need.
10899# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10900# boot-jdk setup, but we need to have basic tools setup first.
10901
10902
10903# Check whether --with-builddeps-conf was given.
10904if test "${with_builddeps_conf+set}" = set; then :
10905  withval=$with_builddeps_conf;
10906fi
10907
10908
10909
10910# Check whether --with-builddeps-server was given.
10911if test "${with_builddeps_server+set}" = set; then :
10912  withval=$with_builddeps_server;
10913fi
10914
10915
10916
10917# Check whether --with-builddeps-dir was given.
10918if test "${with_builddeps_dir+set}" = set; then :
10919  withval=$with_builddeps_dir;
10920else
10921  with_builddeps_dir=/localhome/builddeps
10922fi
10923
10924
10925
10926# Check whether --with-builddeps-group was given.
10927if test "${with_builddeps_group+set}" = set; then :
10928  withval=$with_builddeps_group;
10929fi
10930
10931
10932
10933
10934  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10935    if test "x$with_builddeps_conf" != x; then
10936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10937$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10938      builddepsfile=$with_builddeps_conf
10939      if test -s $builddepsfile; then
10940        . $builddepsfile
10941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10942$as_echo "loaded!" >&6; }
10943      else
10944        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10945      fi
10946    else
10947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10948$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10949      builddepsfile=`mktemp`
10950      touch $builddepsfile
10951      # Put all found confs into a single file.
10952      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10953      # Source the file to acquire the variables
10954      if test -s $builddepsfile; then
10955        . $builddepsfile
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10957$as_echo "found at least one!" >&6; }
10958      else
10959        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10960      fi
10961    fi
10962    # Create build and target names that use _ instead of "-" and ".".
10963    # This is necessary to use them in variable names.
10964    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10965    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10966    # Extract rewrite information for build and target
10967    eval rewritten_build=\${REWRITE_${build_var}}
10968    if test "x$rewritten_build" = x; then
10969      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10970      echo Build stays the same $rewritten_build
10971    else
10972      echo Rewriting build for builddeps into $rewritten_build
10973    fi
10974    eval rewritten_target=\${REWRITE_${target_var}}
10975    if test "x$rewritten_target" = x; then
10976      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10977      echo Target stays the same $rewritten_target
10978    else
10979      echo Rewriting target for builddeps into $rewritten_target
10980    fi
10981    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10982    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10983  fi
10984  for ac_prog in 7z unzip
10985do
10986  # Extract the first word of "$ac_prog", so it can be a program name with args.
10987set dummy $ac_prog; ac_word=$2
10988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989$as_echo_n "checking for $ac_word... " >&6; }
10990if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10991  $as_echo_n "(cached) " >&6
10992else
10993  if test -n "$BDEPS_UNZIP"; then
10994  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10995else
10996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10997for as_dir in $PATH
10998do
10999  IFS=$as_save_IFS
11000  test -z "$as_dir" && as_dir=.
11001    for ac_exec_ext in '' $ac_executable_extensions; do
11002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11003    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11005    break 2
11006  fi
11007done
11008  done
11009IFS=$as_save_IFS
11010
11011fi
11012fi
11013BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11014if test -n "$BDEPS_UNZIP"; then
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11016$as_echo "$BDEPS_UNZIP" >&6; }
11017else
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
11020fi
11021
11022
11023  test -n "$BDEPS_UNZIP" && break
11024done
11025
11026  if test "x$BDEPS_UNZIP" = x7z; then
11027    BDEPS_UNZIP="7z x"
11028  fi
11029
11030  for ac_prog in wget lftp ftp
11031do
11032  # Extract the first word of "$ac_prog", so it can be a program name with args.
11033set dummy $ac_prog; ac_word=$2
11034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11035$as_echo_n "checking for $ac_word... " >&6; }
11036if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11037  $as_echo_n "(cached) " >&6
11038else
11039  if test -n "$BDEPS_FTP"; then
11040  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11041else
11042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11043for as_dir in $PATH
11044do
11045  IFS=$as_save_IFS
11046  test -z "$as_dir" && as_dir=.
11047    for ac_exec_ext in '' $ac_executable_extensions; do
11048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11049    ac_cv_prog_BDEPS_FTP="$ac_prog"
11050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11051    break 2
11052  fi
11053done
11054  done
11055IFS=$as_save_IFS
11056
11057fi
11058fi
11059BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11060if test -n "$BDEPS_FTP"; then
11061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11062$as_echo "$BDEPS_FTP" >&6; }
11063else
11064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
11066fi
11067
11068
11069  test -n "$BDEPS_FTP" && break
11070done
11071
11072
11073
11074###############################################################################
11075#
11076# Determine OpenJDK variants, options and version numbers.
11077#
11078###############################################################################
11079
11080# We need build & target for this.
11081
11082
11083  ###############################################################################
11084  #
11085  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11086  # We always build headless support.
11087  #
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11089$as_echo_n "checking headful support... " >&6; }
11090  # Check whether --enable-headful was given.
11091if test "${enable_headful+set}" = set; then :
11092  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11093else
11094  SUPPORT_HEADFUL=yes
11095fi
11096
11097
11098  SUPPORT_HEADLESS=yes
11099  BUILD_HEADLESS="BUILD_HEADLESS:=true"
11100
11101  if test "x$SUPPORT_HEADFUL" = xyes; then
11102    # We are building both headful and headless.
11103    headful_msg="include support for both headful and headless"
11104  fi
11105
11106  if test "x$SUPPORT_HEADFUL" = xno; then
11107    # Thus we are building headless only.
11108    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11109    headful_msg="headless only"
11110  fi
11111
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11113$as_echo "$headful_msg" >&6; }
11114
11115
11116
11117
11118
11119  # Control wether Hotspot runs Queens test after build.
11120  # Check whether --enable-hotspot-test-in-build was given.
11121if test "${enable_hotspot_test_in_build+set}" = set; then :
11122  enableval=$enable_hotspot_test_in_build;
11123else
11124  enable_hotspot_test_in_build=no
11125fi
11126
11127  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11128    TEST_IN_BUILD=true
11129  else
11130    TEST_IN_BUILD=false
11131  fi
11132
11133
11134  ###############################################################################
11135  #
11136  # Choose cacerts source file
11137  #
11138
11139# Check whether --with-cacerts-file was given.
11140if test "${with_cacerts_file+set}" = set; then :
11141  withval=$with_cacerts_file;
11142fi
11143
11144  if test "x$with_cacerts_file" != x; then
11145    CACERTS_FILE=$with_cacerts_file
11146  else
11147    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11148  fi
11149
11150
11151  ###############################################################################
11152  #
11153  # Enable or disable unlimited crypto
11154  #
11155  # Check whether --enable-unlimited-crypto was given.
11156if test "${enable_unlimited_crypto+set}" = set; then :
11157  enableval=$enable_unlimited_crypto;
11158else
11159  enable_unlimited_crypto=no
11160fi
11161
11162  if test "x$enable_unlimited_crypto" = "xyes"; then
11163    UNLIMITED_CRYPTO=true
11164  else
11165    UNLIMITED_CRYPTO=false
11166  fi
11167
11168
11169  ###############################################################################
11170  #
11171  # Enable or disable the elliptic curve crypto implementation
11172  #
11173
11174
11175  ###############################################################################
11176  #
11177  # Compress jars
11178  #
11179  COMPRESS_JARS=false
11180
11181
11182
11183
11184  # Source the version numbers
11185  . $AUTOCONF_DIR/version-numbers
11186
11187  # Get the settings from parameters
11188
11189# Check whether --with-milestone was given.
11190if test "${with_milestone+set}" = set; then :
11191  withval=$with_milestone;
11192fi
11193
11194  if test "x$with_milestone" = xyes; then
11195    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11196  elif test "x$with_milestone" != x; then
11197    MILESTONE="$with_milestone"
11198  fi
11199  if test "x$MILESTONE" = x; then
11200    MILESTONE=internal
11201  fi
11202
11203
11204# Check whether --with-update-version was given.
11205if test "${with_update_version+set}" = set; then :
11206  withval=$with_update_version;
11207fi
11208
11209  if test "x$with_update_version" = xyes; then
11210    as_fn_error $? "Update version must have a value" "$LINENO" 5
11211  elif test "x$with_update_version" != x; then
11212    JDK_UPDATE_VERSION="$with_update_version"
11213    # On macosx 10.7, it's not possible to set --with-update-version=0X due
11214    # to a bug in expr (which reduces it to just X). To work around this, we
11215    # always add a 0 to one digit update versions.
11216    if test "${#JDK_UPDATE_VERSION}" = "1"; then
11217      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11218    fi
11219  fi
11220
11221
11222# Check whether --with-user-release-suffix was given.
11223if test "${with_user_release_suffix+set}" = set; then :
11224  withval=$with_user_release_suffix;
11225fi
11226
11227  if test "x$with_user_release_suffix" = xyes; then
11228    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11229  elif test "x$with_user_release_suffix" != x; then
11230    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11231  fi
11232
11233
11234# Check whether --with-build-number was given.
11235if test "${with_build_number+set}" = set; then :
11236  withval=$with_build_number;
11237fi
11238
11239  if test "x$with_build_number" = xyes; then
11240    as_fn_error $? "Build number must have a value" "$LINENO" 5
11241  elif test "x$with_build_number" != x; then
11242    JDK_BUILD_NUMBER="$with_build_number"
11243  fi
11244  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11245  if test "x$JDK_BUILD_NUMBER" = x; then
11246    JDK_BUILD_NUMBER=b00
11247    if test "x$USER_RELEASE_SUFFIX" = x; then
11248      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11249      # Avoid [:alnum:] since it depends on the locale.
11250      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11251      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11252    fi
11253  fi
11254
11255  # Now set the JDK version, milestone, build number etc.
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271  COPYRIGHT_YEAR=`date +'%Y'`
11272
11273
11274  if test "x$JDK_UPDATE_VERSION" != x; then
11275    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11276  else
11277    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11278  fi
11279
11280
11281  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11282
11283
11284
11285###############################################################################
11286#
11287# Setup BootJDK, used to bootstrap the build.
11288#
11289###############################################################################
11290
11291
11292  BOOT_JDK_FOUND=no
11293
11294# Check whether --with-boot-jdk was given.
11295if test "${with_boot_jdk+set}" = set; then :
11296  withval=$with_boot_jdk;
11297fi
11298
11299
11300  # We look for the Boot JDK through various means, going from more certain to
11301  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11302  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11303  # must check if this is indeed valid; otherwise we'll continue looking.
11304
11305  # Test: Is bootjdk explicitely set by command line arguments?
11306
11307  if test "x$BOOT_JDK_FOUND" = xno; then
11308    # Now execute the test
11309
11310  if test "x$with_boot_jdk" != x; then
11311    BOOT_JDK=$with_boot_jdk
11312    BOOT_JDK_FOUND=maybe
11313    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11314$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11315  fi
11316
11317
11318    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11319    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11320      # Do we have a bin/java?
11321      if test ! -x "$BOOT_JDK/bin/java"; then
11322        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11324        BOOT_JDK_FOUND=no
11325      else
11326        # Do we have a bin/javac?
11327        if test ! -x "$BOOT_JDK/bin/javac"; then
11328          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11330          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11331$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11332          BOOT_JDK_FOUND=no
11333        else
11334          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11335          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11338            BOOT_JDK_FOUND=no
11339          else
11340            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11341            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11342
11343            # Extra M4 quote needed to protect [] in grep expression.
11344            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11345            if test "x$FOUND_VERSION_78" = x; then
11346              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11348              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11349$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11350              BOOT_JDK_FOUND=no
11351            else
11352              # We're done! :-)
11353              BOOT_JDK_FOUND=yes
11354
11355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11356
11357  # Input might be given as Windows format, start by converting to
11358  # unix format.
11359  path="$BOOT_JDK"
11360  new_path=`$CYGPATH -u "$path"`
11361
11362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11365  # "foo.exe" is OK but "foo" is an error.
11366  #
11367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11368  # It is also a way to make sure we got the proper file name for the real test later on.
11369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11370  if test "x$test_shortpath" = x; then
11371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11373    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11374  fi
11375
11376  # Call helper function which possibly converts this using DOS-style short mode.
11377  # If so, the updated path is stored in $new_path.
11378
11379  input_path="$new_path"
11380  # Check if we need to convert this using DOS-style short mode. If the path
11381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11382  # take no chances and rewrite it.
11383  # Note: m4 eats our [], so we need to use [ and ] instead.
11384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11385  if test "x$has_forbidden_chars" != x; then
11386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11390      # Going to short mode and back again did indeed matter. Since short mode is
11391      # case insensitive, let's make it lowercase to improve readability.
11392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11393      # Now convert it back to Unix-stile (cygpath)
11394      input_path=`$CYGPATH -u "$shortmode_path"`
11395      new_path="$input_path"
11396    fi
11397  fi
11398
11399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11400  if test "x$test_cygdrive_prefix" = x; then
11401    # As a simple fix, exclude /usr/bin since it's not a real path.
11402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11404      # a path prefixed by /cygdrive for fixpath to work.
11405      new_path="$CYGWIN_ROOT_PATH$input_path"
11406    fi
11407  fi
11408
11409
11410  if test "x$path" != "x$new_path"; then
11411    BOOT_JDK="$new_path"
11412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11414  fi
11415
11416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11417
11418  path="$BOOT_JDK"
11419  has_colon=`$ECHO $path | $GREP ^.:`
11420  new_path="$path"
11421  if test "x$has_colon" = x; then
11422    # Not in mixed or Windows style, start by that.
11423    new_path=`cmd //c echo $path`
11424  fi
11425
11426
11427  input_path="$new_path"
11428  # Check if we need to convert this using DOS-style short mode. If the path
11429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11430  # take no chances and rewrite it.
11431  # Note: m4 eats our [], so we need to use [ and ] instead.
11432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11433  if test "x$has_forbidden_chars" != x; then
11434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11436  fi
11437
11438
11439  windows_path="$new_path"
11440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11441    unix_path=`$CYGPATH -u "$windows_path"`
11442    new_path="$unix_path"
11443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11445    new_path="$unix_path"
11446  fi
11447
11448  if test "x$path" != "x$new_path"; then
11449    BOOT_JDK="$new_path"
11450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11452  fi
11453
11454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11456
11457  else
11458    # We're on a posix platform. Hooray! :)
11459    path="$BOOT_JDK"
11460    has_space=`$ECHO "$path" | $GREP " "`
11461    if test "x$has_space" != x; then
11462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11464      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11465    fi
11466
11467    # Use eval to expand a potential ~
11468    eval path="$path"
11469    if test ! -f "$path" && test ! -d "$path"; then
11470      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11471    fi
11472
11473    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11474  fi
11475
11476              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11477$as_echo_n "checking for Boot JDK... " >&6; }
11478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11479$as_echo "$BOOT_JDK" >&6; }
11480              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11481$as_echo_n "checking Boot JDK version... " >&6; }
11482              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11483              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11484$as_echo "$BOOT_JDK_VERSION" >&6; }
11485            fi # end check jdk version
11486          fi # end check rt.jar
11487        fi # end check javac
11488      fi # end check java
11489    fi # end check boot jdk found
11490  fi
11491
11492  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11493    # Having specified an argument which is incorrect will produce an instant failure;
11494    # we should not go on looking
11495    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11496  fi
11497
11498  # Test: Is bootjdk available from builddeps?
11499
11500  if test "x$BOOT_JDK_FOUND" = xno; then
11501    # Now execute the test
11502
11503
11504
11505  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11506    # Source the builddeps file again, to make sure it uses the latest variables!
11507    . $builddepsfile
11508    # Look for a target and build machine specific resource!
11509    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11510    if test "x$resource" = x; then
11511      # Ok, lets instead look for a target specific resource
11512      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11513    fi
11514    if test "x$resource" = x; then
11515      # Ok, lets instead look for a build specific resource
11516      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11517    fi
11518    if test "x$resource" = x; then
11519      # Ok, lets instead look for a generic resource
11520      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11521      resource=${builddep_bootjdk}
11522    fi
11523    if test "x$resource" != x; then
11524      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11525$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11526      # If the resource in the builddeps.conf file is an existing directory,
11527      # for example /java/linux/cups
11528      if test -d ${resource}; then
11529        depdir=${resource}
11530      else
11531
11532  # bootjdk is for example mymodule
11533  # $resource is for example libs/general/libmymod_1_2_3.zip
11534  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11535  # $with_builddeps_dir is for example /localhome/builddeps
11536  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11537  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11538  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11539  filename=`basename $resource`
11540  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11541  filebase=${filename%%.*}
11542  extension=${filename#*.}
11543  installdir=$with_builddeps_dir/$filebase
11544  if test ! -f $installdir/$filename.unpacked; then
11545    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11546$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11547    if test ! -d $installdir; then
11548      mkdir -p $installdir
11549    fi
11550    if test ! -d $installdir; then
11551      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11552    fi
11553    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11554    touch $tmpfile
11555    if test ! -f $tmpfile; then
11556      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11557    fi
11558
11559  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11560  # $tmpfile is the local file name for the downloaded file.
11561  VALID_TOOL=no
11562  if test "x$BDEPS_FTP" = xwget; then
11563    VALID_TOOL=yes
11564    wget -O $tmpfile $with_builddeps_server/$resource
11565  fi
11566  if test "x$BDEPS_FTP" = xlftp; then
11567    VALID_TOOL=yes
11568    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11569  fi
11570  if test "x$BDEPS_FTP" = xftp; then
11571    VALID_TOOL=yes
11572    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11573    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11574    FTPUSERPWD=${FTPSERVER%%@*}
11575    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11576      FTPUSER=${userpwd%%:*}
11577      FTPPWD=${userpwd#*@}
11578      FTPSERVER=${FTPSERVER#*@}
11579    else
11580      FTPUSER=ftp
11581      FTPPWD=ftp
11582    fi
11583    # the "pass" command does not work on some
11584    # ftp clients (read ftp.exe) but if it works,
11585    # passive mode is better!
11586    ( \
11587        echo "user $FTPUSER $FTPPWD"        ; \
11588        echo "pass"                         ; \
11589        echo "bin"                          ; \
11590        echo "get $FTPPATH $tmpfile"              ; \
11591    ) | ftp -in $FTPSERVER
11592  fi
11593  if test "x$VALID_TOOL" != xyes; then
11594    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11595  fi
11596
11597    mv $tmpfile $installdir/$filename
11598    if test ! -s $installdir/$filename; then
11599      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11600    fi
11601    case "$extension" in
11602      zip)  echo "Unzipping $installdir/$filename..."
11603        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11604        ;;
11605      tar.gz) echo "Untaring $installdir/$filename..."
11606        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11607        ;;
11608      tgz) echo "Untaring $installdir/$filename..."
11609        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11610        ;;
11611      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11612        ;;
11613    esac
11614  fi
11615  if test -f $installdir/$filename.unpacked; then
11616    depdir=$installdir
11617  fi
11618
11619      fi
11620      # Source the builddeps file again, because in the previous command, the depdir
11621      # was updated to point at the current build dependency install directory.
11622      . $builddepsfile
11623      # Now extract variables from the builddeps.conf files.
11624      theroot=${builddep_bootjdk_ROOT}
11625      thecflags=${builddep_bootjdk_CFLAGS}
11626      thelibs=${builddep_bootjdk_LIBS}
11627      if test "x$depdir" = x; then
11628        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11629      fi
11630      BOOT_JDK=$depdir
11631      if test "x$theroot" != x; then
11632        BOOT_JDK="$theroot"
11633      fi
11634      if test "x$thecflags" != x; then
11635        BOOT_JDK_CFLAGS="$thecflags"
11636      fi
11637      if test "x$thelibs" != x; then
11638        BOOT_JDK_LIBS="$thelibs"
11639      fi
11640      BOOT_JDK_FOUND=maybe
11641      else BOOT_JDK_FOUND=no
11642
11643    fi
11644    else BOOT_JDK_FOUND=no
11645
11646  fi
11647
11648
11649
11650    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11651    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11652      # Do we have a bin/java?
11653      if test ! -x "$BOOT_JDK/bin/java"; then
11654        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11656        BOOT_JDK_FOUND=no
11657      else
11658        # Do we have a bin/javac?
11659        if test ! -x "$BOOT_JDK/bin/javac"; then
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11662          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11663$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11664          BOOT_JDK_FOUND=no
11665        else
11666          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11667          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11668            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11670            BOOT_JDK_FOUND=no
11671          else
11672            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11674
11675            # Extra M4 quote needed to protect [] in grep expression.
11676            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11677            if test "x$FOUND_VERSION_78" = x; then
11678              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11680              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11681$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11682              BOOT_JDK_FOUND=no
11683            else
11684              # We're done! :-)
11685              BOOT_JDK_FOUND=yes
11686
11687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11688
11689  # Input might be given as Windows format, start by converting to
11690  # unix format.
11691  path="$BOOT_JDK"
11692  new_path=`$CYGPATH -u "$path"`
11693
11694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11697  # "foo.exe" is OK but "foo" is an error.
11698  #
11699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11700  # It is also a way to make sure we got the proper file name for the real test later on.
11701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11702  if test "x$test_shortpath" = x; then
11703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11705    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11706  fi
11707
11708  # Call helper function which possibly converts this using DOS-style short mode.
11709  # If so, the updated path is stored in $new_path.
11710
11711  input_path="$new_path"
11712  # Check if we need to convert this using DOS-style short mode. If the path
11713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714  # take no chances and rewrite it.
11715  # Note: m4 eats our [], so we need to use [ and ] instead.
11716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11717  if test "x$has_forbidden_chars" != x; then
11718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11722      # Going to short mode and back again did indeed matter. Since short mode is
11723      # case insensitive, let's make it lowercase to improve readability.
11724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11725      # Now convert it back to Unix-stile (cygpath)
11726      input_path=`$CYGPATH -u "$shortmode_path"`
11727      new_path="$input_path"
11728    fi
11729  fi
11730
11731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11732  if test "x$test_cygdrive_prefix" = x; then
11733    # As a simple fix, exclude /usr/bin since it's not a real path.
11734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11736      # a path prefixed by /cygdrive for fixpath to work.
11737      new_path="$CYGWIN_ROOT_PATH$input_path"
11738    fi
11739  fi
11740
11741
11742  if test "x$path" != "x$new_path"; then
11743    BOOT_JDK="$new_path"
11744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11746  fi
11747
11748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749
11750  path="$BOOT_JDK"
11751  has_colon=`$ECHO $path | $GREP ^.:`
11752  new_path="$path"
11753  if test "x$has_colon" = x; then
11754    # Not in mixed or Windows style, start by that.
11755    new_path=`cmd //c echo $path`
11756  fi
11757
11758
11759  input_path="$new_path"
11760  # Check if we need to convert this using DOS-style short mode. If the path
11761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11762  # take no chances and rewrite it.
11763  # Note: m4 eats our [], so we need to use [ and ] instead.
11764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11765  if test "x$has_forbidden_chars" != x; then
11766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11768  fi
11769
11770
11771  windows_path="$new_path"
11772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11773    unix_path=`$CYGPATH -u "$windows_path"`
11774    new_path="$unix_path"
11775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11777    new_path="$unix_path"
11778  fi
11779
11780  if test "x$path" != "x$new_path"; then
11781    BOOT_JDK="$new_path"
11782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11784  fi
11785
11786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11788
11789  else
11790    # We're on a posix platform. Hooray! :)
11791    path="$BOOT_JDK"
11792    has_space=`$ECHO "$path" | $GREP " "`
11793    if test "x$has_space" != x; then
11794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11796      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11797    fi
11798
11799    # Use eval to expand a potential ~
11800    eval path="$path"
11801    if test ! -f "$path" && test ! -d "$path"; then
11802      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11803    fi
11804
11805    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11806  fi
11807
11808              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11809$as_echo_n "checking for Boot JDK... " >&6; }
11810              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11811$as_echo "$BOOT_JDK" >&6; }
11812              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11813$as_echo_n "checking Boot JDK version... " >&6; }
11814              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11815              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11816$as_echo "$BOOT_JDK_VERSION" >&6; }
11817            fi # end check jdk version
11818          fi # end check rt.jar
11819        fi # end check javac
11820      fi # end check java
11821    fi # end check boot jdk found
11822  fi
11823
11824
11825  # Test: Is $JAVA_HOME set?
11826
11827  if test "x$BOOT_JDK_FOUND" = xno; then
11828    # Now execute the test
11829
11830  if test "x$JAVA_HOME" != x; then
11831    JAVA_HOME_PROCESSED="$JAVA_HOME"
11832
11833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11834
11835  # Input might be given as Windows format, start by converting to
11836  # unix format.
11837  path="$JAVA_HOME_PROCESSED"
11838  new_path=`$CYGPATH -u "$path"`
11839
11840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11843  # "foo.exe" is OK but "foo" is an error.
11844  #
11845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11846  # It is also a way to make sure we got the proper file name for the real test later on.
11847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11848  if test "x$test_shortpath" = x; then
11849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11850$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11851    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11852  fi
11853
11854  # Call helper function which possibly converts this using DOS-style short mode.
11855  # If so, the updated path is stored in $new_path.
11856
11857  input_path="$new_path"
11858  # Check if we need to convert this using DOS-style short mode. If the path
11859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11860  # take no chances and rewrite it.
11861  # Note: m4 eats our [], so we need to use [ and ] instead.
11862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11863  if test "x$has_forbidden_chars" != x; then
11864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11868      # Going to short mode and back again did indeed matter. Since short mode is
11869      # case insensitive, let's make it lowercase to improve readability.
11870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11871      # Now convert it back to Unix-stile (cygpath)
11872      input_path=`$CYGPATH -u "$shortmode_path"`
11873      new_path="$input_path"
11874    fi
11875  fi
11876
11877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11878  if test "x$test_cygdrive_prefix" = x; then
11879    # As a simple fix, exclude /usr/bin since it's not a real path.
11880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11882      # a path prefixed by /cygdrive for fixpath to work.
11883      new_path="$CYGWIN_ROOT_PATH$input_path"
11884    fi
11885  fi
11886
11887
11888  if test "x$path" != "x$new_path"; then
11889    JAVA_HOME_PROCESSED="$new_path"
11890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11891$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11892  fi
11893
11894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11895
11896  path="$JAVA_HOME_PROCESSED"
11897  has_colon=`$ECHO $path | $GREP ^.:`
11898  new_path="$path"
11899  if test "x$has_colon" = x; then
11900    # Not in mixed or Windows style, start by that.
11901    new_path=`cmd //c echo $path`
11902  fi
11903
11904
11905  input_path="$new_path"
11906  # Check if we need to convert this using DOS-style short mode. If the path
11907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11908  # take no chances and rewrite it.
11909  # Note: m4 eats our [], so we need to use [ and ] instead.
11910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11911  if test "x$has_forbidden_chars" != x; then
11912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11914  fi
11915
11916
11917  windows_path="$new_path"
11918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11919    unix_path=`$CYGPATH -u "$windows_path"`
11920    new_path="$unix_path"
11921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11923    new_path="$unix_path"
11924  fi
11925
11926  if test "x$path" != "x$new_path"; then
11927    JAVA_HOME_PROCESSED="$new_path"
11928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11929$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11930  fi
11931
11932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11934
11935  else
11936    # We're on a posix platform. Hooray! :)
11937    path="$JAVA_HOME_PROCESSED"
11938    has_space=`$ECHO "$path" | $GREP " "`
11939    if test "x$has_space" != x; then
11940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11941$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11942      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11943    fi
11944
11945    # Use eval to expand a potential ~
11946    eval path="$path"
11947    if test ! -f "$path" && test ! -d "$path"; then
11948      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11949    fi
11950
11951    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11952  fi
11953
11954    if test ! -d "$JAVA_HOME_PROCESSED"; then
11955      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11956$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11957    else
11958      # Aha, the user has set a JAVA_HOME
11959      # let us use that as the Boot JDK.
11960      BOOT_JDK="$JAVA_HOME_PROCESSED"
11961      BOOT_JDK_FOUND=maybe
11962      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11963$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11964    fi
11965  fi
11966
11967
11968    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11969    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11970      # Do we have a bin/java?
11971      if test ! -x "$BOOT_JDK/bin/java"; then
11972        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11974        BOOT_JDK_FOUND=no
11975      else
11976        # Do we have a bin/javac?
11977        if test ! -x "$BOOT_JDK/bin/javac"; then
11978          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11980          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11981$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11982          BOOT_JDK_FOUND=no
11983        else
11984          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11985          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11986            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11988            BOOT_JDK_FOUND=no
11989          else
11990            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11991            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11992
11993            # Extra M4 quote needed to protect [] in grep expression.
11994            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11995            if test "x$FOUND_VERSION_78" = x; then
11996              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11998              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11999$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12000              BOOT_JDK_FOUND=no
12001            else
12002              # We're done! :-)
12003              BOOT_JDK_FOUND=yes
12004
12005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12006
12007  # Input might be given as Windows format, start by converting to
12008  # unix format.
12009  path="$BOOT_JDK"
12010  new_path=`$CYGPATH -u "$path"`
12011
12012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12015  # "foo.exe" is OK but "foo" is an error.
12016  #
12017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12018  # It is also a way to make sure we got the proper file name for the real test later on.
12019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12020  if test "x$test_shortpath" = x; then
12021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12023    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12024  fi
12025
12026  # Call helper function which possibly converts this using DOS-style short mode.
12027  # If so, the updated path is stored in $new_path.
12028
12029  input_path="$new_path"
12030  # Check if we need to convert this using DOS-style short mode. If the path
12031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12032  # take no chances and rewrite it.
12033  # Note: m4 eats our [], so we need to use [ and ] instead.
12034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12035  if test "x$has_forbidden_chars" != x; then
12036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12040      # Going to short mode and back again did indeed matter. Since short mode is
12041      # case insensitive, let's make it lowercase to improve readability.
12042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12043      # Now convert it back to Unix-stile (cygpath)
12044      input_path=`$CYGPATH -u "$shortmode_path"`
12045      new_path="$input_path"
12046    fi
12047  fi
12048
12049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12050  if test "x$test_cygdrive_prefix" = x; then
12051    # As a simple fix, exclude /usr/bin since it's not a real path.
12052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12054      # a path prefixed by /cygdrive for fixpath to work.
12055      new_path="$CYGWIN_ROOT_PATH$input_path"
12056    fi
12057  fi
12058
12059
12060  if test "x$path" != "x$new_path"; then
12061    BOOT_JDK="$new_path"
12062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12064  fi
12065
12066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12067
12068  path="$BOOT_JDK"
12069  has_colon=`$ECHO $path | $GREP ^.:`
12070  new_path="$path"
12071  if test "x$has_colon" = x; then
12072    # Not in mixed or Windows style, start by that.
12073    new_path=`cmd //c echo $path`
12074  fi
12075
12076
12077  input_path="$new_path"
12078  # Check if we need to convert this using DOS-style short mode. If the path
12079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12080  # take no chances and rewrite it.
12081  # Note: m4 eats our [], so we need to use [ and ] instead.
12082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12083  if test "x$has_forbidden_chars" != x; then
12084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12086  fi
12087
12088
12089  windows_path="$new_path"
12090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12091    unix_path=`$CYGPATH -u "$windows_path"`
12092    new_path="$unix_path"
12093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12095    new_path="$unix_path"
12096  fi
12097
12098  if test "x$path" != "x$new_path"; then
12099    BOOT_JDK="$new_path"
12100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12102  fi
12103
12104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12106
12107  else
12108    # We're on a posix platform. Hooray! :)
12109    path="$BOOT_JDK"
12110    has_space=`$ECHO "$path" | $GREP " "`
12111    if test "x$has_space" != x; then
12112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12115    fi
12116
12117    # Use eval to expand a potential ~
12118    eval path="$path"
12119    if test ! -f "$path" && test ! -d "$path"; then
12120      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12121    fi
12122
12123    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12124  fi
12125
12126              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12127$as_echo_n "checking for Boot JDK... " >&6; }
12128              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12129$as_echo "$BOOT_JDK" >&6; }
12130              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12131$as_echo_n "checking Boot JDK version... " >&6; }
12132              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12133              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12134$as_echo "$BOOT_JDK_VERSION" >&6; }
12135            fi # end check jdk version
12136          fi # end check rt.jar
12137        fi # end check javac
12138      fi # end check java
12139    fi # end check boot jdk found
12140  fi
12141
12142
12143  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12144
12145  if test "x$BOOT_JDK_FOUND" = xno; then
12146    # Now execute the test
12147
12148  if test -x /usr/libexec/java_home; then
12149    BOOT_JDK=`/usr/libexec/java_home`
12150    BOOT_JDK_FOUND=maybe
12151    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12152$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12153  fi
12154
12155
12156    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12157    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12158      # Do we have a bin/java?
12159      if test ! -x "$BOOT_JDK/bin/java"; then
12160        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12162        BOOT_JDK_FOUND=no
12163      else
12164        # Do we have a bin/javac?
12165        if test ! -x "$BOOT_JDK/bin/javac"; then
12166          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12168          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12169$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12170          BOOT_JDK_FOUND=no
12171        else
12172          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12173          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12174            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12176            BOOT_JDK_FOUND=no
12177          else
12178            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12180
12181            # Extra M4 quote needed to protect [] in grep expression.
12182            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12183            if test "x$FOUND_VERSION_78" = x; then
12184              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12186              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12187$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12188              BOOT_JDK_FOUND=no
12189            else
12190              # We're done! :-)
12191              BOOT_JDK_FOUND=yes
12192
12193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12194
12195  # Input might be given as Windows format, start by converting to
12196  # unix format.
12197  path="$BOOT_JDK"
12198  new_path=`$CYGPATH -u "$path"`
12199
12200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12203  # "foo.exe" is OK but "foo" is an error.
12204  #
12205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12206  # It is also a way to make sure we got the proper file name for the real test later on.
12207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12208  if test "x$test_shortpath" = x; then
12209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12211    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12212  fi
12213
12214  # Call helper function which possibly converts this using DOS-style short mode.
12215  # If so, the updated path is stored in $new_path.
12216
12217  input_path="$new_path"
12218  # Check if we need to convert this using DOS-style short mode. If the path
12219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12220  # take no chances and rewrite it.
12221  # Note: m4 eats our [], so we need to use [ and ] instead.
12222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12223  if test "x$has_forbidden_chars" != x; then
12224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12228      # Going to short mode and back again did indeed matter. Since short mode is
12229      # case insensitive, let's make it lowercase to improve readability.
12230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12231      # Now convert it back to Unix-stile (cygpath)
12232      input_path=`$CYGPATH -u "$shortmode_path"`
12233      new_path="$input_path"
12234    fi
12235  fi
12236
12237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12238  if test "x$test_cygdrive_prefix" = x; then
12239    # As a simple fix, exclude /usr/bin since it's not a real path.
12240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12242      # a path prefixed by /cygdrive for fixpath to work.
12243      new_path="$CYGWIN_ROOT_PATH$input_path"
12244    fi
12245  fi
12246
12247
12248  if test "x$path" != "x$new_path"; then
12249    BOOT_JDK="$new_path"
12250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252  fi
12253
12254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12255
12256  path="$BOOT_JDK"
12257  has_colon=`$ECHO $path | $GREP ^.:`
12258  new_path="$path"
12259  if test "x$has_colon" = x; then
12260    # Not in mixed or Windows style, start by that.
12261    new_path=`cmd //c echo $path`
12262  fi
12263
12264
12265  input_path="$new_path"
12266  # Check if we need to convert this using DOS-style short mode. If the path
12267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12268  # take no chances and rewrite it.
12269  # Note: m4 eats our [], so we need to use [ and ] instead.
12270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12271  if test "x$has_forbidden_chars" != x; then
12272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12274  fi
12275
12276
12277  windows_path="$new_path"
12278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12279    unix_path=`$CYGPATH -u "$windows_path"`
12280    new_path="$unix_path"
12281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12283    new_path="$unix_path"
12284  fi
12285
12286  if test "x$path" != "x$new_path"; then
12287    BOOT_JDK="$new_path"
12288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12290  fi
12291
12292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12294
12295  else
12296    # We're on a posix platform. Hooray! :)
12297    path="$BOOT_JDK"
12298    has_space=`$ECHO "$path" | $GREP " "`
12299    if test "x$has_space" != x; then
12300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12302      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12303    fi
12304
12305    # Use eval to expand a potential ~
12306    eval path="$path"
12307    if test ! -f "$path" && test ! -d "$path"; then
12308      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12309    fi
12310
12311    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12312  fi
12313
12314              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12315$as_echo_n "checking for Boot JDK... " >&6; }
12316              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12317$as_echo "$BOOT_JDK" >&6; }
12318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12319$as_echo_n "checking Boot JDK version... " >&6; }
12320              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12321              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12322$as_echo "$BOOT_JDK_VERSION" >&6; }
12323            fi # end check jdk version
12324          fi # end check rt.jar
12325        fi # end check javac
12326      fi # end check java
12327    fi # end check boot jdk found
12328  fi
12329
12330
12331  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12332
12333  if test "x$BOOT_JDK_FOUND" = xno; then
12334    # Now execute the test
12335
12336  # Extract the first word of "javac", so it can be a program name with args.
12337set dummy javac; ac_word=$2
12338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12339$as_echo_n "checking for $ac_word... " >&6; }
12340if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12341  $as_echo_n "(cached) " >&6
12342else
12343  case $JAVAC_CHECK in
12344  [\\/]* | ?:[\\/]*)
12345  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12346  ;;
12347  *)
12348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12349for as_dir in $PATH
12350do
12351  IFS=$as_save_IFS
12352  test -z "$as_dir" && as_dir=.
12353    for ac_exec_ext in '' $ac_executable_extensions; do
12354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12355    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12357    break 2
12358  fi
12359done
12360  done
12361IFS=$as_save_IFS
12362
12363  ;;
12364esac
12365fi
12366JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12367if test -n "$JAVAC_CHECK"; then
12368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12369$as_echo "$JAVAC_CHECK" >&6; }
12370else
12371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12372$as_echo "no" >&6; }
12373fi
12374
12375
12376  # Extract the first word of "java", so it can be a program name with args.
12377set dummy java; ac_word=$2
12378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12379$as_echo_n "checking for $ac_word... " >&6; }
12380if ${ac_cv_path_JAVA_CHECK+:} false; then :
12381  $as_echo_n "(cached) " >&6
12382else
12383  case $JAVA_CHECK in
12384  [\\/]* | ?:[\\/]*)
12385  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12386  ;;
12387  *)
12388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12389for as_dir in $PATH
12390do
12391  IFS=$as_save_IFS
12392  test -z "$as_dir" && as_dir=.
12393    for ac_exec_ext in '' $ac_executable_extensions; do
12394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12395    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12397    break 2
12398  fi
12399done
12400  done
12401IFS=$as_save_IFS
12402
12403  ;;
12404esac
12405fi
12406JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12407if test -n "$JAVA_CHECK"; then
12408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12409$as_echo "$JAVA_CHECK" >&6; }
12410else
12411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12412$as_echo "no" >&6; }
12413fi
12414
12415
12416  BINARY="$JAVAC_CHECK"
12417  if test "x$JAVAC_CHECK" = x; then
12418    BINARY="$JAVA_CHECK"
12419  fi
12420  if test "x$BINARY" != x; then
12421    # So there is a java(c) binary, it might be part of a JDK.
12422    # Lets find the JDK/JRE directory by following symbolic links.
12423    # Linux/GNU systems often have links from /usr/bin/java to
12424    # /etc/alternatives/java to the real JDK binary.
12425
12426  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12427    # Follow a chain of symbolic links. Use readlink
12428    # where it exists, else fall back to horribly
12429    # complicated shell code.
12430    if test "x$READLINK_TESTED" != yes; then
12431      # On MacOSX there is a readlink tool with a different
12432      # purpose than the GNU readlink tool. Check the found readlink.
12433      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12434      if test "x$ISGNU" = x; then
12435        # A readlink that we do not know how to use.
12436        # Are there other non-GNU readlinks out there?
12437        READLINK_TESTED=yes
12438        READLINK=
12439      fi
12440    fi
12441
12442    if test "x$READLINK" != x; then
12443      BINARY=`$READLINK -f $BINARY`
12444    else
12445      # Save the current directory for restoring afterwards
12446      STARTDIR=$PWD
12447      COUNTER=0
12448      sym_link_dir=`$DIRNAME $BINARY`
12449      sym_link_file=`$BASENAME $BINARY`
12450      cd $sym_link_dir
12451      # Use -P flag to resolve symlinks in directories.
12452      cd `$THEPWDCMD -P`
12453      sym_link_dir=`$THEPWDCMD -P`
12454      # Resolve file symlinks
12455      while test $COUNTER -lt 20; do
12456        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12457        if test "x$ISLINK" == x; then
12458          # This is not a symbolic link! We are done!
12459          break
12460        fi
12461        # Again resolve directory symlinks since the target of the just found
12462        # link could be in a different directory
12463        cd `$DIRNAME $ISLINK`
12464        sym_link_dir=`$THEPWDCMD -P`
12465        sym_link_file=`$BASENAME $ISLINK`
12466        let COUNTER=COUNTER+1
12467      done
12468      cd $STARTDIR
12469      BINARY=$sym_link_dir/$sym_link_file
12470    fi
12471  fi
12472
12473    BOOT_JDK=`dirname "$BINARY"`
12474    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12475    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12476      # Looks like we found ourselves an JDK
12477      BOOT_JDK_FOUND=maybe
12478      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12479$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12480    fi
12481  fi
12482
12483
12484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12486      # Do we have a bin/java?
12487      if test ! -x "$BOOT_JDK/bin/java"; then
12488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12490        BOOT_JDK_FOUND=no
12491      else
12492        # Do we have a bin/javac?
12493        if test ! -x "$BOOT_JDK/bin/javac"; then
12494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12498          BOOT_JDK_FOUND=no
12499        else
12500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12504            BOOT_JDK_FOUND=no
12505          else
12506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12508
12509            # Extra M4 quote needed to protect [] in grep expression.
12510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12511            if test "x$FOUND_VERSION_78" = x; then
12512              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12514              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12516              BOOT_JDK_FOUND=no
12517            else
12518              # We're done! :-)
12519              BOOT_JDK_FOUND=yes
12520
12521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12522
12523  # Input might be given as Windows format, start by converting to
12524  # unix format.
12525  path="$BOOT_JDK"
12526  new_path=`$CYGPATH -u "$path"`
12527
12528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12531  # "foo.exe" is OK but "foo" is an error.
12532  #
12533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12534  # It is also a way to make sure we got the proper file name for the real test later on.
12535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12536  if test "x$test_shortpath" = x; then
12537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12540  fi
12541
12542  # Call helper function which possibly converts this using DOS-style short mode.
12543  # If so, the updated path is stored in $new_path.
12544
12545  input_path="$new_path"
12546  # Check if we need to convert this using DOS-style short mode. If the path
12547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12548  # take no chances and rewrite it.
12549  # Note: m4 eats our [], so we need to use [ and ] instead.
12550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12551  if test "x$has_forbidden_chars" != x; then
12552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12556      # Going to short mode and back again did indeed matter. Since short mode is
12557      # case insensitive, let's make it lowercase to improve readability.
12558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12559      # Now convert it back to Unix-stile (cygpath)
12560      input_path=`$CYGPATH -u "$shortmode_path"`
12561      new_path="$input_path"
12562    fi
12563  fi
12564
12565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12566  if test "x$test_cygdrive_prefix" = x; then
12567    # As a simple fix, exclude /usr/bin since it's not a real path.
12568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12570      # a path prefixed by /cygdrive for fixpath to work.
12571      new_path="$CYGWIN_ROOT_PATH$input_path"
12572    fi
12573  fi
12574
12575
12576  if test "x$path" != "x$new_path"; then
12577    BOOT_JDK="$new_path"
12578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12580  fi
12581
12582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12583
12584  path="$BOOT_JDK"
12585  has_colon=`$ECHO $path | $GREP ^.:`
12586  new_path="$path"
12587  if test "x$has_colon" = x; then
12588    # Not in mixed or Windows style, start by that.
12589    new_path=`cmd //c echo $path`
12590  fi
12591
12592
12593  input_path="$new_path"
12594  # Check if we need to convert this using DOS-style short mode. If the path
12595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12596  # take no chances and rewrite it.
12597  # Note: m4 eats our [], so we need to use [ and ] instead.
12598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12599  if test "x$has_forbidden_chars" != x; then
12600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12602  fi
12603
12604
12605  windows_path="$new_path"
12606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12607    unix_path=`$CYGPATH -u "$windows_path"`
12608    new_path="$unix_path"
12609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12611    new_path="$unix_path"
12612  fi
12613
12614  if test "x$path" != "x$new_path"; then
12615    BOOT_JDK="$new_path"
12616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12618  fi
12619
12620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12622
12623  else
12624    # We're on a posix platform. Hooray! :)
12625    path="$BOOT_JDK"
12626    has_space=`$ECHO "$path" | $GREP " "`
12627    if test "x$has_space" != x; then
12628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12630      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12631    fi
12632
12633    # Use eval to expand a potential ~
12634    eval path="$path"
12635    if test ! -f "$path" && test ! -d "$path"; then
12636      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12637    fi
12638
12639    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12640  fi
12641
12642              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12643$as_echo_n "checking for Boot JDK... " >&6; }
12644              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12645$as_echo "$BOOT_JDK" >&6; }
12646              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12647$as_echo_n "checking Boot JDK version... " >&6; }
12648              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12649              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12650$as_echo "$BOOT_JDK_VERSION" >&6; }
12651            fi # end check jdk version
12652          fi # end check rt.jar
12653        fi # end check javac
12654      fi # end check java
12655    fi # end check boot jdk found
12656  fi
12657
12658
12659  # Test: Is there a JDK installed in default, well-known locations?
12660
12661  if test "x$BOOT_JDK_FOUND" = xno; then
12662    # Now execute the test
12663
12664  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12665
12666  if test "x$BOOT_JDK_FOUND" = xno; then
12667    # Now execute the test
12668
12669  if test "x$ProgramW6432" != x; then
12670    VIRTUAL_DIR="$ProgramW6432/Java"
12671
12672  windows_path="$VIRTUAL_DIR"
12673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12674    unix_path=`$CYGPATH -u "$windows_path"`
12675    VIRTUAL_DIR="$unix_path"
12676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12678    VIRTUAL_DIR="$unix_path"
12679  fi
12680
12681
12682  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12683  BOOT_JDK_SUFFIX=""
12684  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12685  if test "x$ALL_JDKS_FOUND" != x; then
12686    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12687
12688  if test "x$BOOT_JDK_FOUND" = xno; then
12689    # Now execute the test
12690
12691        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12692        if test -d "$BOOT_JDK"; then
12693          BOOT_JDK_FOUND=maybe
12694          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12695$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12696        fi
12697
12698
12699    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12700    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12701      # Do we have a bin/java?
12702      if test ! -x "$BOOT_JDK/bin/java"; then
12703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12705        BOOT_JDK_FOUND=no
12706      else
12707        # Do we have a bin/javac?
12708        if test ! -x "$BOOT_JDK/bin/javac"; then
12709          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12711          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12712$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12713          BOOT_JDK_FOUND=no
12714        else
12715          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12716          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12717            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12719            BOOT_JDK_FOUND=no
12720          else
12721            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12722            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12723
12724            # Extra M4 quote needed to protect [] in grep expression.
12725            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12726            if test "x$FOUND_VERSION_78" = x; then
12727              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12729              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12730$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12731              BOOT_JDK_FOUND=no
12732            else
12733              # We're done! :-)
12734              BOOT_JDK_FOUND=yes
12735
12736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12737
12738  # Input might be given as Windows format, start by converting to
12739  # unix format.
12740  path="$BOOT_JDK"
12741  new_path=`$CYGPATH -u "$path"`
12742
12743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12746  # "foo.exe" is OK but "foo" is an error.
12747  #
12748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12749  # It is also a way to make sure we got the proper file name for the real test later on.
12750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12751  if test "x$test_shortpath" = x; then
12752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12755  fi
12756
12757  # Call helper function which possibly converts this using DOS-style short mode.
12758  # If so, the updated path is stored in $new_path.
12759
12760  input_path="$new_path"
12761  # Check if we need to convert this using DOS-style short mode. If the path
12762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12763  # take no chances and rewrite it.
12764  # Note: m4 eats our [], so we need to use [ and ] instead.
12765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12766  if test "x$has_forbidden_chars" != x; then
12767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12771      # Going to short mode and back again did indeed matter. Since short mode is
12772      # case insensitive, let's make it lowercase to improve readability.
12773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12774      # Now convert it back to Unix-stile (cygpath)
12775      input_path=`$CYGPATH -u "$shortmode_path"`
12776      new_path="$input_path"
12777    fi
12778  fi
12779
12780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12781  if test "x$test_cygdrive_prefix" = x; then
12782    # As a simple fix, exclude /usr/bin since it's not a real path.
12783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12785      # a path prefixed by /cygdrive for fixpath to work.
12786      new_path="$CYGWIN_ROOT_PATH$input_path"
12787    fi
12788  fi
12789
12790
12791  if test "x$path" != "x$new_path"; then
12792    BOOT_JDK="$new_path"
12793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12795  fi
12796
12797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12798
12799  path="$BOOT_JDK"
12800  has_colon=`$ECHO $path | $GREP ^.:`
12801  new_path="$path"
12802  if test "x$has_colon" = x; then
12803    # Not in mixed or Windows style, start by that.
12804    new_path=`cmd //c echo $path`
12805  fi
12806
12807
12808  input_path="$new_path"
12809  # Check if we need to convert this using DOS-style short mode. If the path
12810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12811  # take no chances and rewrite it.
12812  # Note: m4 eats our [], so we need to use [ and ] instead.
12813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12814  if test "x$has_forbidden_chars" != x; then
12815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12817  fi
12818
12819
12820  windows_path="$new_path"
12821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12822    unix_path=`$CYGPATH -u "$windows_path"`
12823    new_path="$unix_path"
12824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12826    new_path="$unix_path"
12827  fi
12828
12829  if test "x$path" != "x$new_path"; then
12830    BOOT_JDK="$new_path"
12831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12833  fi
12834
12835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12837
12838  else
12839    # We're on a posix platform. Hooray! :)
12840    path="$BOOT_JDK"
12841    has_space=`$ECHO "$path" | $GREP " "`
12842    if test "x$has_space" != x; then
12843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12845      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12846    fi
12847
12848    # Use eval to expand a potential ~
12849    eval path="$path"
12850    if test ! -f "$path" && test ! -d "$path"; then
12851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12852    fi
12853
12854    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12855  fi
12856
12857              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12858$as_echo_n "checking for Boot JDK... " >&6; }
12859              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12860$as_echo "$BOOT_JDK" >&6; }
12861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12862$as_echo_n "checking Boot JDK version... " >&6; }
12863              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12865$as_echo "$BOOT_JDK_VERSION" >&6; }
12866            fi # end check jdk version
12867          fi # end check rt.jar
12868        fi # end check javac
12869      fi # end check java
12870    fi # end check boot jdk found
12871  fi
12872
12873    done
12874  fi
12875
12876  fi
12877
12878
12879    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12880    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12881      # Do we have a bin/java?
12882      if test ! -x "$BOOT_JDK/bin/java"; then
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12885        BOOT_JDK_FOUND=no
12886      else
12887        # Do we have a bin/javac?
12888        if test ! -x "$BOOT_JDK/bin/javac"; then
12889          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12891          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12892$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12893          BOOT_JDK_FOUND=no
12894        else
12895          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12896          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12897            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12899            BOOT_JDK_FOUND=no
12900          else
12901            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12902            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12903
12904            # Extra M4 quote needed to protect [] in grep expression.
12905            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12906            if test "x$FOUND_VERSION_78" = x; then
12907              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12909              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12910$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12911              BOOT_JDK_FOUND=no
12912            else
12913              # We're done! :-)
12914              BOOT_JDK_FOUND=yes
12915
12916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12917
12918  # Input might be given as Windows format, start by converting to
12919  # unix format.
12920  path="$BOOT_JDK"
12921  new_path=`$CYGPATH -u "$path"`
12922
12923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12926  # "foo.exe" is OK but "foo" is an error.
12927  #
12928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12929  # It is also a way to make sure we got the proper file name for the real test later on.
12930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12931  if test "x$test_shortpath" = x; then
12932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12934    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12935  fi
12936
12937  # Call helper function which possibly converts this using DOS-style short mode.
12938  # If so, the updated path is stored in $new_path.
12939
12940  input_path="$new_path"
12941  # Check if we need to convert this using DOS-style short mode. If the path
12942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12943  # take no chances and rewrite it.
12944  # Note: m4 eats our [], so we need to use [ and ] instead.
12945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12946  if test "x$has_forbidden_chars" != x; then
12947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12951      # Going to short mode and back again did indeed matter. Since short mode is
12952      # case insensitive, let's make it lowercase to improve readability.
12953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12954      # Now convert it back to Unix-stile (cygpath)
12955      input_path=`$CYGPATH -u "$shortmode_path"`
12956      new_path="$input_path"
12957    fi
12958  fi
12959
12960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12961  if test "x$test_cygdrive_prefix" = x; then
12962    # As a simple fix, exclude /usr/bin since it's not a real path.
12963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12965      # a path prefixed by /cygdrive for fixpath to work.
12966      new_path="$CYGWIN_ROOT_PATH$input_path"
12967    fi
12968  fi
12969
12970
12971  if test "x$path" != "x$new_path"; then
12972    BOOT_JDK="$new_path"
12973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12975  fi
12976
12977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12978
12979  path="$BOOT_JDK"
12980  has_colon=`$ECHO $path | $GREP ^.:`
12981  new_path="$path"
12982  if test "x$has_colon" = x; then
12983    # Not in mixed or Windows style, start by that.
12984    new_path=`cmd //c echo $path`
12985  fi
12986
12987
12988  input_path="$new_path"
12989  # Check if we need to convert this using DOS-style short mode. If the path
12990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12991  # take no chances and rewrite it.
12992  # Note: m4 eats our [], so we need to use [ and ] instead.
12993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12994  if test "x$has_forbidden_chars" != x; then
12995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12997  fi
12998
12999
13000  windows_path="$new_path"
13001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13002    unix_path=`$CYGPATH -u "$windows_path"`
13003    new_path="$unix_path"
13004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13006    new_path="$unix_path"
13007  fi
13008
13009  if test "x$path" != "x$new_path"; then
13010    BOOT_JDK="$new_path"
13011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13012$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13013  fi
13014
13015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13017
13018  else
13019    # We're on a posix platform. Hooray! :)
13020    path="$BOOT_JDK"
13021    has_space=`$ECHO "$path" | $GREP " "`
13022    if test "x$has_space" != x; then
13023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13024$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13025      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13026    fi
13027
13028    # Use eval to expand a potential ~
13029    eval path="$path"
13030    if test ! -f "$path" && test ! -d "$path"; then
13031      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13032    fi
13033
13034    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13035  fi
13036
13037              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13038$as_echo_n "checking for Boot JDK... " >&6; }
13039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13040$as_echo "$BOOT_JDK" >&6; }
13041              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13042$as_echo_n "checking Boot JDK version... " >&6; }
13043              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13044              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13045$as_echo "$BOOT_JDK_VERSION" >&6; }
13046            fi # end check jdk version
13047          fi # end check rt.jar
13048        fi # end check javac
13049      fi # end check java
13050    fi # end check boot jdk found
13051  fi
13052
13053
13054  if test "x$BOOT_JDK_FOUND" = xno; then
13055    # Now execute the test
13056
13057  if test "x$PROGRAMW6432" != x; then
13058    VIRTUAL_DIR="$PROGRAMW6432/Java"
13059
13060  windows_path="$VIRTUAL_DIR"
13061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13062    unix_path=`$CYGPATH -u "$windows_path"`
13063    VIRTUAL_DIR="$unix_path"
13064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13066    VIRTUAL_DIR="$unix_path"
13067  fi
13068
13069
13070  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13071  BOOT_JDK_SUFFIX=""
13072  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13073  if test "x$ALL_JDKS_FOUND" != x; then
13074    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13075
13076  if test "x$BOOT_JDK_FOUND" = xno; then
13077    # Now execute the test
13078
13079        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13080        if test -d "$BOOT_JDK"; then
13081          BOOT_JDK_FOUND=maybe
13082          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13083$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13084        fi
13085
13086
13087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13089      # Do we have a bin/java?
13090      if test ! -x "$BOOT_JDK/bin/java"; then
13091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13093        BOOT_JDK_FOUND=no
13094      else
13095        # Do we have a bin/javac?
13096        if test ! -x "$BOOT_JDK/bin/javac"; then
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13101          BOOT_JDK_FOUND=no
13102        else
13103          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13104          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13107            BOOT_JDK_FOUND=no
13108          else
13109            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13111
13112            # Extra M4 quote needed to protect [] in grep expression.
13113            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13114            if test "x$FOUND_VERSION_78" = x; then
13115              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13117              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13118$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13119              BOOT_JDK_FOUND=no
13120            else
13121              # We're done! :-)
13122              BOOT_JDK_FOUND=yes
13123
13124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13125
13126  # Input might be given as Windows format, start by converting to
13127  # unix format.
13128  path="$BOOT_JDK"
13129  new_path=`$CYGPATH -u "$path"`
13130
13131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13134  # "foo.exe" is OK but "foo" is an error.
13135  #
13136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13137  # It is also a way to make sure we got the proper file name for the real test later on.
13138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13139  if test "x$test_shortpath" = x; then
13140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13141$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13142    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13143  fi
13144
13145  # Call helper function which possibly converts this using DOS-style short mode.
13146  # If so, the updated path is stored in $new_path.
13147
13148  input_path="$new_path"
13149  # Check if we need to convert this using DOS-style short mode. If the path
13150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13151  # take no chances and rewrite it.
13152  # Note: m4 eats our [], so we need to use [ and ] instead.
13153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13154  if test "x$has_forbidden_chars" != x; then
13155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13159      # Going to short mode and back again did indeed matter. Since short mode is
13160      # case insensitive, let's make it lowercase to improve readability.
13161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13162      # Now convert it back to Unix-stile (cygpath)
13163      input_path=`$CYGPATH -u "$shortmode_path"`
13164      new_path="$input_path"
13165    fi
13166  fi
13167
13168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13169  if test "x$test_cygdrive_prefix" = x; then
13170    # As a simple fix, exclude /usr/bin since it's not a real path.
13171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13173      # a path prefixed by /cygdrive for fixpath to work.
13174      new_path="$CYGWIN_ROOT_PATH$input_path"
13175    fi
13176  fi
13177
13178
13179  if test "x$path" != "x$new_path"; then
13180    BOOT_JDK="$new_path"
13181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13183  fi
13184
13185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13186
13187  path="$BOOT_JDK"
13188  has_colon=`$ECHO $path | $GREP ^.:`
13189  new_path="$path"
13190  if test "x$has_colon" = x; then
13191    # Not in mixed or Windows style, start by that.
13192    new_path=`cmd //c echo $path`
13193  fi
13194
13195
13196  input_path="$new_path"
13197  # Check if we need to convert this using DOS-style short mode. If the path
13198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13199  # take no chances and rewrite it.
13200  # Note: m4 eats our [], so we need to use [ and ] instead.
13201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13202  if test "x$has_forbidden_chars" != x; then
13203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13205  fi
13206
13207
13208  windows_path="$new_path"
13209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13210    unix_path=`$CYGPATH -u "$windows_path"`
13211    new_path="$unix_path"
13212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13214    new_path="$unix_path"
13215  fi
13216
13217  if test "x$path" != "x$new_path"; then
13218    BOOT_JDK="$new_path"
13219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13221  fi
13222
13223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13225
13226  else
13227    # We're on a posix platform. Hooray! :)
13228    path="$BOOT_JDK"
13229    has_space=`$ECHO "$path" | $GREP " "`
13230    if test "x$has_space" != x; then
13231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13234    fi
13235
13236    # Use eval to expand a potential ~
13237    eval path="$path"
13238    if test ! -f "$path" && test ! -d "$path"; then
13239      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13240    fi
13241
13242    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13243  fi
13244
13245              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13246$as_echo_n "checking for Boot JDK... " >&6; }
13247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13248$as_echo "$BOOT_JDK" >&6; }
13249              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13250$as_echo_n "checking Boot JDK version... " >&6; }
13251              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13252              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13253$as_echo "$BOOT_JDK_VERSION" >&6; }
13254            fi # end check jdk version
13255          fi # end check rt.jar
13256        fi # end check javac
13257      fi # end check java
13258    fi # end check boot jdk found
13259  fi
13260
13261    done
13262  fi
13263
13264  fi
13265
13266
13267    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13268    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13269      # Do we have a bin/java?
13270      if test ! -x "$BOOT_JDK/bin/java"; then
13271        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13273        BOOT_JDK_FOUND=no
13274      else
13275        # Do we have a bin/javac?
13276        if test ! -x "$BOOT_JDK/bin/javac"; then
13277          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13279          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13280$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13281          BOOT_JDK_FOUND=no
13282        else
13283          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13284          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13285            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13287            BOOT_JDK_FOUND=no
13288          else
13289            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13291
13292            # Extra M4 quote needed to protect [] in grep expression.
13293            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13294            if test "x$FOUND_VERSION_78" = x; then
13295              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13297              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13298$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13299              BOOT_JDK_FOUND=no
13300            else
13301              # We're done! :-)
13302              BOOT_JDK_FOUND=yes
13303
13304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13305
13306  # Input might be given as Windows format, start by converting to
13307  # unix format.
13308  path="$BOOT_JDK"
13309  new_path=`$CYGPATH -u "$path"`
13310
13311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13314  # "foo.exe" is OK but "foo" is an error.
13315  #
13316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13317  # It is also a way to make sure we got the proper file name for the real test later on.
13318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13319  if test "x$test_shortpath" = x; then
13320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13323  fi
13324
13325  # Call helper function which possibly converts this using DOS-style short mode.
13326  # If so, the updated path is stored in $new_path.
13327
13328  input_path="$new_path"
13329  # Check if we need to convert this using DOS-style short mode. If the path
13330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13331  # take no chances and rewrite it.
13332  # Note: m4 eats our [], so we need to use [ and ] instead.
13333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13334  if test "x$has_forbidden_chars" != x; then
13335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13339      # Going to short mode and back again did indeed matter. Since short mode is
13340      # case insensitive, let's make it lowercase to improve readability.
13341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13342      # Now convert it back to Unix-stile (cygpath)
13343      input_path=`$CYGPATH -u "$shortmode_path"`
13344      new_path="$input_path"
13345    fi
13346  fi
13347
13348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13349  if test "x$test_cygdrive_prefix" = x; then
13350    # As a simple fix, exclude /usr/bin since it's not a real path.
13351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13353      # a path prefixed by /cygdrive for fixpath to work.
13354      new_path="$CYGWIN_ROOT_PATH$input_path"
13355    fi
13356  fi
13357
13358
13359  if test "x$path" != "x$new_path"; then
13360    BOOT_JDK="$new_path"
13361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13363  fi
13364
13365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13366
13367  path="$BOOT_JDK"
13368  has_colon=`$ECHO $path | $GREP ^.:`
13369  new_path="$path"
13370  if test "x$has_colon" = x; then
13371    # Not in mixed or Windows style, start by that.
13372    new_path=`cmd //c echo $path`
13373  fi
13374
13375
13376  input_path="$new_path"
13377  # Check if we need to convert this using DOS-style short mode. If the path
13378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13379  # take no chances and rewrite it.
13380  # Note: m4 eats our [], so we need to use [ and ] instead.
13381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13382  if test "x$has_forbidden_chars" != x; then
13383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13385  fi
13386
13387
13388  windows_path="$new_path"
13389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13390    unix_path=`$CYGPATH -u "$windows_path"`
13391    new_path="$unix_path"
13392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13394    new_path="$unix_path"
13395  fi
13396
13397  if test "x$path" != "x$new_path"; then
13398    BOOT_JDK="$new_path"
13399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13401  fi
13402
13403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13405
13406  else
13407    # We're on a posix platform. Hooray! :)
13408    path="$BOOT_JDK"
13409    has_space=`$ECHO "$path" | $GREP " "`
13410    if test "x$has_space" != x; then
13411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13413      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13414    fi
13415
13416    # Use eval to expand a potential ~
13417    eval path="$path"
13418    if test ! -f "$path" && test ! -d "$path"; then
13419      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13420    fi
13421
13422    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13423  fi
13424
13425              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13426$as_echo_n "checking for Boot JDK... " >&6; }
13427              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13428$as_echo "$BOOT_JDK" >&6; }
13429              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13430$as_echo_n "checking Boot JDK version... " >&6; }
13431              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13432              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13433$as_echo "$BOOT_JDK_VERSION" >&6; }
13434            fi # end check jdk version
13435          fi # end check rt.jar
13436        fi # end check javac
13437      fi # end check java
13438    fi # end check boot jdk found
13439  fi
13440
13441
13442  if test "x$BOOT_JDK_FOUND" = xno; then
13443    # Now execute the test
13444
13445  if test "x$PROGRAMFILES" != x; then
13446    VIRTUAL_DIR="$PROGRAMFILES/Java"
13447
13448  windows_path="$VIRTUAL_DIR"
13449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13450    unix_path=`$CYGPATH -u "$windows_path"`
13451    VIRTUAL_DIR="$unix_path"
13452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13454    VIRTUAL_DIR="$unix_path"
13455  fi
13456
13457
13458  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13459  BOOT_JDK_SUFFIX=""
13460  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13461  if test "x$ALL_JDKS_FOUND" != x; then
13462    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13463
13464  if test "x$BOOT_JDK_FOUND" = xno; then
13465    # Now execute the test
13466
13467        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13468        if test -d "$BOOT_JDK"; then
13469          BOOT_JDK_FOUND=maybe
13470          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13471$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13472        fi
13473
13474
13475    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13476    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13477      # Do we have a bin/java?
13478      if test ! -x "$BOOT_JDK/bin/java"; then
13479        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13481        BOOT_JDK_FOUND=no
13482      else
13483        # Do we have a bin/javac?
13484        if test ! -x "$BOOT_JDK/bin/javac"; then
13485          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13487          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13488$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13489          BOOT_JDK_FOUND=no
13490        else
13491          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13492          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13493            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13495            BOOT_JDK_FOUND=no
13496          else
13497            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13498            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13499
13500            # Extra M4 quote needed to protect [] in grep expression.
13501            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13502            if test "x$FOUND_VERSION_78" = x; then
13503              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13505              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13506$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13507              BOOT_JDK_FOUND=no
13508            else
13509              # We're done! :-)
13510              BOOT_JDK_FOUND=yes
13511
13512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13513
13514  # Input might be given as Windows format, start by converting to
13515  # unix format.
13516  path="$BOOT_JDK"
13517  new_path=`$CYGPATH -u "$path"`
13518
13519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13522  # "foo.exe" is OK but "foo" is an error.
13523  #
13524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13525  # It is also a way to make sure we got the proper file name for the real test later on.
13526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13527  if test "x$test_shortpath" = x; then
13528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13529$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13530    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13531  fi
13532
13533  # Call helper function which possibly converts this using DOS-style short mode.
13534  # If so, the updated path is stored in $new_path.
13535
13536  input_path="$new_path"
13537  # Check if we need to convert this using DOS-style short mode. If the path
13538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13539  # take no chances and rewrite it.
13540  # Note: m4 eats our [], so we need to use [ and ] instead.
13541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13542  if test "x$has_forbidden_chars" != x; then
13543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13547      # Going to short mode and back again did indeed matter. Since short mode is
13548      # case insensitive, let's make it lowercase to improve readability.
13549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13550      # Now convert it back to Unix-stile (cygpath)
13551      input_path=`$CYGPATH -u "$shortmode_path"`
13552      new_path="$input_path"
13553    fi
13554  fi
13555
13556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13557  if test "x$test_cygdrive_prefix" = x; then
13558    # As a simple fix, exclude /usr/bin since it's not a real path.
13559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13561      # a path prefixed by /cygdrive for fixpath to work.
13562      new_path="$CYGWIN_ROOT_PATH$input_path"
13563    fi
13564  fi
13565
13566
13567  if test "x$path" != "x$new_path"; then
13568    BOOT_JDK="$new_path"
13569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13570$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13571  fi
13572
13573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13574
13575  path="$BOOT_JDK"
13576  has_colon=`$ECHO $path | $GREP ^.:`
13577  new_path="$path"
13578  if test "x$has_colon" = x; then
13579    # Not in mixed or Windows style, start by that.
13580    new_path=`cmd //c echo $path`
13581  fi
13582
13583
13584  input_path="$new_path"
13585  # Check if we need to convert this using DOS-style short mode. If the path
13586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13587  # take no chances and rewrite it.
13588  # Note: m4 eats our [], so we need to use [ and ] instead.
13589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13590  if test "x$has_forbidden_chars" != x; then
13591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13593  fi
13594
13595
13596  windows_path="$new_path"
13597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13598    unix_path=`$CYGPATH -u "$windows_path"`
13599    new_path="$unix_path"
13600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13602    new_path="$unix_path"
13603  fi
13604
13605  if test "x$path" != "x$new_path"; then
13606    BOOT_JDK="$new_path"
13607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13609  fi
13610
13611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13613
13614  else
13615    # We're on a posix platform. Hooray! :)
13616    path="$BOOT_JDK"
13617    has_space=`$ECHO "$path" | $GREP " "`
13618    if test "x$has_space" != x; then
13619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13621      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13622    fi
13623
13624    # Use eval to expand a potential ~
13625    eval path="$path"
13626    if test ! -f "$path" && test ! -d "$path"; then
13627      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13628    fi
13629
13630    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13631  fi
13632
13633              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13634$as_echo_n "checking for Boot JDK... " >&6; }
13635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13636$as_echo "$BOOT_JDK" >&6; }
13637              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13638$as_echo_n "checking Boot JDK version... " >&6; }
13639              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13640              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13641$as_echo "$BOOT_JDK_VERSION" >&6; }
13642            fi # end check jdk version
13643          fi # end check rt.jar
13644        fi # end check javac
13645      fi # end check java
13646    fi # end check boot jdk found
13647  fi
13648
13649    done
13650  fi
13651
13652  fi
13653
13654
13655    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13656    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13657      # Do we have a bin/java?
13658      if test ! -x "$BOOT_JDK/bin/java"; then
13659        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13661        BOOT_JDK_FOUND=no
13662      else
13663        # Do we have a bin/javac?
13664        if test ! -x "$BOOT_JDK/bin/javac"; then
13665          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13667          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13668$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13669          BOOT_JDK_FOUND=no
13670        else
13671          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13672          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13673            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13675            BOOT_JDK_FOUND=no
13676          else
13677            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13679
13680            # Extra M4 quote needed to protect [] in grep expression.
13681            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13682            if test "x$FOUND_VERSION_78" = x; then
13683              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13685              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13686$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13687              BOOT_JDK_FOUND=no
13688            else
13689              # We're done! :-)
13690              BOOT_JDK_FOUND=yes
13691
13692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13693
13694  # Input might be given as Windows format, start by converting to
13695  # unix format.
13696  path="$BOOT_JDK"
13697  new_path=`$CYGPATH -u "$path"`
13698
13699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13702  # "foo.exe" is OK but "foo" is an error.
13703  #
13704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13705  # It is also a way to make sure we got the proper file name for the real test later on.
13706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13707  if test "x$test_shortpath" = x; then
13708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13710    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13711  fi
13712
13713  # Call helper function which possibly converts this using DOS-style short mode.
13714  # If so, the updated path is stored in $new_path.
13715
13716  input_path="$new_path"
13717  # Check if we need to convert this using DOS-style short mode. If the path
13718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13719  # take no chances and rewrite it.
13720  # Note: m4 eats our [], so we need to use [ and ] instead.
13721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13722  if test "x$has_forbidden_chars" != x; then
13723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13727      # Going to short mode and back again did indeed matter. Since short mode is
13728      # case insensitive, let's make it lowercase to improve readability.
13729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13730      # Now convert it back to Unix-stile (cygpath)
13731      input_path=`$CYGPATH -u "$shortmode_path"`
13732      new_path="$input_path"
13733    fi
13734  fi
13735
13736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13737  if test "x$test_cygdrive_prefix" = x; then
13738    # As a simple fix, exclude /usr/bin since it's not a real path.
13739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13741      # a path prefixed by /cygdrive for fixpath to work.
13742      new_path="$CYGWIN_ROOT_PATH$input_path"
13743    fi
13744  fi
13745
13746
13747  if test "x$path" != "x$new_path"; then
13748    BOOT_JDK="$new_path"
13749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13751  fi
13752
13753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13754
13755  path="$BOOT_JDK"
13756  has_colon=`$ECHO $path | $GREP ^.:`
13757  new_path="$path"
13758  if test "x$has_colon" = x; then
13759    # Not in mixed or Windows style, start by that.
13760    new_path=`cmd //c echo $path`
13761  fi
13762
13763
13764  input_path="$new_path"
13765  # Check if we need to convert this using DOS-style short mode. If the path
13766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13767  # take no chances and rewrite it.
13768  # Note: m4 eats our [], so we need to use [ and ] instead.
13769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13770  if test "x$has_forbidden_chars" != x; then
13771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13773  fi
13774
13775
13776  windows_path="$new_path"
13777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13778    unix_path=`$CYGPATH -u "$windows_path"`
13779    new_path="$unix_path"
13780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13782    new_path="$unix_path"
13783  fi
13784
13785  if test "x$path" != "x$new_path"; then
13786    BOOT_JDK="$new_path"
13787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13789  fi
13790
13791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13793
13794  else
13795    # We're on a posix platform. Hooray! :)
13796    path="$BOOT_JDK"
13797    has_space=`$ECHO "$path" | $GREP " "`
13798    if test "x$has_space" != x; then
13799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13800$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13801      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13802    fi
13803
13804    # Use eval to expand a potential ~
13805    eval path="$path"
13806    if test ! -f "$path" && test ! -d "$path"; then
13807      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13808    fi
13809
13810    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13811  fi
13812
13813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13814$as_echo_n "checking for Boot JDK... " >&6; }
13815              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13816$as_echo "$BOOT_JDK" >&6; }
13817              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13818$as_echo_n "checking Boot JDK version... " >&6; }
13819              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13820              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13821$as_echo "$BOOT_JDK_VERSION" >&6; }
13822            fi # end check jdk version
13823          fi # end check rt.jar
13824        fi # end check javac
13825      fi # end check java
13826    fi # end check boot jdk found
13827  fi
13828
13829
13830  if test "x$BOOT_JDK_FOUND" = xno; then
13831    # Now execute the test
13832
13833  if test "x$ProgramFiles" != x; then
13834    VIRTUAL_DIR="$ProgramFiles/Java"
13835
13836  windows_path="$VIRTUAL_DIR"
13837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13838    unix_path=`$CYGPATH -u "$windows_path"`
13839    VIRTUAL_DIR="$unix_path"
13840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13842    VIRTUAL_DIR="$unix_path"
13843  fi
13844
13845
13846  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13847  BOOT_JDK_SUFFIX=""
13848  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13849  if test "x$ALL_JDKS_FOUND" != x; then
13850    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13851
13852  if test "x$BOOT_JDK_FOUND" = xno; then
13853    # Now execute the test
13854
13855        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13856        if test -d "$BOOT_JDK"; then
13857          BOOT_JDK_FOUND=maybe
13858          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13859$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13860        fi
13861
13862
13863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13865      # Do we have a bin/java?
13866      if test ! -x "$BOOT_JDK/bin/java"; then
13867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13869        BOOT_JDK_FOUND=no
13870      else
13871        # Do we have a bin/javac?
13872        if test ! -x "$BOOT_JDK/bin/javac"; then
13873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13877          BOOT_JDK_FOUND=no
13878        else
13879          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13880          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13881            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13883            BOOT_JDK_FOUND=no
13884          else
13885            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13887
13888            # Extra M4 quote needed to protect [] in grep expression.
13889            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13890            if test "x$FOUND_VERSION_78" = x; then
13891              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13893              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13894$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13895              BOOT_JDK_FOUND=no
13896            else
13897              # We're done! :-)
13898              BOOT_JDK_FOUND=yes
13899
13900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13901
13902  # Input might be given as Windows format, start by converting to
13903  # unix format.
13904  path="$BOOT_JDK"
13905  new_path=`$CYGPATH -u "$path"`
13906
13907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13910  # "foo.exe" is OK but "foo" is an error.
13911  #
13912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13913  # It is also a way to make sure we got the proper file name for the real test later on.
13914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13915  if test "x$test_shortpath" = x; then
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13919  fi
13920
13921  # Call helper function which possibly converts this using DOS-style short mode.
13922  # If so, the updated path is stored in $new_path.
13923
13924  input_path="$new_path"
13925  # Check if we need to convert this using DOS-style short mode. If the path
13926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13927  # take no chances and rewrite it.
13928  # Note: m4 eats our [], so we need to use [ and ] instead.
13929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13930  if test "x$has_forbidden_chars" != x; then
13931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13935      # Going to short mode and back again did indeed matter. Since short mode is
13936      # case insensitive, let's make it lowercase to improve readability.
13937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13938      # Now convert it back to Unix-stile (cygpath)
13939      input_path=`$CYGPATH -u "$shortmode_path"`
13940      new_path="$input_path"
13941    fi
13942  fi
13943
13944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13945  if test "x$test_cygdrive_prefix" = x; then
13946    # As a simple fix, exclude /usr/bin since it's not a real path.
13947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13949      # a path prefixed by /cygdrive for fixpath to work.
13950      new_path="$CYGWIN_ROOT_PATH$input_path"
13951    fi
13952  fi
13953
13954
13955  if test "x$path" != "x$new_path"; then
13956    BOOT_JDK="$new_path"
13957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13959  fi
13960
13961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13962
13963  path="$BOOT_JDK"
13964  has_colon=`$ECHO $path | $GREP ^.:`
13965  new_path="$path"
13966  if test "x$has_colon" = x; then
13967    # Not in mixed or Windows style, start by that.
13968    new_path=`cmd //c echo $path`
13969  fi
13970
13971
13972  input_path="$new_path"
13973  # Check if we need to convert this using DOS-style short mode. If the path
13974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13975  # take no chances and rewrite it.
13976  # Note: m4 eats our [], so we need to use [ and ] instead.
13977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13978  if test "x$has_forbidden_chars" != x; then
13979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13981  fi
13982
13983
13984  windows_path="$new_path"
13985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13986    unix_path=`$CYGPATH -u "$windows_path"`
13987    new_path="$unix_path"
13988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13990    new_path="$unix_path"
13991  fi
13992
13993  if test "x$path" != "x$new_path"; then
13994    BOOT_JDK="$new_path"
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13997  fi
13998
13999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14001
14002  else
14003    # We're on a posix platform. Hooray! :)
14004    path="$BOOT_JDK"
14005    has_space=`$ECHO "$path" | $GREP " "`
14006    if test "x$has_space" != x; then
14007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14009      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14010    fi
14011
14012    # Use eval to expand a potential ~
14013    eval path="$path"
14014    if test ! -f "$path" && test ! -d "$path"; then
14015      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14016    fi
14017
14018    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14019  fi
14020
14021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14022$as_echo_n "checking for Boot JDK... " >&6; }
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14024$as_echo "$BOOT_JDK" >&6; }
14025              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14026$as_echo_n "checking Boot JDK version... " >&6; }
14027              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14029$as_echo "$BOOT_JDK_VERSION" >&6; }
14030            fi # end check jdk version
14031          fi # end check rt.jar
14032        fi # end check javac
14033      fi # end check java
14034    fi # end check boot jdk found
14035  fi
14036
14037    done
14038  fi
14039
14040  fi
14041
14042
14043    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14044    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14045      # Do we have a bin/java?
14046      if test ! -x "$BOOT_JDK/bin/java"; then
14047        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14049        BOOT_JDK_FOUND=no
14050      else
14051        # Do we have a bin/javac?
14052        if test ! -x "$BOOT_JDK/bin/javac"; then
14053          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14055          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14056$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14057          BOOT_JDK_FOUND=no
14058        else
14059          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14060          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14061            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14063            BOOT_JDK_FOUND=no
14064          else
14065            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14066            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14067
14068            # Extra M4 quote needed to protect [] in grep expression.
14069            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14070            if test "x$FOUND_VERSION_78" = x; then
14071              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14073              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14074$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14075              BOOT_JDK_FOUND=no
14076            else
14077              # We're done! :-)
14078              BOOT_JDK_FOUND=yes
14079
14080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14081
14082  # Input might be given as Windows format, start by converting to
14083  # unix format.
14084  path="$BOOT_JDK"
14085  new_path=`$CYGPATH -u "$path"`
14086
14087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14090  # "foo.exe" is OK but "foo" is an error.
14091  #
14092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14093  # It is also a way to make sure we got the proper file name for the real test later on.
14094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14095  if test "x$test_shortpath" = x; then
14096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14098    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14099  fi
14100
14101  # Call helper function which possibly converts this using DOS-style short mode.
14102  # If so, the updated path is stored in $new_path.
14103
14104  input_path="$new_path"
14105  # Check if we need to convert this using DOS-style short mode. If the path
14106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14107  # take no chances and rewrite it.
14108  # Note: m4 eats our [], so we need to use [ and ] instead.
14109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14110  if test "x$has_forbidden_chars" != x; then
14111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14115      # Going to short mode and back again did indeed matter. Since short mode is
14116      # case insensitive, let's make it lowercase to improve readability.
14117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14118      # Now convert it back to Unix-stile (cygpath)
14119      input_path=`$CYGPATH -u "$shortmode_path"`
14120      new_path="$input_path"
14121    fi
14122  fi
14123
14124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14125  if test "x$test_cygdrive_prefix" = x; then
14126    # As a simple fix, exclude /usr/bin since it's not a real path.
14127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14129      # a path prefixed by /cygdrive for fixpath to work.
14130      new_path="$CYGWIN_ROOT_PATH$input_path"
14131    fi
14132  fi
14133
14134
14135  if test "x$path" != "x$new_path"; then
14136    BOOT_JDK="$new_path"
14137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14139  fi
14140
14141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14142
14143  path="$BOOT_JDK"
14144  has_colon=`$ECHO $path | $GREP ^.:`
14145  new_path="$path"
14146  if test "x$has_colon" = x; then
14147    # Not in mixed or Windows style, start by that.
14148    new_path=`cmd //c echo $path`
14149  fi
14150
14151
14152  input_path="$new_path"
14153  # Check if we need to convert this using DOS-style short mode. If the path
14154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14155  # take no chances and rewrite it.
14156  # Note: m4 eats our [], so we need to use [ and ] instead.
14157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14158  if test "x$has_forbidden_chars" != x; then
14159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14161  fi
14162
14163
14164  windows_path="$new_path"
14165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14166    unix_path=`$CYGPATH -u "$windows_path"`
14167    new_path="$unix_path"
14168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14170    new_path="$unix_path"
14171  fi
14172
14173  if test "x$path" != "x$new_path"; then
14174    BOOT_JDK="$new_path"
14175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14177  fi
14178
14179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14181
14182  else
14183    # We're on a posix platform. Hooray! :)
14184    path="$BOOT_JDK"
14185    has_space=`$ECHO "$path" | $GREP " "`
14186    if test "x$has_space" != x; then
14187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14189      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14190    fi
14191
14192    # Use eval to expand a potential ~
14193    eval path="$path"
14194    if test ! -f "$path" && test ! -d "$path"; then
14195      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14196    fi
14197
14198    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14199  fi
14200
14201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14202$as_echo_n "checking for Boot JDK... " >&6; }
14203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14204$as_echo "$BOOT_JDK" >&6; }
14205              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14206$as_echo_n "checking Boot JDK version... " >&6; }
14207              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14208              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14209$as_echo "$BOOT_JDK_VERSION" >&6; }
14210            fi # end check jdk version
14211          fi # end check rt.jar
14212        fi # end check javac
14213      fi # end check java
14214    fi # end check boot jdk found
14215  fi
14216
14217
14218  if test "x$BOOT_JDK_FOUND" = xno; then
14219    # Now execute the test
14220
14221  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14222  BOOT_JDK_SUFFIX=""
14223  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14224  if test "x$ALL_JDKS_FOUND" != x; then
14225    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14226
14227  if test "x$BOOT_JDK_FOUND" = xno; then
14228    # Now execute the test
14229
14230        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14231        if test -d "$BOOT_JDK"; then
14232          BOOT_JDK_FOUND=maybe
14233          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14234$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14235        fi
14236
14237
14238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14240      # Do we have a bin/java?
14241      if test ! -x "$BOOT_JDK/bin/java"; then
14242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14244        BOOT_JDK_FOUND=no
14245      else
14246        # Do we have a bin/javac?
14247        if test ! -x "$BOOT_JDK/bin/javac"; then
14248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14252          BOOT_JDK_FOUND=no
14253        else
14254          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14255          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14258            BOOT_JDK_FOUND=no
14259          else
14260            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14262
14263            # Extra M4 quote needed to protect [] in grep expression.
14264            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14265            if test "x$FOUND_VERSION_78" = x; then
14266              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14268              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14269$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14270              BOOT_JDK_FOUND=no
14271            else
14272              # We're done! :-)
14273              BOOT_JDK_FOUND=yes
14274
14275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14276
14277  # Input might be given as Windows format, start by converting to
14278  # unix format.
14279  path="$BOOT_JDK"
14280  new_path=`$CYGPATH -u "$path"`
14281
14282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14285  # "foo.exe" is OK but "foo" is an error.
14286  #
14287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14288  # It is also a way to make sure we got the proper file name for the real test later on.
14289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14290  if test "x$test_shortpath" = x; then
14291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14293    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14294  fi
14295
14296  # Call helper function which possibly converts this using DOS-style short mode.
14297  # If so, the updated path is stored in $new_path.
14298
14299  input_path="$new_path"
14300  # Check if we need to convert this using DOS-style short mode. If the path
14301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14302  # take no chances and rewrite it.
14303  # Note: m4 eats our [], so we need to use [ and ] instead.
14304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14305  if test "x$has_forbidden_chars" != x; then
14306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14310      # Going to short mode and back again did indeed matter. Since short mode is
14311      # case insensitive, let's make it lowercase to improve readability.
14312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313      # Now convert it back to Unix-stile (cygpath)
14314      input_path=`$CYGPATH -u "$shortmode_path"`
14315      new_path="$input_path"
14316    fi
14317  fi
14318
14319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14320  if test "x$test_cygdrive_prefix" = x; then
14321    # As a simple fix, exclude /usr/bin since it's not a real path.
14322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14324      # a path prefixed by /cygdrive for fixpath to work.
14325      new_path="$CYGWIN_ROOT_PATH$input_path"
14326    fi
14327  fi
14328
14329
14330  if test "x$path" != "x$new_path"; then
14331    BOOT_JDK="$new_path"
14332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14334  fi
14335
14336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14337
14338  path="$BOOT_JDK"
14339  has_colon=`$ECHO $path | $GREP ^.:`
14340  new_path="$path"
14341  if test "x$has_colon" = x; then
14342    # Not in mixed or Windows style, start by that.
14343    new_path=`cmd //c echo $path`
14344  fi
14345
14346
14347  input_path="$new_path"
14348  # Check if we need to convert this using DOS-style short mode. If the path
14349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350  # take no chances and rewrite it.
14351  # Note: m4 eats our [], so we need to use [ and ] instead.
14352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14353  if test "x$has_forbidden_chars" != x; then
14354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14356  fi
14357
14358
14359  windows_path="$new_path"
14360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14361    unix_path=`$CYGPATH -u "$windows_path"`
14362    new_path="$unix_path"
14363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14365    new_path="$unix_path"
14366  fi
14367
14368  if test "x$path" != "x$new_path"; then
14369    BOOT_JDK="$new_path"
14370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14372  fi
14373
14374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14376
14377  else
14378    # We're on a posix platform. Hooray! :)
14379    path="$BOOT_JDK"
14380    has_space=`$ECHO "$path" | $GREP " "`
14381    if test "x$has_space" != x; then
14382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14384      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385    fi
14386
14387    # Use eval to expand a potential ~
14388    eval path="$path"
14389    if test ! -f "$path" && test ! -d "$path"; then
14390      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14391    fi
14392
14393    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14394  fi
14395
14396              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14397$as_echo_n "checking for Boot JDK... " >&6; }
14398              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14399$as_echo "$BOOT_JDK" >&6; }
14400              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14401$as_echo_n "checking Boot JDK version... " >&6; }
14402              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14404$as_echo "$BOOT_JDK_VERSION" >&6; }
14405            fi # end check jdk version
14406          fi # end check rt.jar
14407        fi # end check javac
14408      fi # end check java
14409    fi # end check boot jdk found
14410  fi
14411
14412    done
14413  fi
14414
14415
14416    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14417    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14418      # Do we have a bin/java?
14419      if test ! -x "$BOOT_JDK/bin/java"; then
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14422        BOOT_JDK_FOUND=no
14423      else
14424        # Do we have a bin/javac?
14425        if test ! -x "$BOOT_JDK/bin/javac"; then
14426          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14428          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14429$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14430          BOOT_JDK_FOUND=no
14431        else
14432          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14433          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14434            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14436            BOOT_JDK_FOUND=no
14437          else
14438            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14439            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14440
14441            # Extra M4 quote needed to protect [] in grep expression.
14442            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14443            if test "x$FOUND_VERSION_78" = x; then
14444              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14446              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14447$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14448              BOOT_JDK_FOUND=no
14449            else
14450              # We're done! :-)
14451              BOOT_JDK_FOUND=yes
14452
14453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14454
14455  # Input might be given as Windows format, start by converting to
14456  # unix format.
14457  path="$BOOT_JDK"
14458  new_path=`$CYGPATH -u "$path"`
14459
14460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14463  # "foo.exe" is OK but "foo" is an error.
14464  #
14465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14466  # It is also a way to make sure we got the proper file name for the real test later on.
14467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14468  if test "x$test_shortpath" = x; then
14469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14471    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14472  fi
14473
14474  # Call helper function which possibly converts this using DOS-style short mode.
14475  # If so, the updated path is stored in $new_path.
14476
14477  input_path="$new_path"
14478  # Check if we need to convert this using DOS-style short mode. If the path
14479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14480  # take no chances and rewrite it.
14481  # Note: m4 eats our [], so we need to use [ and ] instead.
14482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14483  if test "x$has_forbidden_chars" != x; then
14484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14488      # Going to short mode and back again did indeed matter. Since short mode is
14489      # case insensitive, let's make it lowercase to improve readability.
14490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14491      # Now convert it back to Unix-stile (cygpath)
14492      input_path=`$CYGPATH -u "$shortmode_path"`
14493      new_path="$input_path"
14494    fi
14495  fi
14496
14497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14498  if test "x$test_cygdrive_prefix" = x; then
14499    # As a simple fix, exclude /usr/bin since it's not a real path.
14500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14502      # a path prefixed by /cygdrive for fixpath to work.
14503      new_path="$CYGWIN_ROOT_PATH$input_path"
14504    fi
14505  fi
14506
14507
14508  if test "x$path" != "x$new_path"; then
14509    BOOT_JDK="$new_path"
14510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14511$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14512  fi
14513
14514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14515
14516  path="$BOOT_JDK"
14517  has_colon=`$ECHO $path | $GREP ^.:`
14518  new_path="$path"
14519  if test "x$has_colon" = x; then
14520    # Not in mixed or Windows style, start by that.
14521    new_path=`cmd //c echo $path`
14522  fi
14523
14524
14525  input_path="$new_path"
14526  # Check if we need to convert this using DOS-style short mode. If the path
14527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14528  # take no chances and rewrite it.
14529  # Note: m4 eats our [], so we need to use [ and ] instead.
14530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14531  if test "x$has_forbidden_chars" != x; then
14532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14534  fi
14535
14536
14537  windows_path="$new_path"
14538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14539    unix_path=`$CYGPATH -u "$windows_path"`
14540    new_path="$unix_path"
14541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14543    new_path="$unix_path"
14544  fi
14545
14546  if test "x$path" != "x$new_path"; then
14547    BOOT_JDK="$new_path"
14548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14549$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14550  fi
14551
14552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14554
14555  else
14556    # We're on a posix platform. Hooray! :)
14557    path="$BOOT_JDK"
14558    has_space=`$ECHO "$path" | $GREP " "`
14559    if test "x$has_space" != x; then
14560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14563    fi
14564
14565    # Use eval to expand a potential ~
14566    eval path="$path"
14567    if test ! -f "$path" && test ! -d "$path"; then
14568      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14569    fi
14570
14571    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14572  fi
14573
14574              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14575$as_echo_n "checking for Boot JDK... " >&6; }
14576              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14577$as_echo "$BOOT_JDK" >&6; }
14578              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14579$as_echo_n "checking Boot JDK version... " >&6; }
14580              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14582$as_echo "$BOOT_JDK_VERSION" >&6; }
14583            fi # end check jdk version
14584          fi # end check rt.jar
14585        fi # end check javac
14586      fi # end check java
14587    fi # end check boot jdk found
14588  fi
14589
14590  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14591
14592  if test "x$BOOT_JDK_FOUND" = xno; then
14593    # Now execute the test
14594
14595  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14596  BOOT_JDK_SUFFIX="/Contents/Home"
14597  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14598  if test "x$ALL_JDKS_FOUND" != x; then
14599    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14600
14601  if test "x$BOOT_JDK_FOUND" = xno; then
14602    # Now execute the test
14603
14604        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14605        if test -d "$BOOT_JDK"; then
14606          BOOT_JDK_FOUND=maybe
14607          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14608$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14609        fi
14610
14611
14612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14614      # Do we have a bin/java?
14615      if test ! -x "$BOOT_JDK/bin/java"; then
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14618        BOOT_JDK_FOUND=no
14619      else
14620        # Do we have a bin/javac?
14621        if test ! -x "$BOOT_JDK/bin/javac"; then
14622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14626          BOOT_JDK_FOUND=no
14627        else
14628          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14629          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14632            BOOT_JDK_FOUND=no
14633          else
14634            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14636
14637            # Extra M4 quote needed to protect [] in grep expression.
14638            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14639            if test "x$FOUND_VERSION_78" = x; then
14640              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14642              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14643$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14644              BOOT_JDK_FOUND=no
14645            else
14646              # We're done! :-)
14647              BOOT_JDK_FOUND=yes
14648
14649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14650
14651  # Input might be given as Windows format, start by converting to
14652  # unix format.
14653  path="$BOOT_JDK"
14654  new_path=`$CYGPATH -u "$path"`
14655
14656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14659  # "foo.exe" is OK but "foo" is an error.
14660  #
14661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14662  # It is also a way to make sure we got the proper file name for the real test later on.
14663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14664  if test "x$test_shortpath" = x; then
14665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14668  fi
14669
14670  # Call helper function which possibly converts this using DOS-style short mode.
14671  # If so, the updated path is stored in $new_path.
14672
14673  input_path="$new_path"
14674  # Check if we need to convert this using DOS-style short mode. If the path
14675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14676  # take no chances and rewrite it.
14677  # Note: m4 eats our [], so we need to use [ and ] instead.
14678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14679  if test "x$has_forbidden_chars" != x; then
14680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14684      # Going to short mode and back again did indeed matter. Since short mode is
14685      # case insensitive, let's make it lowercase to improve readability.
14686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14687      # Now convert it back to Unix-stile (cygpath)
14688      input_path=`$CYGPATH -u "$shortmode_path"`
14689      new_path="$input_path"
14690    fi
14691  fi
14692
14693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14694  if test "x$test_cygdrive_prefix" = x; then
14695    # As a simple fix, exclude /usr/bin since it's not a real path.
14696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14698      # a path prefixed by /cygdrive for fixpath to work.
14699      new_path="$CYGWIN_ROOT_PATH$input_path"
14700    fi
14701  fi
14702
14703
14704  if test "x$path" != "x$new_path"; then
14705    BOOT_JDK="$new_path"
14706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14708  fi
14709
14710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14711
14712  path="$BOOT_JDK"
14713  has_colon=`$ECHO $path | $GREP ^.:`
14714  new_path="$path"
14715  if test "x$has_colon" = x; then
14716    # Not in mixed or Windows style, start by that.
14717    new_path=`cmd //c echo $path`
14718  fi
14719
14720
14721  input_path="$new_path"
14722  # Check if we need to convert this using DOS-style short mode. If the path
14723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14724  # take no chances and rewrite it.
14725  # Note: m4 eats our [], so we need to use [ and ] instead.
14726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14727  if test "x$has_forbidden_chars" != x; then
14728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14730  fi
14731
14732
14733  windows_path="$new_path"
14734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14735    unix_path=`$CYGPATH -u "$windows_path"`
14736    new_path="$unix_path"
14737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14739    new_path="$unix_path"
14740  fi
14741
14742  if test "x$path" != "x$new_path"; then
14743    BOOT_JDK="$new_path"
14744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14746  fi
14747
14748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14750
14751  else
14752    # We're on a posix platform. Hooray! :)
14753    path="$BOOT_JDK"
14754    has_space=`$ECHO "$path" | $GREP " "`
14755    if test "x$has_space" != x; then
14756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14758      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14759    fi
14760
14761    # Use eval to expand a potential ~
14762    eval path="$path"
14763    if test ! -f "$path" && test ! -d "$path"; then
14764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14765    fi
14766
14767    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14768  fi
14769
14770              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14771$as_echo_n "checking for Boot JDK... " >&6; }
14772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14773$as_echo "$BOOT_JDK" >&6; }
14774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14775$as_echo_n "checking Boot JDK version... " >&6; }
14776              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14778$as_echo "$BOOT_JDK_VERSION" >&6; }
14779            fi # end check jdk version
14780          fi # end check rt.jar
14781        fi # end check javac
14782      fi # end check java
14783    fi # end check boot jdk found
14784  fi
14785
14786    done
14787  fi
14788
14789
14790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14792      # Do we have a bin/java?
14793      if test ! -x "$BOOT_JDK/bin/java"; then
14794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14796        BOOT_JDK_FOUND=no
14797      else
14798        # Do we have a bin/javac?
14799        if test ! -x "$BOOT_JDK/bin/javac"; then
14800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14804          BOOT_JDK_FOUND=no
14805        else
14806          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14807          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14810            BOOT_JDK_FOUND=no
14811          else
14812            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14813            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14814
14815            # Extra M4 quote needed to protect [] in grep expression.
14816            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14817            if test "x$FOUND_VERSION_78" = x; then
14818              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14820              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14821$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14822              BOOT_JDK_FOUND=no
14823            else
14824              # We're done! :-)
14825              BOOT_JDK_FOUND=yes
14826
14827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14828
14829  # Input might be given as Windows format, start by converting to
14830  # unix format.
14831  path="$BOOT_JDK"
14832  new_path=`$CYGPATH -u "$path"`
14833
14834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14837  # "foo.exe" is OK but "foo" is an error.
14838  #
14839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14840  # It is also a way to make sure we got the proper file name for the real test later on.
14841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14842  if test "x$test_shortpath" = x; then
14843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14845    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14846  fi
14847
14848  # Call helper function which possibly converts this using DOS-style short mode.
14849  # If so, the updated path is stored in $new_path.
14850
14851  input_path="$new_path"
14852  # Check if we need to convert this using DOS-style short mode. If the path
14853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14854  # take no chances and rewrite it.
14855  # Note: m4 eats our [], so we need to use [ and ] instead.
14856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14857  if test "x$has_forbidden_chars" != x; then
14858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14862      # Going to short mode and back again did indeed matter. Since short mode is
14863      # case insensitive, let's make it lowercase to improve readability.
14864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14865      # Now convert it back to Unix-stile (cygpath)
14866      input_path=`$CYGPATH -u "$shortmode_path"`
14867      new_path="$input_path"
14868    fi
14869  fi
14870
14871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14872  if test "x$test_cygdrive_prefix" = x; then
14873    # As a simple fix, exclude /usr/bin since it's not a real path.
14874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14876      # a path prefixed by /cygdrive for fixpath to work.
14877      new_path="$CYGWIN_ROOT_PATH$input_path"
14878    fi
14879  fi
14880
14881
14882  if test "x$path" != "x$new_path"; then
14883    BOOT_JDK="$new_path"
14884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14886  fi
14887
14888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14889
14890  path="$BOOT_JDK"
14891  has_colon=`$ECHO $path | $GREP ^.:`
14892  new_path="$path"
14893  if test "x$has_colon" = x; then
14894    # Not in mixed or Windows style, start by that.
14895    new_path=`cmd //c echo $path`
14896  fi
14897
14898
14899  input_path="$new_path"
14900  # Check if we need to convert this using DOS-style short mode. If the path
14901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14902  # take no chances and rewrite it.
14903  # Note: m4 eats our [], so we need to use [ and ] instead.
14904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14905  if test "x$has_forbidden_chars" != x; then
14906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14908  fi
14909
14910
14911  windows_path="$new_path"
14912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14913    unix_path=`$CYGPATH -u "$windows_path"`
14914    new_path="$unix_path"
14915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14917    new_path="$unix_path"
14918  fi
14919
14920  if test "x$path" != "x$new_path"; then
14921    BOOT_JDK="$new_path"
14922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14924  fi
14925
14926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14928
14929  else
14930    # We're on a posix platform. Hooray! :)
14931    path="$BOOT_JDK"
14932    has_space=`$ECHO "$path" | $GREP " "`
14933    if test "x$has_space" != x; then
14934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14937    fi
14938
14939    # Use eval to expand a potential ~
14940    eval path="$path"
14941    if test ! -f "$path" && test ! -d "$path"; then
14942      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14943    fi
14944
14945    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14946  fi
14947
14948              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14949$as_echo_n "checking for Boot JDK... " >&6; }
14950              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14951$as_echo "$BOOT_JDK" >&6; }
14952              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14953$as_echo_n "checking Boot JDK version... " >&6; }
14954              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14956$as_echo "$BOOT_JDK_VERSION" >&6; }
14957            fi # end check jdk version
14958          fi # end check rt.jar
14959        fi # end check javac
14960      fi # end check java
14961    fi # end check boot jdk found
14962  fi
14963
14964
14965  if test "x$BOOT_JDK_FOUND" = xno; then
14966    # Now execute the test
14967
14968  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14969  BOOT_JDK_SUFFIX="/Contents/Home"
14970  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14971  if test "x$ALL_JDKS_FOUND" != x; then
14972    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14973
14974  if test "x$BOOT_JDK_FOUND" = xno; then
14975    # Now execute the test
14976
14977        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14978        if test -d "$BOOT_JDK"; then
14979          BOOT_JDK_FOUND=maybe
14980          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14981$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14982        fi
14983
14984
14985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14987      # Do we have a bin/java?
14988      if test ! -x "$BOOT_JDK/bin/java"; then
14989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14991        BOOT_JDK_FOUND=no
14992      else
14993        # Do we have a bin/javac?
14994        if test ! -x "$BOOT_JDK/bin/javac"; then
14995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14999          BOOT_JDK_FOUND=no
15000        else
15001          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15002          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15005            BOOT_JDK_FOUND=no
15006          else
15007            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15008            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15009
15010            # Extra M4 quote needed to protect [] in grep expression.
15011            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15012            if test "x$FOUND_VERSION_78" = x; then
15013              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15015              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15016$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15017              BOOT_JDK_FOUND=no
15018            else
15019              # We're done! :-)
15020              BOOT_JDK_FOUND=yes
15021
15022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15023
15024  # Input might be given as Windows format, start by converting to
15025  # unix format.
15026  path="$BOOT_JDK"
15027  new_path=`$CYGPATH -u "$path"`
15028
15029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15032  # "foo.exe" is OK but "foo" is an error.
15033  #
15034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15035  # It is also a way to make sure we got the proper file name for the real test later on.
15036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15037  if test "x$test_shortpath" = x; then
15038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15041  fi
15042
15043  # Call helper function which possibly converts this using DOS-style short mode.
15044  # If so, the updated path is stored in $new_path.
15045
15046  input_path="$new_path"
15047  # Check if we need to convert this using DOS-style short mode. If the path
15048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15049  # take no chances and rewrite it.
15050  # Note: m4 eats our [], so we need to use [ and ] instead.
15051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15052  if test "x$has_forbidden_chars" != x; then
15053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15057      # Going to short mode and back again did indeed matter. Since short mode is
15058      # case insensitive, let's make it lowercase to improve readability.
15059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15060      # Now convert it back to Unix-stile (cygpath)
15061      input_path=`$CYGPATH -u "$shortmode_path"`
15062      new_path="$input_path"
15063    fi
15064  fi
15065
15066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15067  if test "x$test_cygdrive_prefix" = x; then
15068    # As a simple fix, exclude /usr/bin since it's not a real path.
15069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15071      # a path prefixed by /cygdrive for fixpath to work.
15072      new_path="$CYGWIN_ROOT_PATH$input_path"
15073    fi
15074  fi
15075
15076
15077  if test "x$path" != "x$new_path"; then
15078    BOOT_JDK="$new_path"
15079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15081  fi
15082
15083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15084
15085  path="$BOOT_JDK"
15086  has_colon=`$ECHO $path | $GREP ^.:`
15087  new_path="$path"
15088  if test "x$has_colon" = x; then
15089    # Not in mixed or Windows style, start by that.
15090    new_path=`cmd //c echo $path`
15091  fi
15092
15093
15094  input_path="$new_path"
15095  # Check if we need to convert this using DOS-style short mode. If the path
15096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15097  # take no chances and rewrite it.
15098  # Note: m4 eats our [], so we need to use [ and ] instead.
15099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15100  if test "x$has_forbidden_chars" != x; then
15101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15103  fi
15104
15105
15106  windows_path="$new_path"
15107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15108    unix_path=`$CYGPATH -u "$windows_path"`
15109    new_path="$unix_path"
15110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15112    new_path="$unix_path"
15113  fi
15114
15115  if test "x$path" != "x$new_path"; then
15116    BOOT_JDK="$new_path"
15117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15119  fi
15120
15121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15123
15124  else
15125    # We're on a posix platform. Hooray! :)
15126    path="$BOOT_JDK"
15127    has_space=`$ECHO "$path" | $GREP " "`
15128    if test "x$has_space" != x; then
15129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15131      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15132    fi
15133
15134    # Use eval to expand a potential ~
15135    eval path="$path"
15136    if test ! -f "$path" && test ! -d "$path"; then
15137      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15138    fi
15139
15140    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15141  fi
15142
15143              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15144$as_echo_n "checking for Boot JDK... " >&6; }
15145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15146$as_echo "$BOOT_JDK" >&6; }
15147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15148$as_echo_n "checking Boot JDK version... " >&6; }
15149              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15151$as_echo "$BOOT_JDK_VERSION" >&6; }
15152            fi # end check jdk version
15153          fi # end check rt.jar
15154        fi # end check javac
15155      fi # end check java
15156    fi # end check boot jdk found
15157  fi
15158
15159    done
15160  fi
15161
15162
15163    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15164    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15165      # Do we have a bin/java?
15166      if test ! -x "$BOOT_JDK/bin/java"; then
15167        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15169        BOOT_JDK_FOUND=no
15170      else
15171        # Do we have a bin/javac?
15172        if test ! -x "$BOOT_JDK/bin/javac"; then
15173          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15175          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15176$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15177          BOOT_JDK_FOUND=no
15178        else
15179          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15180          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15181            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15183            BOOT_JDK_FOUND=no
15184          else
15185            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15186            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15187
15188            # Extra M4 quote needed to protect [] in grep expression.
15189            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15190            if test "x$FOUND_VERSION_78" = x; then
15191              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15193              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15194$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15195              BOOT_JDK_FOUND=no
15196            else
15197              # We're done! :-)
15198              BOOT_JDK_FOUND=yes
15199
15200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15201
15202  # Input might be given as Windows format, start by converting to
15203  # unix format.
15204  path="$BOOT_JDK"
15205  new_path=`$CYGPATH -u "$path"`
15206
15207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15210  # "foo.exe" is OK but "foo" is an error.
15211  #
15212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15213  # It is also a way to make sure we got the proper file name for the real test later on.
15214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15215  if test "x$test_shortpath" = x; then
15216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15218    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15219  fi
15220
15221  # Call helper function which possibly converts this using DOS-style short mode.
15222  # If so, the updated path is stored in $new_path.
15223
15224  input_path="$new_path"
15225  # Check if we need to convert this using DOS-style short mode. If the path
15226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15227  # take no chances and rewrite it.
15228  # Note: m4 eats our [], so we need to use [ and ] instead.
15229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15230  if test "x$has_forbidden_chars" != x; then
15231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15235      # Going to short mode and back again did indeed matter. Since short mode is
15236      # case insensitive, let's make it lowercase to improve readability.
15237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15238      # Now convert it back to Unix-stile (cygpath)
15239      input_path=`$CYGPATH -u "$shortmode_path"`
15240      new_path="$input_path"
15241    fi
15242  fi
15243
15244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15245  if test "x$test_cygdrive_prefix" = x; then
15246    # As a simple fix, exclude /usr/bin since it's not a real path.
15247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15249      # a path prefixed by /cygdrive for fixpath to work.
15250      new_path="$CYGWIN_ROOT_PATH$input_path"
15251    fi
15252  fi
15253
15254
15255  if test "x$path" != "x$new_path"; then
15256    BOOT_JDK="$new_path"
15257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15259  fi
15260
15261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15262
15263  path="$BOOT_JDK"
15264  has_colon=`$ECHO $path | $GREP ^.:`
15265  new_path="$path"
15266  if test "x$has_colon" = x; then
15267    # Not in mixed or Windows style, start by that.
15268    new_path=`cmd //c echo $path`
15269  fi
15270
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15281  fi
15282
15283
15284  windows_path="$new_path"
15285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15286    unix_path=`$CYGPATH -u "$windows_path"`
15287    new_path="$unix_path"
15288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15290    new_path="$unix_path"
15291  fi
15292
15293  if test "x$path" != "x$new_path"; then
15294    BOOT_JDK="$new_path"
15295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15297  fi
15298
15299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15301
15302  else
15303    # We're on a posix platform. Hooray! :)
15304    path="$BOOT_JDK"
15305    has_space=`$ECHO "$path" | $GREP " "`
15306    if test "x$has_space" != x; then
15307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15309      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15310    fi
15311
15312    # Use eval to expand a potential ~
15313    eval path="$path"
15314    if test ! -f "$path" && test ! -d "$path"; then
15315      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15316    fi
15317
15318    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15319  fi
15320
15321              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15322$as_echo_n "checking for Boot JDK... " >&6; }
15323              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15324$as_echo "$BOOT_JDK" >&6; }
15325              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15326$as_echo_n "checking Boot JDK version... " >&6; }
15327              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15328              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15329$as_echo "$BOOT_JDK_VERSION" >&6; }
15330            fi # end check jdk version
15331          fi # end check rt.jar
15332        fi # end check javac
15333      fi # end check java
15334    fi # end check boot jdk found
15335  fi
15336
15337  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15338
15339  if test "x$BOOT_JDK_FOUND" = xno; then
15340    # Now execute the test
15341
15342  BOOT_JDK_PREFIX="/usr/lib/jvm"
15343  BOOT_JDK_SUFFIX=""
15344  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15345  if test "x$ALL_JDKS_FOUND" != x; then
15346    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15347
15348  if test "x$BOOT_JDK_FOUND" = xno; then
15349    # Now execute the test
15350
15351        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15352        if test -d "$BOOT_JDK"; then
15353          BOOT_JDK_FOUND=maybe
15354          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15355$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15356        fi
15357
15358
15359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15361      # Do we have a bin/java?
15362      if test ! -x "$BOOT_JDK/bin/java"; then
15363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15365        BOOT_JDK_FOUND=no
15366      else
15367        # Do we have a bin/javac?
15368        if test ! -x "$BOOT_JDK/bin/javac"; then
15369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15373          BOOT_JDK_FOUND=no
15374        else
15375          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15376          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15377            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15379            BOOT_JDK_FOUND=no
15380          else
15381            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15382            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15383
15384            # Extra M4 quote needed to protect [] in grep expression.
15385            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15386            if test "x$FOUND_VERSION_78" = x; then
15387              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15389              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15390$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15391              BOOT_JDK_FOUND=no
15392            else
15393              # We're done! :-)
15394              BOOT_JDK_FOUND=yes
15395
15396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15397
15398  # Input might be given as Windows format, start by converting to
15399  # unix format.
15400  path="$BOOT_JDK"
15401  new_path=`$CYGPATH -u "$path"`
15402
15403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15406  # "foo.exe" is OK but "foo" is an error.
15407  #
15408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15409  # It is also a way to make sure we got the proper file name for the real test later on.
15410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15411  if test "x$test_shortpath" = x; then
15412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15415  fi
15416
15417  # Call helper function which possibly converts this using DOS-style short mode.
15418  # If so, the updated path is stored in $new_path.
15419
15420  input_path="$new_path"
15421  # Check if we need to convert this using DOS-style short mode. If the path
15422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15423  # take no chances and rewrite it.
15424  # Note: m4 eats our [], so we need to use [ and ] instead.
15425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15426  if test "x$has_forbidden_chars" != x; then
15427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15431      # Going to short mode and back again did indeed matter. Since short mode is
15432      # case insensitive, let's make it lowercase to improve readability.
15433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15434      # Now convert it back to Unix-stile (cygpath)
15435      input_path=`$CYGPATH -u "$shortmode_path"`
15436      new_path="$input_path"
15437    fi
15438  fi
15439
15440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15441  if test "x$test_cygdrive_prefix" = x; then
15442    # As a simple fix, exclude /usr/bin since it's not a real path.
15443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15445      # a path prefixed by /cygdrive for fixpath to work.
15446      new_path="$CYGWIN_ROOT_PATH$input_path"
15447    fi
15448  fi
15449
15450
15451  if test "x$path" != "x$new_path"; then
15452    BOOT_JDK="$new_path"
15453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15455  fi
15456
15457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15458
15459  path="$BOOT_JDK"
15460  has_colon=`$ECHO $path | $GREP ^.:`
15461  new_path="$path"
15462  if test "x$has_colon" = x; then
15463    # Not in mixed or Windows style, start by that.
15464    new_path=`cmd //c echo $path`
15465  fi
15466
15467
15468  input_path="$new_path"
15469  # Check if we need to convert this using DOS-style short mode. If the path
15470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15471  # take no chances and rewrite it.
15472  # Note: m4 eats our [], so we need to use [ and ] instead.
15473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15474  if test "x$has_forbidden_chars" != x; then
15475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15477  fi
15478
15479
15480  windows_path="$new_path"
15481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15482    unix_path=`$CYGPATH -u "$windows_path"`
15483    new_path="$unix_path"
15484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15486    new_path="$unix_path"
15487  fi
15488
15489  if test "x$path" != "x$new_path"; then
15490    BOOT_JDK="$new_path"
15491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15493  fi
15494
15495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15497
15498  else
15499    # We're on a posix platform. Hooray! :)
15500    path="$BOOT_JDK"
15501    has_space=`$ECHO "$path" | $GREP " "`
15502    if test "x$has_space" != x; then
15503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15505      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15506    fi
15507
15508    # Use eval to expand a potential ~
15509    eval path="$path"
15510    if test ! -f "$path" && test ! -d "$path"; then
15511      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15512    fi
15513
15514    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15515  fi
15516
15517              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15518$as_echo_n "checking for Boot JDK... " >&6; }
15519              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15520$as_echo "$BOOT_JDK" >&6; }
15521              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15522$as_echo_n "checking Boot JDK version... " >&6; }
15523              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15524              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15525$as_echo "$BOOT_JDK_VERSION" >&6; }
15526            fi # end check jdk version
15527          fi # end check rt.jar
15528        fi # end check javac
15529      fi # end check java
15530    fi # end check boot jdk found
15531  fi
15532
15533    done
15534  fi
15535
15536
15537    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15538    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15539      # Do we have a bin/java?
15540      if test ! -x "$BOOT_JDK/bin/java"; then
15541        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15543        BOOT_JDK_FOUND=no
15544      else
15545        # Do we have a bin/javac?
15546        if test ! -x "$BOOT_JDK/bin/javac"; then
15547          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15549          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15550$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15551          BOOT_JDK_FOUND=no
15552        else
15553          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15554          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15555            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15557            BOOT_JDK_FOUND=no
15558          else
15559            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15561
15562            # Extra M4 quote needed to protect [] in grep expression.
15563            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15564            if test "x$FOUND_VERSION_78" = x; then
15565              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15567              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15568$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15569              BOOT_JDK_FOUND=no
15570            else
15571              # We're done! :-)
15572              BOOT_JDK_FOUND=yes
15573
15574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15575
15576  # Input might be given as Windows format, start by converting to
15577  # unix format.
15578  path="$BOOT_JDK"
15579  new_path=`$CYGPATH -u "$path"`
15580
15581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15584  # "foo.exe" is OK but "foo" is an error.
15585  #
15586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15587  # It is also a way to make sure we got the proper file name for the real test later on.
15588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15589  if test "x$test_shortpath" = x; then
15590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15592    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15593  fi
15594
15595  # Call helper function which possibly converts this using DOS-style short mode.
15596  # If so, the updated path is stored in $new_path.
15597
15598  input_path="$new_path"
15599  # Check if we need to convert this using DOS-style short mode. If the path
15600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15601  # take no chances and rewrite it.
15602  # Note: m4 eats our [], so we need to use [ and ] instead.
15603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15604  if test "x$has_forbidden_chars" != x; then
15605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15609      # Going to short mode and back again did indeed matter. Since short mode is
15610      # case insensitive, let's make it lowercase to improve readability.
15611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15612      # Now convert it back to Unix-stile (cygpath)
15613      input_path=`$CYGPATH -u "$shortmode_path"`
15614      new_path="$input_path"
15615    fi
15616  fi
15617
15618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15619  if test "x$test_cygdrive_prefix" = x; then
15620    # As a simple fix, exclude /usr/bin since it's not a real path.
15621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15623      # a path prefixed by /cygdrive for fixpath to work.
15624      new_path="$CYGWIN_ROOT_PATH$input_path"
15625    fi
15626  fi
15627
15628
15629  if test "x$path" != "x$new_path"; then
15630    BOOT_JDK="$new_path"
15631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15633  fi
15634
15635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15636
15637  path="$BOOT_JDK"
15638  has_colon=`$ECHO $path | $GREP ^.:`
15639  new_path="$path"
15640  if test "x$has_colon" = x; then
15641    # Not in mixed or Windows style, start by that.
15642    new_path=`cmd //c echo $path`
15643  fi
15644
15645
15646  input_path="$new_path"
15647  # Check if we need to convert this using DOS-style short mode. If the path
15648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15649  # take no chances and rewrite it.
15650  # Note: m4 eats our [], so we need to use [ and ] instead.
15651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15652  if test "x$has_forbidden_chars" != x; then
15653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15655  fi
15656
15657
15658  windows_path="$new_path"
15659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15660    unix_path=`$CYGPATH -u "$windows_path"`
15661    new_path="$unix_path"
15662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15664    new_path="$unix_path"
15665  fi
15666
15667  if test "x$path" != "x$new_path"; then
15668    BOOT_JDK="$new_path"
15669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15670$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15671  fi
15672
15673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15675
15676  else
15677    # We're on a posix platform. Hooray! :)
15678    path="$BOOT_JDK"
15679    has_space=`$ECHO "$path" | $GREP " "`
15680    if test "x$has_space" != x; then
15681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15683      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15684    fi
15685
15686    # Use eval to expand a potential ~
15687    eval path="$path"
15688    if test ! -f "$path" && test ! -d "$path"; then
15689      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15690    fi
15691
15692    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15693  fi
15694
15695              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15696$as_echo_n "checking for Boot JDK... " >&6; }
15697              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15698$as_echo "$BOOT_JDK" >&6; }
15699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15700$as_echo_n "checking Boot JDK version... " >&6; }
15701              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15702              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15703$as_echo "$BOOT_JDK_VERSION" >&6; }
15704            fi # end check jdk version
15705          fi # end check rt.jar
15706        fi # end check javac
15707      fi # end check java
15708    fi # end check boot jdk found
15709  fi
15710
15711  fi
15712
15713
15714    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15715    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15716      # Do we have a bin/java?
15717      if test ! -x "$BOOT_JDK/bin/java"; then
15718        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15720        BOOT_JDK_FOUND=no
15721      else
15722        # Do we have a bin/javac?
15723        if test ! -x "$BOOT_JDK/bin/javac"; then
15724          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15726          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15727$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15728          BOOT_JDK_FOUND=no
15729        else
15730          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15731          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15732            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15734            BOOT_JDK_FOUND=no
15735          else
15736            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15738
15739            # Extra M4 quote needed to protect [] in grep expression.
15740            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15741            if test "x$FOUND_VERSION_78" = x; then
15742              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15744              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15745$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15746              BOOT_JDK_FOUND=no
15747            else
15748              # We're done! :-)
15749              BOOT_JDK_FOUND=yes
15750
15751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15752
15753  # Input might be given as Windows format, start by converting to
15754  # unix format.
15755  path="$BOOT_JDK"
15756  new_path=`$CYGPATH -u "$path"`
15757
15758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15761  # "foo.exe" is OK but "foo" is an error.
15762  #
15763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15764  # It is also a way to make sure we got the proper file name for the real test later on.
15765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15766  if test "x$test_shortpath" = x; then
15767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15769    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15770  fi
15771
15772  # Call helper function which possibly converts this using DOS-style short mode.
15773  # If so, the updated path is stored in $new_path.
15774
15775  input_path="$new_path"
15776  # Check if we need to convert this using DOS-style short mode. If the path
15777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15778  # take no chances and rewrite it.
15779  # Note: m4 eats our [], so we need to use [ and ] instead.
15780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15781  if test "x$has_forbidden_chars" != x; then
15782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15786      # Going to short mode and back again did indeed matter. Since short mode is
15787      # case insensitive, let's make it lowercase to improve readability.
15788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15789      # Now convert it back to Unix-stile (cygpath)
15790      input_path=`$CYGPATH -u "$shortmode_path"`
15791      new_path="$input_path"
15792    fi
15793  fi
15794
15795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15796  if test "x$test_cygdrive_prefix" = x; then
15797    # As a simple fix, exclude /usr/bin since it's not a real path.
15798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15800      # a path prefixed by /cygdrive for fixpath to work.
15801      new_path="$CYGWIN_ROOT_PATH$input_path"
15802    fi
15803  fi
15804
15805
15806  if test "x$path" != "x$new_path"; then
15807    BOOT_JDK="$new_path"
15808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15810  fi
15811
15812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15813
15814  path="$BOOT_JDK"
15815  has_colon=`$ECHO $path | $GREP ^.:`
15816  new_path="$path"
15817  if test "x$has_colon" = x; then
15818    # Not in mixed or Windows style, start by that.
15819    new_path=`cmd //c echo $path`
15820  fi
15821
15822
15823  input_path="$new_path"
15824  # Check if we need to convert this using DOS-style short mode. If the path
15825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15826  # take no chances and rewrite it.
15827  # Note: m4 eats our [], so we need to use [ and ] instead.
15828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15829  if test "x$has_forbidden_chars" != x; then
15830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15832  fi
15833
15834
15835  windows_path="$new_path"
15836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15837    unix_path=`$CYGPATH -u "$windows_path"`
15838    new_path="$unix_path"
15839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15841    new_path="$unix_path"
15842  fi
15843
15844  if test "x$path" != "x$new_path"; then
15845    BOOT_JDK="$new_path"
15846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15848  fi
15849
15850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15852
15853  else
15854    # We're on a posix platform. Hooray! :)
15855    path="$BOOT_JDK"
15856    has_space=`$ECHO "$path" | $GREP " "`
15857    if test "x$has_space" != x; then
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15860      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15861    fi
15862
15863    # Use eval to expand a potential ~
15864    eval path="$path"
15865    if test ! -f "$path" && test ! -d "$path"; then
15866      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15867    fi
15868
15869    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15870  fi
15871
15872              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15873$as_echo_n "checking for Boot JDK... " >&6; }
15874              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15875$as_echo "$BOOT_JDK" >&6; }
15876              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15877$as_echo_n "checking Boot JDK version... " >&6; }
15878              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15879              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15880$as_echo "$BOOT_JDK_VERSION" >&6; }
15881            fi # end check jdk version
15882          fi # end check rt.jar
15883        fi # end check javac
15884      fi # end check java
15885    fi # end check boot jdk found
15886  fi
15887
15888
15889  # If we haven't found anything yet, we've truly lost. Give up.
15890  if test "x$BOOT_JDK_FOUND" = xno; then
15891
15892  # Print a helpful message on how to acquire the necessary build dependency.
15893  # openjdk is the help tag: freetype, cups, pulse, alsa etc
15894  MISSING_DEPENDENCY=openjdk
15895
15896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15897    cygwin_help $MISSING_DEPENDENCY
15898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15899    msys_help $MISSING_DEPENDENCY
15900  else
15901    PKGHANDLER_COMMAND=
15902
15903    case $PKGHANDLER in
15904      apt-get)
15905        apt_help     $MISSING_DEPENDENCY ;;
15906      yum)
15907        yum_help     $MISSING_DEPENDENCY ;;
15908      port)
15909        port_help    $MISSING_DEPENDENCY ;;
15910      pkgutil)
15911        pkgutil_help $MISSING_DEPENDENCY ;;
15912      pkgadd)
15913        pkgadd_help  $MISSING_DEPENDENCY ;;
15914    esac
15915
15916    if test "x$PKGHANDLER_COMMAND" != x; then
15917      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15918    fi
15919  fi
15920
15921    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15922$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15923    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15924$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15925    as_fn_error $? "Cannot continue" "$LINENO" 5
15926  fi
15927
15928  # Setup proper paths for what we found
15929  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15930  if test ! -f "$BOOT_RTJAR"; then
15931    # On MacOSX it is called classes.jar
15932    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15933    if test -f "$BOOT_RTJAR"; then
15934      # Remove the ..
15935      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15936    fi
15937  fi
15938  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15939  BOOT_JDK="$BOOT_JDK"
15940
15941
15942
15943
15944  # Setup tools from the Boot JDK.
15945
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15947$as_echo_n "checking for java in Boot JDK... " >&6; }
15948  JAVA=$BOOT_JDK/bin/java
15949  if test ! -x $JAVA; then
15950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15951$as_echo "not found" >&6; }
15952    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15953$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15954    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15955  fi
15956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15957$as_echo "ok" >&6; }
15958
15959
15960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15961$as_echo_n "checking for javac in Boot JDK... " >&6; }
15962  JAVAC=$BOOT_JDK/bin/javac
15963  if test ! -x $JAVAC; then
15964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15965$as_echo "not found" >&6; }
15966    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15967$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15968    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15969  fi
15970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15971$as_echo "ok" >&6; }
15972
15973
15974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15975$as_echo_n "checking for javah in Boot JDK... " >&6; }
15976  JAVAH=$BOOT_JDK/bin/javah
15977  if test ! -x $JAVAH; then
15978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15979$as_echo "not found" >&6; }
15980    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15981$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15982    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15983  fi
15984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15985$as_echo "ok" >&6; }
15986
15987
15988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15989$as_echo_n "checking for javap in Boot JDK... " >&6; }
15990  JAVAP=$BOOT_JDK/bin/javap
15991  if test ! -x $JAVAP; then
15992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15993$as_echo "not found" >&6; }
15994    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15995$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15996    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15997  fi
15998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15999$as_echo "ok" >&6; }
16000
16001
16002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16003$as_echo_n "checking for jar in Boot JDK... " >&6; }
16004  JAR=$BOOT_JDK/bin/jar
16005  if test ! -x $JAR; then
16006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16007$as_echo "not found" >&6; }
16008    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16009$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16010    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16011  fi
16012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16013$as_echo "ok" >&6; }
16014
16015
16016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16017$as_echo_n "checking for rmic in Boot JDK... " >&6; }
16018  RMIC=$BOOT_JDK/bin/rmic
16019  if test ! -x $RMIC; then
16020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16021$as_echo "not found" >&6; }
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16023$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16024    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16025  fi
16026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16027$as_echo "ok" >&6; }
16028
16029
16030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16031$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16032  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16033  if test ! -x $NATIVE2ASCII; then
16034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16035$as_echo "not found" >&6; }
16036    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16037$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16038    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16039  fi
16040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16041$as_echo "ok" >&6; }
16042
16043
16044  # Finally, set some other options...
16045
16046  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16047  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16048
16049
16050
16051
16052  ##############################################################################
16053  #
16054  # Specify options for anything that is run with the Boot JDK.
16055  #
16056
16057# Check whether --with-boot-jdk-jvmargs was given.
16058if test "${with_boot_jdk_jvmargs+set}" = set; then :
16059  withval=$with_boot_jdk_jvmargs;
16060fi
16061
16062
16063  if test "x$with_boot_jdk_jvmargs" = x; then
16064    # Not all JVM:s accept the same arguments on the command line.
16065    # OpenJDK specific increase in thread stack for JDK build,
16066    # well more specifically, when running javac.
16067    if test "x$BUILD_NUM_BITS" = x32; then
16068      STACK_SIZE=768
16069    else
16070      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16071      # since 64-bit pointers are pushed on the stach. Apparently, we need
16072      # to increase the stack space when javacing the JDK....
16073      STACK_SIZE=1536
16074    fi
16075
16076    # Minimum amount of heap memory.
16077
16078  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16079  $ECHO "Command: $JAVA -Xms64M -version" >&5
16080  OUTPUT=`$JAVA -Xms64M -version 2>&1`
16081  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16082  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16084    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16085    JVM_ARG_OK=true
16086  else
16087    $ECHO "Arg failed:" >&5
16088    $ECHO "$OUTPUT" >&5
16089    JVM_ARG_OK=false
16090  fi
16091
16092    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
16093      # Why does macosx need more heap? Its the huge JDK batch.
16094
16095  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16096  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16097  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16101    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16102    JVM_ARG_OK=true
16103  else
16104    $ECHO "Arg failed:" >&5
16105    $ECHO "$OUTPUT" >&5
16106    JVM_ARG_OK=false
16107  fi
16108
16109    else
16110
16111  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16112  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16113  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16114  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16115  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16116  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16117    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16118    JVM_ARG_OK=true
16119  else
16120    $ECHO "Arg failed:" >&5
16121    $ECHO "$OUTPUT" >&5
16122    JVM_ARG_OK=false
16123  fi
16124
16125    fi
16126    # When is adding -client something that speeds up the JVM?
16127    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16128
16129  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16130  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16131  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16132  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16133  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16134  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16135    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16136    JVM_ARG_OK=true
16137  else
16138    $ECHO "Arg failed:" >&5
16139    $ECHO "$OUTPUT" >&5
16140    JVM_ARG_OK=false
16141  fi
16142
16143    # Disable special log output when a debug build is used as Boot JDK...
16144
16145  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16146  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16147  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16148  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16149  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16150  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16151    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16152    JVM_ARG_OK=true
16153  else
16154    $ECHO "Arg failed:" >&5
16155    $ECHO "$OUTPUT" >&5
16156    JVM_ARG_OK=false
16157  fi
16158
16159  fi
16160
16161  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16162
16163
16164
16165###############################################################################
16166#
16167# Configure the sources to use. We can add or override individual directories.
16168#
16169###############################################################################
16170
16171
16172  # Where are the sources. Any of these can be overridden
16173  # using --with-override-corba and the likes.
16174  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16175  CORBA_TOPDIR="$SRC_ROOT/corba"
16176  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16177  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16178  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16179  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16180  JDK_TOPDIR="$SRC_ROOT/jdk"
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191  ###############################################################################
16192  #
16193  # Pickup additional source for a component from outside of the source root
16194  # or override source for a component.
16195  #
16196
16197# Check whether --with-add-source-root was given.
16198if test "${with_add_source_root+set}" = set; then :
16199  withval=$with_add_source_root;
16200fi
16201
16202
16203
16204# Check whether --with-override-source-root was given.
16205if test "${with_override_source_root+set}" = set; then :
16206  withval=$with_override_source_root;
16207fi
16208
16209
16210
16211# Check whether --with-adds-and-overrides was given.
16212if test "${with_adds_and_overrides+set}" = set; then :
16213  withval=$with_adds_and_overrides;
16214fi
16215
16216
16217  if test "x$with_adds_and_overrides" != x; then
16218    with_add_source_root="$with_adds_and_overrides/adds"
16219    with_override_source_root="$with_adds_and_overrides/overrides"
16220  fi
16221
16222  if test "x$with_add_source_root" != x; then
16223    if ! test -d $with_add_source_root; then
16224      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16225    fi
16226    CURDIR="$PWD"
16227    cd "$with_add_source_root"
16228    ADD_SRC_ROOT="`pwd`"
16229    cd "$CURDIR"
16230    # Verify that the addon source root does not have any root makefiles.
16231    # If it does, then it is usually an error, prevent this.
16232    if test -f $with_add_source_root/langtools/make/Makefile; then
16233      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
16234    fi
16235    if test -f $with_add_source_root/corba/make/Makefile; then
16236      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
16237    fi
16238    if test -f $with_add_source_root/jaxp/make/Makefile; then
16239      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
16240    fi
16241    if test -f $with_add_source_root/jaxws/make/Makefile; then
16242      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
16243    fi
16244    if test -f $with_add_source_root/hotspot/make/Makefile; then
16245      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
16246    fi
16247    if test -f $with_add_source_root/nashorn/make/Makefile; then
16248      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16249    fi
16250    if test -f $with_add_source_root/jdk/make/Makefile; then
16251      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
16252    fi
16253  fi
16254
16255
16256  if test "x$with_override_source_root" != x; then
16257    if ! test -d $with_override_source_root; then
16258      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16259    fi
16260    CURDIR="$PWD"
16261    cd "$with_override_source_root"
16262    OVERRIDE_SRC_ROOT="`pwd`"
16263    cd "$CURDIR"
16264    if test -f $with_override_source_root/langtools/make/Makefile; then
16265      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
16266    fi
16267    if test -f $with_override_source_root/corba/make/Makefile; then
16268      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
16269    fi
16270    if test -f $with_override_source_root/jaxp/make/Makefile; then
16271      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
16272    fi
16273    if test -f $with_override_source_root/jaxws/make/Makefile; then
16274      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
16275    fi
16276    if test -f $with_override_source_root/hotspot/make/Makefile; then
16277      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
16278    fi
16279    if test -f $with_override_source_root/nashorn/make/Makefile; then
16280      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16281    fi
16282    if test -f $with_override_source_root/jdk/make/Makefile; then
16283      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
16284    fi
16285  fi
16286
16287
16288  ###############################################################################
16289  #
16290  # Override a repo completely, this is used for example when you have 3 small
16291  # development sandboxes of the langtools sources and want to avoid having 3 full
16292  # OpenJDK sources checked out on disk.
16293  #
16294  # Assuming that the 3 langtools sandboxes are located here:
16295  # /home/fredrik/sandbox1/langtools
16296  # /home/fredrik/sandbox2/langtools
16297  # /home/fredrik/sandbox3/langtools
16298  #
16299  # From the source root you create build subdirs manually:
16300  #     mkdir -p build1 build2 build3
16301  # in each build directory run:
16302  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16303  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16304  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16305  #
16306
16307
16308# Check whether --with-override-langtools was given.
16309if test "${with_override_langtools+set}" = set; then :
16310  withval=$with_override_langtools;
16311fi
16312
16313
16314
16315# Check whether --with-override-corba was given.
16316if test "${with_override_corba+set}" = set; then :
16317  withval=$with_override_corba;
16318fi
16319
16320
16321
16322# Check whether --with-override-jaxp was given.
16323if test "${with_override_jaxp+set}" = set; then :
16324  withval=$with_override_jaxp;
16325fi
16326
16327
16328
16329# Check whether --with-override-jaxws was given.
16330if test "${with_override_jaxws+set}" = set; then :
16331  withval=$with_override_jaxws;
16332fi
16333
16334
16335
16336# Check whether --with-override-hotspot was given.
16337if test "${with_override_hotspot+set}" = set; then :
16338  withval=$with_override_hotspot;
16339fi
16340
16341
16342
16343# Check whether --with-override-nashorn was given.
16344if test "${with_override_nashorn+set}" = set; then :
16345  withval=$with_override_nashorn;
16346fi
16347
16348
16349
16350# Check whether --with-override-jdk was given.
16351if test "${with_override_jdk+set}" = set; then :
16352  withval=$with_override_jdk;
16353fi
16354
16355
16356  if test "x$with_override_langtools" != x; then
16357    CURDIR="$PWD"
16358    cd "$with_override_langtools"
16359    LANGTOOLS_TOPDIR="`pwd`"
16360    cd "$CURDIR"
16361    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16362      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16363    fi
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16365$as_echo_n "checking if langtools should be overridden... " >&6; }
16366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16367$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16368  fi
16369  if test "x$with_override_corba" != x; then
16370    CURDIR="$PWD"
16371    cd "$with_override_corba"
16372    CORBA_TOPDIR="`pwd`"
16373    cd "$CURDIR"
16374    if ! test -f $CORBA_TOPDIR/make/Makefile; then
16375      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16376    fi
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16378$as_echo_n "checking if corba should be overridden... " >&6; }
16379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16380$as_echo "yes with $CORBA_TOPDIR" >&6; }
16381  fi
16382  if test "x$with_override_jaxp" != x; then
16383    CURDIR="$PWD"
16384    cd "$with_override_jaxp"
16385    JAXP_TOPDIR="`pwd`"
16386    cd "$CURDIR"
16387    if ! test -f $JAXP_TOPDIR/make/Makefile; then
16388      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16389    fi
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16391$as_echo_n "checking if jaxp should be overridden... " >&6; }
16392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16393$as_echo "yes with $JAXP_TOPDIR" >&6; }
16394  fi
16395  if test "x$with_override_jaxws" != x; then
16396    CURDIR="$PWD"
16397    cd "$with_override_jaxws"
16398    JAXWS_TOPDIR="`pwd`"
16399    cd "$CURDIR"
16400    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16401      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16402    fi
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16404$as_echo_n "checking if jaxws should be overridden... " >&6; }
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16406$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16407  fi
16408  if test "x$with_override_hotspot" != x; then
16409    CURDIR="$PWD"
16410    cd "$with_override_hotspot"
16411    HOTSPOT_TOPDIR="`pwd`"
16412    cd "$CURDIR"
16413    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16414      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16415    fi
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16417$as_echo_n "checking if hotspot should be overridden... " >&6; }
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16419$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16420  fi
16421  if test "x$with_override_nashorn" != x; then
16422    CURDIR="$PWD"
16423    cd "$with_override_nashorn"
16424    NASHORN_TOPDIR="`pwd`"
16425    cd "$CURDIR"
16426    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16427      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16428    fi
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16430$as_echo_n "checking if nashorn should be overridden... " >&6; }
16431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16432$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16433  fi
16434  if test "x$with_override_jdk" != x; then
16435    CURDIR="$PWD"
16436    cd "$with_override_jdk"
16437    JDK_TOPDIR="`pwd`"
16438    cd "$CURDIR"
16439    if ! test -f $JDK_TOPDIR/make/Makefile; then
16440      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16441    fi
16442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16443$as_echo_n "checking if JDK should be overridden... " >&6; }
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16445$as_echo "yes with $JDK_TOPDIR" >&6; }
16446  fi
16447
16448
16449  BUILD_OUTPUT="$OUTPUT_ROOT"
16450
16451
16452  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16453  BUILD_HOTSPOT=true
16454
16455
16456
16457# Check whether --with-import-hotspot was given.
16458if test "${with_import_hotspot+set}" = set; then :
16459  withval=$with_import_hotspot;
16460fi
16461
16462  if test "x$with_import_hotspot" != x; then
16463    CURDIR="$PWD"
16464    cd "$with_import_hotspot"
16465    HOTSPOT_DIST="`pwd`"
16466    cd "$CURDIR"
16467    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16468      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16469    fi
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16471$as_echo_n "checking if hotspot should be imported... " >&6; }
16472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16473$as_echo "yes from $HOTSPOT_DIST" >&6; }
16474    BUILD_HOTSPOT=false
16475  fi
16476
16477  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16478
16479
16480###############################################################################
16481#
16482# Setup the toolchain (compilers etc), i.e. the tools that need to be
16483# cross-compilation aware.
16484#
16485###############################################################################
16486
16487
16488  ###############################################################################
16489  #
16490  # Configure the development tool paths and potential sysroot.
16491  #
16492  ac_ext=cpp
16493ac_cpp='$CXXCPP $CPPFLAGS'
16494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16497
16498
16499  # The option used to specify the target .o,.a or .so file.
16500  # When compiling, how to specify the to be created object file.
16501  CC_OUT_OPTION='-o$(SPACE)'
16502  # When linking, how to specify the to be created executable.
16503  EXE_OUT_OPTION='-o$(SPACE)'
16504  # When linking, how to specify the to be created dynamically linkable library.
16505  LD_OUT_OPTION='-o$(SPACE)'
16506  # When archiving, how to specify the to be create static archive for object files.
16507  AR_OUT_OPTION='rcs$(SPACE)'
16508
16509
16510
16511
16512
16513# Locate the actual tools
16514
16515
16516# Check whether --with-jtreg was given.
16517if test "${with_jtreg+set}" = set; then :
16518  withval=$with_jtreg;
16519else
16520  with_jtreg=no
16521fi
16522
16523
16524  if test "x$with_jtreg" = xno; then
16525    # jtreg disabled
16526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16527$as_echo_n "checking for jtreg... " >&6; }
16528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16529$as_echo "no" >&6; }
16530  else
16531    if test "x$with_jtreg" != xyes; then
16532      # with path specified.
16533      JT_HOME="$with_jtreg"
16534    fi
16535
16536    if test "x$JT_HOME" != x; then
16537      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16538$as_echo_n "checking for jtreg... " >&6; }
16539
16540      # use JT_HOME enviroment var.
16541
16542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16543
16544  # Input might be given as Windows format, start by converting to
16545  # unix format.
16546  path="$JT_HOME"
16547  new_path=`$CYGPATH -u "$path"`
16548
16549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16552  # "foo.exe" is OK but "foo" is an error.
16553  #
16554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16555  # It is also a way to make sure we got the proper file name for the real test later on.
16556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16557  if test "x$test_shortpath" = x; then
16558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16559$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16560    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16561  fi
16562
16563  # Call helper function which possibly converts this using DOS-style short mode.
16564  # If so, the updated path is stored in $new_path.
16565
16566  input_path="$new_path"
16567  # Check if we need to convert this using DOS-style short mode. If the path
16568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16569  # take no chances and rewrite it.
16570  # Note: m4 eats our [], so we need to use [ and ] instead.
16571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16572  if test "x$has_forbidden_chars" != x; then
16573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16577      # Going to short mode and back again did indeed matter. Since short mode is
16578      # case insensitive, let's make it lowercase to improve readability.
16579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16580      # Now convert it back to Unix-stile (cygpath)
16581      input_path=`$CYGPATH -u "$shortmode_path"`
16582      new_path="$input_path"
16583    fi
16584  fi
16585
16586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16587  if test "x$test_cygdrive_prefix" = x; then
16588    # As a simple fix, exclude /usr/bin since it's not a real path.
16589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16591      # a path prefixed by /cygdrive for fixpath to work.
16592      new_path="$CYGWIN_ROOT_PATH$input_path"
16593    fi
16594  fi
16595
16596
16597  if test "x$path" != "x$new_path"; then
16598    JT_HOME="$new_path"
16599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16600$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16601  fi
16602
16603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16604
16605  path="$JT_HOME"
16606  has_colon=`$ECHO $path | $GREP ^.:`
16607  new_path="$path"
16608  if test "x$has_colon" = x; then
16609    # Not in mixed or Windows style, start by that.
16610    new_path=`cmd //c echo $path`
16611  fi
16612
16613
16614  input_path="$new_path"
16615  # Check if we need to convert this using DOS-style short mode. If the path
16616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16617  # take no chances and rewrite it.
16618  # Note: m4 eats our [], so we need to use [ and ] instead.
16619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16620  if test "x$has_forbidden_chars" != x; then
16621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16623  fi
16624
16625
16626  windows_path="$new_path"
16627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16628    unix_path=`$CYGPATH -u "$windows_path"`
16629    new_path="$unix_path"
16630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16632    new_path="$unix_path"
16633  fi
16634
16635  if test "x$path" != "x$new_path"; then
16636    JT_HOME="$new_path"
16637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16638$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16639  fi
16640
16641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16643
16644  else
16645    # We're on a posix platform. Hooray! :)
16646    path="$JT_HOME"
16647    has_space=`$ECHO "$path" | $GREP " "`
16648    if test "x$has_space" != x; then
16649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16650$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16651      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16652    fi
16653
16654    # Use eval to expand a potential ~
16655    eval path="$path"
16656    if test ! -f "$path" && test ! -d "$path"; then
16657      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16658    fi
16659
16660    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16661  fi
16662
16663
16664      # jtreg win32 script works for everybody
16665      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16666
16667      if test ! -f "$JTREGEXE"; then
16668        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16669      fi
16670
16671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16672$as_echo "$JTREGEXE" >&6; }
16673    else
16674      # try to find jtreg on path
16675
16676  for ac_prog in jtreg
16677do
16678  # Extract the first word of "$ac_prog", so it can be a program name with args.
16679set dummy $ac_prog; ac_word=$2
16680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16681$as_echo_n "checking for $ac_word... " >&6; }
16682if ${ac_cv_path_JTREGEXE+:} false; then :
16683  $as_echo_n "(cached) " >&6
16684else
16685  case $JTREGEXE in
16686  [\\/]* | ?:[\\/]*)
16687  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16688  ;;
16689  *)
16690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16691for as_dir in $PATH
16692do
16693  IFS=$as_save_IFS
16694  test -z "$as_dir" && as_dir=.
16695    for ac_exec_ext in '' $ac_executable_extensions; do
16696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16697    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16699    break 2
16700  fi
16701done
16702  done
16703IFS=$as_save_IFS
16704
16705  ;;
16706esac
16707fi
16708JTREGEXE=$ac_cv_path_JTREGEXE
16709if test -n "$JTREGEXE"; then
16710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16711$as_echo "$JTREGEXE" >&6; }
16712else
16713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16714$as_echo "no" >&6; }
16715fi
16716
16717
16718  test -n "$JTREGEXE" && break
16719done
16720
16721
16722  if test "x$JTREGEXE" = x; then
16723    if test "xjtreg" = x; then
16724      PROG_NAME=jtregexe
16725    else
16726      PROG_NAME=jtreg
16727    fi
16728    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16729$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16730    as_fn_error $? "Cannot continue" "$LINENO" 5
16731  fi
16732
16733
16734      JT_HOME="`$DIRNAME $JTREGEXE`"
16735    fi
16736  fi
16737
16738
16739
16740
16741
16742  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16743
16744  # Store path to cygwin link.exe to help excluding it when searching for
16745  # VS linker. This must be done before changing the PATH when looking for VS.
16746  # Extract the first word of "link", so it can be a program name with args.
16747set dummy link; ac_word=$2
16748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16749$as_echo_n "checking for $ac_word... " >&6; }
16750if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16751  $as_echo_n "(cached) " >&6
16752else
16753  case $CYGWIN_LINK in
16754  [\\/]* | ?:[\\/]*)
16755  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16756  ;;
16757  *)
16758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16759for as_dir in $PATH
16760do
16761  IFS=$as_save_IFS
16762  test -z "$as_dir" && as_dir=.
16763    for ac_exec_ext in '' $ac_executable_extensions; do
16764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16765    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16767    break 2
16768  fi
16769done
16770  done
16771IFS=$as_save_IFS
16772
16773  ;;
16774esac
16775fi
16776CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16777if test -n "$CYGWIN_LINK"; then
16778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16779$as_echo "$CYGWIN_LINK" >&6; }
16780else
16781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16782$as_echo "no" >&6; }
16783fi
16784
16785
16786  if test "x$CYGWIN_LINK" != x; then
16787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16788$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16789    "$CYGWIN_LINK" --version > /dev/null
16790    if test $? -eq 0 ; then
16791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16792$as_echo "yes" >&6; }
16793    else
16794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16795$as_echo "no" >&6; }
16796      # This might be the VS linker. Don't exclude it later on.
16797      CYGWIN_LINK=""
16798    fi
16799  fi
16800
16801  # First-hand choice is to locate and run the vsvars bat file.
16802
16803  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16804    VCVARSFILE="vc/bin/vcvars32.bat"
16805  else
16806    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16807  fi
16808
16809  VS_ENV_CMD=""
16810  VS_ENV_ARGS=""
16811  if test "x$with_toolsdir" != x; then
16812
16813  if test "x$VS_ENV_CMD" = x; then
16814    VS100BASE="$with_toolsdir/../.."
16815    METHOD="--with-tools-dir"
16816
16817  windows_path="$VS100BASE"
16818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16819    unix_path=`$CYGPATH -u "$windows_path"`
16820    VS100BASE="$unix_path"
16821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16823    VS100BASE="$unix_path"
16824  fi
16825
16826    if test -d "$VS100BASE"; then
16827      if test -f "$VS100BASE/$VCVARSFILE"; then
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16829$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16830        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16831      else
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16833$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16834        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16835$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16836      fi
16837    fi
16838  fi
16839
16840  fi
16841
16842  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16843    # Having specified an argument which is incorrect will produce an instant failure;
16844    # we should not go on looking
16845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16846$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16847    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16848$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16849    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16850  fi
16851
16852  if test "x$VS100COMNTOOLS" != x; then
16853
16854  if test "x$VS_ENV_CMD" = x; then
16855    VS100BASE="$VS100COMNTOOLS/../.."
16856    METHOD="VS100COMNTOOLS variable"
16857
16858  windows_path="$VS100BASE"
16859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16860    unix_path=`$CYGPATH -u "$windows_path"`
16861    VS100BASE="$unix_path"
16862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16864    VS100BASE="$unix_path"
16865  fi
16866
16867    if test -d "$VS100BASE"; then
16868      if test -f "$VS100BASE/$VCVARSFILE"; then
16869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16870$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16871        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16872      else
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16874$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16875        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16876$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16877      fi
16878    fi
16879  fi
16880
16881  fi
16882  if test "x$PROGRAMFILES" != x; then
16883
16884  if test "x$VS_ENV_CMD" = x; then
16885    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16886    METHOD="well-known name"
16887
16888  windows_path="$VS100BASE"
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890    unix_path=`$CYGPATH -u "$windows_path"`
16891    VS100BASE="$unix_path"
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16894    VS100BASE="$unix_path"
16895  fi
16896
16897    if test -d "$VS100BASE"; then
16898      if test -f "$VS100BASE/$VCVARSFILE"; then
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16900$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16901        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16902      else
16903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16904$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16906$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16907      fi
16908    fi
16909  fi
16910
16911  fi
16912
16913  if test "x$VS_ENV_CMD" = x; then
16914    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16915    METHOD="well-known name"
16916
16917  windows_path="$VS100BASE"
16918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16919    unix_path=`$CYGPATH -u "$windows_path"`
16920    VS100BASE="$unix_path"
16921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16923    VS100BASE="$unix_path"
16924  fi
16925
16926    if test -d "$VS100BASE"; then
16927      if test -f "$VS100BASE/$VCVARSFILE"; then
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16929$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16930        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16931      else
16932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16933$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16935$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16936      fi
16937    fi
16938  fi
16939
16940
16941  if test "x$VS_ENV_CMD" = x; then
16942    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16943    METHOD="well-known name"
16944
16945  windows_path="$VS100BASE"
16946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947    unix_path=`$CYGPATH -u "$windows_path"`
16948    VS100BASE="$unix_path"
16949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16951    VS100BASE="$unix_path"
16952  fi
16953
16954    if test -d "$VS100BASE"; then
16955      if test -f "$VS100BASE/$VCVARSFILE"; then
16956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16957$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16958        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16959      else
16960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16961$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16963$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16964      fi
16965    fi
16966  fi
16967
16968
16969  if test "x$ProgramW6432" != x; then
16970
16971  if test "x$VS_ENV_CMD" = x; then
16972    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16973    METHOD="well-known name"
16974
16975  windows_path="$WIN_SDK_BASE"
16976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16977    unix_path=`$CYGPATH -u "$windows_path"`
16978    WIN_SDK_BASE="$unix_path"
16979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16981    WIN_SDK_BASE="$unix_path"
16982  fi
16983
16984    if test -d "$WIN_SDK_BASE"; then
16985      # There have been cases of partial or broken SDK installations. A missing
16986      # lib dir is not going to work.
16987      if test ! -d "$WIN_SDK_BASE/../lib"; then
16988        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16989$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16990        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16991$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16992      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16993        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16994$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16995        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16996        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16997          VS_ENV_ARGS="/x86"
16998        else
16999          VS_ENV_ARGS="/x64"
17000        fi
17001      else
17002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17005$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17006      fi
17007    fi
17008  fi
17009
17010  fi
17011  if test "x$PROGRAMW6432" != x; then
17012
17013  if test "x$VS_ENV_CMD" = x; then
17014    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17015    METHOD="well-known name"
17016
17017  windows_path="$WIN_SDK_BASE"
17018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17019    unix_path=`$CYGPATH -u "$windows_path"`
17020    WIN_SDK_BASE="$unix_path"
17021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17023    WIN_SDK_BASE="$unix_path"
17024  fi
17025
17026    if test -d "$WIN_SDK_BASE"; then
17027      # There have been cases of partial or broken SDK installations. A missing
17028      # lib dir is not going to work.
17029      if test ! -d "$WIN_SDK_BASE/../lib"; then
17030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17031$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17032        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17033$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17034      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17036$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17037        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17038        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17039          VS_ENV_ARGS="/x86"
17040        else
17041          VS_ENV_ARGS="/x64"
17042        fi
17043      else
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17047$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17048      fi
17049    fi
17050  fi
17051
17052  fi
17053  if test "x$PROGRAMFILES" != x; then
17054
17055  if test "x$VS_ENV_CMD" = x; then
17056    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17057    METHOD="well-known name"
17058
17059  windows_path="$WIN_SDK_BASE"
17060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17061    unix_path=`$CYGPATH -u "$windows_path"`
17062    WIN_SDK_BASE="$unix_path"
17063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17065    WIN_SDK_BASE="$unix_path"
17066  fi
17067
17068    if test -d "$WIN_SDK_BASE"; then
17069      # There have been cases of partial or broken SDK installations. A missing
17070      # lib dir is not going to work.
17071      if test ! -d "$WIN_SDK_BASE/../lib"; then
17072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17075$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17076      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17077        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17078$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17079        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17080        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17081          VS_ENV_ARGS="/x86"
17082        else
17083          VS_ENV_ARGS="/x64"
17084        fi
17085      else
17086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17089$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17090      fi
17091    fi
17092  fi
17093
17094  fi
17095
17096  if test "x$VS_ENV_CMD" = x; then
17097    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17098    METHOD="well-known name"
17099
17100  windows_path="$WIN_SDK_BASE"
17101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17102    unix_path=`$CYGPATH -u "$windows_path"`
17103    WIN_SDK_BASE="$unix_path"
17104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17106    WIN_SDK_BASE="$unix_path"
17107  fi
17108
17109    if test -d "$WIN_SDK_BASE"; then
17110      # There have been cases of partial or broken SDK installations. A missing
17111      # lib dir is not going to work.
17112      if test ! -d "$WIN_SDK_BASE/../lib"; then
17113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17114$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17115        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17116$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17117      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17120        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17121        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17122          VS_ENV_ARGS="/x86"
17123        else
17124          VS_ENV_ARGS="/x64"
17125        fi
17126      else
17127        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17128$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17129        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17130$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17131      fi
17132    fi
17133  fi
17134
17135
17136  if test "x$VS_ENV_CMD" = x; then
17137    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17138    METHOD="well-known name"
17139
17140  windows_path="$WIN_SDK_BASE"
17141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17142    unix_path=`$CYGPATH -u "$windows_path"`
17143    WIN_SDK_BASE="$unix_path"
17144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17146    WIN_SDK_BASE="$unix_path"
17147  fi
17148
17149    if test -d "$WIN_SDK_BASE"; then
17150      # There have been cases of partial or broken SDK installations. A missing
17151      # lib dir is not going to work.
17152      if test ! -d "$WIN_SDK_BASE/../lib"; then
17153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17156$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17157      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17160        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17161        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17162          VS_ENV_ARGS="/x86"
17163        else
17164          VS_ENV_ARGS="/x64"
17165        fi
17166      else
17167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17168$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17170$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17171      fi
17172    fi
17173  fi
17174
17175
17176  if test "x$VS_ENV_CMD" != x; then
17177    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17178
17179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17180
17181  # First separate the path from the arguments. This will split at the first
17182  # space.
17183  complete="$VS_ENV_CMD"
17184  path="${complete%% *}"
17185  tmp="$complete EOL"
17186  arguments="${tmp#* }"
17187
17188  # Input might be given as Windows format, start by converting to
17189  # unix format.
17190  new_path=`$CYGPATH -u "$path"`
17191
17192  # Now try to locate executable using which
17193  new_path=`$WHICH "$new_path" 2> /dev/null`
17194  # bat and cmd files are not always considered executable in cygwin causing which
17195  # to not find them
17196  if test "x$new_path" = x \
17197      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17198      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17199    new_path=`$CYGPATH -u "$path"`
17200  fi
17201  if test "x$new_path" = x; then
17202    # Oops. Which didn't find the executable.
17203    # The splitting of arguments from the executable at a space might have been incorrect,
17204    # since paths with space are more likely in Windows. Give it another try with the whole
17205    # argument.
17206    path="$complete"
17207    arguments="EOL"
17208    new_path=`$CYGPATH -u "$path"`
17209    new_path=`$WHICH "$new_path" 2> /dev/null`
17210    # bat and cmd files are not always considered executable in cygwin causing which
17211    # to not find them
17212    if test "x$new_path" = x \
17213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17215      new_path=`$CYGPATH -u "$path"`
17216    fi
17217    if test "x$new_path" = x; then
17218      # It's still not found. Now this is an unrecoverable error.
17219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17220$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17221      has_space=`$ECHO "$complete" | $GREP " "`
17222      if test "x$has_space" != x; then
17223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17225      fi
17226      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17227    fi
17228  fi
17229
17230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17233  # "foo.exe" is OK but "foo" is an error.
17234  #
17235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17236  # It is also a way to make sure we got the proper file name for the real test later on.
17237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17238  if test "x$test_shortpath" = x; then
17239    # Short path failed, file does not exist as specified.
17240    # Try adding .exe or .cmd
17241    if test -f "${new_path}.exe"; then
17242      input_to_shortpath="${new_path}.exe"
17243    elif test -f "${new_path}.cmd"; then
17244      input_to_shortpath="${new_path}.cmd"
17245    else
17246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17247$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17250      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17251    fi
17252  else
17253    input_to_shortpath="$new_path"
17254  fi
17255
17256  # Call helper function which possibly converts this using DOS-style short mode.
17257  # If so, the updated path is stored in $new_path.
17258  new_path="$input_to_shortpath"
17259
17260  input_path="$input_to_shortpath"
17261  # Check if we need to convert this using DOS-style short mode. If the path
17262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17263  # take no chances and rewrite it.
17264  # Note: m4 eats our [], so we need to use [ and ] instead.
17265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17266  if test "x$has_forbidden_chars" != x; then
17267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17271      # Going to short mode and back again did indeed matter. Since short mode is
17272      # case insensitive, let's make it lowercase to improve readability.
17273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17274      # Now convert it back to Unix-stile (cygpath)
17275      input_path=`$CYGPATH -u "$shortmode_path"`
17276      new_path="$input_path"
17277    fi
17278  fi
17279
17280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17281  if test "x$test_cygdrive_prefix" = x; then
17282    # As a simple fix, exclude /usr/bin since it's not a real path.
17283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17285      # a path prefixed by /cygdrive for fixpath to work.
17286      new_path="$CYGWIN_ROOT_PATH$input_path"
17287    fi
17288  fi
17289
17290  # remove trailing .exe if any
17291  new_path="${new_path/%.exe/}"
17292
17293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17294
17295  # First separate the path from the arguments. This will split at the first
17296  # space.
17297  complete="$VS_ENV_CMD"
17298  path="${complete%% *}"
17299  tmp="$complete EOL"
17300  arguments="${tmp#* }"
17301
17302  # Input might be given as Windows format, start by converting to
17303  # unix format.
17304  new_path="$path"
17305
17306  windows_path="$new_path"
17307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17308    unix_path=`$CYGPATH -u "$windows_path"`
17309    new_path="$unix_path"
17310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17312    new_path="$unix_path"
17313  fi
17314
17315
17316  # Now try to locate executable using which
17317  new_path=`$WHICH "$new_path" 2> /dev/null`
17318
17319  if test "x$new_path" = x; then
17320    # Oops. Which didn't find the executable.
17321    # The splitting of arguments from the executable at a space might have been incorrect,
17322    # since paths with space are more likely in Windows. Give it another try with the whole
17323    # argument.
17324    path="$complete"
17325    arguments="EOL"
17326    new_path="$path"
17327
17328  windows_path="$new_path"
17329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17330    unix_path=`$CYGPATH -u "$windows_path"`
17331    new_path="$unix_path"
17332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17334    new_path="$unix_path"
17335  fi
17336
17337
17338    new_path=`$WHICH "$new_path" 2> /dev/null`
17339
17340    if test "x$new_path" = x; then
17341      # It's still not found. Now this is an unrecoverable error.
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17343$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17344      has_space=`$ECHO "$complete" | $GREP " "`
17345      if test "x$has_space" != x; then
17346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17348      fi
17349      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17350    fi
17351  fi
17352
17353  # Now new_path has a complete unix path to the binary
17354  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17355    # Keep paths in /bin as-is, but remove trailing .exe if any
17356    new_path="${new_path/%.exe/}"
17357    # Do not save /bin paths to all_fixpath_prefixes!
17358  else
17359    # Not in mixed or Windows style, start by that.
17360    new_path=`cmd //c echo $new_path`
17361
17362  input_path="$new_path"
17363  # Check if we need to convert this using DOS-style short mode. If the path
17364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17365  # take no chances and rewrite it.
17366  # Note: m4 eats our [], so we need to use [ and ] instead.
17367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17368  if test "x$has_forbidden_chars" != x; then
17369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17371  fi
17372
17373    # Output is in $new_path
17374
17375  windows_path="$new_path"
17376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17377    unix_path=`$CYGPATH -u "$windows_path"`
17378    new_path="$unix_path"
17379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17381    new_path="$unix_path"
17382  fi
17383
17384    # remove trailing .exe if any
17385    new_path="${new_path/%.exe/}"
17386
17387    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17388    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17389  fi
17390
17391  else
17392    # We're on a posix platform. Hooray! :)
17393    # First separate the path from the arguments. This will split at the first
17394    # space.
17395    complete="$VS_ENV_CMD"
17396    path="${complete%% *}"
17397    tmp="$complete EOL"
17398    arguments="${tmp#* }"
17399
17400    # Cannot rely on the command "which" here since it doesn't always work.
17401    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17402    if test -z "$is_absolute_path"; then
17403      # Path to executable is not absolute. Find it.
17404      IFS_save="$IFS"
17405      IFS=:
17406      for p in $PATH; do
17407        if test -f "$p/$path" && test -x "$p/$path"; then
17408          new_path="$p/$path"
17409          break
17410        fi
17411      done
17412      IFS="$IFS_save"
17413    else
17414      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17415$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17416      new_path="$path"
17417    fi
17418
17419    if test "x$new_path" = x; then
17420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17421$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17422      has_space=`$ECHO "$complete" | $GREP " "`
17423      if test "x$has_space" != x; then
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17425$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17426      fi
17427      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17428    fi
17429  fi
17430
17431  # Now join together the path and the arguments once again
17432  if test "x$arguments" != xEOL; then
17433    new_complete="$new_path ${arguments% *}"
17434  else
17435    new_complete="$new_path"
17436  fi
17437
17438  if test "x$complete" != "x$new_complete"; then
17439    VS_ENV_CMD="$new_complete"
17440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17441$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17442  fi
17443
17444
17445    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17446    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17447$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17448    cd $OUTPUT_ROOT
17449    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17450    # to autoconf standards.
17451
17452    #----
17453
17454    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17455    # but calculate the difference in Cygwin environment before/after running it and then
17456    # apply the diff.
17457
17458    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17459      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17460      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17461      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17462    else
17463      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17464      _dosbash=`cmd //c echo \`which bash\``
17465    fi
17466
17467    # generate the set of exported vars before/after the vs10 setup
17468    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17469    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17470    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17471    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17472
17473    # Now execute the newly created bat file.
17474    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17475    cmd /c localdevenvtmp.bat | cat
17476
17477    # apply the diff (less some non-vs10 vars named by "!")
17478    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17479    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17480    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17481
17482    # cleanup
17483    $RM localdevenvtmp*
17484    #----
17485    cd $CURDIR
17486    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17488$as_echo "no" >&6; }
17489      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17490$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17491      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17492$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17493      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17494$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17495      as_fn_error $? "Cannot continue" "$LINENO" 5
17496    fi
17497
17498    # Now set all paths and other env variables. This will allow the rest of
17499    # the configure script to find and run the compiler in the proper way.
17500    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17501$as_echo "$as_me: Setting extracted environment variables" >&6;}
17502    . $OUTPUT_ROOT/localdevenv.sh
17503  else
17504    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17505    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17506$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17507  fi
17508
17509  # At this point, we should have corrent variables in the environment, or we can't continue.
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17511$as_echo_n "checking for Visual Studio variables... " >&6; }
17512
17513  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17514    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17516$as_echo "present but broken" >&6; }
17517      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17518    else
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17520$as_echo "ok" >&6; }
17521      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17522      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17523      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17524      # Remove any paths containing # (typically F#) as that messes up make
17525      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17526      VS_PATH="$PATH"
17527
17528
17529
17530    fi
17531  else
17532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17533$as_echo "not found" >&6; }
17534
17535    if test "x$VS_ENV_CMD" = x; then
17536      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17537$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17538      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17539$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17540    else
17541      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17542$as_echo "$as_me: Running the extraction script failed." >&6;}
17543    fi
17544    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17545$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17546    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17547$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17548    as_fn_error $? "Cannot continue" "$LINENO" 5
17549  fi
17550
17551
17552
17553# Check whether --with-msvcr-dll was given.
17554if test "${with_msvcr_dll+set}" = set; then :
17555  withval=$with_msvcr_dll;
17556fi
17557
17558
17559  if test "x$with_msvcr_dll" != x; then
17560    # If given explicitely by user, do not probe. If not present, fail directly.
17561
17562  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17563  METHOD="--with-msvcr-dll"
17564  if test -e "$POSSIBLE_MSVCR_DLL"; then
17565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17566$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17567
17568    # Need to check if the found msvcr is correct architecture
17569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17570$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17571    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17572    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17573      CORRECT_MSVCR_ARCH=386
17574    else
17575      CORRECT_MSVCR_ARCH=x86-64
17576    fi
17577    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17579$as_echo "ok" >&6; }
17580      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17582$as_echo_n "checking for msvcr100.dll... " >&6; }
17583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17584$as_echo "$MSVCR_DLL" >&6; }
17585    else
17586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17587$as_echo "incorrect, ignoring" >&6; }
17588      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17589$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17590    fi
17591  fi
17592
17593    if test "x$MSVCR_DLL" = x; then
17594      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17595    fi
17596  fi
17597
17598  if test "x$MSVCR_DLL" = x; then
17599    # Probe: Using well-known location from Visual Studio 10.0
17600    if test "x$VCINSTALLDIR" != x; then
17601      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17602
17603  windows_path="$CYGWIN_VC_INSTALL_DIR"
17604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17605    unix_path=`$CYGPATH -u "$windows_path"`
17606    CYGWIN_VC_INSTALL_DIR="$unix_path"
17607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17609    CYGWIN_VC_INSTALL_DIR="$unix_path"
17610  fi
17611
17612      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17613        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17614      else
17615        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17616      fi
17617
17618  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17619  METHOD="well-known location in VCINSTALLDIR"
17620  if test -e "$POSSIBLE_MSVCR_DLL"; then
17621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17622$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17623
17624    # Need to check if the found msvcr is correct architecture
17625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17626$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17627    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17628    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17629      CORRECT_MSVCR_ARCH=386
17630    else
17631      CORRECT_MSVCR_ARCH=x86-64
17632    fi
17633    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17635$as_echo "ok" >&6; }
17636      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17638$as_echo_n "checking for msvcr100.dll... " >&6; }
17639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17640$as_echo "$MSVCR_DLL" >&6; }
17641    else
17642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17643$as_echo "incorrect, ignoring" >&6; }
17644      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17645$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17646    fi
17647  fi
17648
17649    fi
17650  fi
17651
17652  if test "x$MSVCR_DLL" = x; then
17653    # Probe: Check in the Boot JDK directory.
17654    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17655
17656  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17657  METHOD="well-known location in Boot JDK"
17658  if test -e "$POSSIBLE_MSVCR_DLL"; then
17659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17660$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17661
17662    # Need to check if the found msvcr is correct architecture
17663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17664$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17665    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17666    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17667      CORRECT_MSVCR_ARCH=386
17668    else
17669      CORRECT_MSVCR_ARCH=x86-64
17670    fi
17671    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17673$as_echo "ok" >&6; }
17674      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17676$as_echo_n "checking for msvcr100.dll... " >&6; }
17677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17678$as_echo "$MSVCR_DLL" >&6; }
17679    else
17680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17681$as_echo "incorrect, ignoring" >&6; }
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17683$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17684    fi
17685  fi
17686
17687  fi
17688
17689  if test "x$MSVCR_DLL" = x; then
17690    # Probe: Look in the Windows system32 directory
17691    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17692
17693  windows_path="$CYGWIN_SYSTEMROOT"
17694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17695    unix_path=`$CYGPATH -u "$windows_path"`
17696    CYGWIN_SYSTEMROOT="$unix_path"
17697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17699    CYGWIN_SYSTEMROOT="$unix_path"
17700  fi
17701
17702    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17703
17704  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17705  METHOD="well-known location in SYSTEMROOT"
17706  if test -e "$POSSIBLE_MSVCR_DLL"; then
17707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17708$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17709
17710    # Need to check if the found msvcr is correct architecture
17711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17712$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17713    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17714    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17715      CORRECT_MSVCR_ARCH=386
17716    else
17717      CORRECT_MSVCR_ARCH=x86-64
17718    fi
17719    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17720      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17721$as_echo "ok" >&6; }
17722      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17724$as_echo_n "checking for msvcr100.dll... " >&6; }
17725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17726$as_echo "$MSVCR_DLL" >&6; }
17727    else
17728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17729$as_echo "incorrect, ignoring" >&6; }
17730      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17731$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17732    fi
17733  fi
17734
17735  fi
17736
17737  if test "x$MSVCR_DLL" = x; then
17738    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17739    if test "x$VS100COMNTOOLS" != x; then
17740      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17741
17742  windows_path="$CYGWIN_VS_TOOLS_DIR"
17743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17744    unix_path=`$CYGPATH -u "$windows_path"`
17745    CYGWIN_VS_TOOLS_DIR="$unix_path"
17746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17748    CYGWIN_VS_TOOLS_DIR="$unix_path"
17749  fi
17750
17751      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17752        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17753      else
17754        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17755      fi
17756
17757  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17758  METHOD="search of VS100COMNTOOLS"
17759  if test -e "$POSSIBLE_MSVCR_DLL"; then
17760    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17761$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17762
17763    # Need to check if the found msvcr is correct architecture
17764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17765$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17766    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17767    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17768      CORRECT_MSVCR_ARCH=386
17769    else
17770      CORRECT_MSVCR_ARCH=x86-64
17771    fi
17772    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17774$as_echo "ok" >&6; }
17775      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17777$as_echo_n "checking for msvcr100.dll... " >&6; }
17778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17779$as_echo "$MSVCR_DLL" >&6; }
17780    else
17781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17782$as_echo "incorrect, ignoring" >&6; }
17783      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17784$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17785    fi
17786  fi
17787
17788    fi
17789  fi
17790
17791  if test "x$MSVCR_DLL" = x; then
17792    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17793    # (This was the original behaviour; kept since it might turn up something)
17794    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17795      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17796        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17797      else
17798        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17799        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17800          # We're grasping at straws now...
17801          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17802        fi
17803      fi
17804
17805
17806  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17807  METHOD="search of VCINSTALLDIR"
17808  if test -e "$POSSIBLE_MSVCR_DLL"; then
17809    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17810$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17811
17812    # Need to check if the found msvcr is correct architecture
17813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17814$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17815    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17816    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17817      CORRECT_MSVCR_ARCH=386
17818    else
17819      CORRECT_MSVCR_ARCH=x86-64
17820    fi
17821    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17823$as_echo "ok" >&6; }
17824      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17825      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17826$as_echo_n "checking for msvcr100.dll... " >&6; }
17827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17828$as_echo "$MSVCR_DLL" >&6; }
17829    else
17830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17831$as_echo "incorrect, ignoring" >&6; }
17832      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17833$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17834    fi
17835  fi
17836
17837    fi
17838  fi
17839
17840  if test "x$MSVCR_DLL" = x; then
17841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17842$as_echo_n "checking for msvcr100.dll... " >&6; }
17843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17844$as_echo "no" >&6; }
17845    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17846  fi
17847
17848
17849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17850
17851  # Input might be given as Windows format, start by converting to
17852  # unix format.
17853  path="$MSVCR_DLL"
17854  new_path=`$CYGPATH -u "$path"`
17855
17856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17859  # "foo.exe" is OK but "foo" is an error.
17860  #
17861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17862  # It is also a way to make sure we got the proper file name for the real test later on.
17863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17864  if test "x$test_shortpath" = x; then
17865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17866$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17867    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17868  fi
17869
17870  # Call helper function which possibly converts this using DOS-style short mode.
17871  # If so, the updated path is stored in $new_path.
17872
17873  input_path="$new_path"
17874  # Check if we need to convert this using DOS-style short mode. If the path
17875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17876  # take no chances and rewrite it.
17877  # Note: m4 eats our [], so we need to use [ and ] instead.
17878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17879  if test "x$has_forbidden_chars" != x; then
17880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17884      # Going to short mode and back again did indeed matter. Since short mode is
17885      # case insensitive, let's make it lowercase to improve readability.
17886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17887      # Now convert it back to Unix-stile (cygpath)
17888      input_path=`$CYGPATH -u "$shortmode_path"`
17889      new_path="$input_path"
17890    fi
17891  fi
17892
17893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17894  if test "x$test_cygdrive_prefix" = x; then
17895    # As a simple fix, exclude /usr/bin since it's not a real path.
17896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17898      # a path prefixed by /cygdrive for fixpath to work.
17899      new_path="$CYGWIN_ROOT_PATH$input_path"
17900    fi
17901  fi
17902
17903
17904  if test "x$path" != "x$new_path"; then
17905    MSVCR_DLL="$new_path"
17906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17907$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17908  fi
17909
17910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17911
17912  path="$MSVCR_DLL"
17913  has_colon=`$ECHO $path | $GREP ^.:`
17914  new_path="$path"
17915  if test "x$has_colon" = x; then
17916    # Not in mixed or Windows style, start by that.
17917    new_path=`cmd //c echo $path`
17918  fi
17919
17920
17921  input_path="$new_path"
17922  # Check if we need to convert this using DOS-style short mode. If the path
17923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17924  # take no chances and rewrite it.
17925  # Note: m4 eats our [], so we need to use [ and ] instead.
17926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17927  if test "x$has_forbidden_chars" != x; then
17928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17930  fi
17931
17932
17933  windows_path="$new_path"
17934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17935    unix_path=`$CYGPATH -u "$windows_path"`
17936    new_path="$unix_path"
17937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17939    new_path="$unix_path"
17940  fi
17941
17942  if test "x$path" != "x$new_path"; then
17943    MSVCR_DLL="$new_path"
17944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17945$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17946  fi
17947
17948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17950
17951  else
17952    # We're on a posix platform. Hooray! :)
17953    path="$MSVCR_DLL"
17954    has_space=`$ECHO "$path" | $GREP " "`
17955    if test "x$has_space" != x; then
17956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17957$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17958      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17959    fi
17960
17961    # Use eval to expand a potential ~
17962    eval path="$path"
17963    if test ! -f "$path" && test ! -d "$path"; then
17964      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17965    fi
17966
17967    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17968  fi
17969
17970
17971
17972
17973# Check whether --with-dxsdk was given.
17974if test "${with_dxsdk+set}" = set; then :
17975  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17976$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17977fi
17978
17979
17980
17981
17982# Check whether --with-dxsdk-lib was given.
17983if test "${with_dxsdk_lib+set}" = set; then :
17984  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17985$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17986fi
17987
17988
17989
17990
17991# Check whether --with-dxsdk-include was given.
17992if test "${with_dxsdk_include+set}" = set; then :
17993  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17994$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17995fi
17996
17997
17998  fi
17999
18000
18001
18002  # If --build AND --host is set, then the configure script will find any
18003  # cross compilation tools in the PATH. Cross compilation tools
18004  # follows the cross compilation standard where they are prefixed with ${host}.
18005  # For example the binary i686-sun-solaris2.10-gcc
18006  # will cross compile for i686-sun-solaris2.10
18007  # If neither of build and host is not set, then build=host and the
18008  # default compiler found in the path will be used.
18009  # Setting only --host, does not seem to be really supported.
18010  # Please set both --build and --host if you want to cross compile.
18011
18012  if test "x$COMPILE_TYPE" = "xcross"; then
18013    # Now we to find a C/C++ compiler that can build executables for the build
18014    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18015    # once. Also, we need to do this before adding a tools dir to the path,
18016    # otherwise we might pick up cross-compilers which don't use standard naming.
18017    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18018    # to wait until they are properly discovered.
18019    for ac_prog in cl cc gcc
18020do
18021  # Extract the first word of "$ac_prog", so it can be a program name with args.
18022set dummy $ac_prog; ac_word=$2
18023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18024$as_echo_n "checking for $ac_word... " >&6; }
18025if ${ac_cv_path_BUILD_CC+:} false; then :
18026  $as_echo_n "(cached) " >&6
18027else
18028  case $BUILD_CC in
18029  [\\/]* | ?:[\\/]*)
18030  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18031  ;;
18032  *)
18033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18034for as_dir in $PATH
18035do
18036  IFS=$as_save_IFS
18037  test -z "$as_dir" && as_dir=.
18038    for ac_exec_ext in '' $ac_executable_extensions; do
18039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18040    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18042    break 2
18043  fi
18044done
18045  done
18046IFS=$as_save_IFS
18047
18048  ;;
18049esac
18050fi
18051BUILD_CC=$ac_cv_path_BUILD_CC
18052if test -n "$BUILD_CC"; then
18053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18054$as_echo "$BUILD_CC" >&6; }
18055else
18056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18057$as_echo "no" >&6; }
18058fi
18059
18060
18061  test -n "$BUILD_CC" && break
18062done
18063
18064
18065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18066
18067  # First separate the path from the arguments. This will split at the first
18068  # space.
18069  complete="$BUILD_CC"
18070  path="${complete%% *}"
18071  tmp="$complete EOL"
18072  arguments="${tmp#* }"
18073
18074  # Input might be given as Windows format, start by converting to
18075  # unix format.
18076  new_path=`$CYGPATH -u "$path"`
18077
18078  # Now try to locate executable using which
18079  new_path=`$WHICH "$new_path" 2> /dev/null`
18080  # bat and cmd files are not always considered executable in cygwin causing which
18081  # to not find them
18082  if test "x$new_path" = x \
18083      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18084      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18085    new_path=`$CYGPATH -u "$path"`
18086  fi
18087  if test "x$new_path" = x; then
18088    # Oops. Which didn't find the executable.
18089    # The splitting of arguments from the executable at a space might have been incorrect,
18090    # since paths with space are more likely in Windows. Give it another try with the whole
18091    # argument.
18092    path="$complete"
18093    arguments="EOL"
18094    new_path=`$CYGPATH -u "$path"`
18095    new_path=`$WHICH "$new_path" 2> /dev/null`
18096    # bat and cmd files are not always considered executable in cygwin causing which
18097    # to not find them
18098    if test "x$new_path" = x \
18099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18101      new_path=`$CYGPATH -u "$path"`
18102    fi
18103    if test "x$new_path" = x; then
18104      # It's still not found. Now this is an unrecoverable error.
18105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18106$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18107      has_space=`$ECHO "$complete" | $GREP " "`
18108      if test "x$has_space" != x; then
18109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18111      fi
18112      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18113    fi
18114  fi
18115
18116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18119  # "foo.exe" is OK but "foo" is an error.
18120  #
18121  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18122  # It is also a way to make sure we got the proper file name for the real test later on.
18123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18124  if test "x$test_shortpath" = x; then
18125    # Short path failed, file does not exist as specified.
18126    # Try adding .exe or .cmd
18127    if test -f "${new_path}.exe"; then
18128      input_to_shortpath="${new_path}.exe"
18129    elif test -f "${new_path}.cmd"; then
18130      input_to_shortpath="${new_path}.cmd"
18131    else
18132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18133$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18134      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18135$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18136      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18137    fi
18138  else
18139    input_to_shortpath="$new_path"
18140  fi
18141
18142  # Call helper function which possibly converts this using DOS-style short mode.
18143  # If so, the updated path is stored in $new_path.
18144  new_path="$input_to_shortpath"
18145
18146  input_path="$input_to_shortpath"
18147  # Check if we need to convert this using DOS-style short mode. If the path
18148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18149  # take no chances and rewrite it.
18150  # Note: m4 eats our [], so we need to use [ and ] instead.
18151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18152  if test "x$has_forbidden_chars" != x; then
18153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18157      # Going to short mode and back again did indeed matter. Since short mode is
18158      # case insensitive, let's make it lowercase to improve readability.
18159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18160      # Now convert it back to Unix-stile (cygpath)
18161      input_path=`$CYGPATH -u "$shortmode_path"`
18162      new_path="$input_path"
18163    fi
18164  fi
18165
18166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18167  if test "x$test_cygdrive_prefix" = x; then
18168    # As a simple fix, exclude /usr/bin since it's not a real path.
18169    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18171      # a path prefixed by /cygdrive for fixpath to work.
18172      new_path="$CYGWIN_ROOT_PATH$input_path"
18173    fi
18174  fi
18175
18176  # remove trailing .exe if any
18177  new_path="${new_path/%.exe/}"
18178
18179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18180
18181  # First separate the path from the arguments. This will split at the first
18182  # space.
18183  complete="$BUILD_CC"
18184  path="${complete%% *}"
18185  tmp="$complete EOL"
18186  arguments="${tmp#* }"
18187
18188  # Input might be given as Windows format, start by converting to
18189  # unix format.
18190  new_path="$path"
18191
18192  windows_path="$new_path"
18193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18194    unix_path=`$CYGPATH -u "$windows_path"`
18195    new_path="$unix_path"
18196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18198    new_path="$unix_path"
18199  fi
18200
18201
18202  # Now try to locate executable using which
18203  new_path=`$WHICH "$new_path" 2> /dev/null`
18204
18205  if test "x$new_path" = x; then
18206    # Oops. Which didn't find the executable.
18207    # The splitting of arguments from the executable at a space might have been incorrect,
18208    # since paths with space are more likely in Windows. Give it another try with the whole
18209    # argument.
18210    path="$complete"
18211    arguments="EOL"
18212    new_path="$path"
18213
18214  windows_path="$new_path"
18215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18216    unix_path=`$CYGPATH -u "$windows_path"`
18217    new_path="$unix_path"
18218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18220    new_path="$unix_path"
18221  fi
18222
18223
18224    new_path=`$WHICH "$new_path" 2> /dev/null`
18225
18226    if test "x$new_path" = x; then
18227      # It's still not found. Now this is an unrecoverable error.
18228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18229$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18230      has_space=`$ECHO "$complete" | $GREP " "`
18231      if test "x$has_space" != x; then
18232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18234      fi
18235      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18236    fi
18237  fi
18238
18239  # Now new_path has a complete unix path to the binary
18240  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18241    # Keep paths in /bin as-is, but remove trailing .exe if any
18242    new_path="${new_path/%.exe/}"
18243    # Do not save /bin paths to all_fixpath_prefixes!
18244  else
18245    # Not in mixed or Windows style, start by that.
18246    new_path=`cmd //c echo $new_path`
18247
18248  input_path="$new_path"
18249  # Check if we need to convert this using DOS-style short mode. If the path
18250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18251  # take no chances and rewrite it.
18252  # Note: m4 eats our [], so we need to use [ and ] instead.
18253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18254  if test "x$has_forbidden_chars" != x; then
18255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18257  fi
18258
18259    # Output is in $new_path
18260
18261  windows_path="$new_path"
18262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18263    unix_path=`$CYGPATH -u "$windows_path"`
18264    new_path="$unix_path"
18265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18267    new_path="$unix_path"
18268  fi
18269
18270    # remove trailing .exe if any
18271    new_path="${new_path/%.exe/}"
18272
18273    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18274    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18275  fi
18276
18277  else
18278    # We're on a posix platform. Hooray! :)
18279    # First separate the path from the arguments. This will split at the first
18280    # space.
18281    complete="$BUILD_CC"
18282    path="${complete%% *}"
18283    tmp="$complete EOL"
18284    arguments="${tmp#* }"
18285
18286    # Cannot rely on the command "which" here since it doesn't always work.
18287    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18288    if test -z "$is_absolute_path"; then
18289      # Path to executable is not absolute. Find it.
18290      IFS_save="$IFS"
18291      IFS=:
18292      for p in $PATH; do
18293        if test -f "$p/$path" && test -x "$p/$path"; then
18294          new_path="$p/$path"
18295          break
18296        fi
18297      done
18298      IFS="$IFS_save"
18299    else
18300      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18301$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18302      new_path="$path"
18303    fi
18304
18305    if test "x$new_path" = x; then
18306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18307$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18308      has_space=`$ECHO "$complete" | $GREP " "`
18309      if test "x$has_space" != x; then
18310        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18311$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18312      fi
18313      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18314    fi
18315  fi
18316
18317  # Now join together the path and the arguments once again
18318  if test "x$arguments" != xEOL; then
18319    new_complete="$new_path ${arguments% *}"
18320  else
18321    new_complete="$new_path"
18322  fi
18323
18324  if test "x$complete" != "x$new_complete"; then
18325    BUILD_CC="$new_complete"
18326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18327$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18328  fi
18329
18330    for ac_prog in cl CC g++
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_BUILD_CXX+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $BUILD_CXX in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362BUILD_CXX=$ac_cv_path_BUILD_CXX
18363if test -n "$BUILD_CXX"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18365$as_echo "$BUILD_CXX" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$BUILD_CXX" && break
18373done
18374
18375
18376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18377
18378  # First separate the path from the arguments. This will split at the first
18379  # space.
18380  complete="$BUILD_CXX"
18381  path="${complete%% *}"
18382  tmp="$complete EOL"
18383  arguments="${tmp#* }"
18384
18385  # Input might be given as Windows format, start by converting to
18386  # unix format.
18387  new_path=`$CYGPATH -u "$path"`
18388
18389  # Now try to locate executable using which
18390  new_path=`$WHICH "$new_path" 2> /dev/null`
18391  # bat and cmd files are not always considered executable in cygwin causing which
18392  # to not find them
18393  if test "x$new_path" = x \
18394      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18395      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18396    new_path=`$CYGPATH -u "$path"`
18397  fi
18398  if test "x$new_path" = x; then
18399    # Oops. Which didn't find the executable.
18400    # The splitting of arguments from the executable at a space might have been incorrect,
18401    # since paths with space are more likely in Windows. Give it another try with the whole
18402    # argument.
18403    path="$complete"
18404    arguments="EOL"
18405    new_path=`$CYGPATH -u "$path"`
18406    new_path=`$WHICH "$new_path" 2> /dev/null`
18407    # bat and cmd files are not always considered executable in cygwin causing which
18408    # to not find them
18409    if test "x$new_path" = x \
18410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18412      new_path=`$CYGPATH -u "$path"`
18413    fi
18414    if test "x$new_path" = x; then
18415      # It's still not found. Now this is an unrecoverable error.
18416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18417$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18418      has_space=`$ECHO "$complete" | $GREP " "`
18419      if test "x$has_space" != x; then
18420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18422      fi
18423      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18424    fi
18425  fi
18426
18427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18430  # "foo.exe" is OK but "foo" is an error.
18431  #
18432  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18433  # It is also a way to make sure we got the proper file name for the real test later on.
18434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18435  if test "x$test_shortpath" = x; then
18436    # Short path failed, file does not exist as specified.
18437    # Try adding .exe or .cmd
18438    if test -f "${new_path}.exe"; then
18439      input_to_shortpath="${new_path}.exe"
18440    elif test -f "${new_path}.cmd"; then
18441      input_to_shortpath="${new_path}.cmd"
18442    else
18443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18444$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18445      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18446$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18447      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18448    fi
18449  else
18450    input_to_shortpath="$new_path"
18451  fi
18452
18453  # Call helper function which possibly converts this using DOS-style short mode.
18454  # If so, the updated path is stored in $new_path.
18455  new_path="$input_to_shortpath"
18456
18457  input_path="$input_to_shortpath"
18458  # Check if we need to convert this using DOS-style short mode. If the path
18459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18460  # take no chances and rewrite it.
18461  # Note: m4 eats our [], so we need to use [ and ] instead.
18462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18463  if test "x$has_forbidden_chars" != x; then
18464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18468      # Going to short mode and back again did indeed matter. Since short mode is
18469      # case insensitive, let's make it lowercase to improve readability.
18470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18471      # Now convert it back to Unix-stile (cygpath)
18472      input_path=`$CYGPATH -u "$shortmode_path"`
18473      new_path="$input_path"
18474    fi
18475  fi
18476
18477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18478  if test "x$test_cygdrive_prefix" = x; then
18479    # As a simple fix, exclude /usr/bin since it's not a real path.
18480    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18482      # a path prefixed by /cygdrive for fixpath to work.
18483      new_path="$CYGWIN_ROOT_PATH$input_path"
18484    fi
18485  fi
18486
18487  # remove trailing .exe if any
18488  new_path="${new_path/%.exe/}"
18489
18490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18491
18492  # First separate the path from the arguments. This will split at the first
18493  # space.
18494  complete="$BUILD_CXX"
18495  path="${complete%% *}"
18496  tmp="$complete EOL"
18497  arguments="${tmp#* }"
18498
18499  # Input might be given as Windows format, start by converting to
18500  # unix format.
18501  new_path="$path"
18502
18503  windows_path="$new_path"
18504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18505    unix_path=`$CYGPATH -u "$windows_path"`
18506    new_path="$unix_path"
18507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18509    new_path="$unix_path"
18510  fi
18511
18512
18513  # Now try to locate executable using which
18514  new_path=`$WHICH "$new_path" 2> /dev/null`
18515
18516  if test "x$new_path" = x; then
18517    # Oops. Which didn't find the executable.
18518    # The splitting of arguments from the executable at a space might have been incorrect,
18519    # since paths with space are more likely in Windows. Give it another try with the whole
18520    # argument.
18521    path="$complete"
18522    arguments="EOL"
18523    new_path="$path"
18524
18525  windows_path="$new_path"
18526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18527    unix_path=`$CYGPATH -u "$windows_path"`
18528    new_path="$unix_path"
18529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18531    new_path="$unix_path"
18532  fi
18533
18534
18535    new_path=`$WHICH "$new_path" 2> /dev/null`
18536
18537    if test "x$new_path" = x; then
18538      # It's still not found. Now this is an unrecoverable error.
18539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18540$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18541      has_space=`$ECHO "$complete" | $GREP " "`
18542      if test "x$has_space" != x; then
18543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18545      fi
18546      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18547    fi
18548  fi
18549
18550  # Now new_path has a complete unix path to the binary
18551  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18552    # Keep paths in /bin as-is, but remove trailing .exe if any
18553    new_path="${new_path/%.exe/}"
18554    # Do not save /bin paths to all_fixpath_prefixes!
18555  else
18556    # Not in mixed or Windows style, start by that.
18557    new_path=`cmd //c echo $new_path`
18558
18559  input_path="$new_path"
18560  # Check if we need to convert this using DOS-style short mode. If the path
18561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18562  # take no chances and rewrite it.
18563  # Note: m4 eats our [], so we need to use [ and ] instead.
18564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18565  if test "x$has_forbidden_chars" != x; then
18566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18568  fi
18569
18570    # Output is in $new_path
18571
18572  windows_path="$new_path"
18573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18574    unix_path=`$CYGPATH -u "$windows_path"`
18575    new_path="$unix_path"
18576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18578    new_path="$unix_path"
18579  fi
18580
18581    # remove trailing .exe if any
18582    new_path="${new_path/%.exe/}"
18583
18584    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18585    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18586  fi
18587
18588  else
18589    # We're on a posix platform. Hooray! :)
18590    # First separate the path from the arguments. This will split at the first
18591    # space.
18592    complete="$BUILD_CXX"
18593    path="${complete%% *}"
18594    tmp="$complete EOL"
18595    arguments="${tmp#* }"
18596
18597    # Cannot rely on the command "which" here since it doesn't always work.
18598    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18599    if test -z "$is_absolute_path"; then
18600      # Path to executable is not absolute. Find it.
18601      IFS_save="$IFS"
18602      IFS=:
18603      for p in $PATH; do
18604        if test -f "$p/$path" && test -x "$p/$path"; then
18605          new_path="$p/$path"
18606          break
18607        fi
18608      done
18609      IFS="$IFS_save"
18610    else
18611      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18612$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18613      new_path="$path"
18614    fi
18615
18616    if test "x$new_path" = x; then
18617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18618$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18619      has_space=`$ECHO "$complete" | $GREP " "`
18620      if test "x$has_space" != x; then
18621        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18622$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18623      fi
18624      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18625    fi
18626  fi
18627
18628  # Now join together the path and the arguments once again
18629  if test "x$arguments" != xEOL; then
18630    new_complete="$new_path ${arguments% *}"
18631  else
18632    new_complete="$new_path"
18633  fi
18634
18635  if test "x$complete" != "x$new_complete"; then
18636    BUILD_CXX="$new_complete"
18637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18638$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18639  fi
18640
18641    # Extract the first word of "ld", so it can be a program name with args.
18642set dummy ld; ac_word=$2
18643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644$as_echo_n "checking for $ac_word... " >&6; }
18645if ${ac_cv_path_BUILD_LD+:} false; then :
18646  $as_echo_n "(cached) " >&6
18647else
18648  case $BUILD_LD in
18649  [\\/]* | ?:[\\/]*)
18650  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18651  ;;
18652  *)
18653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668  ;;
18669esac
18670fi
18671BUILD_LD=$ac_cv_path_BUILD_LD
18672if test -n "$BUILD_LD"; then
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18674$as_echo "$BUILD_LD" >&6; }
18675else
18676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677$as_echo "no" >&6; }
18678fi
18679
18680
18681
18682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18683
18684  # First separate the path from the arguments. This will split at the first
18685  # space.
18686  complete="$BUILD_LD"
18687  path="${complete%% *}"
18688  tmp="$complete EOL"
18689  arguments="${tmp#* }"
18690
18691  # Input might be given as Windows format, start by converting to
18692  # unix format.
18693  new_path=`$CYGPATH -u "$path"`
18694
18695  # Now try to locate executable using which
18696  new_path=`$WHICH "$new_path" 2> /dev/null`
18697  # bat and cmd files are not always considered executable in cygwin causing which
18698  # to not find them
18699  if test "x$new_path" = x \
18700      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18701      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18702    new_path=`$CYGPATH -u "$path"`
18703  fi
18704  if test "x$new_path" = x; then
18705    # Oops. Which didn't find the executable.
18706    # The splitting of arguments from the executable at a space might have been incorrect,
18707    # since paths with space are more likely in Windows. Give it another try with the whole
18708    # argument.
18709    path="$complete"
18710    arguments="EOL"
18711    new_path=`$CYGPATH -u "$path"`
18712    new_path=`$WHICH "$new_path" 2> /dev/null`
18713    # bat and cmd files are not always considered executable in cygwin causing which
18714    # to not find them
18715    if test "x$new_path" = x \
18716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18718      new_path=`$CYGPATH -u "$path"`
18719    fi
18720    if test "x$new_path" = x; then
18721      # It's still not found. Now this is an unrecoverable error.
18722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18723$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18724      has_space=`$ECHO "$complete" | $GREP " "`
18725      if test "x$has_space" != x; then
18726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18728      fi
18729      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18730    fi
18731  fi
18732
18733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18736  # "foo.exe" is OK but "foo" is an error.
18737  #
18738  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18739  # It is also a way to make sure we got the proper file name for the real test later on.
18740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18741  if test "x$test_shortpath" = x; then
18742    # Short path failed, file does not exist as specified.
18743    # Try adding .exe or .cmd
18744    if test -f "${new_path}.exe"; then
18745      input_to_shortpath="${new_path}.exe"
18746    elif test -f "${new_path}.cmd"; then
18747      input_to_shortpath="${new_path}.cmd"
18748    else
18749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18750$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18753      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18754    fi
18755  else
18756    input_to_shortpath="$new_path"
18757  fi
18758
18759  # Call helper function which possibly converts this using DOS-style short mode.
18760  # If so, the updated path is stored in $new_path.
18761  new_path="$input_to_shortpath"
18762
18763  input_path="$input_to_shortpath"
18764  # Check if we need to convert this using DOS-style short mode. If the path
18765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18766  # take no chances and rewrite it.
18767  # Note: m4 eats our [], so we need to use [ and ] instead.
18768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18769  if test "x$has_forbidden_chars" != x; then
18770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18774      # Going to short mode and back again did indeed matter. Since short mode is
18775      # case insensitive, let's make it lowercase to improve readability.
18776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18777      # Now convert it back to Unix-stile (cygpath)
18778      input_path=`$CYGPATH -u "$shortmode_path"`
18779      new_path="$input_path"
18780    fi
18781  fi
18782
18783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18784  if test "x$test_cygdrive_prefix" = x; then
18785    # As a simple fix, exclude /usr/bin since it's not a real path.
18786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18788      # a path prefixed by /cygdrive for fixpath to work.
18789      new_path="$CYGWIN_ROOT_PATH$input_path"
18790    fi
18791  fi
18792
18793  # remove trailing .exe if any
18794  new_path="${new_path/%.exe/}"
18795
18796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18797
18798  # First separate the path from the arguments. This will split at the first
18799  # space.
18800  complete="$BUILD_LD"
18801  path="${complete%% *}"
18802  tmp="$complete EOL"
18803  arguments="${tmp#* }"
18804
18805  # Input might be given as Windows format, start by converting to
18806  # unix format.
18807  new_path="$path"
18808
18809  windows_path="$new_path"
18810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18811    unix_path=`$CYGPATH -u "$windows_path"`
18812    new_path="$unix_path"
18813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18815    new_path="$unix_path"
18816  fi
18817
18818
18819  # Now try to locate executable using which
18820  new_path=`$WHICH "$new_path" 2> /dev/null`
18821
18822  if test "x$new_path" = x; then
18823    # Oops. Which didn't find the executable.
18824    # The splitting of arguments from the executable at a space might have been incorrect,
18825    # since paths with space are more likely in Windows. Give it another try with the whole
18826    # argument.
18827    path="$complete"
18828    arguments="EOL"
18829    new_path="$path"
18830
18831  windows_path="$new_path"
18832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18833    unix_path=`$CYGPATH -u "$windows_path"`
18834    new_path="$unix_path"
18835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18837    new_path="$unix_path"
18838  fi
18839
18840
18841    new_path=`$WHICH "$new_path" 2> /dev/null`
18842
18843    if test "x$new_path" = x; then
18844      # It's still not found. Now this is an unrecoverable error.
18845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18846$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18847      has_space=`$ECHO "$complete" | $GREP " "`
18848      if test "x$has_space" != x; then
18849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18851      fi
18852      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18853    fi
18854  fi
18855
18856  # Now new_path has a complete unix path to the binary
18857  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18858    # Keep paths in /bin as-is, but remove trailing .exe if any
18859    new_path="${new_path/%.exe/}"
18860    # Do not save /bin paths to all_fixpath_prefixes!
18861  else
18862    # Not in mixed or Windows style, start by that.
18863    new_path=`cmd //c echo $new_path`
18864
18865  input_path="$new_path"
18866  # Check if we need to convert this using DOS-style short mode. If the path
18867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18868  # take no chances and rewrite it.
18869  # Note: m4 eats our [], so we need to use [ and ] instead.
18870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18871  if test "x$has_forbidden_chars" != x; then
18872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18874  fi
18875
18876    # Output is in $new_path
18877
18878  windows_path="$new_path"
18879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18880    unix_path=`$CYGPATH -u "$windows_path"`
18881    new_path="$unix_path"
18882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18884    new_path="$unix_path"
18885  fi
18886
18887    # remove trailing .exe if any
18888    new_path="${new_path/%.exe/}"
18889
18890    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18891    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18892  fi
18893
18894  else
18895    # We're on a posix platform. Hooray! :)
18896    # First separate the path from the arguments. This will split at the first
18897    # space.
18898    complete="$BUILD_LD"
18899    path="${complete%% *}"
18900    tmp="$complete EOL"
18901    arguments="${tmp#* }"
18902
18903    # Cannot rely on the command "which" here since it doesn't always work.
18904    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18905    if test -z "$is_absolute_path"; then
18906      # Path to executable is not absolute. Find it.
18907      IFS_save="$IFS"
18908      IFS=:
18909      for p in $PATH; do
18910        if test -f "$p/$path" && test -x "$p/$path"; then
18911          new_path="$p/$path"
18912          break
18913        fi
18914      done
18915      IFS="$IFS_save"
18916    else
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18918$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18919      new_path="$path"
18920    fi
18921
18922    if test "x$new_path" = x; then
18923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18924$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18925      has_space=`$ECHO "$complete" | $GREP " "`
18926      if test "x$has_space" != x; then
18927        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18929      fi
18930      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18931    fi
18932  fi
18933
18934  # Now join together the path and the arguments once again
18935  if test "x$arguments" != xEOL; then
18936    new_complete="$new_path ${arguments% *}"
18937  else
18938    new_complete="$new_path"
18939  fi
18940
18941  if test "x$complete" != "x$new_complete"; then
18942    BUILD_LD="$new_complete"
18943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18944$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18945  fi
18946
18947  fi
18948
18949
18950
18951
18952  # If a devkit is found on the builddeps server, then prepend its path to the
18953  # PATH variable. If there are cross compilers available in the devkit, these
18954  # will be found by AC_PROG_CC et al.
18955  DEVKIT=
18956
18957
18958  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18959    # Source the builddeps file again, to make sure it uses the latest variables!
18960    . $builddepsfile
18961    # Look for a target and build machine specific resource!
18962    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18963    if test "x$resource" = x; then
18964      # Ok, lets instead look for a target specific resource
18965      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18966    fi
18967    if test "x$resource" = x; then
18968      # Ok, lets instead look for a build specific resource
18969      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18970    fi
18971    if test "x$resource" = x; then
18972      # Ok, lets instead look for a generic resource
18973      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18974      resource=${builddep_devkit}
18975    fi
18976    if test "x$resource" != x; then
18977      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18978$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18979      # If the resource in the builddeps.conf file is an existing directory,
18980      # for example /java/linux/cups
18981      if test -d ${resource}; then
18982        depdir=${resource}
18983      else
18984
18985  # devkit is for example mymodule
18986  # $resource is for example libs/general/libmymod_1_2_3.zip
18987  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18988  # $with_builddeps_dir is for example /localhome/builddeps
18989  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18990  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18991  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18992  filename=`basename $resource`
18993  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18994  filebase=${filename%%.*}
18995  extension=${filename#*.}
18996  installdir=$with_builddeps_dir/$filebase
18997  if test ! -f $installdir/$filename.unpacked; then
18998    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18999$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19000    if test ! -d $installdir; then
19001      mkdir -p $installdir
19002    fi
19003    if test ! -d $installdir; then
19004      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19005    fi
19006    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19007    touch $tmpfile
19008    if test ! -f $tmpfile; then
19009      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19010    fi
19011
19012  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19013  # $tmpfile is the local file name for the downloaded file.
19014  VALID_TOOL=no
19015  if test "x$BDEPS_FTP" = xwget; then
19016    VALID_TOOL=yes
19017    wget -O $tmpfile $with_builddeps_server/$resource
19018  fi
19019  if test "x$BDEPS_FTP" = xlftp; then
19020    VALID_TOOL=yes
19021    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19022  fi
19023  if test "x$BDEPS_FTP" = xftp; then
19024    VALID_TOOL=yes
19025    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19026    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19027    FTPUSERPWD=${FTPSERVER%%@*}
19028    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19029      FTPUSER=${userpwd%%:*}
19030      FTPPWD=${userpwd#*@}
19031      FTPSERVER=${FTPSERVER#*@}
19032    else
19033      FTPUSER=ftp
19034      FTPPWD=ftp
19035    fi
19036    # the "pass" command does not work on some
19037    # ftp clients (read ftp.exe) but if it works,
19038    # passive mode is better!
19039    ( \
19040        echo "user $FTPUSER $FTPPWD"        ; \
19041        echo "pass"                         ; \
19042        echo "bin"                          ; \
19043        echo "get $FTPPATH $tmpfile"              ; \
19044    ) | ftp -in $FTPSERVER
19045  fi
19046  if test "x$VALID_TOOL" != xyes; then
19047    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19048  fi
19049
19050    mv $tmpfile $installdir/$filename
19051    if test ! -s $installdir/$filename; then
19052      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19053    fi
19054    case "$extension" in
19055      zip)  echo "Unzipping $installdir/$filename..."
19056        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19057        ;;
19058      tar.gz) echo "Untaring $installdir/$filename..."
19059        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19060        ;;
19061      tgz) echo "Untaring $installdir/$filename..."
19062        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19063        ;;
19064      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19065        ;;
19066    esac
19067  fi
19068  if test -f $installdir/$filename.unpacked; then
19069    depdir=$installdir
19070  fi
19071
19072      fi
19073      # Source the builddeps file again, because in the previous command, the depdir
19074      # was updated to point at the current build dependency install directory.
19075      . $builddepsfile
19076      # Now extract variables from the builddeps.conf files.
19077      theroot=${builddep_devkit_ROOT}
19078      thecflags=${builddep_devkit_CFLAGS}
19079      thelibs=${builddep_devkit_LIBS}
19080      if test "x$depdir" = x; then
19081        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19082      fi
19083      DEVKIT=$depdir
19084      if test "x$theroot" != x; then
19085        DEVKIT="$theroot"
19086      fi
19087      if test "x$thecflags" != x; then
19088        DEVKIT_CFLAGS="$thecflags"
19089      fi
19090      if test "x$thelibs" != x; then
19091        DEVKIT_LIBS="$thelibs"
19092      fi
19093
19094        # Found devkit
19095        PATH="$DEVKIT/bin:$PATH"
19096        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19097        if test "x$x_includes" = "xNONE"; then
19098          x_includes="$SYS_ROOT/usr/include/X11"
19099        fi
19100        if test "x$x_libraries" = "xNONE"; then
19101          x_libraries="$SYS_ROOT/usr/lib"
19102        fi
19103
19104
19105    fi
19106
19107  fi
19108
19109
19110  # Store the CFLAGS etal passed to the configure script.
19111  ORG_CFLAGS="$CFLAGS"
19112  ORG_CXXFLAGS="$CXXFLAGS"
19113  ORG_OBJCFLAGS="$OBJCFLAGS"
19114
19115  # autoconf magic only relies on PATH, so update it if tools dir is specified
19116  OLD_PATH="$PATH"
19117  if test "x$TOOLS_DIR" != x; then
19118    PATH=$TOOLS_DIR:$PATH
19119  fi
19120
19121
19122  ### Locate C compiler (CC)
19123
19124  # On windows, only cl.exe is supported.
19125  # On Solaris, cc is preferred to gcc.
19126  # Elsewhere, gcc is preferred to cc.
19127
19128  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19129    COMPILER_CHECK_LIST="cl"
19130  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19131    COMPILER_CHECK_LIST="cc gcc"
19132  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19133    # Do not probe for cc on AIX.
19134    COMPILER_CHECK_LIST="xlc_r"
19135  else
19136    COMPILER_CHECK_LIST="gcc cc"
19137  fi
19138
19139
19140  COMPILER_NAME=C
19141  SEARCH_LIST="$COMPILER_CHECK_LIST"
19142
19143  if test "x$CC" != x; then
19144    # User has supplied compiler name already, always let that override.
19145    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
19146$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
19147    if test "x`basename $CC`" = "x$CC"; then
19148      # A command without a complete path is provided, search $PATH.
19149
19150      for ac_prog in $CC
19151do
19152  # Extract the first word of "$ac_prog", so it can be a program name with args.
19153set dummy $ac_prog; ac_word=$2
19154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19155$as_echo_n "checking for $ac_word... " >&6; }
19156if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19157  $as_echo_n "(cached) " >&6
19158else
19159  case $POTENTIAL_CC in
19160  [\\/]* | ?:[\\/]*)
19161  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19162  ;;
19163  *)
19164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165for as_dir in $PATH
19166do
19167  IFS=$as_save_IFS
19168  test -z "$as_dir" && as_dir=.
19169    for ac_exec_ext in '' $ac_executable_extensions; do
19170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19171    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173    break 2
19174  fi
19175done
19176  done
19177IFS=$as_save_IFS
19178
19179  ;;
19180esac
19181fi
19182POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19183if test -n "$POTENTIAL_CC"; then
19184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19185$as_echo "$POTENTIAL_CC" >&6; }
19186else
19187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19188$as_echo "no" >&6; }
19189fi
19190
19191
19192  test -n "$POTENTIAL_CC" && break
19193done
19194
19195      if test "x$POTENTIAL_CC" != x; then
19196        CC=$POTENTIAL_CC
19197      else
19198        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
19199      fi
19200    else
19201      # Otherwise it might already be a complete path
19202      if test ! -x "$CC"; then
19203        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
19204      fi
19205    fi
19206  else
19207    # No user supplied value. Locate compiler ourselves
19208    CC=
19209    # If TOOLS_DIR is set, check for all compiler names in there first
19210    # before checking the rest of the PATH.
19211    if test -n "$TOOLS_DIR"; then
19212      PATH_save="$PATH"
19213      PATH="$TOOLS_DIR"
19214      for ac_prog in $SEARCH_LIST
19215do
19216  # Extract the first word of "$ac_prog", so it can be a program name with args.
19217set dummy $ac_prog; ac_word=$2
19218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19219$as_echo_n "checking for $ac_word... " >&6; }
19220if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19221  $as_echo_n "(cached) " >&6
19222else
19223  case $TOOLS_DIR_CC in
19224  [\\/]* | ?:[\\/]*)
19225  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19226  ;;
19227  *)
19228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19229for as_dir in $PATH
19230do
19231  IFS=$as_save_IFS
19232  test -z "$as_dir" && as_dir=.
19233    for ac_exec_ext in '' $ac_executable_extensions; do
19234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19235    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19237    break 2
19238  fi
19239done
19240  done
19241IFS=$as_save_IFS
19242
19243  ;;
19244esac
19245fi
19246TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19247if test -n "$TOOLS_DIR_CC"; then
19248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19249$as_echo "$TOOLS_DIR_CC" >&6; }
19250else
19251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19252$as_echo "no" >&6; }
19253fi
19254
19255
19256  test -n "$TOOLS_DIR_CC" && break
19257done
19258
19259      CC=$TOOLS_DIR_CC
19260      PATH="$PATH_save"
19261    fi
19262
19263    # AC_PATH_PROGS can't be run multiple times with the same variable,
19264    # so create a new name for this run.
19265    if test "x$CC" = x; then
19266      for ac_prog in $SEARCH_LIST
19267do
19268  # Extract the first word of "$ac_prog", so it can be a program name with args.
19269set dummy $ac_prog; ac_word=$2
19270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19271$as_echo_n "checking for $ac_word... " >&6; }
19272if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19273  $as_echo_n "(cached) " >&6
19274else
19275  case $POTENTIAL_CC in
19276  [\\/]* | ?:[\\/]*)
19277  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19278  ;;
19279  *)
19280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19281for as_dir in $PATH
19282do
19283  IFS=$as_save_IFS
19284  test -z "$as_dir" && as_dir=.
19285    for ac_exec_ext in '' $ac_executable_extensions; do
19286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19287    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19289    break 2
19290  fi
19291done
19292  done
19293IFS=$as_save_IFS
19294
19295  ;;
19296esac
19297fi
19298POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19299if test -n "$POTENTIAL_CC"; then
19300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19301$as_echo "$POTENTIAL_CC" >&6; }
19302else
19303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19304$as_echo "no" >&6; }
19305fi
19306
19307
19308  test -n "$POTENTIAL_CC" && break
19309done
19310
19311      CC=$POTENTIAL_CC
19312    fi
19313
19314    if test "x$CC" = x; then
19315
19316  # Print a helpful message on how to acquire the necessary build dependency.
19317  # devkit is the help tag: freetype, cups, pulse, alsa etc
19318  MISSING_DEPENDENCY=devkit
19319
19320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19321    cygwin_help $MISSING_DEPENDENCY
19322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19323    msys_help $MISSING_DEPENDENCY
19324  else
19325    PKGHANDLER_COMMAND=
19326
19327    case $PKGHANDLER in
19328      apt-get)
19329        apt_help     $MISSING_DEPENDENCY ;;
19330      yum)
19331        yum_help     $MISSING_DEPENDENCY ;;
19332      port)
19333        port_help    $MISSING_DEPENDENCY ;;
19334      pkgutil)
19335        pkgutil_help $MISSING_DEPENDENCY ;;
19336      pkgadd)
19337        pkgadd_help  $MISSING_DEPENDENCY ;;
19338    esac
19339
19340    if test "x$PKGHANDLER_COMMAND" != x; then
19341      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19342    fi
19343  fi
19344
19345      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19346    fi
19347  fi
19348
19349  # Now we have a compiler binary in CC. Make sure it's okay.
19350
19351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19352
19353  # First separate the path from the arguments. This will split at the first
19354  # space.
19355  complete="$CC"
19356  path="${complete%% *}"
19357  tmp="$complete EOL"
19358  arguments="${tmp#* }"
19359
19360  # Input might be given as Windows format, start by converting to
19361  # unix format.
19362  new_path=`$CYGPATH -u "$path"`
19363
19364  # Now try to locate executable using which
19365  new_path=`$WHICH "$new_path" 2> /dev/null`
19366  # bat and cmd files are not always considered executable in cygwin causing which
19367  # to not find them
19368  if test "x$new_path" = x \
19369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19371    new_path=`$CYGPATH -u "$path"`
19372  fi
19373  if test "x$new_path" = x; then
19374    # Oops. Which didn't find the executable.
19375    # The splitting of arguments from the executable at a space might have been incorrect,
19376    # since paths with space are more likely in Windows. Give it another try with the whole
19377    # argument.
19378    path="$complete"
19379    arguments="EOL"
19380    new_path=`$CYGPATH -u "$path"`
19381    new_path=`$WHICH "$new_path" 2> /dev/null`
19382    # bat and cmd files are not always considered executable in cygwin causing which
19383    # to not find them
19384    if test "x$new_path" = x \
19385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19387      new_path=`$CYGPATH -u "$path"`
19388    fi
19389    if test "x$new_path" = x; then
19390      # It's still not found. Now this is an unrecoverable error.
19391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19392$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19393      has_space=`$ECHO "$complete" | $GREP " "`
19394      if test "x$has_space" != x; then
19395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19397      fi
19398      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19399    fi
19400  fi
19401
19402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19405  # "foo.exe" is OK but "foo" is an error.
19406  #
19407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19408  # It is also a way to make sure we got the proper file name for the real test later on.
19409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19410  if test "x$test_shortpath" = x; then
19411    # Short path failed, file does not exist as specified.
19412    # Try adding .exe or .cmd
19413    if test -f "${new_path}.exe"; then
19414      input_to_shortpath="${new_path}.exe"
19415    elif test -f "${new_path}.cmd"; then
19416      input_to_shortpath="${new_path}.cmd"
19417    else
19418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19419$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19422      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19423    fi
19424  else
19425    input_to_shortpath="$new_path"
19426  fi
19427
19428  # Call helper function which possibly converts this using DOS-style short mode.
19429  # If so, the updated path is stored in $new_path.
19430  new_path="$input_to_shortpath"
19431
19432  input_path="$input_to_shortpath"
19433  # Check if we need to convert this using DOS-style short mode. If the path
19434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19435  # take no chances and rewrite it.
19436  # Note: m4 eats our [], so we need to use [ and ] instead.
19437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19438  if test "x$has_forbidden_chars" != x; then
19439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19443      # Going to short mode and back again did indeed matter. Since short mode is
19444      # case insensitive, let's make it lowercase to improve readability.
19445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19446      # Now convert it back to Unix-stile (cygpath)
19447      input_path=`$CYGPATH -u "$shortmode_path"`
19448      new_path="$input_path"
19449    fi
19450  fi
19451
19452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19453  if test "x$test_cygdrive_prefix" = x; then
19454    # As a simple fix, exclude /usr/bin since it's not a real path.
19455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19457      # a path prefixed by /cygdrive for fixpath to work.
19458      new_path="$CYGWIN_ROOT_PATH$input_path"
19459    fi
19460  fi
19461
19462  # remove trailing .exe if any
19463  new_path="${new_path/%.exe/}"
19464
19465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19466
19467  # First separate the path from the arguments. This will split at the first
19468  # space.
19469  complete="$CC"
19470  path="${complete%% *}"
19471  tmp="$complete EOL"
19472  arguments="${tmp#* }"
19473
19474  # Input might be given as Windows format, start by converting to
19475  # unix format.
19476  new_path="$path"
19477
19478  windows_path="$new_path"
19479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19480    unix_path=`$CYGPATH -u "$windows_path"`
19481    new_path="$unix_path"
19482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19484    new_path="$unix_path"
19485  fi
19486
19487
19488  # Now try to locate executable using which
19489  new_path=`$WHICH "$new_path" 2> /dev/null`
19490
19491  if test "x$new_path" = x; then
19492    # Oops. Which didn't find the executable.
19493    # The splitting of arguments from the executable at a space might have been incorrect,
19494    # since paths with space are more likely in Windows. Give it another try with the whole
19495    # argument.
19496    path="$complete"
19497    arguments="EOL"
19498    new_path="$path"
19499
19500  windows_path="$new_path"
19501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19502    unix_path=`$CYGPATH -u "$windows_path"`
19503    new_path="$unix_path"
19504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19506    new_path="$unix_path"
19507  fi
19508
19509
19510    new_path=`$WHICH "$new_path" 2> /dev/null`
19511
19512    if test "x$new_path" = x; then
19513      # It's still not found. Now this is an unrecoverable error.
19514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19515$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19516      has_space=`$ECHO "$complete" | $GREP " "`
19517      if test "x$has_space" != x; then
19518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19520      fi
19521      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19522    fi
19523  fi
19524
19525  # Now new_path has a complete unix path to the binary
19526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19527    # Keep paths in /bin as-is, but remove trailing .exe if any
19528    new_path="${new_path/%.exe/}"
19529    # Do not save /bin paths to all_fixpath_prefixes!
19530  else
19531    # Not in mixed or Windows style, start by that.
19532    new_path=`cmd //c echo $new_path`
19533
19534  input_path="$new_path"
19535  # Check if we need to convert this using DOS-style short mode. If the path
19536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19537  # take no chances and rewrite it.
19538  # Note: m4 eats our [], so we need to use [ and ] instead.
19539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19540  if test "x$has_forbidden_chars" != x; then
19541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19543  fi
19544
19545    # Output is in $new_path
19546
19547  windows_path="$new_path"
19548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19549    unix_path=`$CYGPATH -u "$windows_path"`
19550    new_path="$unix_path"
19551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19553    new_path="$unix_path"
19554  fi
19555
19556    # remove trailing .exe if any
19557    new_path="${new_path/%.exe/}"
19558
19559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19561  fi
19562
19563  else
19564    # We're on a posix platform. Hooray! :)
19565    # First separate the path from the arguments. This will split at the first
19566    # space.
19567    complete="$CC"
19568    path="${complete%% *}"
19569    tmp="$complete EOL"
19570    arguments="${tmp#* }"
19571
19572    # Cannot rely on the command "which" here since it doesn't always work.
19573    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19574    if test -z "$is_absolute_path"; then
19575      # Path to executable is not absolute. Find it.
19576      IFS_save="$IFS"
19577      IFS=:
19578      for p in $PATH; do
19579        if test -f "$p/$path" && test -x "$p/$path"; then
19580          new_path="$p/$path"
19581          break
19582        fi
19583      done
19584      IFS="$IFS_save"
19585    else
19586      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19587$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19588      new_path="$path"
19589    fi
19590
19591    if test "x$new_path" = x; then
19592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19593$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19594      has_space=`$ECHO "$complete" | $GREP " "`
19595      if test "x$has_space" != x; then
19596        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19598      fi
19599      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19600    fi
19601  fi
19602
19603  # Now join together the path and the arguments once again
19604  if test "x$arguments" != xEOL; then
19605    new_complete="$new_path ${arguments% *}"
19606  else
19607    new_complete="$new_path"
19608  fi
19609
19610  if test "x$complete" != "x$new_complete"; then
19611    CC="$new_complete"
19612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19613$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19614  fi
19615
19616  TEST_COMPILER="$CC"
19617  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19618  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19619  if test "x$OPENJDK_BUILD_OS" != xaix; then
19620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19621$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19622
19623  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19624    # Follow a chain of symbolic links. Use readlink
19625    # where it exists, else fall back to horribly
19626    # complicated shell code.
19627    if test "x$READLINK_TESTED" != yes; then
19628      # On MacOSX there is a readlink tool with a different
19629      # purpose than the GNU readlink tool. Check the found readlink.
19630      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19631      if test "x$ISGNU" = x; then
19632        # A readlink that we do not know how to use.
19633        # Are there other non-GNU readlinks out there?
19634        READLINK_TESTED=yes
19635        READLINK=
19636      fi
19637    fi
19638
19639    if test "x$READLINK" != x; then
19640      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19641    else
19642      # Save the current directory for restoring afterwards
19643      STARTDIR=$PWD
19644      COUNTER=0
19645      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19646      sym_link_file=`$BASENAME $TEST_COMPILER`
19647      cd $sym_link_dir
19648      # Use -P flag to resolve symlinks in directories.
19649      cd `$THEPWDCMD -P`
19650      sym_link_dir=`$THEPWDCMD -P`
19651      # Resolve file symlinks
19652      while test $COUNTER -lt 20; do
19653        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19654        if test "x$ISLINK" == x; then
19655          # This is not a symbolic link! We are done!
19656          break
19657        fi
19658        # Again resolve directory symlinks since the target of the just found
19659        # link could be in a different directory
19660        cd `$DIRNAME $ISLINK`
19661        sym_link_dir=`$THEPWDCMD -P`
19662        sym_link_file=`$BASENAME $ISLINK`
19663        let COUNTER=COUNTER+1
19664      done
19665      cd $STARTDIR
19666      TEST_COMPILER=$sym_link_dir/$sym_link_file
19667    fi
19668  fi
19669
19670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19671$as_echo "$TEST_COMPILER" >&6; }
19672  fi
19673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19674$as_echo_n "checking if CC is disguised ccache... " >&6; }
19675
19676  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19677  if test "x$COMPILER_BASENAME" = "xccache"; then
19678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19679$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19680    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19681    # We want to control ccache invocation ourselves, so ignore this cc and try
19682    # searching again.
19683
19684    # Remove the path to the fake ccache cc from the PATH
19685    RETRY_COMPILER_SAVED_PATH="$PATH"
19686    COMPILER_DIRNAME=`$DIRNAME $CC`
19687    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19688
19689    # Try again looking for our compiler
19690    if test -n "$ac_tool_prefix"; then
19691  for ac_prog in $COMPILER_CHECK_LIST
19692  do
19693    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19696$as_echo_n "checking for $ac_word... " >&6; }
19697if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19698  $as_echo_n "(cached) " >&6
19699else
19700  if test -n "$PROPER_COMPILER_CC"; then
19701  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19702else
19703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19704for as_dir in $PATH
19705do
19706  IFS=$as_save_IFS
19707  test -z "$as_dir" && as_dir=.
19708    for ac_exec_ext in '' $ac_executable_extensions; do
19709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19710    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19712    break 2
19713  fi
19714done
19715  done
19716IFS=$as_save_IFS
19717
19718fi
19719fi
19720PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19721if test -n "$PROPER_COMPILER_CC"; then
19722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19723$as_echo "$PROPER_COMPILER_CC" >&6; }
19724else
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19726$as_echo "no" >&6; }
19727fi
19728
19729
19730    test -n "$PROPER_COMPILER_CC" && break
19731  done
19732fi
19733if test -z "$PROPER_COMPILER_CC"; then
19734  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19735  for ac_prog in $COMPILER_CHECK_LIST
19736do
19737  # Extract the first word of "$ac_prog", so it can be a program name with args.
19738set dummy $ac_prog; ac_word=$2
19739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19740$as_echo_n "checking for $ac_word... " >&6; }
19741if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19742  $as_echo_n "(cached) " >&6
19743else
19744  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19745  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19746else
19747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19748for as_dir in $PATH
19749do
19750  IFS=$as_save_IFS
19751  test -z "$as_dir" && as_dir=.
19752    for ac_exec_ext in '' $ac_executable_extensions; do
19753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19754    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19756    break 2
19757  fi
19758done
19759  done
19760IFS=$as_save_IFS
19761
19762fi
19763fi
19764ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19765if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19767$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19768else
19769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19770$as_echo "no" >&6; }
19771fi
19772
19773
19774  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19775done
19776
19777  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19778    PROPER_COMPILER_CC=""
19779  else
19780    case $cross_compiling:$ac_tool_warned in
19781yes:)
19782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19784ac_tool_warned=yes ;;
19785esac
19786    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19787  fi
19788fi
19789
19790
19791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19792
19793  # First separate the path from the arguments. This will split at the first
19794  # space.
19795  complete="$PROPER_COMPILER_CC"
19796  path="${complete%% *}"
19797  tmp="$complete EOL"
19798  arguments="${tmp#* }"
19799
19800  # Input might be given as Windows format, start by converting to
19801  # unix format.
19802  new_path=`$CYGPATH -u "$path"`
19803
19804  # Now try to locate executable using which
19805  new_path=`$WHICH "$new_path" 2> /dev/null`
19806  # bat and cmd files are not always considered executable in cygwin causing which
19807  # to not find them
19808  if test "x$new_path" = x \
19809      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19810      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19811    new_path=`$CYGPATH -u "$path"`
19812  fi
19813  if test "x$new_path" = x; then
19814    # Oops. Which didn't find the executable.
19815    # The splitting of arguments from the executable at a space might have been incorrect,
19816    # since paths with space are more likely in Windows. Give it another try with the whole
19817    # argument.
19818    path="$complete"
19819    arguments="EOL"
19820    new_path=`$CYGPATH -u "$path"`
19821    new_path=`$WHICH "$new_path" 2> /dev/null`
19822    # bat and cmd files are not always considered executable in cygwin causing which
19823    # to not find them
19824    if test "x$new_path" = x \
19825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19827      new_path=`$CYGPATH -u "$path"`
19828    fi
19829    if test "x$new_path" = x; then
19830      # It's still not found. Now this is an unrecoverable error.
19831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19832$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19833      has_space=`$ECHO "$complete" | $GREP " "`
19834      if test "x$has_space" != x; then
19835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19837      fi
19838      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19839    fi
19840  fi
19841
19842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19845  # "foo.exe" is OK but "foo" is an error.
19846  #
19847  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19848  # It is also a way to make sure we got the proper file name for the real test later on.
19849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19850  if test "x$test_shortpath" = x; then
19851    # Short path failed, file does not exist as specified.
19852    # Try adding .exe or .cmd
19853    if test -f "${new_path}.exe"; then
19854      input_to_shortpath="${new_path}.exe"
19855    elif test -f "${new_path}.cmd"; then
19856      input_to_shortpath="${new_path}.cmd"
19857    else
19858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19859$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19862      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19863    fi
19864  else
19865    input_to_shortpath="$new_path"
19866  fi
19867
19868  # Call helper function which possibly converts this using DOS-style short mode.
19869  # If so, the updated path is stored in $new_path.
19870  new_path="$input_to_shortpath"
19871
19872  input_path="$input_to_shortpath"
19873  # Check if we need to convert this using DOS-style short mode. If the path
19874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19875  # take no chances and rewrite it.
19876  # Note: m4 eats our [], so we need to use [ and ] instead.
19877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19878  if test "x$has_forbidden_chars" != x; then
19879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19883      # Going to short mode and back again did indeed matter. Since short mode is
19884      # case insensitive, let's make it lowercase to improve readability.
19885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19886      # Now convert it back to Unix-stile (cygpath)
19887      input_path=`$CYGPATH -u "$shortmode_path"`
19888      new_path="$input_path"
19889    fi
19890  fi
19891
19892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19893  if test "x$test_cygdrive_prefix" = x; then
19894    # As a simple fix, exclude /usr/bin since it's not a real path.
19895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19897      # a path prefixed by /cygdrive for fixpath to work.
19898      new_path="$CYGWIN_ROOT_PATH$input_path"
19899    fi
19900  fi
19901
19902  # remove trailing .exe if any
19903  new_path="${new_path/%.exe/}"
19904
19905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19906
19907  # First separate the path from the arguments. This will split at the first
19908  # space.
19909  complete="$PROPER_COMPILER_CC"
19910  path="${complete%% *}"
19911  tmp="$complete EOL"
19912  arguments="${tmp#* }"
19913
19914  # Input might be given as Windows format, start by converting to
19915  # unix format.
19916  new_path="$path"
19917
19918  windows_path="$new_path"
19919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19920    unix_path=`$CYGPATH -u "$windows_path"`
19921    new_path="$unix_path"
19922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19924    new_path="$unix_path"
19925  fi
19926
19927
19928  # Now try to locate executable using which
19929  new_path=`$WHICH "$new_path" 2> /dev/null`
19930
19931  if test "x$new_path" = x; then
19932    # Oops. Which didn't find the executable.
19933    # The splitting of arguments from the executable at a space might have been incorrect,
19934    # since paths with space are more likely in Windows. Give it another try with the whole
19935    # argument.
19936    path="$complete"
19937    arguments="EOL"
19938    new_path="$path"
19939
19940  windows_path="$new_path"
19941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942    unix_path=`$CYGPATH -u "$windows_path"`
19943    new_path="$unix_path"
19944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19946    new_path="$unix_path"
19947  fi
19948
19949
19950    new_path=`$WHICH "$new_path" 2> /dev/null`
19951
19952    if test "x$new_path" = x; then
19953      # It's still not found. Now this is an unrecoverable error.
19954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19955$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19956      has_space=`$ECHO "$complete" | $GREP " "`
19957      if test "x$has_space" != x; then
19958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19960      fi
19961      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19962    fi
19963  fi
19964
19965  # Now new_path has a complete unix path to the binary
19966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19967    # Keep paths in /bin as-is, but remove trailing .exe if any
19968    new_path="${new_path/%.exe/}"
19969    # Do not save /bin paths to all_fixpath_prefixes!
19970  else
19971    # Not in mixed or Windows style, start by that.
19972    new_path=`cmd //c echo $new_path`
19973
19974  input_path="$new_path"
19975  # Check if we need to convert this using DOS-style short mode. If the path
19976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19977  # take no chances and rewrite it.
19978  # Note: m4 eats our [], so we need to use [ and ] instead.
19979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19980  if test "x$has_forbidden_chars" != x; then
19981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19983  fi
19984
19985    # Output is in $new_path
19986
19987  windows_path="$new_path"
19988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19989    unix_path=`$CYGPATH -u "$windows_path"`
19990    new_path="$unix_path"
19991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19993    new_path="$unix_path"
19994  fi
19995
19996    # remove trailing .exe if any
19997    new_path="${new_path/%.exe/}"
19998
19999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20001  fi
20002
20003  else
20004    # We're on a posix platform. Hooray! :)
20005    # First separate the path from the arguments. This will split at the first
20006    # space.
20007    complete="$PROPER_COMPILER_CC"
20008    path="${complete%% *}"
20009    tmp="$complete EOL"
20010    arguments="${tmp#* }"
20011
20012    # Cannot rely on the command "which" here since it doesn't always work.
20013    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20014    if test -z "$is_absolute_path"; then
20015      # Path to executable is not absolute. Find it.
20016      IFS_save="$IFS"
20017      IFS=:
20018      for p in $PATH; do
20019        if test -f "$p/$path" && test -x "$p/$path"; then
20020          new_path="$p/$path"
20021          break
20022        fi
20023      done
20024      IFS="$IFS_save"
20025    else
20026      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20027$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20028      new_path="$path"
20029    fi
20030
20031    if test "x$new_path" = x; then
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20033$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20034      has_space=`$ECHO "$complete" | $GREP " "`
20035      if test "x$has_space" != x; then
20036        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20038      fi
20039      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20040    fi
20041  fi
20042
20043  # Now join together the path and the arguments once again
20044  if test "x$arguments" != xEOL; then
20045    new_complete="$new_path ${arguments% *}"
20046  else
20047    new_complete="$new_path"
20048  fi
20049
20050  if test "x$complete" != "x$new_complete"; then
20051    PROPER_COMPILER_CC="$new_complete"
20052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20053$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20054  fi
20055
20056    PATH="$RETRY_COMPILER_SAVED_PATH"
20057
20058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20059$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20060
20061  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20062    # Follow a chain of symbolic links. Use readlink
20063    # where it exists, else fall back to horribly
20064    # complicated shell code.
20065    if test "x$READLINK_TESTED" != yes; then
20066      # On MacOSX there is a readlink tool with a different
20067      # purpose than the GNU readlink tool. Check the found readlink.
20068      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20069      if test "x$ISGNU" = x; then
20070        # A readlink that we do not know how to use.
20071        # Are there other non-GNU readlinks out there?
20072        READLINK_TESTED=yes
20073        READLINK=
20074      fi
20075    fi
20076
20077    if test "x$READLINK" != x; then
20078      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20079    else
20080      # Save the current directory for restoring afterwards
20081      STARTDIR=$PWD
20082      COUNTER=0
20083      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20084      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20085      cd $sym_link_dir
20086      # Use -P flag to resolve symlinks in directories.
20087      cd `$THEPWDCMD -P`
20088      sym_link_dir=`$THEPWDCMD -P`
20089      # Resolve file symlinks
20090      while test $COUNTER -lt 20; do
20091        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20092        if test "x$ISLINK" == x; then
20093          # This is not a symbolic link! We are done!
20094          break
20095        fi
20096        # Again resolve directory symlinks since the target of the just found
20097        # link could be in a different directory
20098        cd `$DIRNAME $ISLINK`
20099        sym_link_dir=`$THEPWDCMD -P`
20100        sym_link_file=`$BASENAME $ISLINK`
20101        let COUNTER=COUNTER+1
20102      done
20103      cd $STARTDIR
20104      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20105    fi
20106  fi
20107
20108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20109$as_echo "$PROPER_COMPILER_CC" >&6; }
20110    CC="$PROPER_COMPILER_CC"
20111  else
20112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20113$as_echo "no, keeping CC" >&6; }
20114  fi
20115
20116
20117  COMPILER=$CC
20118  COMPILER_NAME=$COMPILER_NAME
20119
20120  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20121    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20122    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20123    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20124    if test $? -ne 0; then
20125      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20126
20127      { $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
20128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20130$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20131      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20132    else
20133      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20134      COMPILER_VENDOR="Sun Studio"
20135    fi
20136  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20137      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20138      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20139      if test $? -ne 0; then
20140        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20141      else
20142        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20143        COMPILER_VENDOR='IBM'
20144      fi
20145  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20146    # First line typically looks something like:
20147    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20148    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20149    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20150    COMPILER_VENDOR="Microsoft CL.EXE"
20151    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20152    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20153      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20154        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20155      fi
20156    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20157      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20158        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20159      fi
20160    fi
20161  else
20162    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20163    # Check that this is likely to be GCC.
20164    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20165    if test $? -ne 0; then
20166      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20167$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20168      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20169$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20170      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20171    fi
20172
20173    # First line typically looks something like:
20174    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20175    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20176    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20177  fi
20178  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20179  CC_VERSION="$COMPILER_VERSION"
20180  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20181  CC_VENDOR="$COMPILER_VENDOR"
20182
20183  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20184$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20185
20186
20187  # Now that we have resolved CC ourself, let autoconf have its go at it
20188  ac_ext=c
20189ac_cpp='$CPP $CPPFLAGS'
20190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20192ac_compiler_gnu=$ac_cv_c_compiler_gnu
20193if test -n "$ac_tool_prefix"; then
20194  for ac_prog in $CC
20195  do
20196    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20197set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20199$as_echo_n "checking for $ac_word... " >&6; }
20200if ${ac_cv_prog_CC+:} false; then :
20201  $as_echo_n "(cached) " >&6
20202else
20203  if test -n "$CC"; then
20204  ac_cv_prog_CC="$CC" # Let the user override the test.
20205else
20206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20207for as_dir in $PATH
20208do
20209  IFS=$as_save_IFS
20210  test -z "$as_dir" && as_dir=.
20211    for ac_exec_ext in '' $ac_executable_extensions; do
20212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20213    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20215    break 2
20216  fi
20217done
20218  done
20219IFS=$as_save_IFS
20220
20221fi
20222fi
20223CC=$ac_cv_prog_CC
20224if test -n "$CC"; then
20225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20226$as_echo "$CC" >&6; }
20227else
20228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20229$as_echo "no" >&6; }
20230fi
20231
20232
20233    test -n "$CC" && break
20234  done
20235fi
20236if test -z "$CC"; then
20237  ac_ct_CC=$CC
20238  for ac_prog in $CC
20239do
20240  # Extract the first word of "$ac_prog", so it can be a program name with args.
20241set dummy $ac_prog; ac_word=$2
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20243$as_echo_n "checking for $ac_word... " >&6; }
20244if ${ac_cv_prog_ac_ct_CC+:} false; then :
20245  $as_echo_n "(cached) " >&6
20246else
20247  if test -n "$ac_ct_CC"; then
20248  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20249else
20250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20251for as_dir in $PATH
20252do
20253  IFS=$as_save_IFS
20254  test -z "$as_dir" && as_dir=.
20255    for ac_exec_ext in '' $ac_executable_extensions; do
20256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20257    ac_cv_prog_ac_ct_CC="$ac_prog"
20258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20259    break 2
20260  fi
20261done
20262  done
20263IFS=$as_save_IFS
20264
20265fi
20266fi
20267ac_ct_CC=$ac_cv_prog_ac_ct_CC
20268if test -n "$ac_ct_CC"; then
20269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20270$as_echo "$ac_ct_CC" >&6; }
20271else
20272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20273$as_echo "no" >&6; }
20274fi
20275
20276
20277  test -n "$ac_ct_CC" && break
20278done
20279
20280  if test "x$ac_ct_CC" = x; then
20281    CC=""
20282  else
20283    case $cross_compiling:$ac_tool_warned in
20284yes:)
20285{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20286$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20287ac_tool_warned=yes ;;
20288esac
20289    CC=$ac_ct_CC
20290  fi
20291fi
20292
20293
20294test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20296as_fn_error $? "no acceptable C compiler found in \$PATH
20297See \`config.log' for more details" "$LINENO" 5; }
20298
20299# Provide some information about the compiler.
20300$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20301set X $ac_compile
20302ac_compiler=$2
20303for ac_option in --version -v -V -qversion; do
20304  { { ac_try="$ac_compiler $ac_option >&5"
20305case "(($ac_try" in
20306  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20307  *) ac_try_echo=$ac_try;;
20308esac
20309eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20310$as_echo "$ac_try_echo"; } >&5
20311  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20312  ac_status=$?
20313  if test -s conftest.err; then
20314    sed '10a\
20315... rest of stderr output deleted ...
20316         10q' conftest.err >conftest.er1
20317    cat conftest.er1 >&5
20318  fi
20319  rm -f conftest.er1 conftest.err
20320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20321  test $ac_status = 0; }
20322done
20323
20324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20325/* end confdefs.h.  */
20326
20327int
20328main ()
20329{
20330
20331  ;
20332  return 0;
20333}
20334_ACEOF
20335ac_clean_files_save=$ac_clean_files
20336ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20337# Try to create an executable without -o first, disregard a.out.
20338# It will help us diagnose broken compilers, and finding out an intuition
20339# of exeext.
20340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20341$as_echo_n "checking whether the C compiler works... " >&6; }
20342ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20343
20344# The possible output files:
20345ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20346
20347ac_rmfiles=
20348for ac_file in $ac_files
20349do
20350  case $ac_file in
20351    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20352    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20353  esac
20354done
20355rm -f $ac_rmfiles
20356
20357if { { ac_try="$ac_link_default"
20358case "(($ac_try" in
20359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20360  *) ac_try_echo=$ac_try;;
20361esac
20362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20363$as_echo "$ac_try_echo"; } >&5
20364  (eval "$ac_link_default") 2>&5
20365  ac_status=$?
20366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20367  test $ac_status = 0; }; then :
20368  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20369# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20370# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20371# so that the user can short-circuit this test for compilers unknown to
20372# Autoconf.
20373for ac_file in $ac_files ''
20374do
20375  test -f "$ac_file" || continue
20376  case $ac_file in
20377    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20378	;;
20379    [ab].out )
20380	# We found the default executable, but exeext='' is most
20381	# certainly right.
20382	break;;
20383    *.* )
20384	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20385	then :; else
20386	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20387	fi
20388	# We set ac_cv_exeext here because the later test for it is not
20389	# safe: cross compilers may not add the suffix if given an `-o'
20390	# argument, so we may need to know it at that point already.
20391	# Even if this section looks crufty: it has the advantage of
20392	# actually working.
20393	break;;
20394    * )
20395	break;;
20396  esac
20397done
20398test "$ac_cv_exeext" = no && ac_cv_exeext=
20399
20400else
20401  ac_file=''
20402fi
20403if test -z "$ac_file"; then :
20404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20405$as_echo "no" >&6; }
20406$as_echo "$as_me: failed program was:" >&5
20407sed 's/^/| /' conftest.$ac_ext >&5
20408
20409{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20411as_fn_error 77 "C compiler cannot create executables
20412See \`config.log' for more details" "$LINENO" 5; }
20413else
20414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20415$as_echo "yes" >&6; }
20416fi
20417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20418$as_echo_n "checking for C compiler default output file name... " >&6; }
20419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20420$as_echo "$ac_file" >&6; }
20421ac_exeext=$ac_cv_exeext
20422
20423rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20424ac_clean_files=$ac_clean_files_save
20425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20426$as_echo_n "checking for suffix of executables... " >&6; }
20427if { { ac_try="$ac_link"
20428case "(($ac_try" in
20429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20430  *) ac_try_echo=$ac_try;;
20431esac
20432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20433$as_echo "$ac_try_echo"; } >&5
20434  (eval "$ac_link") 2>&5
20435  ac_status=$?
20436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20437  test $ac_status = 0; }; then :
20438  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20439# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20440# work properly (i.e., refer to `conftest.exe'), while it won't with
20441# `rm'.
20442for ac_file in conftest.exe conftest conftest.*; do
20443  test -f "$ac_file" || continue
20444  case $ac_file in
20445    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20446    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20447	  break;;
20448    * ) break;;
20449  esac
20450done
20451else
20452  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20454as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20455See \`config.log' for more details" "$LINENO" 5; }
20456fi
20457rm -f conftest conftest$ac_cv_exeext
20458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20459$as_echo "$ac_cv_exeext" >&6; }
20460
20461rm -f conftest.$ac_ext
20462EXEEXT=$ac_cv_exeext
20463ac_exeext=$EXEEXT
20464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20465/* end confdefs.h.  */
20466#include <stdio.h>
20467int
20468main ()
20469{
20470FILE *f = fopen ("conftest.out", "w");
20471 return ferror (f) || fclose (f) != 0;
20472
20473  ;
20474  return 0;
20475}
20476_ACEOF
20477ac_clean_files="$ac_clean_files conftest.out"
20478# Check that the compiler produces executables we can run.  If not, either
20479# the compiler is broken, or we cross compile.
20480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20481$as_echo_n "checking whether we are cross compiling... " >&6; }
20482if test "$cross_compiling" != yes; then
20483  { { ac_try="$ac_link"
20484case "(($ac_try" in
20485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20486  *) ac_try_echo=$ac_try;;
20487esac
20488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20489$as_echo "$ac_try_echo"; } >&5
20490  (eval "$ac_link") 2>&5
20491  ac_status=$?
20492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20493  test $ac_status = 0; }
20494  if { ac_try='./conftest$ac_cv_exeext'
20495  { { case "(($ac_try" in
20496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20497  *) ac_try_echo=$ac_try;;
20498esac
20499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20500$as_echo "$ac_try_echo"; } >&5
20501  (eval "$ac_try") 2>&5
20502  ac_status=$?
20503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20504  test $ac_status = 0; }; }; then
20505    cross_compiling=no
20506  else
20507    if test "$cross_compiling" = maybe; then
20508	cross_compiling=yes
20509    else
20510	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20512as_fn_error $? "cannot run C compiled programs.
20513If you meant to cross compile, use \`--host'.
20514See \`config.log' for more details" "$LINENO" 5; }
20515    fi
20516  fi
20517fi
20518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20519$as_echo "$cross_compiling" >&6; }
20520
20521rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20522ac_clean_files=$ac_clean_files_save
20523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20524$as_echo_n "checking for suffix of object files... " >&6; }
20525if ${ac_cv_objext+:} false; then :
20526  $as_echo_n "(cached) " >&6
20527else
20528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20529/* end confdefs.h.  */
20530
20531int
20532main ()
20533{
20534
20535  ;
20536  return 0;
20537}
20538_ACEOF
20539rm -f conftest.o conftest.obj
20540if { { ac_try="$ac_compile"
20541case "(($ac_try" in
20542  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20543  *) ac_try_echo=$ac_try;;
20544esac
20545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20546$as_echo "$ac_try_echo"; } >&5
20547  (eval "$ac_compile") 2>&5
20548  ac_status=$?
20549  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20550  test $ac_status = 0; }; then :
20551  for ac_file in conftest.o conftest.obj conftest.*; do
20552  test -f "$ac_file" || continue;
20553  case $ac_file in
20554    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20555    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20556       break;;
20557  esac
20558done
20559else
20560  $as_echo "$as_me: failed program was:" >&5
20561sed 's/^/| /' conftest.$ac_ext >&5
20562
20563{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20565as_fn_error $? "cannot compute suffix of object files: cannot compile
20566See \`config.log' for more details" "$LINENO" 5; }
20567fi
20568rm -f conftest.$ac_cv_objext conftest.$ac_ext
20569fi
20570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20571$as_echo "$ac_cv_objext" >&6; }
20572OBJEXT=$ac_cv_objext
20573ac_objext=$OBJEXT
20574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20575$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20576if ${ac_cv_c_compiler_gnu+:} false; then :
20577  $as_echo_n "(cached) " >&6
20578else
20579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20580/* end confdefs.h.  */
20581
20582int
20583main ()
20584{
20585#ifndef __GNUC__
20586       choke me
20587#endif
20588
20589  ;
20590  return 0;
20591}
20592_ACEOF
20593if ac_fn_c_try_compile "$LINENO"; then :
20594  ac_compiler_gnu=yes
20595else
20596  ac_compiler_gnu=no
20597fi
20598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20599ac_cv_c_compiler_gnu=$ac_compiler_gnu
20600
20601fi
20602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20603$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20604if test $ac_compiler_gnu = yes; then
20605  GCC=yes
20606else
20607  GCC=
20608fi
20609ac_test_CFLAGS=${CFLAGS+set}
20610ac_save_CFLAGS=$CFLAGS
20611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20612$as_echo_n "checking whether $CC accepts -g... " >&6; }
20613if ${ac_cv_prog_cc_g+:} false; then :
20614  $as_echo_n "(cached) " >&6
20615else
20616  ac_save_c_werror_flag=$ac_c_werror_flag
20617   ac_c_werror_flag=yes
20618   ac_cv_prog_cc_g=no
20619   CFLAGS="-g"
20620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20621/* end confdefs.h.  */
20622
20623int
20624main ()
20625{
20626
20627  ;
20628  return 0;
20629}
20630_ACEOF
20631if ac_fn_c_try_compile "$LINENO"; then :
20632  ac_cv_prog_cc_g=yes
20633else
20634  CFLAGS=""
20635      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20636/* end confdefs.h.  */
20637
20638int
20639main ()
20640{
20641
20642  ;
20643  return 0;
20644}
20645_ACEOF
20646if ac_fn_c_try_compile "$LINENO"; then :
20647
20648else
20649  ac_c_werror_flag=$ac_save_c_werror_flag
20650	 CFLAGS="-g"
20651	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20652/* end confdefs.h.  */
20653
20654int
20655main ()
20656{
20657
20658  ;
20659  return 0;
20660}
20661_ACEOF
20662if ac_fn_c_try_compile "$LINENO"; then :
20663  ac_cv_prog_cc_g=yes
20664fi
20665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20666fi
20667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20668fi
20669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20670   ac_c_werror_flag=$ac_save_c_werror_flag
20671fi
20672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20673$as_echo "$ac_cv_prog_cc_g" >&6; }
20674if test "$ac_test_CFLAGS" = set; then
20675  CFLAGS=$ac_save_CFLAGS
20676elif test $ac_cv_prog_cc_g = yes; then
20677  if test "$GCC" = yes; then
20678    CFLAGS="-g -O2"
20679  else
20680    CFLAGS="-g"
20681  fi
20682else
20683  if test "$GCC" = yes; then
20684    CFLAGS="-O2"
20685  else
20686    CFLAGS=
20687  fi
20688fi
20689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20690$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20691if ${ac_cv_prog_cc_c89+:} false; then :
20692  $as_echo_n "(cached) " >&6
20693else
20694  ac_cv_prog_cc_c89=no
20695ac_save_CC=$CC
20696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20697/* end confdefs.h.  */
20698#include <stdarg.h>
20699#include <stdio.h>
20700struct stat;
20701/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20702struct buf { int x; };
20703FILE * (*rcsopen) (struct buf *, struct stat *, int);
20704static char *e (p, i)
20705     char **p;
20706     int i;
20707{
20708  return p[i];
20709}
20710static char *f (char * (*g) (char **, int), char **p, ...)
20711{
20712  char *s;
20713  va_list v;
20714  va_start (v,p);
20715  s = g (p, va_arg (v,int));
20716  va_end (v);
20717  return s;
20718}
20719
20720/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20721   function prototypes and stuff, but not '\xHH' hex character constants.
20722   These don't provoke an error unfortunately, instead are silently treated
20723   as 'x'.  The following induces an error, until -std is added to get
20724   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20725   array size at least.  It's necessary to write '\x00'==0 to get something
20726   that's true only with -std.  */
20727int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20728
20729/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20730   inside strings and character constants.  */
20731#define FOO(x) 'x'
20732int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20733
20734int test (int i, double x);
20735struct s1 {int (*f) (int a);};
20736struct s2 {int (*f) (double a);};
20737int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20738int argc;
20739char **argv;
20740int
20741main ()
20742{
20743return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20744  ;
20745  return 0;
20746}
20747_ACEOF
20748for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20749	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20750do
20751  CC="$ac_save_CC $ac_arg"
20752  if ac_fn_c_try_compile "$LINENO"; then :
20753  ac_cv_prog_cc_c89=$ac_arg
20754fi
20755rm -f core conftest.err conftest.$ac_objext
20756  test "x$ac_cv_prog_cc_c89" != "xno" && break
20757done
20758rm -f conftest.$ac_ext
20759CC=$ac_save_CC
20760
20761fi
20762# AC_CACHE_VAL
20763case "x$ac_cv_prog_cc_c89" in
20764  x)
20765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20766$as_echo "none needed" >&6; } ;;
20767  xno)
20768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20769$as_echo "unsupported" >&6; } ;;
20770  *)
20771    CC="$CC $ac_cv_prog_cc_c89"
20772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20773$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20774esac
20775if test "x$ac_cv_prog_cc_c89" != xno; then :
20776
20777fi
20778
20779ac_ext=cpp
20780ac_cpp='$CXXCPP $CPPFLAGS'
20781ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20782ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20783ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20784
20785
20786  # Option used to tell the compiler whether to create 32- or 64-bit executables
20787  # Notice that CC contains the full compiler path at this point.
20788  case $CC in
20789    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20790    *)      COMPILER_TARGET_BITS_FLAG="-m";;
20791  esac
20792
20793
20794  ### Locate C++ compiler (CXX)
20795
20796  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20797    COMPILER_CHECK_LIST="cl"
20798  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20799    COMPILER_CHECK_LIST="CC g++"
20800  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20801    # Do not probe for CC on AIX .
20802    COMPILER_CHECK_LIST="xlC_r"
20803  else
20804    COMPILER_CHECK_LIST="g++ CC"
20805  fi
20806
20807
20808  COMPILER_NAME=C++
20809  SEARCH_LIST="$COMPILER_CHECK_LIST"
20810
20811  if test "x$CXX" != x; then
20812    # User has supplied compiler name already, always let that override.
20813    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
20814$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
20815    if test "x`basename $CXX`" = "x$CXX"; then
20816      # A command without a complete path is provided, search $PATH.
20817
20818      for ac_prog in $CXX
20819do
20820  # Extract the first word of "$ac_prog", so it can be a program name with args.
20821set dummy $ac_prog; ac_word=$2
20822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20823$as_echo_n "checking for $ac_word... " >&6; }
20824if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20825  $as_echo_n "(cached) " >&6
20826else
20827  case $POTENTIAL_CXX in
20828  [\\/]* | ?:[\\/]*)
20829  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20830  ;;
20831  *)
20832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20833for as_dir in $PATH
20834do
20835  IFS=$as_save_IFS
20836  test -z "$as_dir" && as_dir=.
20837    for ac_exec_ext in '' $ac_executable_extensions; do
20838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20839    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20841    break 2
20842  fi
20843done
20844  done
20845IFS=$as_save_IFS
20846
20847  ;;
20848esac
20849fi
20850POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20851if test -n "$POTENTIAL_CXX"; then
20852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20853$as_echo "$POTENTIAL_CXX" >&6; }
20854else
20855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20856$as_echo "no" >&6; }
20857fi
20858
20859
20860  test -n "$POTENTIAL_CXX" && break
20861done
20862
20863      if test "x$POTENTIAL_CXX" != x; then
20864        CXX=$POTENTIAL_CXX
20865      else
20866        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
20867      fi
20868    else
20869      # Otherwise it might already be a complete path
20870      if test ! -x "$CXX"; then
20871        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
20872      fi
20873    fi
20874  else
20875    # No user supplied value. Locate compiler ourselves
20876    CXX=
20877    # If TOOLS_DIR is set, check for all compiler names in there first
20878    # before checking the rest of the PATH.
20879    if test -n "$TOOLS_DIR"; then
20880      PATH_save="$PATH"
20881      PATH="$TOOLS_DIR"
20882      for ac_prog in $SEARCH_LIST
20883do
20884  # Extract the first word of "$ac_prog", so it can be a program name with args.
20885set dummy $ac_prog; ac_word=$2
20886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20887$as_echo_n "checking for $ac_word... " >&6; }
20888if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20889  $as_echo_n "(cached) " >&6
20890else
20891  case $TOOLS_DIR_CXX in
20892  [\\/]* | ?:[\\/]*)
20893  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20894  ;;
20895  *)
20896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20897for as_dir in $PATH
20898do
20899  IFS=$as_save_IFS
20900  test -z "$as_dir" && as_dir=.
20901    for ac_exec_ext in '' $ac_executable_extensions; do
20902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20903    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20905    break 2
20906  fi
20907done
20908  done
20909IFS=$as_save_IFS
20910
20911  ;;
20912esac
20913fi
20914TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20915if test -n "$TOOLS_DIR_CXX"; then
20916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20917$as_echo "$TOOLS_DIR_CXX" >&6; }
20918else
20919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20920$as_echo "no" >&6; }
20921fi
20922
20923
20924  test -n "$TOOLS_DIR_CXX" && break
20925done
20926
20927      CXX=$TOOLS_DIR_CXX
20928      PATH="$PATH_save"
20929    fi
20930
20931    # AC_PATH_PROGS can't be run multiple times with the same variable,
20932    # so create a new name for this run.
20933    if test "x$CXX" = x; then
20934      for ac_prog in $SEARCH_LIST
20935do
20936  # Extract the first word of "$ac_prog", so it can be a program name with args.
20937set dummy $ac_prog; ac_word=$2
20938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20939$as_echo_n "checking for $ac_word... " >&6; }
20940if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20941  $as_echo_n "(cached) " >&6
20942else
20943  case $POTENTIAL_CXX in
20944  [\\/]* | ?:[\\/]*)
20945  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20946  ;;
20947  *)
20948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20949for as_dir in $PATH
20950do
20951  IFS=$as_save_IFS
20952  test -z "$as_dir" && as_dir=.
20953    for ac_exec_ext in '' $ac_executable_extensions; do
20954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20955    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20957    break 2
20958  fi
20959done
20960  done
20961IFS=$as_save_IFS
20962
20963  ;;
20964esac
20965fi
20966POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20967if test -n "$POTENTIAL_CXX"; then
20968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20969$as_echo "$POTENTIAL_CXX" >&6; }
20970else
20971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20972$as_echo "no" >&6; }
20973fi
20974
20975
20976  test -n "$POTENTIAL_CXX" && break
20977done
20978
20979      CXX=$POTENTIAL_CXX
20980    fi
20981
20982    if test "x$CXX" = x; then
20983
20984  # Print a helpful message on how to acquire the necessary build dependency.
20985  # devkit is the help tag: freetype, cups, pulse, alsa etc
20986  MISSING_DEPENDENCY=devkit
20987
20988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20989    cygwin_help $MISSING_DEPENDENCY
20990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20991    msys_help $MISSING_DEPENDENCY
20992  else
20993    PKGHANDLER_COMMAND=
20994
20995    case $PKGHANDLER in
20996      apt-get)
20997        apt_help     $MISSING_DEPENDENCY ;;
20998      yum)
20999        yum_help     $MISSING_DEPENDENCY ;;
21000      port)
21001        port_help    $MISSING_DEPENDENCY ;;
21002      pkgutil)
21003        pkgutil_help $MISSING_DEPENDENCY ;;
21004      pkgadd)
21005        pkgadd_help  $MISSING_DEPENDENCY ;;
21006    esac
21007
21008    if test "x$PKGHANDLER_COMMAND" != x; then
21009      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21010    fi
21011  fi
21012
21013      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21014    fi
21015  fi
21016
21017  # Now we have a compiler binary in CXX. Make sure it's okay.
21018
21019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21020
21021  # First separate the path from the arguments. This will split at the first
21022  # space.
21023  complete="$CXX"
21024  path="${complete%% *}"
21025  tmp="$complete EOL"
21026  arguments="${tmp#* }"
21027
21028  # Input might be given as Windows format, start by converting to
21029  # unix format.
21030  new_path=`$CYGPATH -u "$path"`
21031
21032  # Now try to locate executable using which
21033  new_path=`$WHICH "$new_path" 2> /dev/null`
21034  # bat and cmd files are not always considered executable in cygwin causing which
21035  # to not find them
21036  if test "x$new_path" = x \
21037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21039    new_path=`$CYGPATH -u "$path"`
21040  fi
21041  if test "x$new_path" = x; then
21042    # Oops. Which didn't find the executable.
21043    # The splitting of arguments from the executable at a space might have been incorrect,
21044    # since paths with space are more likely in Windows. Give it another try with the whole
21045    # argument.
21046    path="$complete"
21047    arguments="EOL"
21048    new_path=`$CYGPATH -u "$path"`
21049    new_path=`$WHICH "$new_path" 2> /dev/null`
21050    # bat and cmd files are not always considered executable in cygwin causing which
21051    # to not find them
21052    if test "x$new_path" = x \
21053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21055      new_path=`$CYGPATH -u "$path"`
21056    fi
21057    if test "x$new_path" = x; then
21058      # It's still not found. Now this is an unrecoverable error.
21059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21060$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21061      has_space=`$ECHO "$complete" | $GREP " "`
21062      if test "x$has_space" != x; then
21063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21065      fi
21066      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21067    fi
21068  fi
21069
21070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21073  # "foo.exe" is OK but "foo" is an error.
21074  #
21075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21076  # It is also a way to make sure we got the proper file name for the real test later on.
21077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21078  if test "x$test_shortpath" = x; then
21079    # Short path failed, file does not exist as specified.
21080    # Try adding .exe or .cmd
21081    if test -f "${new_path}.exe"; then
21082      input_to_shortpath="${new_path}.exe"
21083    elif test -f "${new_path}.cmd"; then
21084      input_to_shortpath="${new_path}.cmd"
21085    else
21086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21087$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21090      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21091    fi
21092  else
21093    input_to_shortpath="$new_path"
21094  fi
21095
21096  # Call helper function which possibly converts this using DOS-style short mode.
21097  # If so, the updated path is stored in $new_path.
21098  new_path="$input_to_shortpath"
21099
21100  input_path="$input_to_shortpath"
21101  # Check if we need to convert this using DOS-style short mode. If the path
21102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21103  # take no chances and rewrite it.
21104  # Note: m4 eats our [], so we need to use [ and ] instead.
21105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21106  if test "x$has_forbidden_chars" != x; then
21107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21111      # Going to short mode and back again did indeed matter. Since short mode is
21112      # case insensitive, let's make it lowercase to improve readability.
21113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21114      # Now convert it back to Unix-stile (cygpath)
21115      input_path=`$CYGPATH -u "$shortmode_path"`
21116      new_path="$input_path"
21117    fi
21118  fi
21119
21120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21121  if test "x$test_cygdrive_prefix" = x; then
21122    # As a simple fix, exclude /usr/bin since it's not a real path.
21123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21125      # a path prefixed by /cygdrive for fixpath to work.
21126      new_path="$CYGWIN_ROOT_PATH$input_path"
21127    fi
21128  fi
21129
21130  # remove trailing .exe if any
21131  new_path="${new_path/%.exe/}"
21132
21133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21134
21135  # First separate the path from the arguments. This will split at the first
21136  # space.
21137  complete="$CXX"
21138  path="${complete%% *}"
21139  tmp="$complete EOL"
21140  arguments="${tmp#* }"
21141
21142  # Input might be given as Windows format, start by converting to
21143  # unix format.
21144  new_path="$path"
21145
21146  windows_path="$new_path"
21147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21148    unix_path=`$CYGPATH -u "$windows_path"`
21149    new_path="$unix_path"
21150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21152    new_path="$unix_path"
21153  fi
21154
21155
21156  # Now try to locate executable using which
21157  new_path=`$WHICH "$new_path" 2> /dev/null`
21158
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="$path"
21167
21168  windows_path="$new_path"
21169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21170    unix_path=`$CYGPATH -u "$windows_path"`
21171    new_path="$unix_path"
21172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21174    new_path="$unix_path"
21175  fi
21176
21177
21178    new_path=`$WHICH "$new_path" 2> /dev/null`
21179
21180    if test "x$new_path" = x; then
21181      # It's still not found. Now this is an unrecoverable error.
21182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21183$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21184      has_space=`$ECHO "$complete" | $GREP " "`
21185      if test "x$has_space" != x; then
21186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21188      fi
21189      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21190    fi
21191  fi
21192
21193  # Now new_path has a complete unix path to the binary
21194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21195    # Keep paths in /bin as-is, but remove trailing .exe if any
21196    new_path="${new_path/%.exe/}"
21197    # Do not save /bin paths to all_fixpath_prefixes!
21198  else
21199    # Not in mixed or Windows style, start by that.
21200    new_path=`cmd //c echo $new_path`
21201
21202  input_path="$new_path"
21203  # Check if we need to convert this using DOS-style short mode. If the path
21204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21205  # take no chances and rewrite it.
21206  # Note: m4 eats our [], so we need to use [ and ] instead.
21207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21208  if test "x$has_forbidden_chars" != x; then
21209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21211  fi
21212
21213    # Output is in $new_path
21214
21215  windows_path="$new_path"
21216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21217    unix_path=`$CYGPATH -u "$windows_path"`
21218    new_path="$unix_path"
21219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21221    new_path="$unix_path"
21222  fi
21223
21224    # remove trailing .exe if any
21225    new_path="${new_path/%.exe/}"
21226
21227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21229  fi
21230
21231  else
21232    # We're on a posix platform. Hooray! :)
21233    # First separate the path from the arguments. This will split at the first
21234    # space.
21235    complete="$CXX"
21236    path="${complete%% *}"
21237    tmp="$complete EOL"
21238    arguments="${tmp#* }"
21239
21240    # Cannot rely on the command "which" here since it doesn't always work.
21241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21242    if test -z "$is_absolute_path"; then
21243      # Path to executable is not absolute. Find it.
21244      IFS_save="$IFS"
21245      IFS=:
21246      for p in $PATH; do
21247        if test -f "$p/$path" && test -x "$p/$path"; then
21248          new_path="$p/$path"
21249          break
21250        fi
21251      done
21252      IFS="$IFS_save"
21253    else
21254      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21255$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21256      new_path="$path"
21257    fi
21258
21259    if test "x$new_path" = x; then
21260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21261$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21262      has_space=`$ECHO "$complete" | $GREP " "`
21263      if test "x$has_space" != x; then
21264        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21266      fi
21267      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21268    fi
21269  fi
21270
21271  # Now join together the path and the arguments once again
21272  if test "x$arguments" != xEOL; then
21273    new_complete="$new_path ${arguments% *}"
21274  else
21275    new_complete="$new_path"
21276  fi
21277
21278  if test "x$complete" != "x$new_complete"; then
21279    CXX="$new_complete"
21280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21281$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21282  fi
21283
21284  TEST_COMPILER="$CXX"
21285  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21286  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21287  if test "x$OPENJDK_BUILD_OS" != xaix; then
21288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21289$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21290
21291  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21292    # Follow a chain of symbolic links. Use readlink
21293    # where it exists, else fall back to horribly
21294    # complicated shell code.
21295    if test "x$READLINK_TESTED" != yes; then
21296      # On MacOSX there is a readlink tool with a different
21297      # purpose than the GNU readlink tool. Check the found readlink.
21298      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21299      if test "x$ISGNU" = x; then
21300        # A readlink that we do not know how to use.
21301        # Are there other non-GNU readlinks out there?
21302        READLINK_TESTED=yes
21303        READLINK=
21304      fi
21305    fi
21306
21307    if test "x$READLINK" != x; then
21308      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21309    else
21310      # Save the current directory for restoring afterwards
21311      STARTDIR=$PWD
21312      COUNTER=0
21313      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21314      sym_link_file=`$BASENAME $TEST_COMPILER`
21315      cd $sym_link_dir
21316      # Use -P flag to resolve symlinks in directories.
21317      cd `$THEPWDCMD -P`
21318      sym_link_dir=`$THEPWDCMD -P`
21319      # Resolve file symlinks
21320      while test $COUNTER -lt 20; do
21321        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21322        if test "x$ISLINK" == x; then
21323          # This is not a symbolic link! We are done!
21324          break
21325        fi
21326        # Again resolve directory symlinks since the target of the just found
21327        # link could be in a different directory
21328        cd `$DIRNAME $ISLINK`
21329        sym_link_dir=`$THEPWDCMD -P`
21330        sym_link_file=`$BASENAME $ISLINK`
21331        let COUNTER=COUNTER+1
21332      done
21333      cd $STARTDIR
21334      TEST_COMPILER=$sym_link_dir/$sym_link_file
21335    fi
21336  fi
21337
21338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21339$as_echo "$TEST_COMPILER" >&6; }
21340  fi
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21342$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21343
21344  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21345  if test "x$COMPILER_BASENAME" = "xccache"; then
21346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21347$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21348    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21349    # We want to control ccache invocation ourselves, so ignore this cc and try
21350    # searching again.
21351
21352    # Remove the path to the fake ccache cc from the PATH
21353    RETRY_COMPILER_SAVED_PATH="$PATH"
21354    COMPILER_DIRNAME=`$DIRNAME $CXX`
21355    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21356
21357    # Try again looking for our compiler
21358    if test -n "$ac_tool_prefix"; then
21359  for ac_prog in $COMPILER_CHECK_LIST
21360  do
21361    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21362set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21364$as_echo_n "checking for $ac_word... " >&6; }
21365if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21366  $as_echo_n "(cached) " >&6
21367else
21368  if test -n "$PROPER_COMPILER_CXX"; then
21369  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21370else
21371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21372for as_dir in $PATH
21373do
21374  IFS=$as_save_IFS
21375  test -z "$as_dir" && as_dir=.
21376    for ac_exec_ext in '' $ac_executable_extensions; do
21377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21378    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21380    break 2
21381  fi
21382done
21383  done
21384IFS=$as_save_IFS
21385
21386fi
21387fi
21388PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21389if test -n "$PROPER_COMPILER_CXX"; then
21390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21391$as_echo "$PROPER_COMPILER_CXX" >&6; }
21392else
21393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21394$as_echo "no" >&6; }
21395fi
21396
21397
21398    test -n "$PROPER_COMPILER_CXX" && break
21399  done
21400fi
21401if test -z "$PROPER_COMPILER_CXX"; then
21402  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21403  for ac_prog in $COMPILER_CHECK_LIST
21404do
21405  # Extract the first word of "$ac_prog", so it can be a program name with args.
21406set dummy $ac_prog; ac_word=$2
21407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21408$as_echo_n "checking for $ac_word... " >&6; }
21409if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21410  $as_echo_n "(cached) " >&6
21411else
21412  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21413  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21414else
21415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21416for as_dir in $PATH
21417do
21418  IFS=$as_save_IFS
21419  test -z "$as_dir" && as_dir=.
21420    for ac_exec_ext in '' $ac_executable_extensions; do
21421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21422    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21424    break 2
21425  fi
21426done
21427  done
21428IFS=$as_save_IFS
21429
21430fi
21431fi
21432ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21433if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21435$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21436else
21437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21438$as_echo "no" >&6; }
21439fi
21440
21441
21442  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21443done
21444
21445  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21446    PROPER_COMPILER_CXX=""
21447  else
21448    case $cross_compiling:$ac_tool_warned in
21449yes:)
21450{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21451$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21452ac_tool_warned=yes ;;
21453esac
21454    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21455  fi
21456fi
21457
21458
21459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21460
21461  # First separate the path from the arguments. This will split at the first
21462  # space.
21463  complete="$PROPER_COMPILER_CXX"
21464  path="${complete%% *}"
21465  tmp="$complete EOL"
21466  arguments="${tmp#* }"
21467
21468  # Input might be given as Windows format, start by converting to
21469  # unix format.
21470  new_path=`$CYGPATH -u "$path"`
21471
21472  # Now try to locate executable using which
21473  new_path=`$WHICH "$new_path" 2> /dev/null`
21474  # bat and cmd files are not always considered executable in cygwin causing which
21475  # to not find them
21476  if test "x$new_path" = x \
21477      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21478      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21479    new_path=`$CYGPATH -u "$path"`
21480  fi
21481  if test "x$new_path" = x; then
21482    # Oops. Which didn't find the executable.
21483    # The splitting of arguments from the executable at a space might have been incorrect,
21484    # since paths with space are more likely in Windows. Give it another try with the whole
21485    # argument.
21486    path="$complete"
21487    arguments="EOL"
21488    new_path=`$CYGPATH -u "$path"`
21489    new_path=`$WHICH "$new_path" 2> /dev/null`
21490    # bat and cmd files are not always considered executable in cygwin causing which
21491    # to not find them
21492    if test "x$new_path" = x \
21493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21495      new_path=`$CYGPATH -u "$path"`
21496    fi
21497    if test "x$new_path" = x; then
21498      # It's still not found. Now this is an unrecoverable error.
21499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21500$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21501      has_space=`$ECHO "$complete" | $GREP " "`
21502      if test "x$has_space" != x; then
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21505      fi
21506      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21507    fi
21508  fi
21509
21510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21513  # "foo.exe" is OK but "foo" is an error.
21514  #
21515  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21516  # It is also a way to make sure we got the proper file name for the real test later on.
21517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21518  if test "x$test_shortpath" = x; then
21519    # Short path failed, file does not exist as specified.
21520    # Try adding .exe or .cmd
21521    if test -f "${new_path}.exe"; then
21522      input_to_shortpath="${new_path}.exe"
21523    elif test -f "${new_path}.cmd"; then
21524      input_to_shortpath="${new_path}.cmd"
21525    else
21526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21527$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21530      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21531    fi
21532  else
21533    input_to_shortpath="$new_path"
21534  fi
21535
21536  # Call helper function which possibly converts this using DOS-style short mode.
21537  # If so, the updated path is stored in $new_path.
21538  new_path="$input_to_shortpath"
21539
21540  input_path="$input_to_shortpath"
21541  # Check if we need to convert this using DOS-style short mode. If the path
21542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21543  # take no chances and rewrite it.
21544  # Note: m4 eats our [], so we need to use [ and ] instead.
21545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21546  if test "x$has_forbidden_chars" != x; then
21547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21551      # Going to short mode and back again did indeed matter. Since short mode is
21552      # case insensitive, let's make it lowercase to improve readability.
21553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21554      # Now convert it back to Unix-stile (cygpath)
21555      input_path=`$CYGPATH -u "$shortmode_path"`
21556      new_path="$input_path"
21557    fi
21558  fi
21559
21560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21561  if test "x$test_cygdrive_prefix" = x; then
21562    # As a simple fix, exclude /usr/bin since it's not a real path.
21563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21565      # a path prefixed by /cygdrive for fixpath to work.
21566      new_path="$CYGWIN_ROOT_PATH$input_path"
21567    fi
21568  fi
21569
21570  # remove trailing .exe if any
21571  new_path="${new_path/%.exe/}"
21572
21573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21574
21575  # First separate the path from the arguments. This will split at the first
21576  # space.
21577  complete="$PROPER_COMPILER_CXX"
21578  path="${complete%% *}"
21579  tmp="$complete EOL"
21580  arguments="${tmp#* }"
21581
21582  # Input might be given as Windows format, start by converting to
21583  # unix format.
21584  new_path="$path"
21585
21586  windows_path="$new_path"
21587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21588    unix_path=`$CYGPATH -u "$windows_path"`
21589    new_path="$unix_path"
21590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21592    new_path="$unix_path"
21593  fi
21594
21595
21596  # Now try to locate executable using which
21597  new_path=`$WHICH "$new_path" 2> /dev/null`
21598
21599  if test "x$new_path" = x; then
21600    # Oops. Which didn't find the executable.
21601    # The splitting of arguments from the executable at a space might have been incorrect,
21602    # since paths with space are more likely in Windows. Give it another try with the whole
21603    # argument.
21604    path="$complete"
21605    arguments="EOL"
21606    new_path="$path"
21607
21608  windows_path="$new_path"
21609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21610    unix_path=`$CYGPATH -u "$windows_path"`
21611    new_path="$unix_path"
21612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21614    new_path="$unix_path"
21615  fi
21616
21617
21618    new_path=`$WHICH "$new_path" 2> /dev/null`
21619
21620    if test "x$new_path" = x; then
21621      # It's still not found. Now this is an unrecoverable error.
21622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21623$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21624      has_space=`$ECHO "$complete" | $GREP " "`
21625      if test "x$has_space" != x; then
21626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21628      fi
21629      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21630    fi
21631  fi
21632
21633  # Now new_path has a complete unix path to the binary
21634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21635    # Keep paths in /bin as-is, but remove trailing .exe if any
21636    new_path="${new_path/%.exe/}"
21637    # Do not save /bin paths to all_fixpath_prefixes!
21638  else
21639    # Not in mixed or Windows style, start by that.
21640    new_path=`cmd //c echo $new_path`
21641
21642  input_path="$new_path"
21643  # Check if we need to convert this using DOS-style short mode. If the path
21644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21645  # take no chances and rewrite it.
21646  # Note: m4 eats our [], so we need to use [ and ] instead.
21647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21648  if test "x$has_forbidden_chars" != x; then
21649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21651  fi
21652
21653    # Output is in $new_path
21654
21655  windows_path="$new_path"
21656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21657    unix_path=`$CYGPATH -u "$windows_path"`
21658    new_path="$unix_path"
21659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21661    new_path="$unix_path"
21662  fi
21663
21664    # remove trailing .exe if any
21665    new_path="${new_path/%.exe/}"
21666
21667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21669  fi
21670
21671  else
21672    # We're on a posix platform. Hooray! :)
21673    # First separate the path from the arguments. This will split at the first
21674    # space.
21675    complete="$PROPER_COMPILER_CXX"
21676    path="${complete%% *}"
21677    tmp="$complete EOL"
21678    arguments="${tmp#* }"
21679
21680    # Cannot rely on the command "which" here since it doesn't always work.
21681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21682    if test -z "$is_absolute_path"; then
21683      # Path to executable is not absolute. Find it.
21684      IFS_save="$IFS"
21685      IFS=:
21686      for p in $PATH; do
21687        if test -f "$p/$path" && test -x "$p/$path"; then
21688          new_path="$p/$path"
21689          break
21690        fi
21691      done
21692      IFS="$IFS_save"
21693    else
21694      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21695$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21696      new_path="$path"
21697    fi
21698
21699    if test "x$new_path" = x; then
21700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21701$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21702      has_space=`$ECHO "$complete" | $GREP " "`
21703      if test "x$has_space" != x; then
21704        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21706      fi
21707      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21708    fi
21709  fi
21710
21711  # Now join together the path and the arguments once again
21712  if test "x$arguments" != xEOL; then
21713    new_complete="$new_path ${arguments% *}"
21714  else
21715    new_complete="$new_path"
21716  fi
21717
21718  if test "x$complete" != "x$new_complete"; then
21719    PROPER_COMPILER_CXX="$new_complete"
21720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21721$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21722  fi
21723
21724    PATH="$RETRY_COMPILER_SAVED_PATH"
21725
21726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21727$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21728
21729  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21730    # Follow a chain of symbolic links. Use readlink
21731    # where it exists, else fall back to horribly
21732    # complicated shell code.
21733    if test "x$READLINK_TESTED" != yes; then
21734      # On MacOSX there is a readlink tool with a different
21735      # purpose than the GNU readlink tool. Check the found readlink.
21736      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21737      if test "x$ISGNU" = x; then
21738        # A readlink that we do not know how to use.
21739        # Are there other non-GNU readlinks out there?
21740        READLINK_TESTED=yes
21741        READLINK=
21742      fi
21743    fi
21744
21745    if test "x$READLINK" != x; then
21746      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21747    else
21748      # Save the current directory for restoring afterwards
21749      STARTDIR=$PWD
21750      COUNTER=0
21751      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21752      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21753      cd $sym_link_dir
21754      # Use -P flag to resolve symlinks in directories.
21755      cd `$THEPWDCMD -P`
21756      sym_link_dir=`$THEPWDCMD -P`
21757      # Resolve file symlinks
21758      while test $COUNTER -lt 20; do
21759        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21760        if test "x$ISLINK" == x; then
21761          # This is not a symbolic link! We are done!
21762          break
21763        fi
21764        # Again resolve directory symlinks since the target of the just found
21765        # link could be in a different directory
21766        cd `$DIRNAME $ISLINK`
21767        sym_link_dir=`$THEPWDCMD -P`
21768        sym_link_file=`$BASENAME $ISLINK`
21769        let COUNTER=COUNTER+1
21770      done
21771      cd $STARTDIR
21772      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21773    fi
21774  fi
21775
21776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21777$as_echo "$PROPER_COMPILER_CXX" >&6; }
21778    CXX="$PROPER_COMPILER_CXX"
21779  else
21780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21781$as_echo "no, keeping CXX" >&6; }
21782  fi
21783
21784
21785  COMPILER=$CXX
21786  COMPILER_NAME=$COMPILER_NAME
21787
21788  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21789    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21790    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21791    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21792    if test $? -ne 0; then
21793      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21794
21795      { $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
21796$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21797      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21798$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21799      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21800    else
21801      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21802      COMPILER_VENDOR="Sun Studio"
21803    fi
21804  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21805      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21806      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21807      if test $? -ne 0; then
21808        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21809      else
21810        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21811        COMPILER_VENDOR='IBM'
21812      fi
21813  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21814    # First line typically looks something like:
21815    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21816    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21817    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21818    COMPILER_VENDOR="Microsoft CL.EXE"
21819    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21820    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21821      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21822        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21823      fi
21824    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21825      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21826        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21827      fi
21828    fi
21829  else
21830    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21831    # Check that this is likely to be GCC.
21832    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21833    if test $? -ne 0; then
21834      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21835$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21836      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21837$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21838      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21839    fi
21840
21841    # First line typically looks something like:
21842    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21843    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21844    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21845  fi
21846  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21847  CXX_VERSION="$COMPILER_VERSION"
21848  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21849  CXX_VENDOR="$COMPILER_VENDOR"
21850
21851  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21852$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21853
21854
21855  # Now that we have resolved CXX ourself, let autoconf have its go at it
21856  ac_ext=cpp
21857ac_cpp='$CXXCPP $CPPFLAGS'
21858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21861if test -z "$CXX"; then
21862  if test -n "$CCC"; then
21863    CXX=$CCC
21864  else
21865    if test -n "$ac_tool_prefix"; then
21866  for ac_prog in $CXX
21867  do
21868    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21871$as_echo_n "checking for $ac_word... " >&6; }
21872if ${ac_cv_prog_CXX+:} false; then :
21873  $as_echo_n "(cached) " >&6
21874else
21875  if test -n "$CXX"; then
21876  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21877else
21878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21879for as_dir in $PATH
21880do
21881  IFS=$as_save_IFS
21882  test -z "$as_dir" && as_dir=.
21883    for ac_exec_ext in '' $ac_executable_extensions; do
21884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21885    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21887    break 2
21888  fi
21889done
21890  done
21891IFS=$as_save_IFS
21892
21893fi
21894fi
21895CXX=$ac_cv_prog_CXX
21896if test -n "$CXX"; then
21897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21898$as_echo "$CXX" >&6; }
21899else
21900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21901$as_echo "no" >&6; }
21902fi
21903
21904
21905    test -n "$CXX" && break
21906  done
21907fi
21908if test -z "$CXX"; then
21909  ac_ct_CXX=$CXX
21910  for ac_prog in $CXX
21911do
21912  # Extract the first word of "$ac_prog", so it can be a program name with args.
21913set dummy $ac_prog; ac_word=$2
21914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21915$as_echo_n "checking for $ac_word... " >&6; }
21916if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21917  $as_echo_n "(cached) " >&6
21918else
21919  if test -n "$ac_ct_CXX"; then
21920  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21921else
21922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21923for as_dir in $PATH
21924do
21925  IFS=$as_save_IFS
21926  test -z "$as_dir" && as_dir=.
21927    for ac_exec_ext in '' $ac_executable_extensions; do
21928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21929    ac_cv_prog_ac_ct_CXX="$ac_prog"
21930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21931    break 2
21932  fi
21933done
21934  done
21935IFS=$as_save_IFS
21936
21937fi
21938fi
21939ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21940if test -n "$ac_ct_CXX"; then
21941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21942$as_echo "$ac_ct_CXX" >&6; }
21943else
21944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21945$as_echo "no" >&6; }
21946fi
21947
21948
21949  test -n "$ac_ct_CXX" && break
21950done
21951
21952  if test "x$ac_ct_CXX" = x; then
21953    CXX="g++"
21954  else
21955    case $cross_compiling:$ac_tool_warned in
21956yes:)
21957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21959ac_tool_warned=yes ;;
21960esac
21961    CXX=$ac_ct_CXX
21962  fi
21963fi
21964
21965  fi
21966fi
21967# Provide some information about the compiler.
21968$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21969set X $ac_compile
21970ac_compiler=$2
21971for ac_option in --version -v -V -qversion; do
21972  { { ac_try="$ac_compiler $ac_option >&5"
21973case "(($ac_try" in
21974  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21975  *) ac_try_echo=$ac_try;;
21976esac
21977eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21978$as_echo "$ac_try_echo"; } >&5
21979  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21980  ac_status=$?
21981  if test -s conftest.err; then
21982    sed '10a\
21983... rest of stderr output deleted ...
21984         10q' conftest.err >conftest.er1
21985    cat conftest.er1 >&5
21986  fi
21987  rm -f conftest.er1 conftest.err
21988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21989  test $ac_status = 0; }
21990done
21991
21992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21993$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21994if ${ac_cv_cxx_compiler_gnu+:} false; then :
21995  $as_echo_n "(cached) " >&6
21996else
21997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21998/* end confdefs.h.  */
21999
22000int
22001main ()
22002{
22003#ifndef __GNUC__
22004       choke me
22005#endif
22006
22007  ;
22008  return 0;
22009}
22010_ACEOF
22011if ac_fn_cxx_try_compile "$LINENO"; then :
22012  ac_compiler_gnu=yes
22013else
22014  ac_compiler_gnu=no
22015fi
22016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22017ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22018
22019fi
22020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22021$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22022if test $ac_compiler_gnu = yes; then
22023  GXX=yes
22024else
22025  GXX=
22026fi
22027ac_test_CXXFLAGS=${CXXFLAGS+set}
22028ac_save_CXXFLAGS=$CXXFLAGS
22029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22030$as_echo_n "checking whether $CXX accepts -g... " >&6; }
22031if ${ac_cv_prog_cxx_g+:} false; then :
22032  $as_echo_n "(cached) " >&6
22033else
22034  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22035   ac_cxx_werror_flag=yes
22036   ac_cv_prog_cxx_g=no
22037   CXXFLAGS="-g"
22038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22039/* end confdefs.h.  */
22040
22041int
22042main ()
22043{
22044
22045  ;
22046  return 0;
22047}
22048_ACEOF
22049if ac_fn_cxx_try_compile "$LINENO"; then :
22050  ac_cv_prog_cxx_g=yes
22051else
22052  CXXFLAGS=""
22053      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22054/* end confdefs.h.  */
22055
22056int
22057main ()
22058{
22059
22060  ;
22061  return 0;
22062}
22063_ACEOF
22064if ac_fn_cxx_try_compile "$LINENO"; then :
22065
22066else
22067  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22068	 CXXFLAGS="-g"
22069	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070/* end confdefs.h.  */
22071
22072int
22073main ()
22074{
22075
22076  ;
22077  return 0;
22078}
22079_ACEOF
22080if ac_fn_cxx_try_compile "$LINENO"; then :
22081  ac_cv_prog_cxx_g=yes
22082fi
22083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22084fi
22085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22086fi
22087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22088   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22089fi
22090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22091$as_echo "$ac_cv_prog_cxx_g" >&6; }
22092if test "$ac_test_CXXFLAGS" = set; then
22093  CXXFLAGS=$ac_save_CXXFLAGS
22094elif test $ac_cv_prog_cxx_g = yes; then
22095  if test "$GXX" = yes; then
22096    CXXFLAGS="-g -O2"
22097  else
22098    CXXFLAGS="-g"
22099  fi
22100else
22101  if test "$GXX" = yes; then
22102    CXXFLAGS="-O2"
22103  else
22104    CXXFLAGS=
22105  fi
22106fi
22107ac_ext=cpp
22108ac_cpp='$CXXCPP $CPPFLAGS'
22109ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22110ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22111ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22112
22113
22114  ### Locate other tools
22115
22116  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22117    ac_ext=m
22118ac_cpp='$OBJCPP $CPPFLAGS'
22119ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22120ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22121ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22122if test -n "$ac_tool_prefix"; then
22123  for ac_prog in gcc objcc objc cc CC
22124  do
22125    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22126set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22128$as_echo_n "checking for $ac_word... " >&6; }
22129if ${ac_cv_prog_OBJC+:} false; then :
22130  $as_echo_n "(cached) " >&6
22131else
22132  if test -n "$OBJC"; then
22133  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22134else
22135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22136for as_dir in $PATH
22137do
22138  IFS=$as_save_IFS
22139  test -z "$as_dir" && as_dir=.
22140    for ac_exec_ext in '' $ac_executable_extensions; do
22141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22142    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22144    break 2
22145  fi
22146done
22147  done
22148IFS=$as_save_IFS
22149
22150fi
22151fi
22152OBJC=$ac_cv_prog_OBJC
22153if test -n "$OBJC"; then
22154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22155$as_echo "$OBJC" >&6; }
22156else
22157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22158$as_echo "no" >&6; }
22159fi
22160
22161
22162    test -n "$OBJC" && break
22163  done
22164fi
22165if test -z "$OBJC"; then
22166  ac_ct_OBJC=$OBJC
22167  for ac_prog in gcc objcc objc cc CC
22168do
22169  # Extract the first word of "$ac_prog", so it can be a program name with args.
22170set dummy $ac_prog; ac_word=$2
22171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22172$as_echo_n "checking for $ac_word... " >&6; }
22173if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22174  $as_echo_n "(cached) " >&6
22175else
22176  if test -n "$ac_ct_OBJC"; then
22177  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22178else
22179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22180for as_dir in $PATH
22181do
22182  IFS=$as_save_IFS
22183  test -z "$as_dir" && as_dir=.
22184    for ac_exec_ext in '' $ac_executable_extensions; do
22185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22186    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22188    break 2
22189  fi
22190done
22191  done
22192IFS=$as_save_IFS
22193
22194fi
22195fi
22196ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22197if test -n "$ac_ct_OBJC"; then
22198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22199$as_echo "$ac_ct_OBJC" >&6; }
22200else
22201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22202$as_echo "no" >&6; }
22203fi
22204
22205
22206  test -n "$ac_ct_OBJC" && break
22207done
22208
22209  if test "x$ac_ct_OBJC" = x; then
22210    OBJC="gcc"
22211  else
22212    case $cross_compiling:$ac_tool_warned in
22213yes:)
22214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22216ac_tool_warned=yes ;;
22217esac
22218    OBJC=$ac_ct_OBJC
22219  fi
22220fi
22221
22222# Provide some information about the compiler.
22223$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22224set X $ac_compile
22225ac_compiler=$2
22226for ac_option in --version -v -V -qversion; do
22227  { { ac_try="$ac_compiler $ac_option >&5"
22228case "(($ac_try" in
22229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22230  *) ac_try_echo=$ac_try;;
22231esac
22232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22233$as_echo "$ac_try_echo"; } >&5
22234  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22235  ac_status=$?
22236  if test -s conftest.err; then
22237    sed '10a\
22238... rest of stderr output deleted ...
22239         10q' conftest.err >conftest.er1
22240    cat conftest.er1 >&5
22241  fi
22242  rm -f conftest.er1 conftest.err
22243  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22244  test $ac_status = 0; }
22245done
22246
22247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22248$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22249if ${ac_cv_objc_compiler_gnu+:} false; then :
22250  $as_echo_n "(cached) " >&6
22251else
22252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22253/* end confdefs.h.  */
22254
22255int
22256main ()
22257{
22258#ifndef __GNUC__
22259       choke me
22260#endif
22261
22262  ;
22263  return 0;
22264}
22265_ACEOF
22266if ac_fn_objc_try_compile "$LINENO"; then :
22267  ac_compiler_gnu=yes
22268else
22269  ac_compiler_gnu=no
22270fi
22271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22272ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22273
22274fi
22275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22276$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22277if test $ac_compiler_gnu = yes; then
22278  GOBJC=yes
22279else
22280  GOBJC=
22281fi
22282ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22283ac_save_OBJCFLAGS=$OBJCFLAGS
22284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22285$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22286if ${ac_cv_prog_objc_g+:} false; then :
22287  $as_echo_n "(cached) " >&6
22288else
22289  ac_save_objc_werror_flag=$ac_objc_werror_flag
22290   ac_objc_werror_flag=yes
22291   ac_cv_prog_objc_g=no
22292   OBJCFLAGS="-g"
22293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22294/* end confdefs.h.  */
22295
22296int
22297main ()
22298{
22299
22300  ;
22301  return 0;
22302}
22303_ACEOF
22304if ac_fn_objc_try_compile "$LINENO"; then :
22305  ac_cv_prog_objc_g=yes
22306else
22307  OBJCFLAGS=""
22308      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22309/* end confdefs.h.  */
22310
22311int
22312main ()
22313{
22314
22315  ;
22316  return 0;
22317}
22318_ACEOF
22319if ac_fn_objc_try_compile "$LINENO"; then :
22320
22321else
22322  ac_objc_werror_flag=$ac_save_objc_werror_flag
22323	 OBJCFLAGS="-g"
22324	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22325/* end confdefs.h.  */
22326
22327int
22328main ()
22329{
22330
22331  ;
22332  return 0;
22333}
22334_ACEOF
22335if ac_fn_objc_try_compile "$LINENO"; then :
22336  ac_cv_prog_objc_g=yes
22337fi
22338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22339fi
22340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22341fi
22342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22343   ac_objc_werror_flag=$ac_save_objc_werror_flag
22344fi
22345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22346$as_echo "$ac_cv_prog_objc_g" >&6; }
22347if test "$ac_test_OBJCFLAGS" = set; then
22348  OBJCFLAGS=$ac_save_OBJCFLAGS
22349elif test $ac_cv_prog_objc_g = yes; then
22350  if test "$GOBJC" = yes; then
22351    OBJCFLAGS="-g -O2"
22352  else
22353    OBJCFLAGS="-g"
22354  fi
22355else
22356  if test "$GOBJC" = yes; then
22357    OBJCFLAGS="-O2"
22358  else
22359    OBJCFLAGS=
22360  fi
22361fi
22362ac_ext=cpp
22363ac_cpp='$CXXCPP $CPPFLAGS'
22364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22367
22368
22369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22370
22371  # First separate the path from the arguments. This will split at the first
22372  # space.
22373  complete="$OBJC"
22374  path="${complete%% *}"
22375  tmp="$complete EOL"
22376  arguments="${tmp#* }"
22377
22378  # Input might be given as Windows format, start by converting to
22379  # unix format.
22380  new_path=`$CYGPATH -u "$path"`
22381
22382  # Now try to locate executable using which
22383  new_path=`$WHICH "$new_path" 2> /dev/null`
22384  # bat and cmd files are not always considered executable in cygwin causing which
22385  # to not find them
22386  if test "x$new_path" = x \
22387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22389    new_path=`$CYGPATH -u "$path"`
22390  fi
22391  if test "x$new_path" = x; then
22392    # Oops. Which didn't find the executable.
22393    # The splitting of arguments from the executable at a space might have been incorrect,
22394    # since paths with space are more likely in Windows. Give it another try with the whole
22395    # argument.
22396    path="$complete"
22397    arguments="EOL"
22398    new_path=`$CYGPATH -u "$path"`
22399    new_path=`$WHICH "$new_path" 2> /dev/null`
22400    # bat and cmd files are not always considered executable in cygwin causing which
22401    # to not find them
22402    if test "x$new_path" = x \
22403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22405      new_path=`$CYGPATH -u "$path"`
22406    fi
22407    if test "x$new_path" = x; then
22408      # It's still not found. Now this is an unrecoverable error.
22409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22410$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22411      has_space=`$ECHO "$complete" | $GREP " "`
22412      if test "x$has_space" != x; then
22413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22415      fi
22416      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22417    fi
22418  fi
22419
22420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22423  # "foo.exe" is OK but "foo" is an error.
22424  #
22425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22426  # It is also a way to make sure we got the proper file name for the real test later on.
22427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22428  if test "x$test_shortpath" = x; then
22429    # Short path failed, file does not exist as specified.
22430    # Try adding .exe or .cmd
22431    if test -f "${new_path}.exe"; then
22432      input_to_shortpath="${new_path}.exe"
22433    elif test -f "${new_path}.cmd"; then
22434      input_to_shortpath="${new_path}.cmd"
22435    else
22436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22437$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22440      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22441    fi
22442  else
22443    input_to_shortpath="$new_path"
22444  fi
22445
22446  # Call helper function which possibly converts this using DOS-style short mode.
22447  # If so, the updated path is stored in $new_path.
22448  new_path="$input_to_shortpath"
22449
22450  input_path="$input_to_shortpath"
22451  # Check if we need to convert this using DOS-style short mode. If the path
22452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22453  # take no chances and rewrite it.
22454  # Note: m4 eats our [], so we need to use [ and ] instead.
22455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22456  if test "x$has_forbidden_chars" != x; then
22457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22461      # Going to short mode and back again did indeed matter. Since short mode is
22462      # case insensitive, let's make it lowercase to improve readability.
22463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22464      # Now convert it back to Unix-stile (cygpath)
22465      input_path=`$CYGPATH -u "$shortmode_path"`
22466      new_path="$input_path"
22467    fi
22468  fi
22469
22470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22471  if test "x$test_cygdrive_prefix" = x; then
22472    # As a simple fix, exclude /usr/bin since it's not a real path.
22473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22475      # a path prefixed by /cygdrive for fixpath to work.
22476      new_path="$CYGWIN_ROOT_PATH$input_path"
22477    fi
22478  fi
22479
22480  # remove trailing .exe if any
22481  new_path="${new_path/%.exe/}"
22482
22483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22484
22485  # First separate the path from the arguments. This will split at the first
22486  # space.
22487  complete="$OBJC"
22488  path="${complete%% *}"
22489  tmp="$complete EOL"
22490  arguments="${tmp#* }"
22491
22492  # Input might be given as Windows format, start by converting to
22493  # unix format.
22494  new_path="$path"
22495
22496  windows_path="$new_path"
22497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22498    unix_path=`$CYGPATH -u "$windows_path"`
22499    new_path="$unix_path"
22500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22502    new_path="$unix_path"
22503  fi
22504
22505
22506  # Now try to locate executable using which
22507  new_path=`$WHICH "$new_path" 2> /dev/null`
22508
22509  if test "x$new_path" = x; then
22510    # Oops. Which didn't find the executable.
22511    # The splitting of arguments from the executable at a space might have been incorrect,
22512    # since paths with space are more likely in Windows. Give it another try with the whole
22513    # argument.
22514    path="$complete"
22515    arguments="EOL"
22516    new_path="$path"
22517
22518  windows_path="$new_path"
22519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22520    unix_path=`$CYGPATH -u "$windows_path"`
22521    new_path="$unix_path"
22522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22524    new_path="$unix_path"
22525  fi
22526
22527
22528    new_path=`$WHICH "$new_path" 2> /dev/null`
22529
22530    if test "x$new_path" = x; then
22531      # It's still not found. Now this is an unrecoverable error.
22532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22533$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22534      has_space=`$ECHO "$complete" | $GREP " "`
22535      if test "x$has_space" != x; then
22536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22538      fi
22539      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22540    fi
22541  fi
22542
22543  # Now new_path has a complete unix path to the binary
22544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22545    # Keep paths in /bin as-is, but remove trailing .exe if any
22546    new_path="${new_path/%.exe/}"
22547    # Do not save /bin paths to all_fixpath_prefixes!
22548  else
22549    # Not in mixed or Windows style, start by that.
22550    new_path=`cmd //c echo $new_path`
22551
22552  input_path="$new_path"
22553  # Check if we need to convert this using DOS-style short mode. If the path
22554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22555  # take no chances and rewrite it.
22556  # Note: m4 eats our [], so we need to use [ and ] instead.
22557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22558  if test "x$has_forbidden_chars" != x; then
22559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22561  fi
22562
22563    # Output is in $new_path
22564
22565  windows_path="$new_path"
22566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22567    unix_path=`$CYGPATH -u "$windows_path"`
22568    new_path="$unix_path"
22569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22571    new_path="$unix_path"
22572  fi
22573
22574    # remove trailing .exe if any
22575    new_path="${new_path/%.exe/}"
22576
22577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22579  fi
22580
22581  else
22582    # We're on a posix platform. Hooray! :)
22583    # First separate the path from the arguments. This will split at the first
22584    # space.
22585    complete="$OBJC"
22586    path="${complete%% *}"
22587    tmp="$complete EOL"
22588    arguments="${tmp#* }"
22589
22590    # Cannot rely on the command "which" here since it doesn't always work.
22591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22592    if test -z "$is_absolute_path"; then
22593      # Path to executable is not absolute. Find it.
22594      IFS_save="$IFS"
22595      IFS=:
22596      for p in $PATH; do
22597        if test -f "$p/$path" && test -x "$p/$path"; then
22598          new_path="$p/$path"
22599          break
22600        fi
22601      done
22602      IFS="$IFS_save"
22603    else
22604      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22605$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22606      new_path="$path"
22607    fi
22608
22609    if test "x$new_path" = x; then
22610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22611$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22612      has_space=`$ECHO "$complete" | $GREP " "`
22613      if test "x$has_space" != x; then
22614        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22616      fi
22617      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22618    fi
22619  fi
22620
22621  # Now join together the path and the arguments once again
22622  if test "x$arguments" != xEOL; then
22623    new_complete="$new_path ${arguments% *}"
22624  else
22625    new_complete="$new_path"
22626  fi
22627
22628  if test "x$complete" != "x$new_complete"; then
22629    OBJC="$new_complete"
22630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22631$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22632  fi
22633
22634  else
22635    OBJC=
22636  fi
22637
22638  # Restore the flags to the user specified values.
22639  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22640  CFLAGS="$ORG_CFLAGS"
22641  CXXFLAGS="$ORG_CXXFLAGS"
22642  OBJCFLAGS="$ORG_OBJCFLAGS"
22643
22644  LD="$CC"
22645  LDEXE="$CC"
22646  LDCXX="$CXX"
22647  LDEXECXX="$CXX"
22648
22649  # LDEXE is the linker to use, when creating executables.
22650
22651  # Linking C++ libraries.
22652
22653  # Linking C++ executables.
22654
22655
22656  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22657    if test -n "$ac_tool_prefix"; then
22658  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22659set dummy ${ac_tool_prefix}ar; ac_word=$2
22660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22661$as_echo_n "checking for $ac_word... " >&6; }
22662if ${ac_cv_prog_AR+:} false; then :
22663  $as_echo_n "(cached) " >&6
22664else
22665  if test -n "$AR"; then
22666  ac_cv_prog_AR="$AR" # Let the user override the test.
22667else
22668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22669for as_dir in $PATH
22670do
22671  IFS=$as_save_IFS
22672  test -z "$as_dir" && as_dir=.
22673    for ac_exec_ext in '' $ac_executable_extensions; do
22674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22675    ac_cv_prog_AR="${ac_tool_prefix}ar"
22676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22677    break 2
22678  fi
22679done
22680  done
22681IFS=$as_save_IFS
22682
22683fi
22684fi
22685AR=$ac_cv_prog_AR
22686if test -n "$AR"; then
22687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22688$as_echo "$AR" >&6; }
22689else
22690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22691$as_echo "no" >&6; }
22692fi
22693
22694
22695fi
22696if test -z "$ac_cv_prog_AR"; then
22697  ac_ct_AR=$AR
22698  # Extract the first word of "ar", so it can be a program name with args.
22699set dummy ar; ac_word=$2
22700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22701$as_echo_n "checking for $ac_word... " >&6; }
22702if ${ac_cv_prog_ac_ct_AR+:} false; then :
22703  $as_echo_n "(cached) " >&6
22704else
22705  if test -n "$ac_ct_AR"; then
22706  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22707else
22708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22709for as_dir in $PATH
22710do
22711  IFS=$as_save_IFS
22712  test -z "$as_dir" && as_dir=.
22713    for ac_exec_ext in '' $ac_executable_extensions; do
22714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22715    ac_cv_prog_ac_ct_AR="ar"
22716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22717    break 2
22718  fi
22719done
22720  done
22721IFS=$as_save_IFS
22722
22723fi
22724fi
22725ac_ct_AR=$ac_cv_prog_ac_ct_AR
22726if test -n "$ac_ct_AR"; then
22727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22728$as_echo "$ac_ct_AR" >&6; }
22729else
22730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22731$as_echo "no" >&6; }
22732fi
22733
22734  if test "x$ac_ct_AR" = x; then
22735    AR=""
22736  else
22737    case $cross_compiling:$ac_tool_warned in
22738yes:)
22739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22741ac_tool_warned=yes ;;
22742esac
22743    AR=$ac_ct_AR
22744  fi
22745else
22746  AR="$ac_cv_prog_AR"
22747fi
22748
22749
22750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22751
22752  # First separate the path from the arguments. This will split at the first
22753  # space.
22754  complete="$AR"
22755  path="${complete%% *}"
22756  tmp="$complete EOL"
22757  arguments="${tmp#* }"
22758
22759  # Input might be given as Windows format, start by converting to
22760  # unix format.
22761  new_path=`$CYGPATH -u "$path"`
22762
22763  # Now try to locate executable using which
22764  new_path=`$WHICH "$new_path" 2> /dev/null`
22765  # bat and cmd files are not always considered executable in cygwin causing which
22766  # to not find them
22767  if test "x$new_path" = x \
22768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22770    new_path=`$CYGPATH -u "$path"`
22771  fi
22772  if test "x$new_path" = x; then
22773    # Oops. Which didn't find the executable.
22774    # The splitting of arguments from the executable at a space might have been incorrect,
22775    # since paths with space are more likely in Windows. Give it another try with the whole
22776    # argument.
22777    path="$complete"
22778    arguments="EOL"
22779    new_path=`$CYGPATH -u "$path"`
22780    new_path=`$WHICH "$new_path" 2> /dev/null`
22781    # bat and cmd files are not always considered executable in cygwin causing which
22782    # to not find them
22783    if test "x$new_path" = x \
22784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22786      new_path=`$CYGPATH -u "$path"`
22787    fi
22788    if test "x$new_path" = x; then
22789      # It's still not found. Now this is an unrecoverable error.
22790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22791$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22792      has_space=`$ECHO "$complete" | $GREP " "`
22793      if test "x$has_space" != x; then
22794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22796      fi
22797      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22798    fi
22799  fi
22800
22801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22804  # "foo.exe" is OK but "foo" is an error.
22805  #
22806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22807  # It is also a way to make sure we got the proper file name for the real test later on.
22808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22809  if test "x$test_shortpath" = x; then
22810    # Short path failed, file does not exist as specified.
22811    # Try adding .exe or .cmd
22812    if test -f "${new_path}.exe"; then
22813      input_to_shortpath="${new_path}.exe"
22814    elif test -f "${new_path}.cmd"; then
22815      input_to_shortpath="${new_path}.cmd"
22816    else
22817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22818$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22821      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22822    fi
22823  else
22824    input_to_shortpath="$new_path"
22825  fi
22826
22827  # Call helper function which possibly converts this using DOS-style short mode.
22828  # If so, the updated path is stored in $new_path.
22829  new_path="$input_to_shortpath"
22830
22831  input_path="$input_to_shortpath"
22832  # Check if we need to convert this using DOS-style short mode. If the path
22833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22834  # take no chances and rewrite it.
22835  # Note: m4 eats our [], so we need to use [ and ] instead.
22836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22837  if test "x$has_forbidden_chars" != x; then
22838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22842      # Going to short mode and back again did indeed matter. Since short mode is
22843      # case insensitive, let's make it lowercase to improve readability.
22844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22845      # Now convert it back to Unix-stile (cygpath)
22846      input_path=`$CYGPATH -u "$shortmode_path"`
22847      new_path="$input_path"
22848    fi
22849  fi
22850
22851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22852  if test "x$test_cygdrive_prefix" = x; then
22853    # As a simple fix, exclude /usr/bin since it's not a real path.
22854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22856      # a path prefixed by /cygdrive for fixpath to work.
22857      new_path="$CYGWIN_ROOT_PATH$input_path"
22858    fi
22859  fi
22860
22861  # remove trailing .exe if any
22862  new_path="${new_path/%.exe/}"
22863
22864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22865
22866  # First separate the path from the arguments. This will split at the first
22867  # space.
22868  complete="$AR"
22869  path="${complete%% *}"
22870  tmp="$complete EOL"
22871  arguments="${tmp#* }"
22872
22873  # Input might be given as Windows format, start by converting to
22874  # unix format.
22875  new_path="$path"
22876
22877  windows_path="$new_path"
22878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22879    unix_path=`$CYGPATH -u "$windows_path"`
22880    new_path="$unix_path"
22881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22883    new_path="$unix_path"
22884  fi
22885
22886
22887  # Now try to locate executable using which
22888  new_path=`$WHICH "$new_path" 2> /dev/null`
22889
22890  if test "x$new_path" = x; then
22891    # Oops. Which didn't find the executable.
22892    # The splitting of arguments from the executable at a space might have been incorrect,
22893    # since paths with space are more likely in Windows. Give it another try with the whole
22894    # argument.
22895    path="$complete"
22896    arguments="EOL"
22897    new_path="$path"
22898
22899  windows_path="$new_path"
22900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22901    unix_path=`$CYGPATH -u "$windows_path"`
22902    new_path="$unix_path"
22903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22905    new_path="$unix_path"
22906  fi
22907
22908
22909    new_path=`$WHICH "$new_path" 2> /dev/null`
22910
22911    if test "x$new_path" = x; then
22912      # It's still not found. Now this is an unrecoverable error.
22913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22914$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22915      has_space=`$ECHO "$complete" | $GREP " "`
22916      if test "x$has_space" != x; then
22917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22919      fi
22920      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22921    fi
22922  fi
22923
22924  # Now new_path has a complete unix path to the binary
22925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22926    # Keep paths in /bin as-is, but remove trailing .exe if any
22927    new_path="${new_path/%.exe/}"
22928    # Do not save /bin paths to all_fixpath_prefixes!
22929  else
22930    # Not in mixed or Windows style, start by that.
22931    new_path=`cmd //c echo $new_path`
22932
22933  input_path="$new_path"
22934  # Check if we need to convert this using DOS-style short mode. If the path
22935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22936  # take no chances and rewrite it.
22937  # Note: m4 eats our [], so we need to use [ and ] instead.
22938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22939  if test "x$has_forbidden_chars" != x; then
22940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22942  fi
22943
22944    # Output is in $new_path
22945
22946  windows_path="$new_path"
22947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22948    unix_path=`$CYGPATH -u "$windows_path"`
22949    new_path="$unix_path"
22950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22952    new_path="$unix_path"
22953  fi
22954
22955    # remove trailing .exe if any
22956    new_path="${new_path/%.exe/}"
22957
22958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22960  fi
22961
22962  else
22963    # We're on a posix platform. Hooray! :)
22964    # First separate the path from the arguments. This will split at the first
22965    # space.
22966    complete="$AR"
22967    path="${complete%% *}"
22968    tmp="$complete EOL"
22969    arguments="${tmp#* }"
22970
22971    # Cannot rely on the command "which" here since it doesn't always work.
22972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22973    if test -z "$is_absolute_path"; then
22974      # Path to executable is not absolute. Find it.
22975      IFS_save="$IFS"
22976      IFS=:
22977      for p in $PATH; do
22978        if test -f "$p/$path" && test -x "$p/$path"; then
22979          new_path="$p/$path"
22980          break
22981        fi
22982      done
22983      IFS="$IFS_save"
22984    else
22985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22986$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22987      new_path="$path"
22988    fi
22989
22990    if test "x$new_path" = x; then
22991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22992$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22993      has_space=`$ECHO "$complete" | $GREP " "`
22994      if test "x$has_space" != x; then
22995        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22997      fi
22998      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22999    fi
23000  fi
23001
23002  # Now join together the path and the arguments once again
23003  if test "x$arguments" != xEOL; then
23004    new_complete="$new_path ${arguments% *}"
23005  else
23006    new_complete="$new_path"
23007  fi
23008
23009  if test "x$complete" != "x$new_complete"; then
23010    AR="$new_complete"
23011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23012$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23013  fi
23014
23015  fi
23016  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23017    ARFLAGS="-r"
23018  elif test "x$OPENJDK_TARGET_OS" = xaix; then
23019    ARFLAGS="-X64"
23020  else
23021    ARFLAGS=""
23022  fi
23023
23024
23025  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23026  HOTSPOT_CXX="$CXX"
23027  HOTSPOT_LD="$LD"
23028
23029
23030
23031  COMPILER_NAME=gcc
23032  COMPILER_TYPE=CC
23033  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23034
23035    # For now, assume that we are always compiling using cl.exe.
23036    CC_OUT_OPTION=-Fo
23037    EXE_OUT_OPTION=-out:
23038    LD_OUT_OPTION=-out:
23039    AR_OUT_OPTION=-out:
23040    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23041    # program for something completely different.
23042    # Extract the first word of "link", so it can be a program name with args.
23043set dummy link; ac_word=$2
23044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23045$as_echo_n "checking for $ac_word... " >&6; }
23046if ${ac_cv_prog_WINLD+:} false; then :
23047  $as_echo_n "(cached) " >&6
23048else
23049  if test -n "$WINLD"; then
23050  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23051else
23052  ac_prog_rejected=no
23053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23054for as_dir in $PATH
23055do
23056  IFS=$as_save_IFS
23057  test -z "$as_dir" && as_dir=.
23058    for ac_exec_ext in '' $ac_executable_extensions; do
23059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23060    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23061       ac_prog_rejected=yes
23062       continue
23063     fi
23064    ac_cv_prog_WINLD="link"
23065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23066    break 2
23067  fi
23068done
23069  done
23070IFS=$as_save_IFS
23071
23072if test $ac_prog_rejected = yes; then
23073  # We found a bogon in the path, so make sure we never use it.
23074  set dummy $ac_cv_prog_WINLD
23075  shift
23076  if test $# != 0; then
23077    # We chose a different compiler from the bogus one.
23078    # However, it has the same basename, so the bogon will be chosen
23079    # first if we set WINLD to just the basename; use the full file name.
23080    shift
23081    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23082  fi
23083fi
23084fi
23085fi
23086WINLD=$ac_cv_prog_WINLD
23087if test -n "$WINLD"; then
23088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23089$as_echo "$WINLD" >&6; }
23090else
23091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23092$as_echo "no" >&6; }
23093fi
23094
23095
23096    # Since we must ignore the first found link, WINLD will contain
23097    # the full path to the link.exe program.
23098
23099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23100
23101  # First separate the path from the arguments. This will split at the first
23102  # space.
23103  complete="$WINLD"
23104  path="${complete%% *}"
23105  tmp="$complete EOL"
23106  arguments="${tmp#* }"
23107
23108  # Input might be given as Windows format, start by converting to
23109  # unix format.
23110  new_path=`$CYGPATH -u "$path"`
23111
23112  # Now try to locate executable using which
23113  new_path=`$WHICH "$new_path" 2> /dev/null`
23114  # bat and cmd files are not always considered executable in cygwin causing which
23115  # to not find them
23116  if test "x$new_path" = x \
23117      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23118      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23119    new_path=`$CYGPATH -u "$path"`
23120  fi
23121  if test "x$new_path" = x; then
23122    # Oops. Which didn't find the executable.
23123    # The splitting of arguments from the executable at a space might have been incorrect,
23124    # since paths with space are more likely in Windows. Give it another try with the whole
23125    # argument.
23126    path="$complete"
23127    arguments="EOL"
23128    new_path=`$CYGPATH -u "$path"`
23129    new_path=`$WHICH "$new_path" 2> /dev/null`
23130    # bat and cmd files are not always considered executable in cygwin causing which
23131    # to not find them
23132    if test "x$new_path" = x \
23133        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23134        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23135      new_path=`$CYGPATH -u "$path"`
23136    fi
23137    if test "x$new_path" = x; then
23138      # It's still not found. Now this is an unrecoverable error.
23139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23140$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23141      has_space=`$ECHO "$complete" | $GREP " "`
23142      if test "x$has_space" != x; then
23143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23145      fi
23146      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23147    fi
23148  fi
23149
23150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23153  # "foo.exe" is OK but "foo" is an error.
23154  #
23155  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23156  # It is also a way to make sure we got the proper file name for the real test later on.
23157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23158  if test "x$test_shortpath" = x; then
23159    # Short path failed, file does not exist as specified.
23160    # Try adding .exe or .cmd
23161    if test -f "${new_path}.exe"; then
23162      input_to_shortpath="${new_path}.exe"
23163    elif test -f "${new_path}.cmd"; then
23164      input_to_shortpath="${new_path}.cmd"
23165    else
23166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23167$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23170      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23171    fi
23172  else
23173    input_to_shortpath="$new_path"
23174  fi
23175
23176  # Call helper function which possibly converts this using DOS-style short mode.
23177  # If so, the updated path is stored in $new_path.
23178  new_path="$input_to_shortpath"
23179
23180  input_path="$input_to_shortpath"
23181  # Check if we need to convert this using DOS-style short mode. If the path
23182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23183  # take no chances and rewrite it.
23184  # Note: m4 eats our [], so we need to use [ and ] instead.
23185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23186  if test "x$has_forbidden_chars" != x; then
23187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23191      # Going to short mode and back again did indeed matter. Since short mode is
23192      # case insensitive, let's make it lowercase to improve readability.
23193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23194      # Now convert it back to Unix-stile (cygpath)
23195      input_path=`$CYGPATH -u "$shortmode_path"`
23196      new_path="$input_path"
23197    fi
23198  fi
23199
23200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23201  if test "x$test_cygdrive_prefix" = x; then
23202    # As a simple fix, exclude /usr/bin since it's not a real path.
23203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23205      # a path prefixed by /cygdrive for fixpath to work.
23206      new_path="$CYGWIN_ROOT_PATH$input_path"
23207    fi
23208  fi
23209
23210  # remove trailing .exe if any
23211  new_path="${new_path/%.exe/}"
23212
23213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23214
23215  # First separate the path from the arguments. This will split at the first
23216  # space.
23217  complete="$WINLD"
23218  path="${complete%% *}"
23219  tmp="$complete EOL"
23220  arguments="${tmp#* }"
23221
23222  # Input might be given as Windows format, start by converting to
23223  # unix format.
23224  new_path="$path"
23225
23226  windows_path="$new_path"
23227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23228    unix_path=`$CYGPATH -u "$windows_path"`
23229    new_path="$unix_path"
23230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23232    new_path="$unix_path"
23233  fi
23234
23235
23236  # Now try to locate executable using which
23237  new_path=`$WHICH "$new_path" 2> /dev/null`
23238
23239  if test "x$new_path" = x; then
23240    # Oops. Which didn't find the executable.
23241    # The splitting of arguments from the executable at a space might have been incorrect,
23242    # since paths with space are more likely in Windows. Give it another try with the whole
23243    # argument.
23244    path="$complete"
23245    arguments="EOL"
23246    new_path="$path"
23247
23248  windows_path="$new_path"
23249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23250    unix_path=`$CYGPATH -u "$windows_path"`
23251    new_path="$unix_path"
23252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23254    new_path="$unix_path"
23255  fi
23256
23257
23258    new_path=`$WHICH "$new_path" 2> /dev/null`
23259
23260    if test "x$new_path" = x; then
23261      # It's still not found. Now this is an unrecoverable error.
23262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23263$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23264      has_space=`$ECHO "$complete" | $GREP " "`
23265      if test "x$has_space" != x; then
23266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23268      fi
23269      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23270    fi
23271  fi
23272
23273  # Now new_path has a complete unix path to the binary
23274  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23275    # Keep paths in /bin as-is, but remove trailing .exe if any
23276    new_path="${new_path/%.exe/}"
23277    # Do not save /bin paths to all_fixpath_prefixes!
23278  else
23279    # Not in mixed or Windows style, start by that.
23280    new_path=`cmd //c echo $new_path`
23281
23282  input_path="$new_path"
23283  # Check if we need to convert this using DOS-style short mode. If the path
23284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23285  # take no chances and rewrite it.
23286  # Note: m4 eats our [], so we need to use [ and ] instead.
23287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23288  if test "x$has_forbidden_chars" != x; then
23289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23291  fi
23292
23293    # Output is in $new_path
23294
23295  windows_path="$new_path"
23296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23297    unix_path=`$CYGPATH -u "$windows_path"`
23298    new_path="$unix_path"
23299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23301    new_path="$unix_path"
23302  fi
23303
23304    # remove trailing .exe if any
23305    new_path="${new_path/%.exe/}"
23306
23307    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23308    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23309  fi
23310
23311  else
23312    # We're on a posix platform. Hooray! :)
23313    # First separate the path from the arguments. This will split at the first
23314    # space.
23315    complete="$WINLD"
23316    path="${complete%% *}"
23317    tmp="$complete EOL"
23318    arguments="${tmp#* }"
23319
23320    # Cannot rely on the command "which" here since it doesn't always work.
23321    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23322    if test -z "$is_absolute_path"; then
23323      # Path to executable is not absolute. Find it.
23324      IFS_save="$IFS"
23325      IFS=:
23326      for p in $PATH; do
23327        if test -f "$p/$path" && test -x "$p/$path"; then
23328          new_path="$p/$path"
23329          break
23330        fi
23331      done
23332      IFS="$IFS_save"
23333    else
23334      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23335$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23336      new_path="$path"
23337    fi
23338
23339    if test "x$new_path" = x; then
23340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23341$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23342      has_space=`$ECHO "$complete" | $GREP " "`
23343      if test "x$has_space" != x; then
23344        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23345$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23346      fi
23347      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23348    fi
23349  fi
23350
23351  # Now join together the path and the arguments once again
23352  if test "x$arguments" != xEOL; then
23353    new_complete="$new_path ${arguments% *}"
23354  else
23355    new_complete="$new_path"
23356  fi
23357
23358  if test "x$complete" != "x$new_complete"; then
23359    WINLD="$new_complete"
23360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23361$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23362  fi
23363
23364    printf "Windows linker was found at $WINLD\n"
23365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23366$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23367    "$WINLD" --version > /dev/null
23368    if test $? -eq 0 ; then
23369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23370$as_echo "no" >&6; }
23371      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23372    else
23373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23374$as_echo "yes" >&6; }
23375    fi
23376    LD="$WINLD"
23377    LDEXE="$WINLD"
23378    LDCXX="$WINLD"
23379    LDEXECXX="$WINLD"
23380
23381    # Extract the first word of "mt", so it can be a program name with args.
23382set dummy mt; ac_word=$2
23383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23384$as_echo_n "checking for $ac_word... " >&6; }
23385if ${ac_cv_prog_MT+:} false; then :
23386  $as_echo_n "(cached) " >&6
23387else
23388  if test -n "$MT"; then
23389  ac_cv_prog_MT="$MT" # Let the user override the test.
23390else
23391  ac_prog_rejected=no
23392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23393for as_dir in $PATH
23394do
23395  IFS=$as_save_IFS
23396  test -z "$as_dir" && as_dir=.
23397    for ac_exec_ext in '' $ac_executable_extensions; do
23398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23399    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23400       ac_prog_rejected=yes
23401       continue
23402     fi
23403    ac_cv_prog_MT="mt"
23404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23405    break 2
23406  fi
23407done
23408  done
23409IFS=$as_save_IFS
23410
23411if test $ac_prog_rejected = yes; then
23412  # We found a bogon in the path, so make sure we never use it.
23413  set dummy $ac_cv_prog_MT
23414  shift
23415  if test $# != 0; then
23416    # We chose a different compiler from the bogus one.
23417    # However, it has the same basename, so the bogon will be chosen
23418    # first if we set MT to just the basename; use the full file name.
23419    shift
23420    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23421  fi
23422fi
23423fi
23424fi
23425MT=$ac_cv_prog_MT
23426if test -n "$MT"; then
23427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23428$as_echo "$MT" >&6; }
23429else
23430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23431$as_echo "no" >&6; }
23432fi
23433
23434
23435
23436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23437
23438  # First separate the path from the arguments. This will split at the first
23439  # space.
23440  complete="$MT"
23441  path="${complete%% *}"
23442  tmp="$complete EOL"
23443  arguments="${tmp#* }"
23444
23445  # Input might be given as Windows format, start by converting to
23446  # unix format.
23447  new_path=`$CYGPATH -u "$path"`
23448
23449  # Now try to locate executable using which
23450  new_path=`$WHICH "$new_path" 2> /dev/null`
23451  # bat and cmd files are not always considered executable in cygwin causing which
23452  # to not find them
23453  if test "x$new_path" = x \
23454      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23455      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23456    new_path=`$CYGPATH -u "$path"`
23457  fi
23458  if test "x$new_path" = x; then
23459    # Oops. Which didn't find the executable.
23460    # The splitting of arguments from the executable at a space might have been incorrect,
23461    # since paths with space are more likely in Windows. Give it another try with the whole
23462    # argument.
23463    path="$complete"
23464    arguments="EOL"
23465    new_path=`$CYGPATH -u "$path"`
23466    new_path=`$WHICH "$new_path" 2> /dev/null`
23467    # bat and cmd files are not always considered executable in cygwin causing which
23468    # to not find them
23469    if test "x$new_path" = x \
23470        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23471        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23472      new_path=`$CYGPATH -u "$path"`
23473    fi
23474    if test "x$new_path" = x; then
23475      # It's still not found. Now this is an unrecoverable error.
23476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23477$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23478      has_space=`$ECHO "$complete" | $GREP " "`
23479      if test "x$has_space" != x; then
23480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23482      fi
23483      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23484    fi
23485  fi
23486
23487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23490  # "foo.exe" is OK but "foo" is an error.
23491  #
23492  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23493  # It is also a way to make sure we got the proper file name for the real test later on.
23494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23495  if test "x$test_shortpath" = x; then
23496    # Short path failed, file does not exist as specified.
23497    # Try adding .exe or .cmd
23498    if test -f "${new_path}.exe"; then
23499      input_to_shortpath="${new_path}.exe"
23500    elif test -f "${new_path}.cmd"; then
23501      input_to_shortpath="${new_path}.cmd"
23502    else
23503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23504$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23505      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23506$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23507      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23508    fi
23509  else
23510    input_to_shortpath="$new_path"
23511  fi
23512
23513  # Call helper function which possibly converts this using DOS-style short mode.
23514  # If so, the updated path is stored in $new_path.
23515  new_path="$input_to_shortpath"
23516
23517  input_path="$input_to_shortpath"
23518  # Check if we need to convert this using DOS-style short mode. If the path
23519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23520  # take no chances and rewrite it.
23521  # Note: m4 eats our [], so we need to use [ and ] instead.
23522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23523  if test "x$has_forbidden_chars" != x; then
23524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23528      # Going to short mode and back again did indeed matter. Since short mode is
23529      # case insensitive, let's make it lowercase to improve readability.
23530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23531      # Now convert it back to Unix-stile (cygpath)
23532      input_path=`$CYGPATH -u "$shortmode_path"`
23533      new_path="$input_path"
23534    fi
23535  fi
23536
23537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23538  if test "x$test_cygdrive_prefix" = x; then
23539    # As a simple fix, exclude /usr/bin since it's not a real path.
23540    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23542      # a path prefixed by /cygdrive for fixpath to work.
23543      new_path="$CYGWIN_ROOT_PATH$input_path"
23544    fi
23545  fi
23546
23547  # remove trailing .exe if any
23548  new_path="${new_path/%.exe/}"
23549
23550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23551
23552  # First separate the path from the arguments. This will split at the first
23553  # space.
23554  complete="$MT"
23555  path="${complete%% *}"
23556  tmp="$complete EOL"
23557  arguments="${tmp#* }"
23558
23559  # Input might be given as Windows format, start by converting to
23560  # unix format.
23561  new_path="$path"
23562
23563  windows_path="$new_path"
23564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23565    unix_path=`$CYGPATH -u "$windows_path"`
23566    new_path="$unix_path"
23567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23569    new_path="$unix_path"
23570  fi
23571
23572
23573  # Now try to locate executable using which
23574  new_path=`$WHICH "$new_path" 2> /dev/null`
23575
23576  if test "x$new_path" = x; then
23577    # Oops. Which didn't find the executable.
23578    # The splitting of arguments from the executable at a space might have been incorrect,
23579    # since paths with space are more likely in Windows. Give it another try with the whole
23580    # argument.
23581    path="$complete"
23582    arguments="EOL"
23583    new_path="$path"
23584
23585  windows_path="$new_path"
23586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23587    unix_path=`$CYGPATH -u "$windows_path"`
23588    new_path="$unix_path"
23589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23591    new_path="$unix_path"
23592  fi
23593
23594
23595    new_path=`$WHICH "$new_path" 2> /dev/null`
23596
23597    if test "x$new_path" = x; then
23598      # It's still not found. Now this is an unrecoverable error.
23599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23600$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23601      has_space=`$ECHO "$complete" | $GREP " "`
23602      if test "x$has_space" != x; then
23603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23605      fi
23606      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23607    fi
23608  fi
23609
23610  # Now new_path has a complete unix path to the binary
23611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23612    # Keep paths in /bin as-is, but remove trailing .exe if any
23613    new_path="${new_path/%.exe/}"
23614    # Do not save /bin paths to all_fixpath_prefixes!
23615  else
23616    # Not in mixed or Windows style, start by that.
23617    new_path=`cmd //c echo $new_path`
23618
23619  input_path="$new_path"
23620  # Check if we need to convert this using DOS-style short mode. If the path
23621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23622  # take no chances and rewrite it.
23623  # Note: m4 eats our [], so we need to use [ and ] instead.
23624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23625  if test "x$has_forbidden_chars" != x; then
23626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23628  fi
23629
23630    # Output is in $new_path
23631
23632  windows_path="$new_path"
23633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23634    unix_path=`$CYGPATH -u "$windows_path"`
23635    new_path="$unix_path"
23636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23638    new_path="$unix_path"
23639  fi
23640
23641    # remove trailing .exe if any
23642    new_path="${new_path/%.exe/}"
23643
23644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23646  fi
23647
23648  else
23649    # We're on a posix platform. Hooray! :)
23650    # First separate the path from the arguments. This will split at the first
23651    # space.
23652    complete="$MT"
23653    path="${complete%% *}"
23654    tmp="$complete EOL"
23655    arguments="${tmp#* }"
23656
23657    # Cannot rely on the command "which" here since it doesn't always work.
23658    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23659    if test -z "$is_absolute_path"; then
23660      # Path to executable is not absolute. Find it.
23661      IFS_save="$IFS"
23662      IFS=:
23663      for p in $PATH; do
23664        if test -f "$p/$path" && test -x "$p/$path"; then
23665          new_path="$p/$path"
23666          break
23667        fi
23668      done
23669      IFS="$IFS_save"
23670    else
23671      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23672$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23673      new_path="$path"
23674    fi
23675
23676    if test "x$new_path" = x; then
23677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23678$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23679      has_space=`$ECHO "$complete" | $GREP " "`
23680      if test "x$has_space" != x; then
23681        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23683      fi
23684      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23685    fi
23686  fi
23687
23688  # Now join together the path and the arguments once again
23689  if test "x$arguments" != xEOL; then
23690    new_complete="$new_path ${arguments% *}"
23691  else
23692    new_complete="$new_path"
23693  fi
23694
23695  if test "x$complete" != "x$new_complete"; then
23696    MT="$new_complete"
23697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23698$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23699  fi
23700
23701    # The resource compiler
23702    # Extract the first word of "rc", so it can be a program name with args.
23703set dummy rc; ac_word=$2
23704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23705$as_echo_n "checking for $ac_word... " >&6; }
23706if ${ac_cv_prog_RC+:} false; then :
23707  $as_echo_n "(cached) " >&6
23708else
23709  if test -n "$RC"; then
23710  ac_cv_prog_RC="$RC" # Let the user override the test.
23711else
23712  ac_prog_rejected=no
23713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23714for as_dir in $PATH
23715do
23716  IFS=$as_save_IFS
23717  test -z "$as_dir" && as_dir=.
23718    for ac_exec_ext in '' $ac_executable_extensions; do
23719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23720    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23721       ac_prog_rejected=yes
23722       continue
23723     fi
23724    ac_cv_prog_RC="rc"
23725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23726    break 2
23727  fi
23728done
23729  done
23730IFS=$as_save_IFS
23731
23732if test $ac_prog_rejected = yes; then
23733  # We found a bogon in the path, so make sure we never use it.
23734  set dummy $ac_cv_prog_RC
23735  shift
23736  if test $# != 0; then
23737    # We chose a different compiler from the bogus one.
23738    # However, it has the same basename, so the bogon will be chosen
23739    # first if we set RC to just the basename; use the full file name.
23740    shift
23741    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23742  fi
23743fi
23744fi
23745fi
23746RC=$ac_cv_prog_RC
23747if test -n "$RC"; then
23748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23749$as_echo "$RC" >&6; }
23750else
23751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23752$as_echo "no" >&6; }
23753fi
23754
23755
23756
23757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23758
23759  # First separate the path from the arguments. This will split at the first
23760  # space.
23761  complete="$RC"
23762  path="${complete%% *}"
23763  tmp="$complete EOL"
23764  arguments="${tmp#* }"
23765
23766  # Input might be given as Windows format, start by converting to
23767  # unix format.
23768  new_path=`$CYGPATH -u "$path"`
23769
23770  # Now try to locate executable using which
23771  new_path=`$WHICH "$new_path" 2> /dev/null`
23772  # bat and cmd files are not always considered executable in cygwin causing which
23773  # to not find them
23774  if test "x$new_path" = x \
23775      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23776      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23777    new_path=`$CYGPATH -u "$path"`
23778  fi
23779  if test "x$new_path" = x; then
23780    # Oops. Which didn't find the executable.
23781    # The splitting of arguments from the executable at a space might have been incorrect,
23782    # since paths with space are more likely in Windows. Give it another try with the whole
23783    # argument.
23784    path="$complete"
23785    arguments="EOL"
23786    new_path=`$CYGPATH -u "$path"`
23787    new_path=`$WHICH "$new_path" 2> /dev/null`
23788    # bat and cmd files are not always considered executable in cygwin causing which
23789    # to not find them
23790    if test "x$new_path" = x \
23791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23793      new_path=`$CYGPATH -u "$path"`
23794    fi
23795    if test "x$new_path" = x; then
23796      # It's still not found. Now this is an unrecoverable error.
23797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23798$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23799      has_space=`$ECHO "$complete" | $GREP " "`
23800      if test "x$has_space" != x; then
23801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23803      fi
23804      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23805    fi
23806  fi
23807
23808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23811  # "foo.exe" is OK but "foo" is an error.
23812  #
23813  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23814  # It is also a way to make sure we got the proper file name for the real test later on.
23815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23816  if test "x$test_shortpath" = x; then
23817    # Short path failed, file does not exist as specified.
23818    # Try adding .exe or .cmd
23819    if test -f "${new_path}.exe"; then
23820      input_to_shortpath="${new_path}.exe"
23821    elif test -f "${new_path}.cmd"; then
23822      input_to_shortpath="${new_path}.cmd"
23823    else
23824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23825$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23826      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23828      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23829    fi
23830  else
23831    input_to_shortpath="$new_path"
23832  fi
23833
23834  # Call helper function which possibly converts this using DOS-style short mode.
23835  # If so, the updated path is stored in $new_path.
23836  new_path="$input_to_shortpath"
23837
23838  input_path="$input_to_shortpath"
23839  # Check if we need to convert this using DOS-style short mode. If the path
23840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23841  # take no chances and rewrite it.
23842  # Note: m4 eats our [], so we need to use [ and ] instead.
23843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23844  if test "x$has_forbidden_chars" != x; then
23845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23849      # Going to short mode and back again did indeed matter. Since short mode is
23850      # case insensitive, let's make it lowercase to improve readability.
23851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23852      # Now convert it back to Unix-stile (cygpath)
23853      input_path=`$CYGPATH -u "$shortmode_path"`
23854      new_path="$input_path"
23855    fi
23856  fi
23857
23858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23859  if test "x$test_cygdrive_prefix" = x; then
23860    # As a simple fix, exclude /usr/bin since it's not a real path.
23861    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23863      # a path prefixed by /cygdrive for fixpath to work.
23864      new_path="$CYGWIN_ROOT_PATH$input_path"
23865    fi
23866  fi
23867
23868  # remove trailing .exe if any
23869  new_path="${new_path/%.exe/}"
23870
23871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23872
23873  # First separate the path from the arguments. This will split at the first
23874  # space.
23875  complete="$RC"
23876  path="${complete%% *}"
23877  tmp="$complete EOL"
23878  arguments="${tmp#* }"
23879
23880  # Input might be given as Windows format, start by converting to
23881  # unix format.
23882  new_path="$path"
23883
23884  windows_path="$new_path"
23885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23886    unix_path=`$CYGPATH -u "$windows_path"`
23887    new_path="$unix_path"
23888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23890    new_path="$unix_path"
23891  fi
23892
23893
23894  # Now try to locate executable using which
23895  new_path=`$WHICH "$new_path" 2> /dev/null`
23896
23897  if test "x$new_path" = x; then
23898    # Oops. Which didn't find the executable.
23899    # The splitting of arguments from the executable at a space might have been incorrect,
23900    # since paths with space are more likely in Windows. Give it another try with the whole
23901    # argument.
23902    path="$complete"
23903    arguments="EOL"
23904    new_path="$path"
23905
23906  windows_path="$new_path"
23907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23908    unix_path=`$CYGPATH -u "$windows_path"`
23909    new_path="$unix_path"
23910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23912    new_path="$unix_path"
23913  fi
23914
23915
23916    new_path=`$WHICH "$new_path" 2> /dev/null`
23917
23918    if test "x$new_path" = x; then
23919      # It's still not found. Now this is an unrecoverable error.
23920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23921$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23922      has_space=`$ECHO "$complete" | $GREP " "`
23923      if test "x$has_space" != x; then
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23926      fi
23927      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23928    fi
23929  fi
23930
23931  # Now new_path has a complete unix path to the binary
23932  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23933    # Keep paths in /bin as-is, but remove trailing .exe if any
23934    new_path="${new_path/%.exe/}"
23935    # Do not save /bin paths to all_fixpath_prefixes!
23936  else
23937    # Not in mixed or Windows style, start by that.
23938    new_path=`cmd //c echo $new_path`
23939
23940  input_path="$new_path"
23941  # Check if we need to convert this using DOS-style short mode. If the path
23942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23943  # take no chances and rewrite it.
23944  # Note: m4 eats our [], so we need to use [ and ] instead.
23945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23946  if test "x$has_forbidden_chars" != x; then
23947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23949  fi
23950
23951    # Output is in $new_path
23952
23953  windows_path="$new_path"
23954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23955    unix_path=`$CYGPATH -u "$windows_path"`
23956    new_path="$unix_path"
23957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23959    new_path="$unix_path"
23960  fi
23961
23962    # remove trailing .exe if any
23963    new_path="${new_path/%.exe/}"
23964
23965    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23966    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23967  fi
23968
23969  else
23970    # We're on a posix platform. Hooray! :)
23971    # First separate the path from the arguments. This will split at the first
23972    # space.
23973    complete="$RC"
23974    path="${complete%% *}"
23975    tmp="$complete EOL"
23976    arguments="${tmp#* }"
23977
23978    # Cannot rely on the command "which" here since it doesn't always work.
23979    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23980    if test -z "$is_absolute_path"; then
23981      # Path to executable is not absolute. Find it.
23982      IFS_save="$IFS"
23983      IFS=:
23984      for p in $PATH; do
23985        if test -f "$p/$path" && test -x "$p/$path"; then
23986          new_path="$p/$path"
23987          break
23988        fi
23989      done
23990      IFS="$IFS_save"
23991    else
23992      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23993$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23994      new_path="$path"
23995    fi
23996
23997    if test "x$new_path" = x; then
23998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23999$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24000      has_space=`$ECHO "$complete" | $GREP " "`
24001      if test "x$has_space" != x; then
24002        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24004      fi
24005      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24006    fi
24007  fi
24008
24009  # Now join together the path and the arguments once again
24010  if test "x$arguments" != xEOL; then
24011    new_complete="$new_path ${arguments% *}"
24012  else
24013    new_complete="$new_path"
24014  fi
24015
24016  if test "x$complete" != "x$new_complete"; then
24017    RC="$new_complete"
24018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24019$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24020  fi
24021
24022
24023    # For hotspot, we need these in Windows mixed path,
24024    # so rewrite them all. Need added .exe suffix.
24025    HOTSPOT_CXX="$CXX.exe"
24026    HOTSPOT_LD="$LD.exe"
24027    HOTSPOT_MT="$MT.exe"
24028    HOTSPOT_RC="$RC.exe"
24029
24030  unix_path="$HOTSPOT_CXX"
24031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24032    windows_path=`$CYGPATH -m "$unix_path"`
24033    HOTSPOT_CXX="$windows_path"
24034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24035    windows_path=`cmd //c echo $unix_path`
24036    HOTSPOT_CXX="$windows_path"
24037  fi
24038
24039
24040  unix_path="$HOTSPOT_LD"
24041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24042    windows_path=`$CYGPATH -m "$unix_path"`
24043    HOTSPOT_LD="$windows_path"
24044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24045    windows_path=`cmd //c echo $unix_path`
24046    HOTSPOT_LD="$windows_path"
24047  fi
24048
24049
24050  unix_path="$HOTSPOT_MT"
24051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24052    windows_path=`$CYGPATH -m "$unix_path"`
24053    HOTSPOT_MT="$windows_path"
24054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24055    windows_path=`cmd //c echo $unix_path`
24056    HOTSPOT_MT="$windows_path"
24057  fi
24058
24059
24060  unix_path="$HOTSPOT_RC"
24061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24062    windows_path=`$CYGPATH -m "$unix_path"`
24063    HOTSPOT_RC="$windows_path"
24064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24065    windows_path=`cmd //c echo $unix_path`
24066    HOTSPOT_RC="$windows_path"
24067  fi
24068
24069
24070
24071
24072    RC_FLAGS="-nologo -l 0x409 -r"
24073    if test "x$VARIANT" = xOPT; then :
24074
24075    RC_FLAGS="$RC_FLAGS -d NDEBUG"
24076
24077fi
24078
24079  # The version variables used to create RC_FLAGS may be overridden
24080  # in a custom configure script, or possibly the command line.
24081  # Let those variables be expanded at make time in spec.gmk.
24082  # The \$ are escaped to the shell, and the $(...) variables
24083  # are evaluated by make.
24084  RC_FLAGS="$RC_FLAGS \
24085      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24086      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24087      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24088      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
24089      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24090      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24091      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
24092
24093  # lib.exe is used to create static libraries.
24094  # Extract the first word of "lib", so it can be a program name with args.
24095set dummy lib; ac_word=$2
24096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24097$as_echo_n "checking for $ac_word... " >&6; }
24098if ${ac_cv_prog_WINAR+:} false; then :
24099  $as_echo_n "(cached) " >&6
24100else
24101  if test -n "$WINAR"; then
24102  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24103else
24104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24105for as_dir in $PATH
24106do
24107  IFS=$as_save_IFS
24108  test -z "$as_dir" && as_dir=.
24109    for ac_exec_ext in '' $ac_executable_extensions; do
24110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24111    ac_cv_prog_WINAR="lib"
24112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24113    break 2
24114  fi
24115done
24116  done
24117IFS=$as_save_IFS
24118
24119fi
24120fi
24121WINAR=$ac_cv_prog_WINAR
24122if test -n "$WINAR"; then
24123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24124$as_echo "$WINAR" >&6; }
24125else
24126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24127$as_echo "no" >&6; }
24128fi
24129
24130
24131
24132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24133
24134  # First separate the path from the arguments. This will split at the first
24135  # space.
24136  complete="$WINAR"
24137  path="${complete%% *}"
24138  tmp="$complete EOL"
24139  arguments="${tmp#* }"
24140
24141  # Input might be given as Windows format, start by converting to
24142  # unix format.
24143  new_path=`$CYGPATH -u "$path"`
24144
24145  # Now try to locate executable using which
24146  new_path=`$WHICH "$new_path" 2> /dev/null`
24147  # bat and cmd files are not always considered executable in cygwin causing which
24148  # to not find them
24149  if test "x$new_path" = x \
24150      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24151      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24152    new_path=`$CYGPATH -u "$path"`
24153  fi
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=`$CYGPATH -u "$path"`
24162    new_path=`$WHICH "$new_path" 2> /dev/null`
24163    # bat and cmd files are not always considered executable in cygwin causing which
24164    # to not find them
24165    if test "x$new_path" = x \
24166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24168      new_path=`$CYGPATH -u "$path"`
24169    fi
24170    if test "x$new_path" = x; then
24171      # It's still not found. Now this is an unrecoverable error.
24172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24173$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24174      has_space=`$ECHO "$complete" | $GREP " "`
24175      if test "x$has_space" != x; then
24176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24178      fi
24179      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24180    fi
24181  fi
24182
24183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24186  # "foo.exe" is OK but "foo" is an error.
24187  #
24188  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24189  # It is also a way to make sure we got the proper file name for the real test later on.
24190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24191  if test "x$test_shortpath" = x; then
24192    # Short path failed, file does not exist as specified.
24193    # Try adding .exe or .cmd
24194    if test -f "${new_path}.exe"; then
24195      input_to_shortpath="${new_path}.exe"
24196    elif test -f "${new_path}.cmd"; then
24197      input_to_shortpath="${new_path}.cmd"
24198    else
24199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24200$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24203      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24204    fi
24205  else
24206    input_to_shortpath="$new_path"
24207  fi
24208
24209  # Call helper function which possibly converts this using DOS-style short mode.
24210  # If so, the updated path is stored in $new_path.
24211  new_path="$input_to_shortpath"
24212
24213  input_path="$input_to_shortpath"
24214  # Check if we need to convert this using DOS-style short mode. If the path
24215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24216  # take no chances and rewrite it.
24217  # Note: m4 eats our [], so we need to use [ and ] instead.
24218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24219  if test "x$has_forbidden_chars" != x; then
24220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24224      # Going to short mode and back again did indeed matter. Since short mode is
24225      # case insensitive, let's make it lowercase to improve readability.
24226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24227      # Now convert it back to Unix-stile (cygpath)
24228      input_path=`$CYGPATH -u "$shortmode_path"`
24229      new_path="$input_path"
24230    fi
24231  fi
24232
24233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24234  if test "x$test_cygdrive_prefix" = x; then
24235    # As a simple fix, exclude /usr/bin since it's not a real path.
24236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24238      # a path prefixed by /cygdrive for fixpath to work.
24239      new_path="$CYGWIN_ROOT_PATH$input_path"
24240    fi
24241  fi
24242
24243  # remove trailing .exe if any
24244  new_path="${new_path/%.exe/}"
24245
24246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24247
24248  # First separate the path from the arguments. This will split at the first
24249  # space.
24250  complete="$WINAR"
24251  path="${complete%% *}"
24252  tmp="$complete EOL"
24253  arguments="${tmp#* }"
24254
24255  # Input might be given as Windows format, start by converting to
24256  # unix format.
24257  new_path="$path"
24258
24259  windows_path="$new_path"
24260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24261    unix_path=`$CYGPATH -u "$windows_path"`
24262    new_path="$unix_path"
24263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24265    new_path="$unix_path"
24266  fi
24267
24268
24269  # Now try to locate executable using which
24270  new_path=`$WHICH "$new_path" 2> /dev/null`
24271
24272  if test "x$new_path" = x; then
24273    # Oops. Which didn't find the executable.
24274    # The splitting of arguments from the executable at a space might have been incorrect,
24275    # since paths with space are more likely in Windows. Give it another try with the whole
24276    # argument.
24277    path="$complete"
24278    arguments="EOL"
24279    new_path="$path"
24280
24281  windows_path="$new_path"
24282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24283    unix_path=`$CYGPATH -u "$windows_path"`
24284    new_path="$unix_path"
24285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24287    new_path="$unix_path"
24288  fi
24289
24290
24291    new_path=`$WHICH "$new_path" 2> /dev/null`
24292
24293    if test "x$new_path" = x; then
24294      # It's still not found. Now this is an unrecoverable error.
24295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24296$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24297      has_space=`$ECHO "$complete" | $GREP " "`
24298      if test "x$has_space" != x; then
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24301      fi
24302      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24303    fi
24304  fi
24305
24306  # Now new_path has a complete unix path to the binary
24307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24308    # Keep paths in /bin as-is, but remove trailing .exe if any
24309    new_path="${new_path/%.exe/}"
24310    # Do not save /bin paths to all_fixpath_prefixes!
24311  else
24312    # Not in mixed or Windows style, start by that.
24313    new_path=`cmd //c echo $new_path`
24314
24315  input_path="$new_path"
24316  # Check if we need to convert this using DOS-style short mode. If the path
24317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24318  # take no chances and rewrite it.
24319  # Note: m4 eats our [], so we need to use [ and ] instead.
24320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24321  if test "x$has_forbidden_chars" != x; then
24322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24324  fi
24325
24326    # Output is in $new_path
24327
24328  windows_path="$new_path"
24329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24330    unix_path=`$CYGPATH -u "$windows_path"`
24331    new_path="$unix_path"
24332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24334    new_path="$unix_path"
24335  fi
24336
24337    # remove trailing .exe if any
24338    new_path="${new_path/%.exe/}"
24339
24340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24342  fi
24343
24344  else
24345    # We're on a posix platform. Hooray! :)
24346    # First separate the path from the arguments. This will split at the first
24347    # space.
24348    complete="$WINAR"
24349    path="${complete%% *}"
24350    tmp="$complete EOL"
24351    arguments="${tmp#* }"
24352
24353    # Cannot rely on the command "which" here since it doesn't always work.
24354    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24355    if test -z "$is_absolute_path"; then
24356      # Path to executable is not absolute. Find it.
24357      IFS_save="$IFS"
24358      IFS=:
24359      for p in $PATH; do
24360        if test -f "$p/$path" && test -x "$p/$path"; then
24361          new_path="$p/$path"
24362          break
24363        fi
24364      done
24365      IFS="$IFS_save"
24366    else
24367      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24368$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24369      new_path="$path"
24370    fi
24371
24372    if test "x$new_path" = x; then
24373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24374$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24375      has_space=`$ECHO "$complete" | $GREP " "`
24376      if test "x$has_space" != x; then
24377        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24378$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24379      fi
24380      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24381    fi
24382  fi
24383
24384  # Now join together the path and the arguments once again
24385  if test "x$arguments" != xEOL; then
24386    new_complete="$new_path ${arguments% *}"
24387  else
24388    new_complete="$new_path"
24389  fi
24390
24391  if test "x$complete" != "x$new_complete"; then
24392    WINAR="$new_complete"
24393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24394$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24395  fi
24396
24397  AR="$WINAR"
24398  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24399
24400  # Extract the first word of "dumpbin", so it can be a program name with args.
24401set dummy dumpbin; ac_word=$2
24402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24403$as_echo_n "checking for $ac_word... " >&6; }
24404if ${ac_cv_prog_DUMPBIN+:} false; then :
24405  $as_echo_n "(cached) " >&6
24406else
24407  if test -n "$DUMPBIN"; then
24408  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24409else
24410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24411for as_dir in $PATH
24412do
24413  IFS=$as_save_IFS
24414  test -z "$as_dir" && as_dir=.
24415    for ac_exec_ext in '' $ac_executable_extensions; do
24416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24417    ac_cv_prog_DUMPBIN="dumpbin"
24418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24419    break 2
24420  fi
24421done
24422  done
24423IFS=$as_save_IFS
24424
24425fi
24426fi
24427DUMPBIN=$ac_cv_prog_DUMPBIN
24428if test -n "$DUMPBIN"; then
24429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24430$as_echo "$DUMPBIN" >&6; }
24431else
24432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24433$as_echo "no" >&6; }
24434fi
24435
24436
24437
24438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24439
24440  # First separate the path from the arguments. This will split at the first
24441  # space.
24442  complete="$DUMPBIN"
24443  path="${complete%% *}"
24444  tmp="$complete EOL"
24445  arguments="${tmp#* }"
24446
24447  # Input might be given as Windows format, start by converting to
24448  # unix format.
24449  new_path=`$CYGPATH -u "$path"`
24450
24451  # Now try to locate executable using which
24452  new_path=`$WHICH "$new_path" 2> /dev/null`
24453  # bat and cmd files are not always considered executable in cygwin causing which
24454  # to not find them
24455  if test "x$new_path" = x \
24456      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24457      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24458    new_path=`$CYGPATH -u "$path"`
24459  fi
24460  if test "x$new_path" = x; then
24461    # Oops. Which didn't find the executable.
24462    # The splitting of arguments from the executable at a space might have been incorrect,
24463    # since paths with space are more likely in Windows. Give it another try with the whole
24464    # argument.
24465    path="$complete"
24466    arguments="EOL"
24467    new_path=`$CYGPATH -u "$path"`
24468    new_path=`$WHICH "$new_path" 2> /dev/null`
24469    # bat and cmd files are not always considered executable in cygwin causing which
24470    # to not find them
24471    if test "x$new_path" = x \
24472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24474      new_path=`$CYGPATH -u "$path"`
24475    fi
24476    if test "x$new_path" = x; then
24477      # It's still not found. Now this is an unrecoverable error.
24478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24479$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24480      has_space=`$ECHO "$complete" | $GREP " "`
24481      if test "x$has_space" != x; then
24482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24484      fi
24485      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24486    fi
24487  fi
24488
24489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24492  # "foo.exe" is OK but "foo" is an error.
24493  #
24494  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24495  # It is also a way to make sure we got the proper file name for the real test later on.
24496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24497  if test "x$test_shortpath" = x; then
24498    # Short path failed, file does not exist as specified.
24499    # Try adding .exe or .cmd
24500    if test -f "${new_path}.exe"; then
24501      input_to_shortpath="${new_path}.exe"
24502    elif test -f "${new_path}.cmd"; then
24503      input_to_shortpath="${new_path}.cmd"
24504    else
24505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24506$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24509      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24510    fi
24511  else
24512    input_to_shortpath="$new_path"
24513  fi
24514
24515  # Call helper function which possibly converts this using DOS-style short mode.
24516  # If so, the updated path is stored in $new_path.
24517  new_path="$input_to_shortpath"
24518
24519  input_path="$input_to_shortpath"
24520  # Check if we need to convert this using DOS-style short mode. If the path
24521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24522  # take no chances and rewrite it.
24523  # Note: m4 eats our [], so we need to use [ and ] instead.
24524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24525  if test "x$has_forbidden_chars" != x; then
24526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24530      # Going to short mode and back again did indeed matter. Since short mode is
24531      # case insensitive, let's make it lowercase to improve readability.
24532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24533      # Now convert it back to Unix-stile (cygpath)
24534      input_path=`$CYGPATH -u "$shortmode_path"`
24535      new_path="$input_path"
24536    fi
24537  fi
24538
24539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24540  if test "x$test_cygdrive_prefix" = x; then
24541    # As a simple fix, exclude /usr/bin since it's not a real path.
24542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24544      # a path prefixed by /cygdrive for fixpath to work.
24545      new_path="$CYGWIN_ROOT_PATH$input_path"
24546    fi
24547  fi
24548
24549  # remove trailing .exe if any
24550  new_path="${new_path/%.exe/}"
24551
24552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24553
24554  # First separate the path from the arguments. This will split at the first
24555  # space.
24556  complete="$DUMPBIN"
24557  path="${complete%% *}"
24558  tmp="$complete EOL"
24559  arguments="${tmp#* }"
24560
24561  # Input might be given as Windows format, start by converting to
24562  # unix format.
24563  new_path="$path"
24564
24565  windows_path="$new_path"
24566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24567    unix_path=`$CYGPATH -u "$windows_path"`
24568    new_path="$unix_path"
24569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24571    new_path="$unix_path"
24572  fi
24573
24574
24575  # Now try to locate executable using which
24576  new_path=`$WHICH "$new_path" 2> /dev/null`
24577
24578  if test "x$new_path" = x; then
24579    # Oops. Which didn't find the executable.
24580    # The splitting of arguments from the executable at a space might have been incorrect,
24581    # since paths with space are more likely in Windows. Give it another try with the whole
24582    # argument.
24583    path="$complete"
24584    arguments="EOL"
24585    new_path="$path"
24586
24587  windows_path="$new_path"
24588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24589    unix_path=`$CYGPATH -u "$windows_path"`
24590    new_path="$unix_path"
24591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24593    new_path="$unix_path"
24594  fi
24595
24596
24597    new_path=`$WHICH "$new_path" 2> /dev/null`
24598
24599    if test "x$new_path" = x; then
24600      # It's still not found. Now this is an unrecoverable error.
24601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24602$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24603      has_space=`$ECHO "$complete" | $GREP " "`
24604      if test "x$has_space" != x; then
24605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24607      fi
24608      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24609    fi
24610  fi
24611
24612  # Now new_path has a complete unix path to the binary
24613  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24614    # Keep paths in /bin as-is, but remove trailing .exe if any
24615    new_path="${new_path/%.exe/}"
24616    # Do not save /bin paths to all_fixpath_prefixes!
24617  else
24618    # Not in mixed or Windows style, start by that.
24619    new_path=`cmd //c echo $new_path`
24620
24621  input_path="$new_path"
24622  # Check if we need to convert this using DOS-style short mode. If the path
24623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24624  # take no chances and rewrite it.
24625  # Note: m4 eats our [], so we need to use [ and ] instead.
24626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24627  if test "x$has_forbidden_chars" != x; then
24628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24630  fi
24631
24632    # Output is in $new_path
24633
24634  windows_path="$new_path"
24635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24636    unix_path=`$CYGPATH -u "$windows_path"`
24637    new_path="$unix_path"
24638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24640    new_path="$unix_path"
24641  fi
24642
24643    # remove trailing .exe if any
24644    new_path="${new_path/%.exe/}"
24645
24646    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24647    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24648  fi
24649
24650  else
24651    # We're on a posix platform. Hooray! :)
24652    # First separate the path from the arguments. This will split at the first
24653    # space.
24654    complete="$DUMPBIN"
24655    path="${complete%% *}"
24656    tmp="$complete EOL"
24657    arguments="${tmp#* }"
24658
24659    # Cannot rely on the command "which" here since it doesn't always work.
24660    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24661    if test -z "$is_absolute_path"; then
24662      # Path to executable is not absolute. Find it.
24663      IFS_save="$IFS"
24664      IFS=:
24665      for p in $PATH; do
24666        if test -f "$p/$path" && test -x "$p/$path"; then
24667          new_path="$p/$path"
24668          break
24669        fi
24670      done
24671      IFS="$IFS_save"
24672    else
24673      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24674$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24675      new_path="$path"
24676    fi
24677
24678    if test "x$new_path" = x; then
24679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24680$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24681      has_space=`$ECHO "$complete" | $GREP " "`
24682      if test "x$has_space" != x; then
24683        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24685      fi
24686      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24687    fi
24688  fi
24689
24690  # Now join together the path and the arguments once again
24691  if test "x$arguments" != xEOL; then
24692    new_complete="$new_path ${arguments% *}"
24693  else
24694    new_complete="$new_path"
24695  fi
24696
24697  if test "x$complete" != "x$new_complete"; then
24698    DUMPBIN="$new_complete"
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24700$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24701  fi
24702
24703
24704      COMPILER_TYPE=CL
24705      CCXXFLAGS="$CCXXFLAGS -nologo"
24706
24707fi
24708
24709
24710
24711  ac_ext=c
24712ac_cpp='$CPP $CPPFLAGS'
24713ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24714ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24715ac_compiler_gnu=$ac_cv_c_compiler_gnu
24716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24717$as_echo_n "checking how to run the C preprocessor... " >&6; }
24718# On Suns, sometimes $CPP names a directory.
24719if test -n "$CPP" && test -d "$CPP"; then
24720  CPP=
24721fi
24722if test -z "$CPP"; then
24723  if ${ac_cv_prog_CPP+:} false; then :
24724  $as_echo_n "(cached) " >&6
24725else
24726      # Double quotes because CPP needs to be expanded
24727    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24728    do
24729      ac_preproc_ok=false
24730for ac_c_preproc_warn_flag in '' yes
24731do
24732  # Use a header file that comes with gcc, so configuring glibc
24733  # with a fresh cross-compiler works.
24734  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24735  # <limits.h> exists even on freestanding compilers.
24736  # On the NeXT, cc -E runs the code through the compiler's parser,
24737  # not just through cpp. "Syntax error" is here to catch this case.
24738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24739/* end confdefs.h.  */
24740#ifdef __STDC__
24741# include <limits.h>
24742#else
24743# include <assert.h>
24744#endif
24745		     Syntax error
24746_ACEOF
24747if ac_fn_c_try_cpp "$LINENO"; then :
24748
24749else
24750  # Broken: fails on valid input.
24751continue
24752fi
24753rm -f conftest.err conftest.i conftest.$ac_ext
24754
24755  # OK, works on sane cases.  Now check whether nonexistent headers
24756  # can be detected and how.
24757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24758/* end confdefs.h.  */
24759#include <ac_nonexistent.h>
24760_ACEOF
24761if ac_fn_c_try_cpp "$LINENO"; then :
24762  # Broken: success on invalid input.
24763continue
24764else
24765  # Passes both tests.
24766ac_preproc_ok=:
24767break
24768fi
24769rm -f conftest.err conftest.i conftest.$ac_ext
24770
24771done
24772# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24773rm -f conftest.i conftest.err conftest.$ac_ext
24774if $ac_preproc_ok; then :
24775  break
24776fi
24777
24778    done
24779    ac_cv_prog_CPP=$CPP
24780
24781fi
24782  CPP=$ac_cv_prog_CPP
24783else
24784  ac_cv_prog_CPP=$CPP
24785fi
24786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24787$as_echo "$CPP" >&6; }
24788ac_preproc_ok=false
24789for ac_c_preproc_warn_flag in '' yes
24790do
24791  # Use a header file that comes with gcc, so configuring glibc
24792  # with a fresh cross-compiler works.
24793  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24794  # <limits.h> exists even on freestanding compilers.
24795  # On the NeXT, cc -E runs the code through the compiler's parser,
24796  # not just through cpp. "Syntax error" is here to catch this case.
24797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24798/* end confdefs.h.  */
24799#ifdef __STDC__
24800# include <limits.h>
24801#else
24802# include <assert.h>
24803#endif
24804		     Syntax error
24805_ACEOF
24806if ac_fn_c_try_cpp "$LINENO"; then :
24807
24808else
24809  # Broken: fails on valid input.
24810continue
24811fi
24812rm -f conftest.err conftest.i conftest.$ac_ext
24813
24814  # OK, works on sane cases.  Now check whether nonexistent headers
24815  # can be detected and how.
24816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24817/* end confdefs.h.  */
24818#include <ac_nonexistent.h>
24819_ACEOF
24820if ac_fn_c_try_cpp "$LINENO"; then :
24821  # Broken: success on invalid input.
24822continue
24823else
24824  # Passes both tests.
24825ac_preproc_ok=:
24826break
24827fi
24828rm -f conftest.err conftest.i conftest.$ac_ext
24829
24830done
24831# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24832rm -f conftest.i conftest.err conftest.$ac_ext
24833if $ac_preproc_ok; then :
24834
24835else
24836  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24838as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24839See \`config.log' for more details" "$LINENO" 5; }
24840fi
24841
24842ac_ext=cpp
24843ac_cpp='$CXXCPP $CPPFLAGS'
24844ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24845ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24846ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24847
24848
24849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24850
24851  # First separate the path from the arguments. This will split at the first
24852  # space.
24853  complete="$CPP"
24854  path="${complete%% *}"
24855  tmp="$complete EOL"
24856  arguments="${tmp#* }"
24857
24858  # Input might be given as Windows format, start by converting to
24859  # unix format.
24860  new_path=`$CYGPATH -u "$path"`
24861
24862  # Now try to locate executable using which
24863  new_path=`$WHICH "$new_path" 2> /dev/null`
24864  # bat and cmd files are not always considered executable in cygwin causing which
24865  # to not find them
24866  if test "x$new_path" = x \
24867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24869    new_path=`$CYGPATH -u "$path"`
24870  fi
24871  if test "x$new_path" = x; then
24872    # Oops. Which didn't find the executable.
24873    # The splitting of arguments from the executable at a space might have been incorrect,
24874    # since paths with space are more likely in Windows. Give it another try with the whole
24875    # argument.
24876    path="$complete"
24877    arguments="EOL"
24878    new_path=`$CYGPATH -u "$path"`
24879    new_path=`$WHICH "$new_path" 2> /dev/null`
24880    # bat and cmd files are not always considered executable in cygwin causing which
24881    # to not find them
24882    if test "x$new_path" = x \
24883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24885      new_path=`$CYGPATH -u "$path"`
24886    fi
24887    if test "x$new_path" = x; then
24888      # It's still not found. Now this is an unrecoverable error.
24889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24890$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24891      has_space=`$ECHO "$complete" | $GREP " "`
24892      if test "x$has_space" != x; then
24893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24895      fi
24896      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24897    fi
24898  fi
24899
24900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24903  # "foo.exe" is OK but "foo" is an error.
24904  #
24905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24906  # It is also a way to make sure we got the proper file name for the real test later on.
24907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24908  if test "x$test_shortpath" = x; then
24909    # Short path failed, file does not exist as specified.
24910    # Try adding .exe or .cmd
24911    if test -f "${new_path}.exe"; then
24912      input_to_shortpath="${new_path}.exe"
24913    elif test -f "${new_path}.cmd"; then
24914      input_to_shortpath="${new_path}.cmd"
24915    else
24916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24917$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24920      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24921    fi
24922  else
24923    input_to_shortpath="$new_path"
24924  fi
24925
24926  # Call helper function which possibly converts this using DOS-style short mode.
24927  # If so, the updated path is stored in $new_path.
24928  new_path="$input_to_shortpath"
24929
24930  input_path="$input_to_shortpath"
24931  # Check if we need to convert this using DOS-style short mode. If the path
24932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24933  # take no chances and rewrite it.
24934  # Note: m4 eats our [], so we need to use [ and ] instead.
24935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24936  if test "x$has_forbidden_chars" != x; then
24937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24941      # Going to short mode and back again did indeed matter. Since short mode is
24942      # case insensitive, let's make it lowercase to improve readability.
24943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24944      # Now convert it back to Unix-stile (cygpath)
24945      input_path=`$CYGPATH -u "$shortmode_path"`
24946      new_path="$input_path"
24947    fi
24948  fi
24949
24950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24951  if test "x$test_cygdrive_prefix" = x; then
24952    # As a simple fix, exclude /usr/bin since it's not a real path.
24953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24955      # a path prefixed by /cygdrive for fixpath to work.
24956      new_path="$CYGWIN_ROOT_PATH$input_path"
24957    fi
24958  fi
24959
24960  # remove trailing .exe if any
24961  new_path="${new_path/%.exe/}"
24962
24963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24964
24965  # First separate the path from the arguments. This will split at the first
24966  # space.
24967  complete="$CPP"
24968  path="${complete%% *}"
24969  tmp="$complete EOL"
24970  arguments="${tmp#* }"
24971
24972  # Input might be given as Windows format, start by converting to
24973  # unix format.
24974  new_path="$path"
24975
24976  windows_path="$new_path"
24977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24978    unix_path=`$CYGPATH -u "$windows_path"`
24979    new_path="$unix_path"
24980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24982    new_path="$unix_path"
24983  fi
24984
24985
24986  # Now try to locate executable using which
24987  new_path=`$WHICH "$new_path" 2> /dev/null`
24988
24989  if test "x$new_path" = x; then
24990    # Oops. Which didn't find the executable.
24991    # The splitting of arguments from the executable at a space might have been incorrect,
24992    # since paths with space are more likely in Windows. Give it another try with the whole
24993    # argument.
24994    path="$complete"
24995    arguments="EOL"
24996    new_path="$path"
24997
24998  windows_path="$new_path"
24999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25000    unix_path=`$CYGPATH -u "$windows_path"`
25001    new_path="$unix_path"
25002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25004    new_path="$unix_path"
25005  fi
25006
25007
25008    new_path=`$WHICH "$new_path" 2> /dev/null`
25009
25010    if test "x$new_path" = x; then
25011      # It's still not found. Now this is an unrecoverable error.
25012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25013$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25014      has_space=`$ECHO "$complete" | $GREP " "`
25015      if test "x$has_space" != x; then
25016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25018      fi
25019      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25020    fi
25021  fi
25022
25023  # Now new_path has a complete unix path to the binary
25024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25025    # Keep paths in /bin as-is, but remove trailing .exe if any
25026    new_path="${new_path/%.exe/}"
25027    # Do not save /bin paths to all_fixpath_prefixes!
25028  else
25029    # Not in mixed or Windows style, start by that.
25030    new_path=`cmd //c echo $new_path`
25031
25032  input_path="$new_path"
25033  # Check if we need to convert this using DOS-style short mode. If the path
25034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25035  # take no chances and rewrite it.
25036  # Note: m4 eats our [], so we need to use [ and ] instead.
25037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25038  if test "x$has_forbidden_chars" != x; then
25039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25041  fi
25042
25043    # Output is in $new_path
25044
25045  windows_path="$new_path"
25046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25047    unix_path=`$CYGPATH -u "$windows_path"`
25048    new_path="$unix_path"
25049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25051    new_path="$unix_path"
25052  fi
25053
25054    # remove trailing .exe if any
25055    new_path="${new_path/%.exe/}"
25056
25057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25059  fi
25060
25061  else
25062    # We're on a posix platform. Hooray! :)
25063    # First separate the path from the arguments. This will split at the first
25064    # space.
25065    complete="$CPP"
25066    path="${complete%% *}"
25067    tmp="$complete EOL"
25068    arguments="${tmp#* }"
25069
25070    # Cannot rely on the command "which" here since it doesn't always work.
25071    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25072    if test -z "$is_absolute_path"; then
25073      # Path to executable is not absolute. Find it.
25074      IFS_save="$IFS"
25075      IFS=:
25076      for p in $PATH; do
25077        if test -f "$p/$path" && test -x "$p/$path"; then
25078          new_path="$p/$path"
25079          break
25080        fi
25081      done
25082      IFS="$IFS_save"
25083    else
25084      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25085$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25086      new_path="$path"
25087    fi
25088
25089    if test "x$new_path" = x; then
25090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25091$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25092      has_space=`$ECHO "$complete" | $GREP " "`
25093      if test "x$has_space" != x; then
25094        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25096      fi
25097      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25098    fi
25099  fi
25100
25101  # Now join together the path and the arguments once again
25102  if test "x$arguments" != xEOL; then
25103    new_complete="$new_path ${arguments% *}"
25104  else
25105    new_complete="$new_path"
25106  fi
25107
25108  if test "x$complete" != "x$new_complete"; then
25109    CPP="$new_complete"
25110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25111$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25112  fi
25113
25114
25115  ac_ext=cpp
25116ac_cpp='$CXXCPP $CPPFLAGS'
25117ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25118ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25119ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25121$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25122if test -z "$CXXCPP"; then
25123  if ${ac_cv_prog_CXXCPP+:} false; then :
25124  $as_echo_n "(cached) " >&6
25125else
25126      # Double quotes because CXXCPP needs to be expanded
25127    for CXXCPP in "$CXX -E" "/lib/cpp"
25128    do
25129      ac_preproc_ok=false
25130for ac_cxx_preproc_warn_flag in '' yes
25131do
25132  # Use a header file that comes with gcc, so configuring glibc
25133  # with a fresh cross-compiler works.
25134  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25135  # <limits.h> exists even on freestanding compilers.
25136  # On the NeXT, cc -E runs the code through the compiler's parser,
25137  # not just through cpp. "Syntax error" is here to catch this case.
25138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25139/* end confdefs.h.  */
25140#ifdef __STDC__
25141# include <limits.h>
25142#else
25143# include <assert.h>
25144#endif
25145		     Syntax error
25146_ACEOF
25147if ac_fn_cxx_try_cpp "$LINENO"; then :
25148
25149else
25150  # Broken: fails on valid input.
25151continue
25152fi
25153rm -f conftest.err conftest.i conftest.$ac_ext
25154
25155  # OK, works on sane cases.  Now check whether nonexistent headers
25156  # can be detected and how.
25157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25158/* end confdefs.h.  */
25159#include <ac_nonexistent.h>
25160_ACEOF
25161if ac_fn_cxx_try_cpp "$LINENO"; then :
25162  # Broken: success on invalid input.
25163continue
25164else
25165  # Passes both tests.
25166ac_preproc_ok=:
25167break
25168fi
25169rm -f conftest.err conftest.i conftest.$ac_ext
25170
25171done
25172# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25173rm -f conftest.i conftest.err conftest.$ac_ext
25174if $ac_preproc_ok; then :
25175  break
25176fi
25177
25178    done
25179    ac_cv_prog_CXXCPP=$CXXCPP
25180
25181fi
25182  CXXCPP=$ac_cv_prog_CXXCPP
25183else
25184  ac_cv_prog_CXXCPP=$CXXCPP
25185fi
25186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25187$as_echo "$CXXCPP" >&6; }
25188ac_preproc_ok=false
25189for ac_cxx_preproc_warn_flag in '' yes
25190do
25191  # Use a header file that comes with gcc, so configuring glibc
25192  # with a fresh cross-compiler works.
25193  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25194  # <limits.h> exists even on freestanding compilers.
25195  # On the NeXT, cc -E runs the code through the compiler's parser,
25196  # not just through cpp. "Syntax error" is here to catch this case.
25197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25198/* end confdefs.h.  */
25199#ifdef __STDC__
25200# include <limits.h>
25201#else
25202# include <assert.h>
25203#endif
25204		     Syntax error
25205_ACEOF
25206if ac_fn_cxx_try_cpp "$LINENO"; then :
25207
25208else
25209  # Broken: fails on valid input.
25210continue
25211fi
25212rm -f conftest.err conftest.i conftest.$ac_ext
25213
25214  # OK, works on sane cases.  Now check whether nonexistent headers
25215  # can be detected and how.
25216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25217/* end confdefs.h.  */
25218#include <ac_nonexistent.h>
25219_ACEOF
25220if ac_fn_cxx_try_cpp "$LINENO"; then :
25221  # Broken: success on invalid input.
25222continue
25223else
25224  # Passes both tests.
25225ac_preproc_ok=:
25226break
25227fi
25228rm -f conftest.err conftest.i conftest.$ac_ext
25229
25230done
25231# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25232rm -f conftest.i conftest.err conftest.$ac_ext
25233if $ac_preproc_ok; then :
25234
25235else
25236  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25238as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25239See \`config.log' for more details" "$LINENO" 5; }
25240fi
25241
25242ac_ext=cpp
25243ac_cpp='$CXXCPP $CPPFLAGS'
25244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25247
25248
25249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25250
25251  # First separate the path from the arguments. This will split at the first
25252  # space.
25253  complete="$CXXCPP"
25254  path="${complete%% *}"
25255  tmp="$complete EOL"
25256  arguments="${tmp#* }"
25257
25258  # Input might be given as Windows format, start by converting to
25259  # unix format.
25260  new_path=`$CYGPATH -u "$path"`
25261
25262  # Now try to locate executable using which
25263  new_path=`$WHICH "$new_path" 2> /dev/null`
25264  # bat and cmd files are not always considered executable in cygwin causing which
25265  # to not find them
25266  if test "x$new_path" = x \
25267      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25268      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25269    new_path=`$CYGPATH -u "$path"`
25270  fi
25271  if test "x$new_path" = x; then
25272    # Oops. Which didn't find the executable.
25273    # The splitting of arguments from the executable at a space might have been incorrect,
25274    # since paths with space are more likely in Windows. Give it another try with the whole
25275    # argument.
25276    path="$complete"
25277    arguments="EOL"
25278    new_path=`$CYGPATH -u "$path"`
25279    new_path=`$WHICH "$new_path" 2> /dev/null`
25280    # bat and cmd files are not always considered executable in cygwin causing which
25281    # to not find them
25282    if test "x$new_path" = x \
25283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25285      new_path=`$CYGPATH -u "$path"`
25286    fi
25287    if test "x$new_path" = x; then
25288      # It's still not found. Now this is an unrecoverable error.
25289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25290$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25291      has_space=`$ECHO "$complete" | $GREP " "`
25292      if test "x$has_space" != x; then
25293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25295      fi
25296      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25297    fi
25298  fi
25299
25300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25303  # "foo.exe" is OK but "foo" is an error.
25304  #
25305  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25306  # It is also a way to make sure we got the proper file name for the real test later on.
25307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25308  if test "x$test_shortpath" = x; then
25309    # Short path failed, file does not exist as specified.
25310    # Try adding .exe or .cmd
25311    if test -f "${new_path}.exe"; then
25312      input_to_shortpath="${new_path}.exe"
25313    elif test -f "${new_path}.cmd"; then
25314      input_to_shortpath="${new_path}.cmd"
25315    else
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25317$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25320      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25321    fi
25322  else
25323    input_to_shortpath="$new_path"
25324  fi
25325
25326  # Call helper function which possibly converts this using DOS-style short mode.
25327  # If so, the updated path is stored in $new_path.
25328  new_path="$input_to_shortpath"
25329
25330  input_path="$input_to_shortpath"
25331  # Check if we need to convert this using DOS-style short mode. If the path
25332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25333  # take no chances and rewrite it.
25334  # Note: m4 eats our [], so we need to use [ and ] instead.
25335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25336  if test "x$has_forbidden_chars" != x; then
25337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25341      # Going to short mode and back again did indeed matter. Since short mode is
25342      # case insensitive, let's make it lowercase to improve readability.
25343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25344      # Now convert it back to Unix-stile (cygpath)
25345      input_path=`$CYGPATH -u "$shortmode_path"`
25346      new_path="$input_path"
25347    fi
25348  fi
25349
25350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25351  if test "x$test_cygdrive_prefix" = x; then
25352    # As a simple fix, exclude /usr/bin since it's not a real path.
25353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25355      # a path prefixed by /cygdrive for fixpath to work.
25356      new_path="$CYGWIN_ROOT_PATH$input_path"
25357    fi
25358  fi
25359
25360  # remove trailing .exe if any
25361  new_path="${new_path/%.exe/}"
25362
25363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25364
25365  # First separate the path from the arguments. This will split at the first
25366  # space.
25367  complete="$CXXCPP"
25368  path="${complete%% *}"
25369  tmp="$complete EOL"
25370  arguments="${tmp#* }"
25371
25372  # Input might be given as Windows format, start by converting to
25373  # unix format.
25374  new_path="$path"
25375
25376  windows_path="$new_path"
25377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378    unix_path=`$CYGPATH -u "$windows_path"`
25379    new_path="$unix_path"
25380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25382    new_path="$unix_path"
25383  fi
25384
25385
25386  # Now try to locate executable using which
25387  new_path=`$WHICH "$new_path" 2> /dev/null`
25388
25389  if test "x$new_path" = x; then
25390    # Oops. Which didn't find the executable.
25391    # The splitting of arguments from the executable at a space might have been incorrect,
25392    # since paths with space are more likely in Windows. Give it another try with the whole
25393    # argument.
25394    path="$complete"
25395    arguments="EOL"
25396    new_path="$path"
25397
25398  windows_path="$new_path"
25399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25400    unix_path=`$CYGPATH -u "$windows_path"`
25401    new_path="$unix_path"
25402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25404    new_path="$unix_path"
25405  fi
25406
25407
25408    new_path=`$WHICH "$new_path" 2> /dev/null`
25409
25410    if test "x$new_path" = x; then
25411      # It's still not found. Now this is an unrecoverable error.
25412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25413$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25414      has_space=`$ECHO "$complete" | $GREP " "`
25415      if test "x$has_space" != x; then
25416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25418      fi
25419      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25420    fi
25421  fi
25422
25423  # Now new_path has a complete unix path to the binary
25424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25425    # Keep paths in /bin as-is, but remove trailing .exe if any
25426    new_path="${new_path/%.exe/}"
25427    # Do not save /bin paths to all_fixpath_prefixes!
25428  else
25429    # Not in mixed or Windows style, start by that.
25430    new_path=`cmd //c echo $new_path`
25431
25432  input_path="$new_path"
25433  # Check if we need to convert this using DOS-style short mode. If the path
25434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25435  # take no chances and rewrite it.
25436  # Note: m4 eats our [], so we need to use [ and ] instead.
25437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25438  if test "x$has_forbidden_chars" != x; then
25439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25441  fi
25442
25443    # Output is in $new_path
25444
25445  windows_path="$new_path"
25446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25447    unix_path=`$CYGPATH -u "$windows_path"`
25448    new_path="$unix_path"
25449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25451    new_path="$unix_path"
25452  fi
25453
25454    # remove trailing .exe if any
25455    new_path="${new_path/%.exe/}"
25456
25457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25459  fi
25460
25461  else
25462    # We're on a posix platform. Hooray! :)
25463    # First separate the path from the arguments. This will split at the first
25464    # space.
25465    complete="$CXXCPP"
25466    path="${complete%% *}"
25467    tmp="$complete EOL"
25468    arguments="${tmp#* }"
25469
25470    # Cannot rely on the command "which" here since it doesn't always work.
25471    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25472    if test -z "$is_absolute_path"; then
25473      # Path to executable is not absolute. Find it.
25474      IFS_save="$IFS"
25475      IFS=:
25476      for p in $PATH; do
25477        if test -f "$p/$path" && test -x "$p/$path"; then
25478          new_path="$p/$path"
25479          break
25480        fi
25481      done
25482      IFS="$IFS_save"
25483    else
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25485$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25486      new_path="$path"
25487    fi
25488
25489    if test "x$new_path" = x; then
25490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25491$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25492      has_space=`$ECHO "$complete" | $GREP " "`
25493      if test "x$has_space" != x; then
25494        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25496      fi
25497      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25498    fi
25499  fi
25500
25501  # Now join together the path and the arguments once again
25502  if test "x$arguments" != xEOL; then
25503    new_complete="$new_path ${arguments% *}"
25504  else
25505    new_complete="$new_path"
25506  fi
25507
25508  if test "x$complete" != "x$new_complete"; then
25509    CXXCPP="$new_complete"
25510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25511$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25512  fi
25513
25514
25515  if test "x$COMPILE_TYPE" != "xcross"; then
25516    # If we are not cross compiling, use the same compilers for
25517    # building the build platform executables. The cross-compilation
25518    # case needed to be done earlier, but this can only be done after
25519    # the native tools have been localized.
25520    BUILD_CC="$CC"
25521    BUILD_CXX="$CXX"
25522    BUILD_LD="$LD"
25523  fi
25524
25525  # for solaris we really need solaris tools, and not gnu equivalent
25526  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25527  #   starting to probe
25528  #
25529  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25530  #         so that it can be overriden --with-tools-dir
25531  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25532    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25533  fi
25534
25535  # Find the right assembler.
25536  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25537    # Extract the first word of "as", so it can be a program name with args.
25538set dummy as; ac_word=$2
25539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25540$as_echo_n "checking for $ac_word... " >&6; }
25541if ${ac_cv_path_AS+:} false; then :
25542  $as_echo_n "(cached) " >&6
25543else
25544  case $AS in
25545  [\\/]* | ?:[\\/]*)
25546  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25547  ;;
25548  *)
25549  as_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25556    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
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
25564  ;;
25565esac
25566fi
25567AS=$ac_cv_path_AS
25568if test -n "$AS"; then
25569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25570$as_echo "$AS" >&6; }
25571else
25572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25573$as_echo "no" >&6; }
25574fi
25575
25576
25577
25578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25579
25580  # First separate the path from the arguments. This will split at the first
25581  # space.
25582  complete="$AS"
25583  path="${complete%% *}"
25584  tmp="$complete EOL"
25585  arguments="${tmp#* }"
25586
25587  # Input might be given as Windows format, start by converting to
25588  # unix format.
25589  new_path=`$CYGPATH -u "$path"`
25590
25591  # Now try to locate executable using which
25592  new_path=`$WHICH "$new_path" 2> /dev/null`
25593  # bat and cmd files are not always considered executable in cygwin causing which
25594  # to not find them
25595  if test "x$new_path" = x \
25596      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25597      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25598    new_path=`$CYGPATH -u "$path"`
25599  fi
25600  if test "x$new_path" = x; then
25601    # Oops. Which didn't find the executable.
25602    # The splitting of arguments from the executable at a space might have been incorrect,
25603    # since paths with space are more likely in Windows. Give it another try with the whole
25604    # argument.
25605    path="$complete"
25606    arguments="EOL"
25607    new_path=`$CYGPATH -u "$path"`
25608    new_path=`$WHICH "$new_path" 2> /dev/null`
25609    # bat and cmd files are not always considered executable in cygwin causing which
25610    # to not find them
25611    if test "x$new_path" = x \
25612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25614      new_path=`$CYGPATH -u "$path"`
25615    fi
25616    if test "x$new_path" = x; then
25617      # It's still not found. Now this is an unrecoverable error.
25618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25619$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25620      has_space=`$ECHO "$complete" | $GREP " "`
25621      if test "x$has_space" != x; then
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25624      fi
25625      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25626    fi
25627  fi
25628
25629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25632  # "foo.exe" is OK but "foo" is an error.
25633  #
25634  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25635  # It is also a way to make sure we got the proper file name for the real test later on.
25636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25637  if test "x$test_shortpath" = x; then
25638    # Short path failed, file does not exist as specified.
25639    # Try adding .exe or .cmd
25640    if test -f "${new_path}.exe"; then
25641      input_to_shortpath="${new_path}.exe"
25642    elif test -f "${new_path}.cmd"; then
25643      input_to_shortpath="${new_path}.cmd"
25644    else
25645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25646$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25649      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25650    fi
25651  else
25652    input_to_shortpath="$new_path"
25653  fi
25654
25655  # Call helper function which possibly converts this using DOS-style short mode.
25656  # If so, the updated path is stored in $new_path.
25657  new_path="$input_to_shortpath"
25658
25659  input_path="$input_to_shortpath"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25670      # Going to short mode and back again did indeed matter. Since short mode is
25671      # case insensitive, let's make it lowercase to improve readability.
25672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25673      # Now convert it back to Unix-stile (cygpath)
25674      input_path=`$CYGPATH -u "$shortmode_path"`
25675      new_path="$input_path"
25676    fi
25677  fi
25678
25679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25680  if test "x$test_cygdrive_prefix" = x; then
25681    # As a simple fix, exclude /usr/bin since it's not a real path.
25682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25684      # a path prefixed by /cygdrive for fixpath to work.
25685      new_path="$CYGWIN_ROOT_PATH$input_path"
25686    fi
25687  fi
25688
25689  # remove trailing .exe if any
25690  new_path="${new_path/%.exe/}"
25691
25692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25693
25694  # First separate the path from the arguments. This will split at the first
25695  # space.
25696  complete="$AS"
25697  path="${complete%% *}"
25698  tmp="$complete EOL"
25699  arguments="${tmp#* }"
25700
25701  # Input might be given as Windows format, start by converting to
25702  # unix format.
25703  new_path="$path"
25704
25705  windows_path="$new_path"
25706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25707    unix_path=`$CYGPATH -u "$windows_path"`
25708    new_path="$unix_path"
25709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25711    new_path="$unix_path"
25712  fi
25713
25714
25715  # Now try to locate executable using which
25716  new_path=`$WHICH "$new_path" 2> /dev/null`
25717
25718  if test "x$new_path" = x; then
25719    # Oops. Which didn't find the executable.
25720    # The splitting of arguments from the executable at a space might have been incorrect,
25721    # since paths with space are more likely in Windows. Give it another try with the whole
25722    # argument.
25723    path="$complete"
25724    arguments="EOL"
25725    new_path="$path"
25726
25727  windows_path="$new_path"
25728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25729    unix_path=`$CYGPATH -u "$windows_path"`
25730    new_path="$unix_path"
25731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25733    new_path="$unix_path"
25734  fi
25735
25736
25737    new_path=`$WHICH "$new_path" 2> /dev/null`
25738
25739    if test "x$new_path" = x; then
25740      # It's still not found. Now this is an unrecoverable error.
25741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25742$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25743      has_space=`$ECHO "$complete" | $GREP " "`
25744      if test "x$has_space" != x; then
25745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25747      fi
25748      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25749    fi
25750  fi
25751
25752  # Now new_path has a complete unix path to the binary
25753  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25754    # Keep paths in /bin as-is, but remove trailing .exe if any
25755    new_path="${new_path/%.exe/}"
25756    # Do not save /bin paths to all_fixpath_prefixes!
25757  else
25758    # Not in mixed or Windows style, start by that.
25759    new_path=`cmd //c echo $new_path`
25760
25761  input_path="$new_path"
25762  # Check if we need to convert this using DOS-style short mode. If the path
25763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25764  # take no chances and rewrite it.
25765  # Note: m4 eats our [], so we need to use [ and ] instead.
25766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25767  if test "x$has_forbidden_chars" != x; then
25768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25770  fi
25771
25772    # Output is in $new_path
25773
25774  windows_path="$new_path"
25775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25776    unix_path=`$CYGPATH -u "$windows_path"`
25777    new_path="$unix_path"
25778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25780    new_path="$unix_path"
25781  fi
25782
25783    # remove trailing .exe if any
25784    new_path="${new_path/%.exe/}"
25785
25786    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25787    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25788  fi
25789
25790  else
25791    # We're on a posix platform. Hooray! :)
25792    # First separate the path from the arguments. This will split at the first
25793    # space.
25794    complete="$AS"
25795    path="${complete%% *}"
25796    tmp="$complete EOL"
25797    arguments="${tmp#* }"
25798
25799    # Cannot rely on the command "which" here since it doesn't always work.
25800    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25801    if test -z "$is_absolute_path"; then
25802      # Path to executable is not absolute. Find it.
25803      IFS_save="$IFS"
25804      IFS=:
25805      for p in $PATH; do
25806        if test -f "$p/$path" && test -x "$p/$path"; then
25807          new_path="$p/$path"
25808          break
25809        fi
25810      done
25811      IFS="$IFS_save"
25812    else
25813      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25814$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25815      new_path="$path"
25816    fi
25817
25818    if test "x$new_path" = x; then
25819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25820$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25821      has_space=`$ECHO "$complete" | $GREP " "`
25822      if test "x$has_space" != x; then
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25824$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25825      fi
25826      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25827    fi
25828  fi
25829
25830  # Now join together the path and the arguments once again
25831  if test "x$arguments" != xEOL; then
25832    new_complete="$new_path ${arguments% *}"
25833  else
25834    new_complete="$new_path"
25835  fi
25836
25837  if test "x$complete" != "x$new_complete"; then
25838    AS="$new_complete"
25839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25840$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25841  fi
25842
25843  else
25844    AS="$CC -c"
25845  fi
25846
25847
25848  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25849    # Extract the first word of "nm", so it can be a program name with args.
25850set dummy nm; ac_word=$2
25851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25852$as_echo_n "checking for $ac_word... " >&6; }
25853if ${ac_cv_path_NM+:} false; then :
25854  $as_echo_n "(cached) " >&6
25855else
25856  case $NM in
25857  [\\/]* | ?:[\\/]*)
25858  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25859  ;;
25860  *)
25861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25862for as_dir in $PATH
25863do
25864  IFS=$as_save_IFS
25865  test -z "$as_dir" && as_dir=.
25866    for ac_exec_ext in '' $ac_executable_extensions; do
25867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25868    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25870    break 2
25871  fi
25872done
25873  done
25874IFS=$as_save_IFS
25875
25876  ;;
25877esac
25878fi
25879NM=$ac_cv_path_NM
25880if test -n "$NM"; then
25881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25882$as_echo "$NM" >&6; }
25883else
25884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25885$as_echo "no" >&6; }
25886fi
25887
25888
25889
25890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25891
25892  # First separate the path from the arguments. This will split at the first
25893  # space.
25894  complete="$NM"
25895  path="${complete%% *}"
25896  tmp="$complete EOL"
25897  arguments="${tmp#* }"
25898
25899  # Input might be given as Windows format, start by converting to
25900  # unix format.
25901  new_path=`$CYGPATH -u "$path"`
25902
25903  # Now try to locate executable using which
25904  new_path=`$WHICH "$new_path" 2> /dev/null`
25905  # bat and cmd files are not always considered executable in cygwin causing which
25906  # to not find them
25907  if test "x$new_path" = x \
25908      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25909      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25910    new_path=`$CYGPATH -u "$path"`
25911  fi
25912  if test "x$new_path" = x; then
25913    # Oops. Which didn't find the executable.
25914    # The splitting of arguments from the executable at a space might have been incorrect,
25915    # since paths with space are more likely in Windows. Give it another try with the whole
25916    # argument.
25917    path="$complete"
25918    arguments="EOL"
25919    new_path=`$CYGPATH -u "$path"`
25920    new_path=`$WHICH "$new_path" 2> /dev/null`
25921    # bat and cmd files are not always considered executable in cygwin causing which
25922    # to not find them
25923    if test "x$new_path" = x \
25924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25926      new_path=`$CYGPATH -u "$path"`
25927    fi
25928    if test "x$new_path" = x; then
25929      # It's still not found. Now this is an unrecoverable error.
25930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25931$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25932      has_space=`$ECHO "$complete" | $GREP " "`
25933      if test "x$has_space" != x; then
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25936      fi
25937      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25938    fi
25939  fi
25940
25941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25944  # "foo.exe" is OK but "foo" is an error.
25945  #
25946  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25947  # It is also a way to make sure we got the proper file name for the real test later on.
25948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25949  if test "x$test_shortpath" = x; then
25950    # Short path failed, file does not exist as specified.
25951    # Try adding .exe or .cmd
25952    if test -f "${new_path}.exe"; then
25953      input_to_shortpath="${new_path}.exe"
25954    elif test -f "${new_path}.cmd"; then
25955      input_to_shortpath="${new_path}.cmd"
25956    else
25957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25958$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25961      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25962    fi
25963  else
25964    input_to_shortpath="$new_path"
25965  fi
25966
25967  # Call helper function which possibly converts this using DOS-style short mode.
25968  # If so, the updated path is stored in $new_path.
25969  new_path="$input_to_shortpath"
25970
25971  input_path="$input_to_shortpath"
25972  # Check if we need to convert this using DOS-style short mode. If the path
25973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25974  # take no chances and rewrite it.
25975  # Note: m4 eats our [], so we need to use [ and ] instead.
25976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25977  if test "x$has_forbidden_chars" != x; then
25978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25982      # Going to short mode and back again did indeed matter. Since short mode is
25983      # case insensitive, let's make it lowercase to improve readability.
25984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25985      # Now convert it back to Unix-stile (cygpath)
25986      input_path=`$CYGPATH -u "$shortmode_path"`
25987      new_path="$input_path"
25988    fi
25989  fi
25990
25991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25992  if test "x$test_cygdrive_prefix" = x; then
25993    # As a simple fix, exclude /usr/bin since it's not a real path.
25994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25996      # a path prefixed by /cygdrive for fixpath to work.
25997      new_path="$CYGWIN_ROOT_PATH$input_path"
25998    fi
25999  fi
26000
26001  # remove trailing .exe if any
26002  new_path="${new_path/%.exe/}"
26003
26004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26005
26006  # First separate the path from the arguments. This will split at the first
26007  # space.
26008  complete="$NM"
26009  path="${complete%% *}"
26010  tmp="$complete EOL"
26011  arguments="${tmp#* }"
26012
26013  # Input might be given as Windows format, start by converting to
26014  # unix format.
26015  new_path="$path"
26016
26017  windows_path="$new_path"
26018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26019    unix_path=`$CYGPATH -u "$windows_path"`
26020    new_path="$unix_path"
26021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26023    new_path="$unix_path"
26024  fi
26025
26026
26027  # Now try to locate executable using which
26028  new_path=`$WHICH "$new_path" 2> /dev/null`
26029
26030  if test "x$new_path" = x; then
26031    # Oops. Which didn't find the executable.
26032    # The splitting of arguments from the executable at a space might have been incorrect,
26033    # since paths with space are more likely in Windows. Give it another try with the whole
26034    # argument.
26035    path="$complete"
26036    arguments="EOL"
26037    new_path="$path"
26038
26039  windows_path="$new_path"
26040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26041    unix_path=`$CYGPATH -u "$windows_path"`
26042    new_path="$unix_path"
26043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26045    new_path="$unix_path"
26046  fi
26047
26048
26049    new_path=`$WHICH "$new_path" 2> /dev/null`
26050
26051    if test "x$new_path" = x; then
26052      # It's still not found. Now this is an unrecoverable error.
26053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26054$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26055      has_space=`$ECHO "$complete" | $GREP " "`
26056      if test "x$has_space" != x; then
26057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26059      fi
26060      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26061    fi
26062  fi
26063
26064  # Now new_path has a complete unix path to the binary
26065  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26066    # Keep paths in /bin as-is, but remove trailing .exe if any
26067    new_path="${new_path/%.exe/}"
26068    # Do not save /bin paths to all_fixpath_prefixes!
26069  else
26070    # Not in mixed or Windows style, start by that.
26071    new_path=`cmd //c echo $new_path`
26072
26073  input_path="$new_path"
26074  # Check if we need to convert this using DOS-style short mode. If the path
26075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26076  # take no chances and rewrite it.
26077  # Note: m4 eats our [], so we need to use [ and ] instead.
26078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26079  if test "x$has_forbidden_chars" != x; then
26080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26082  fi
26083
26084    # Output is in $new_path
26085
26086  windows_path="$new_path"
26087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26088    unix_path=`$CYGPATH -u "$windows_path"`
26089    new_path="$unix_path"
26090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26092    new_path="$unix_path"
26093  fi
26094
26095    # remove trailing .exe if any
26096    new_path="${new_path/%.exe/}"
26097
26098    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26099    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26100  fi
26101
26102  else
26103    # We're on a posix platform. Hooray! :)
26104    # First separate the path from the arguments. This will split at the first
26105    # space.
26106    complete="$NM"
26107    path="${complete%% *}"
26108    tmp="$complete EOL"
26109    arguments="${tmp#* }"
26110
26111    # Cannot rely on the command "which" here since it doesn't always work.
26112    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26113    if test -z "$is_absolute_path"; then
26114      # Path to executable is not absolute. Find it.
26115      IFS_save="$IFS"
26116      IFS=:
26117      for p in $PATH; do
26118        if test -f "$p/$path" && test -x "$p/$path"; then
26119          new_path="$p/$path"
26120          break
26121        fi
26122      done
26123      IFS="$IFS_save"
26124    else
26125      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26126$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26127      new_path="$path"
26128    fi
26129
26130    if test "x$new_path" = x; then
26131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26132$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26133      has_space=`$ECHO "$complete" | $GREP " "`
26134      if test "x$has_space" != x; then
26135        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26137      fi
26138      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26139    fi
26140  fi
26141
26142  # Now join together the path and the arguments once again
26143  if test "x$arguments" != xEOL; then
26144    new_complete="$new_path ${arguments% *}"
26145  else
26146    new_complete="$new_path"
26147  fi
26148
26149  if test "x$complete" != "x$new_complete"; then
26150    NM="$new_complete"
26151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26152$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26153  fi
26154
26155    # Extract the first word of "gnm", so it can be a program name with args.
26156set dummy gnm; ac_word=$2
26157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26158$as_echo_n "checking for $ac_word... " >&6; }
26159if ${ac_cv_path_GNM+:} false; then :
26160  $as_echo_n "(cached) " >&6
26161else
26162  case $GNM in
26163  [\\/]* | ?:[\\/]*)
26164  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26165  ;;
26166  *)
26167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26168for as_dir in $PATH
26169do
26170  IFS=$as_save_IFS
26171  test -z "$as_dir" && as_dir=.
26172    for ac_exec_ext in '' $ac_executable_extensions; do
26173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26174    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26176    break 2
26177  fi
26178done
26179  done
26180IFS=$as_save_IFS
26181
26182  ;;
26183esac
26184fi
26185GNM=$ac_cv_path_GNM
26186if test -n "$GNM"; then
26187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26188$as_echo "$GNM" >&6; }
26189else
26190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26191$as_echo "no" >&6; }
26192fi
26193
26194
26195
26196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197
26198  # First separate the path from the arguments. This will split at the first
26199  # space.
26200  complete="$GNM"
26201  path="${complete%% *}"
26202  tmp="$complete EOL"
26203  arguments="${tmp#* }"
26204
26205  # Input might be given as Windows format, start by converting to
26206  # unix format.
26207  new_path=`$CYGPATH -u "$path"`
26208
26209  # Now try to locate executable using which
26210  new_path=`$WHICH "$new_path" 2> /dev/null`
26211  # bat and cmd files are not always considered executable in cygwin causing which
26212  # to not find them
26213  if test "x$new_path" = x \
26214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26216    new_path=`$CYGPATH -u "$path"`
26217  fi
26218  if test "x$new_path" = x; then
26219    # Oops. Which didn't find the executable.
26220    # The splitting of arguments from the executable at a space might have been incorrect,
26221    # since paths with space are more likely in Windows. Give it another try with the whole
26222    # argument.
26223    path="$complete"
26224    arguments="EOL"
26225    new_path=`$CYGPATH -u "$path"`
26226    new_path=`$WHICH "$new_path" 2> /dev/null`
26227    # bat and cmd files are not always considered executable in cygwin causing which
26228    # to not find them
26229    if test "x$new_path" = x \
26230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26232      new_path=`$CYGPATH -u "$path"`
26233    fi
26234    if test "x$new_path" = x; then
26235      # It's still not found. Now this is an unrecoverable error.
26236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26237$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26238      has_space=`$ECHO "$complete" | $GREP " "`
26239      if test "x$has_space" != x; then
26240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26242      fi
26243      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26244    fi
26245  fi
26246
26247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26250  # "foo.exe" is OK but "foo" is an error.
26251  #
26252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26253  # It is also a way to make sure we got the proper file name for the real test later on.
26254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26255  if test "x$test_shortpath" = x; then
26256    # Short path failed, file does not exist as specified.
26257    # Try adding .exe or .cmd
26258    if test -f "${new_path}.exe"; then
26259      input_to_shortpath="${new_path}.exe"
26260    elif test -f "${new_path}.cmd"; then
26261      input_to_shortpath="${new_path}.cmd"
26262    else
26263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26264$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26267      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26268    fi
26269  else
26270    input_to_shortpath="$new_path"
26271  fi
26272
26273  # Call helper function which possibly converts this using DOS-style short mode.
26274  # If so, the updated path is stored in $new_path.
26275  new_path="$input_to_shortpath"
26276
26277  input_path="$input_to_shortpath"
26278  # Check if we need to convert this using DOS-style short mode. If the path
26279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26280  # take no chances and rewrite it.
26281  # Note: m4 eats our [], so we need to use [ and ] instead.
26282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26283  if test "x$has_forbidden_chars" != x; then
26284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26288      # Going to short mode and back again did indeed matter. Since short mode is
26289      # case insensitive, let's make it lowercase to improve readability.
26290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26291      # Now convert it back to Unix-stile (cygpath)
26292      input_path=`$CYGPATH -u "$shortmode_path"`
26293      new_path="$input_path"
26294    fi
26295  fi
26296
26297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26298  if test "x$test_cygdrive_prefix" = x; then
26299    # As a simple fix, exclude /usr/bin since it's not a real path.
26300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26302      # a path prefixed by /cygdrive for fixpath to work.
26303      new_path="$CYGWIN_ROOT_PATH$input_path"
26304    fi
26305  fi
26306
26307  # remove trailing .exe if any
26308  new_path="${new_path/%.exe/}"
26309
26310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26311
26312  # First separate the path from the arguments. This will split at the first
26313  # space.
26314  complete="$GNM"
26315  path="${complete%% *}"
26316  tmp="$complete EOL"
26317  arguments="${tmp#* }"
26318
26319  # Input might be given as Windows format, start by converting to
26320  # unix format.
26321  new_path="$path"
26322
26323  windows_path="$new_path"
26324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26325    unix_path=`$CYGPATH -u "$windows_path"`
26326    new_path="$unix_path"
26327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26329    new_path="$unix_path"
26330  fi
26331
26332
26333  # Now try to locate executable using which
26334  new_path=`$WHICH "$new_path" 2> /dev/null`
26335
26336  if test "x$new_path" = x; then
26337    # Oops. Which didn't find the executable.
26338    # The splitting of arguments from the executable at a space might have been incorrect,
26339    # since paths with space are more likely in Windows. Give it another try with the whole
26340    # argument.
26341    path="$complete"
26342    arguments="EOL"
26343    new_path="$path"
26344
26345  windows_path="$new_path"
26346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26347    unix_path=`$CYGPATH -u "$windows_path"`
26348    new_path="$unix_path"
26349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26351    new_path="$unix_path"
26352  fi
26353
26354
26355    new_path=`$WHICH "$new_path" 2> /dev/null`
26356
26357    if test "x$new_path" = x; then
26358      # It's still not found. Now this is an unrecoverable error.
26359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26360$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26361      has_space=`$ECHO "$complete" | $GREP " "`
26362      if test "x$has_space" != x; then
26363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26365      fi
26366      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26367    fi
26368  fi
26369
26370  # Now new_path has a complete unix path to the binary
26371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26372    # Keep paths in /bin as-is, but remove trailing .exe if any
26373    new_path="${new_path/%.exe/}"
26374    # Do not save /bin paths to all_fixpath_prefixes!
26375  else
26376    # Not in mixed or Windows style, start by that.
26377    new_path=`cmd //c echo $new_path`
26378
26379  input_path="$new_path"
26380  # Check if we need to convert this using DOS-style short mode. If the path
26381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26382  # take no chances and rewrite it.
26383  # Note: m4 eats our [], so we need to use [ and ] instead.
26384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26385  if test "x$has_forbidden_chars" != x; then
26386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26388  fi
26389
26390    # Output is in $new_path
26391
26392  windows_path="$new_path"
26393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26394    unix_path=`$CYGPATH -u "$windows_path"`
26395    new_path="$unix_path"
26396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26398    new_path="$unix_path"
26399  fi
26400
26401    # remove trailing .exe if any
26402    new_path="${new_path/%.exe/}"
26403
26404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26406  fi
26407
26408  else
26409    # We're on a posix platform. Hooray! :)
26410    # First separate the path from the arguments. This will split at the first
26411    # space.
26412    complete="$GNM"
26413    path="${complete%% *}"
26414    tmp="$complete EOL"
26415    arguments="${tmp#* }"
26416
26417    # Cannot rely on the command "which" here since it doesn't always work.
26418    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26419    if test -z "$is_absolute_path"; then
26420      # Path to executable is not absolute. Find it.
26421      IFS_save="$IFS"
26422      IFS=:
26423      for p in $PATH; do
26424        if test -f "$p/$path" && test -x "$p/$path"; then
26425          new_path="$p/$path"
26426          break
26427        fi
26428      done
26429      IFS="$IFS_save"
26430    else
26431      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26432$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26433      new_path="$path"
26434    fi
26435
26436    if test "x$new_path" = x; then
26437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26438$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26439      has_space=`$ECHO "$complete" | $GREP " "`
26440      if test "x$has_space" != x; then
26441        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26443      fi
26444      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26445    fi
26446  fi
26447
26448  # Now join together the path and the arguments once again
26449  if test "x$arguments" != xEOL; then
26450    new_complete="$new_path ${arguments% *}"
26451  else
26452    new_complete="$new_path"
26453  fi
26454
26455  if test "x$complete" != "x$new_complete"; then
26456    GNM="$new_complete"
26457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26458$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26459  fi
26460
26461    # Extract the first word of "strip", so it can be a program name with args.
26462set dummy strip; ac_word=$2
26463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26464$as_echo_n "checking for $ac_word... " >&6; }
26465if ${ac_cv_path_STRIP+:} false; then :
26466  $as_echo_n "(cached) " >&6
26467else
26468  case $STRIP in
26469  [\\/]* | ?:[\\/]*)
26470  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26471  ;;
26472  *)
26473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26474for as_dir in $PATH
26475do
26476  IFS=$as_save_IFS
26477  test -z "$as_dir" && as_dir=.
26478    for ac_exec_ext in '' $ac_executable_extensions; do
26479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26480    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26482    break 2
26483  fi
26484done
26485  done
26486IFS=$as_save_IFS
26487
26488  ;;
26489esac
26490fi
26491STRIP=$ac_cv_path_STRIP
26492if test -n "$STRIP"; then
26493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26494$as_echo "$STRIP" >&6; }
26495else
26496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26497$as_echo "no" >&6; }
26498fi
26499
26500
26501
26502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26503
26504  # First separate the path from the arguments. This will split at the first
26505  # space.
26506  complete="$STRIP"
26507  path="${complete%% *}"
26508  tmp="$complete EOL"
26509  arguments="${tmp#* }"
26510
26511  # Input might be given as Windows format, start by converting to
26512  # unix format.
26513  new_path=`$CYGPATH -u "$path"`
26514
26515  # Now try to locate executable using which
26516  new_path=`$WHICH "$new_path" 2> /dev/null`
26517  # bat and cmd files are not always considered executable in cygwin causing which
26518  # to not find them
26519  if test "x$new_path" = x \
26520      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26521      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26522    new_path=`$CYGPATH -u "$path"`
26523  fi
26524  if test "x$new_path" = x; then
26525    # Oops. Which didn't find the executable.
26526    # The splitting of arguments from the executable at a space might have been incorrect,
26527    # since paths with space are more likely in Windows. Give it another try with the whole
26528    # argument.
26529    path="$complete"
26530    arguments="EOL"
26531    new_path=`$CYGPATH -u "$path"`
26532    new_path=`$WHICH "$new_path" 2> /dev/null`
26533    # bat and cmd files are not always considered executable in cygwin causing which
26534    # to not find them
26535    if test "x$new_path" = x \
26536        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26537        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26538      new_path=`$CYGPATH -u "$path"`
26539    fi
26540    if test "x$new_path" = x; then
26541      # It's still not found. Now this is an unrecoverable error.
26542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26543$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26544      has_space=`$ECHO "$complete" | $GREP " "`
26545      if test "x$has_space" != x; then
26546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26548      fi
26549      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26550    fi
26551  fi
26552
26553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26556  # "foo.exe" is OK but "foo" is an error.
26557  #
26558  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26559  # It is also a way to make sure we got the proper file name for the real test later on.
26560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26561  if test "x$test_shortpath" = x; then
26562    # Short path failed, file does not exist as specified.
26563    # Try adding .exe or .cmd
26564    if test -f "${new_path}.exe"; then
26565      input_to_shortpath="${new_path}.exe"
26566    elif test -f "${new_path}.cmd"; then
26567      input_to_shortpath="${new_path}.cmd"
26568    else
26569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26570$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26571      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26572$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26573      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26574    fi
26575  else
26576    input_to_shortpath="$new_path"
26577  fi
26578
26579  # Call helper function which possibly converts this using DOS-style short mode.
26580  # If so, the updated path is stored in $new_path.
26581  new_path="$input_to_shortpath"
26582
26583  input_path="$input_to_shortpath"
26584  # Check if we need to convert this using DOS-style short mode. If the path
26585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26586  # take no chances and rewrite it.
26587  # Note: m4 eats our [], so we need to use [ and ] instead.
26588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26589  if test "x$has_forbidden_chars" != x; then
26590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26594      # Going to short mode and back again did indeed matter. Since short mode is
26595      # case insensitive, let's make it lowercase to improve readability.
26596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26597      # Now convert it back to Unix-stile (cygpath)
26598      input_path=`$CYGPATH -u "$shortmode_path"`
26599      new_path="$input_path"
26600    fi
26601  fi
26602
26603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26604  if test "x$test_cygdrive_prefix" = x; then
26605    # As a simple fix, exclude /usr/bin since it's not a real path.
26606    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26608      # a path prefixed by /cygdrive for fixpath to work.
26609      new_path="$CYGWIN_ROOT_PATH$input_path"
26610    fi
26611  fi
26612
26613  # remove trailing .exe if any
26614  new_path="${new_path/%.exe/}"
26615
26616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26617
26618  # First separate the path from the arguments. This will split at the first
26619  # space.
26620  complete="$STRIP"
26621  path="${complete%% *}"
26622  tmp="$complete EOL"
26623  arguments="${tmp#* }"
26624
26625  # Input might be given as Windows format, start by converting to
26626  # unix format.
26627  new_path="$path"
26628
26629  windows_path="$new_path"
26630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26631    unix_path=`$CYGPATH -u "$windows_path"`
26632    new_path="$unix_path"
26633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26635    new_path="$unix_path"
26636  fi
26637
26638
26639  # Now try to locate executable using which
26640  new_path=`$WHICH "$new_path" 2> /dev/null`
26641
26642  if test "x$new_path" = x; then
26643    # Oops. Which didn't find the executable.
26644    # The splitting of arguments from the executable at a space might have been incorrect,
26645    # since paths with space are more likely in Windows. Give it another try with the whole
26646    # argument.
26647    path="$complete"
26648    arguments="EOL"
26649    new_path="$path"
26650
26651  windows_path="$new_path"
26652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26653    unix_path=`$CYGPATH -u "$windows_path"`
26654    new_path="$unix_path"
26655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26657    new_path="$unix_path"
26658  fi
26659
26660
26661    new_path=`$WHICH "$new_path" 2> /dev/null`
26662
26663    if test "x$new_path" = x; then
26664      # It's still not found. Now this is an unrecoverable error.
26665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26666$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26667      has_space=`$ECHO "$complete" | $GREP " "`
26668      if test "x$has_space" != x; then
26669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26671      fi
26672      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26673    fi
26674  fi
26675
26676  # Now new_path has a complete unix path to the binary
26677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26678    # Keep paths in /bin as-is, but remove trailing .exe if any
26679    new_path="${new_path/%.exe/}"
26680    # Do not save /bin paths to all_fixpath_prefixes!
26681  else
26682    # Not in mixed or Windows style, start by that.
26683    new_path=`cmd //c echo $new_path`
26684
26685  input_path="$new_path"
26686  # Check if we need to convert this using DOS-style short mode. If the path
26687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26688  # take no chances and rewrite it.
26689  # Note: m4 eats our [], so we need to use [ and ] instead.
26690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26691  if test "x$has_forbidden_chars" != x; then
26692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26694  fi
26695
26696    # Output is in $new_path
26697
26698  windows_path="$new_path"
26699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26700    unix_path=`$CYGPATH -u "$windows_path"`
26701    new_path="$unix_path"
26702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26704    new_path="$unix_path"
26705  fi
26706
26707    # remove trailing .exe if any
26708    new_path="${new_path/%.exe/}"
26709
26710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26712  fi
26713
26714  else
26715    # We're on a posix platform. Hooray! :)
26716    # First separate the path from the arguments. This will split at the first
26717    # space.
26718    complete="$STRIP"
26719    path="${complete%% *}"
26720    tmp="$complete EOL"
26721    arguments="${tmp#* }"
26722
26723    # Cannot rely on the command "which" here since it doesn't always work.
26724    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26725    if test -z "$is_absolute_path"; then
26726      # Path to executable is not absolute. Find it.
26727      IFS_save="$IFS"
26728      IFS=:
26729      for p in $PATH; do
26730        if test -f "$p/$path" && test -x "$p/$path"; then
26731          new_path="$p/$path"
26732          break
26733        fi
26734      done
26735      IFS="$IFS_save"
26736    else
26737      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26738$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26739      new_path="$path"
26740    fi
26741
26742    if test "x$new_path" = x; then
26743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26744$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26745      has_space=`$ECHO "$complete" | $GREP " "`
26746      if test "x$has_space" != x; then
26747        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26749      fi
26750      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26751    fi
26752  fi
26753
26754  # Now join together the path and the arguments once again
26755  if test "x$arguments" != xEOL; then
26756    new_complete="$new_path ${arguments% *}"
26757  else
26758    new_complete="$new_path"
26759  fi
26760
26761  if test "x$complete" != "x$new_complete"; then
26762    STRIP="$new_complete"
26763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26764$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26765  fi
26766
26767    # Extract the first word of "mcs", so it can be a program name with args.
26768set dummy mcs; ac_word=$2
26769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26770$as_echo_n "checking for $ac_word... " >&6; }
26771if ${ac_cv_path_MCS+:} false; then :
26772  $as_echo_n "(cached) " >&6
26773else
26774  case $MCS in
26775  [\\/]* | ?:[\\/]*)
26776  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26777  ;;
26778  *)
26779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26780for as_dir in $PATH
26781do
26782  IFS=$as_save_IFS
26783  test -z "$as_dir" && as_dir=.
26784    for ac_exec_ext in '' $ac_executable_extensions; do
26785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26786    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26788    break 2
26789  fi
26790done
26791  done
26792IFS=$as_save_IFS
26793
26794  ;;
26795esac
26796fi
26797MCS=$ac_cv_path_MCS
26798if test -n "$MCS"; then
26799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26800$as_echo "$MCS" >&6; }
26801else
26802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26803$as_echo "no" >&6; }
26804fi
26805
26806
26807
26808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26809
26810  # First separate the path from the arguments. This will split at the first
26811  # space.
26812  complete="$MCS"
26813  path="${complete%% *}"
26814  tmp="$complete EOL"
26815  arguments="${tmp#* }"
26816
26817  # Input might be given as Windows format, start by converting to
26818  # unix format.
26819  new_path=`$CYGPATH -u "$path"`
26820
26821  # Now try to locate executable using which
26822  new_path=`$WHICH "$new_path" 2> /dev/null`
26823  # bat and cmd files are not always considered executable in cygwin causing which
26824  # to not find them
26825  if test "x$new_path" = x \
26826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26828    new_path=`$CYGPATH -u "$path"`
26829  fi
26830  if test "x$new_path" = x; then
26831    # Oops. Which didn't find the executable.
26832    # The splitting of arguments from the executable at a space might have been incorrect,
26833    # since paths with space are more likely in Windows. Give it another try with the whole
26834    # argument.
26835    path="$complete"
26836    arguments="EOL"
26837    new_path=`$CYGPATH -u "$path"`
26838    new_path=`$WHICH "$new_path" 2> /dev/null`
26839    # bat and cmd files are not always considered executable in cygwin causing which
26840    # to not find them
26841    if test "x$new_path" = x \
26842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26844      new_path=`$CYGPATH -u "$path"`
26845    fi
26846    if test "x$new_path" = x; then
26847      # It's still not found. Now this is an unrecoverable error.
26848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26849$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26850      has_space=`$ECHO "$complete" | $GREP " "`
26851      if test "x$has_space" != x; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26854      fi
26855      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26856    fi
26857  fi
26858
26859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26862  # "foo.exe" is OK but "foo" is an error.
26863  #
26864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26865  # It is also a way to make sure we got the proper file name for the real test later on.
26866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26867  if test "x$test_shortpath" = x; then
26868    # Short path failed, file does not exist as specified.
26869    # Try adding .exe or .cmd
26870    if test -f "${new_path}.exe"; then
26871      input_to_shortpath="${new_path}.exe"
26872    elif test -f "${new_path}.cmd"; then
26873      input_to_shortpath="${new_path}.cmd"
26874    else
26875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26876$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26879      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26880    fi
26881  else
26882    input_to_shortpath="$new_path"
26883  fi
26884
26885  # Call helper function which possibly converts this using DOS-style short mode.
26886  # If so, the updated path is stored in $new_path.
26887  new_path="$input_to_shortpath"
26888
26889  input_path="$input_to_shortpath"
26890  # Check if we need to convert this using DOS-style short mode. If the path
26891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26892  # take no chances and rewrite it.
26893  # Note: m4 eats our [], so we need to use [ and ] instead.
26894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26895  if test "x$has_forbidden_chars" != x; then
26896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26900      # Going to short mode and back again did indeed matter. Since short mode is
26901      # case insensitive, let's make it lowercase to improve readability.
26902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26903      # Now convert it back to Unix-stile (cygpath)
26904      input_path=`$CYGPATH -u "$shortmode_path"`
26905      new_path="$input_path"
26906    fi
26907  fi
26908
26909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26910  if test "x$test_cygdrive_prefix" = x; then
26911    # As a simple fix, exclude /usr/bin since it's not a real path.
26912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26914      # a path prefixed by /cygdrive for fixpath to work.
26915      new_path="$CYGWIN_ROOT_PATH$input_path"
26916    fi
26917  fi
26918
26919  # remove trailing .exe if any
26920  new_path="${new_path/%.exe/}"
26921
26922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923
26924  # First separate the path from the arguments. This will split at the first
26925  # space.
26926  complete="$MCS"
26927  path="${complete%% *}"
26928  tmp="$complete EOL"
26929  arguments="${tmp#* }"
26930
26931  # Input might be given as Windows format, start by converting to
26932  # unix format.
26933  new_path="$path"
26934
26935  windows_path="$new_path"
26936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26937    unix_path=`$CYGPATH -u "$windows_path"`
26938    new_path="$unix_path"
26939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26941    new_path="$unix_path"
26942  fi
26943
26944
26945  # Now try to locate executable using which
26946  new_path=`$WHICH "$new_path" 2> /dev/null`
26947
26948  if test "x$new_path" = x; then
26949    # Oops. Which didn't find the executable.
26950    # The splitting of arguments from the executable at a space might have been incorrect,
26951    # since paths with space are more likely in Windows. Give it another try with the whole
26952    # argument.
26953    path="$complete"
26954    arguments="EOL"
26955    new_path="$path"
26956
26957  windows_path="$new_path"
26958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26959    unix_path=`$CYGPATH -u "$windows_path"`
26960    new_path="$unix_path"
26961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26963    new_path="$unix_path"
26964  fi
26965
26966
26967    new_path=`$WHICH "$new_path" 2> /dev/null`
26968
26969    if test "x$new_path" = x; then
26970      # It's still not found. Now this is an unrecoverable error.
26971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26972$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26973      has_space=`$ECHO "$complete" | $GREP " "`
26974      if test "x$has_space" != x; then
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26977      fi
26978      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26979    fi
26980  fi
26981
26982  # Now new_path has a complete unix path to the binary
26983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26984    # Keep paths in /bin as-is, but remove trailing .exe if any
26985    new_path="${new_path/%.exe/}"
26986    # Do not save /bin paths to all_fixpath_prefixes!
26987  else
26988    # Not in mixed or Windows style, start by that.
26989    new_path=`cmd //c echo $new_path`
26990
26991  input_path="$new_path"
26992  # Check if we need to convert this using DOS-style short mode. If the path
26993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26994  # take no chances and rewrite it.
26995  # Note: m4 eats our [], so we need to use [ and ] instead.
26996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26997  if test "x$has_forbidden_chars" != x; then
26998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27000  fi
27001
27002    # Output is in $new_path
27003
27004  windows_path="$new_path"
27005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27006    unix_path=`$CYGPATH -u "$windows_path"`
27007    new_path="$unix_path"
27008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27010    new_path="$unix_path"
27011  fi
27012
27013    # remove trailing .exe if any
27014    new_path="${new_path/%.exe/}"
27015
27016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27018  fi
27019
27020  else
27021    # We're on a posix platform. Hooray! :)
27022    # First separate the path from the arguments. This will split at the first
27023    # space.
27024    complete="$MCS"
27025    path="${complete%% *}"
27026    tmp="$complete EOL"
27027    arguments="${tmp#* }"
27028
27029    # Cannot rely on the command "which" here since it doesn't always work.
27030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27031    if test -z "$is_absolute_path"; then
27032      # Path to executable is not absolute. Find it.
27033      IFS_save="$IFS"
27034      IFS=:
27035      for p in $PATH; do
27036        if test -f "$p/$path" && test -x "$p/$path"; then
27037          new_path="$p/$path"
27038          break
27039        fi
27040      done
27041      IFS="$IFS_save"
27042    else
27043      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27044$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27045      new_path="$path"
27046    fi
27047
27048    if test "x$new_path" = x; then
27049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27050$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27051      has_space=`$ECHO "$complete" | $GREP " "`
27052      if test "x$has_space" != x; then
27053        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27055      fi
27056      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27057    fi
27058  fi
27059
27060  # Now join together the path and the arguments once again
27061  if test "x$arguments" != xEOL; then
27062    new_complete="$new_path ${arguments% *}"
27063  else
27064    new_complete="$new_path"
27065  fi
27066
27067  if test "x$complete" != "x$new_complete"; then
27068    MCS="$new_complete"
27069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27070$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27071  fi
27072
27073  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27074    if test -n "$ac_tool_prefix"; then
27075  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27076set dummy ${ac_tool_prefix}nm; ac_word=$2
27077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27078$as_echo_n "checking for $ac_word... " >&6; }
27079if ${ac_cv_prog_NM+:} false; then :
27080  $as_echo_n "(cached) " >&6
27081else
27082  if test -n "$NM"; then
27083  ac_cv_prog_NM="$NM" # Let the user override the test.
27084else
27085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27086for as_dir in $PATH
27087do
27088  IFS=$as_save_IFS
27089  test -z "$as_dir" && as_dir=.
27090    for ac_exec_ext in '' $ac_executable_extensions; do
27091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27092    ac_cv_prog_NM="${ac_tool_prefix}nm"
27093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27094    break 2
27095  fi
27096done
27097  done
27098IFS=$as_save_IFS
27099
27100fi
27101fi
27102NM=$ac_cv_prog_NM
27103if test -n "$NM"; then
27104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27105$as_echo "$NM" >&6; }
27106else
27107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27108$as_echo "no" >&6; }
27109fi
27110
27111
27112fi
27113if test -z "$ac_cv_prog_NM"; then
27114  ac_ct_NM=$NM
27115  # Extract the first word of "nm", so it can be a program name with args.
27116set dummy nm; ac_word=$2
27117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27118$as_echo_n "checking for $ac_word... " >&6; }
27119if ${ac_cv_prog_ac_ct_NM+:} false; then :
27120  $as_echo_n "(cached) " >&6
27121else
27122  if test -n "$ac_ct_NM"; then
27123  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27124else
27125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27126for as_dir in $PATH
27127do
27128  IFS=$as_save_IFS
27129  test -z "$as_dir" && as_dir=.
27130    for ac_exec_ext in '' $ac_executable_extensions; do
27131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27132    ac_cv_prog_ac_ct_NM="nm"
27133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27134    break 2
27135  fi
27136done
27137  done
27138IFS=$as_save_IFS
27139
27140fi
27141fi
27142ac_ct_NM=$ac_cv_prog_ac_ct_NM
27143if test -n "$ac_ct_NM"; then
27144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27145$as_echo "$ac_ct_NM" >&6; }
27146else
27147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27148$as_echo "no" >&6; }
27149fi
27150
27151  if test "x$ac_ct_NM" = x; then
27152    NM=""
27153  else
27154    case $cross_compiling:$ac_tool_warned in
27155yes:)
27156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27158ac_tool_warned=yes ;;
27159esac
27160    NM=$ac_ct_NM
27161  fi
27162else
27163  NM="$ac_cv_prog_NM"
27164fi
27165
27166
27167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27168
27169  # First separate the path from the arguments. This will split at the first
27170  # space.
27171  complete="$NM"
27172  path="${complete%% *}"
27173  tmp="$complete EOL"
27174  arguments="${tmp#* }"
27175
27176  # Input might be given as Windows format, start by converting to
27177  # unix format.
27178  new_path=`$CYGPATH -u "$path"`
27179
27180  # Now try to locate executable using which
27181  new_path=`$WHICH "$new_path" 2> /dev/null`
27182  # bat and cmd files are not always considered executable in cygwin causing which
27183  # to not find them
27184  if test "x$new_path" = x \
27185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27187    new_path=`$CYGPATH -u "$path"`
27188  fi
27189  if test "x$new_path" = x; then
27190    # Oops. Which didn't find the executable.
27191    # The splitting of arguments from the executable at a space might have been incorrect,
27192    # since paths with space are more likely in Windows. Give it another try with the whole
27193    # argument.
27194    path="$complete"
27195    arguments="EOL"
27196    new_path=`$CYGPATH -u "$path"`
27197    new_path=`$WHICH "$new_path" 2> /dev/null`
27198    # bat and cmd files are not always considered executable in cygwin causing which
27199    # to not find them
27200    if test "x$new_path" = x \
27201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27203      new_path=`$CYGPATH -u "$path"`
27204    fi
27205    if test "x$new_path" = x; then
27206      # It's still not found. Now this is an unrecoverable error.
27207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27208$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27209      has_space=`$ECHO "$complete" | $GREP " "`
27210      if test "x$has_space" != x; then
27211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27213      fi
27214      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27215    fi
27216  fi
27217
27218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27221  # "foo.exe" is OK but "foo" is an error.
27222  #
27223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27224  # It is also a way to make sure we got the proper file name for the real test later on.
27225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27226  if test "x$test_shortpath" = x; then
27227    # Short path failed, file does not exist as specified.
27228    # Try adding .exe or .cmd
27229    if test -f "${new_path}.exe"; then
27230      input_to_shortpath="${new_path}.exe"
27231    elif test -f "${new_path}.cmd"; then
27232      input_to_shortpath="${new_path}.cmd"
27233    else
27234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27235$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27238      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27239    fi
27240  else
27241    input_to_shortpath="$new_path"
27242  fi
27243
27244  # Call helper function which possibly converts this using DOS-style short mode.
27245  # If so, the updated path is stored in $new_path.
27246  new_path="$input_to_shortpath"
27247
27248  input_path="$input_to_shortpath"
27249  # Check if we need to convert this using DOS-style short mode. If the path
27250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27251  # take no chances and rewrite it.
27252  # Note: m4 eats our [], so we need to use [ and ] instead.
27253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27254  if test "x$has_forbidden_chars" != x; then
27255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27259      # Going to short mode and back again did indeed matter. Since short mode is
27260      # case insensitive, let's make it lowercase to improve readability.
27261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27262      # Now convert it back to Unix-stile (cygpath)
27263      input_path=`$CYGPATH -u "$shortmode_path"`
27264      new_path="$input_path"
27265    fi
27266  fi
27267
27268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27269  if test "x$test_cygdrive_prefix" = x; then
27270    # As a simple fix, exclude /usr/bin since it's not a real path.
27271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27273      # a path prefixed by /cygdrive for fixpath to work.
27274      new_path="$CYGWIN_ROOT_PATH$input_path"
27275    fi
27276  fi
27277
27278  # remove trailing .exe if any
27279  new_path="${new_path/%.exe/}"
27280
27281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27282
27283  # First separate the path from the arguments. This will split at the first
27284  # space.
27285  complete="$NM"
27286  path="${complete%% *}"
27287  tmp="$complete EOL"
27288  arguments="${tmp#* }"
27289
27290  # Input might be given as Windows format, start by converting to
27291  # unix format.
27292  new_path="$path"
27293
27294  windows_path="$new_path"
27295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27296    unix_path=`$CYGPATH -u "$windows_path"`
27297    new_path="$unix_path"
27298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27300    new_path="$unix_path"
27301  fi
27302
27303
27304  # Now try to locate executable using which
27305  new_path=`$WHICH "$new_path" 2> /dev/null`
27306
27307  if test "x$new_path" = x; then
27308    # Oops. Which didn't find the executable.
27309    # The splitting of arguments from the executable at a space might have been incorrect,
27310    # since paths with space are more likely in Windows. Give it another try with the whole
27311    # argument.
27312    path="$complete"
27313    arguments="EOL"
27314    new_path="$path"
27315
27316  windows_path="$new_path"
27317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27318    unix_path=`$CYGPATH -u "$windows_path"`
27319    new_path="$unix_path"
27320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27322    new_path="$unix_path"
27323  fi
27324
27325
27326    new_path=`$WHICH "$new_path" 2> /dev/null`
27327
27328    if test "x$new_path" = x; then
27329      # It's still not found. Now this is an unrecoverable error.
27330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27331$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27332      has_space=`$ECHO "$complete" | $GREP " "`
27333      if test "x$has_space" != x; then
27334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27336      fi
27337      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27338    fi
27339  fi
27340
27341  # Now new_path has a complete unix path to the binary
27342  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27343    # Keep paths in /bin as-is, but remove trailing .exe if any
27344    new_path="${new_path/%.exe/}"
27345    # Do not save /bin paths to all_fixpath_prefixes!
27346  else
27347    # Not in mixed or Windows style, start by that.
27348    new_path=`cmd //c echo $new_path`
27349
27350  input_path="$new_path"
27351  # Check if we need to convert this using DOS-style short mode. If the path
27352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27353  # take no chances and rewrite it.
27354  # Note: m4 eats our [], so we need to use [ and ] instead.
27355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27356  if test "x$has_forbidden_chars" != x; then
27357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27359  fi
27360
27361    # Output is in $new_path
27362
27363  windows_path="$new_path"
27364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27365    unix_path=`$CYGPATH -u "$windows_path"`
27366    new_path="$unix_path"
27367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27369    new_path="$unix_path"
27370  fi
27371
27372    # remove trailing .exe if any
27373    new_path="${new_path/%.exe/}"
27374
27375    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27376    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27377  fi
27378
27379  else
27380    # We're on a posix platform. Hooray! :)
27381    # First separate the path from the arguments. This will split at the first
27382    # space.
27383    complete="$NM"
27384    path="${complete%% *}"
27385    tmp="$complete EOL"
27386    arguments="${tmp#* }"
27387
27388    # Cannot rely on the command "which" here since it doesn't always work.
27389    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27390    if test -z "$is_absolute_path"; then
27391      # Path to executable is not absolute. Find it.
27392      IFS_save="$IFS"
27393      IFS=:
27394      for p in $PATH; do
27395        if test -f "$p/$path" && test -x "$p/$path"; then
27396          new_path="$p/$path"
27397          break
27398        fi
27399      done
27400      IFS="$IFS_save"
27401    else
27402      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27403$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27404      new_path="$path"
27405    fi
27406
27407    if test "x$new_path" = x; then
27408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27409$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27410      has_space=`$ECHO "$complete" | $GREP " "`
27411      if test "x$has_space" != x; then
27412        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27413$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27414      fi
27415      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27416    fi
27417  fi
27418
27419  # Now join together the path and the arguments once again
27420  if test "x$arguments" != xEOL; then
27421    new_complete="$new_path ${arguments% *}"
27422  else
27423    new_complete="$new_path"
27424  fi
27425
27426  if test "x$complete" != "x$new_complete"; then
27427    NM="$new_complete"
27428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27429$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27430  fi
27431
27432    GNM="$NM"
27433
27434    if test -n "$ac_tool_prefix"; then
27435  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27436set dummy ${ac_tool_prefix}strip; ac_word=$2
27437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27438$as_echo_n "checking for $ac_word... " >&6; }
27439if ${ac_cv_prog_STRIP+:} false; then :
27440  $as_echo_n "(cached) " >&6
27441else
27442  if test -n "$STRIP"; then
27443  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27444else
27445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27446for as_dir in $PATH
27447do
27448  IFS=$as_save_IFS
27449  test -z "$as_dir" && as_dir=.
27450    for ac_exec_ext in '' $ac_executable_extensions; do
27451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27452    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27454    break 2
27455  fi
27456done
27457  done
27458IFS=$as_save_IFS
27459
27460fi
27461fi
27462STRIP=$ac_cv_prog_STRIP
27463if test -n "$STRIP"; then
27464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27465$as_echo "$STRIP" >&6; }
27466else
27467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27468$as_echo "no" >&6; }
27469fi
27470
27471
27472fi
27473if test -z "$ac_cv_prog_STRIP"; then
27474  ac_ct_STRIP=$STRIP
27475  # Extract the first word of "strip", so it can be a program name with args.
27476set dummy strip; ac_word=$2
27477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27478$as_echo_n "checking for $ac_word... " >&6; }
27479if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27480  $as_echo_n "(cached) " >&6
27481else
27482  if test -n "$ac_ct_STRIP"; then
27483  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27484else
27485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27486for as_dir in $PATH
27487do
27488  IFS=$as_save_IFS
27489  test -z "$as_dir" && as_dir=.
27490    for ac_exec_ext in '' $ac_executable_extensions; do
27491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27492    ac_cv_prog_ac_ct_STRIP="strip"
27493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27494    break 2
27495  fi
27496done
27497  done
27498IFS=$as_save_IFS
27499
27500fi
27501fi
27502ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27503if test -n "$ac_ct_STRIP"; then
27504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27505$as_echo "$ac_ct_STRIP" >&6; }
27506else
27507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27508$as_echo "no" >&6; }
27509fi
27510
27511  if test "x$ac_ct_STRIP" = x; then
27512    STRIP=""
27513  else
27514    case $cross_compiling:$ac_tool_warned in
27515yes:)
27516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27518ac_tool_warned=yes ;;
27519esac
27520    STRIP=$ac_ct_STRIP
27521  fi
27522else
27523  STRIP="$ac_cv_prog_STRIP"
27524fi
27525
27526
27527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27528
27529  # First separate the path from the arguments. This will split at the first
27530  # space.
27531  complete="$STRIP"
27532  path="${complete%% *}"
27533  tmp="$complete EOL"
27534  arguments="${tmp#* }"
27535
27536  # Input might be given as Windows format, start by converting to
27537  # unix format.
27538  new_path=`$CYGPATH -u "$path"`
27539
27540  # Now try to locate executable using which
27541  new_path=`$WHICH "$new_path" 2> /dev/null`
27542  # bat and cmd files are not always considered executable in cygwin causing which
27543  # to not find them
27544  if test "x$new_path" = x \
27545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27547    new_path=`$CYGPATH -u "$path"`
27548  fi
27549  if test "x$new_path" = x; then
27550    # Oops. Which didn't find the executable.
27551    # The splitting of arguments from the executable at a space might have been incorrect,
27552    # since paths with space are more likely in Windows. Give it another try with the whole
27553    # argument.
27554    path="$complete"
27555    arguments="EOL"
27556    new_path=`$CYGPATH -u "$path"`
27557    new_path=`$WHICH "$new_path" 2> /dev/null`
27558    # bat and cmd files are not always considered executable in cygwin causing which
27559    # to not find them
27560    if test "x$new_path" = x \
27561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27563      new_path=`$CYGPATH -u "$path"`
27564    fi
27565    if test "x$new_path" = x; then
27566      # It's still not found. Now this is an unrecoverable error.
27567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27568$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27569      has_space=`$ECHO "$complete" | $GREP " "`
27570      if test "x$has_space" != x; then
27571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27573      fi
27574      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27575    fi
27576  fi
27577
27578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27581  # "foo.exe" is OK but "foo" is an error.
27582  #
27583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27584  # It is also a way to make sure we got the proper file name for the real test later on.
27585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27586  if test "x$test_shortpath" = x; then
27587    # Short path failed, file does not exist as specified.
27588    # Try adding .exe or .cmd
27589    if test -f "${new_path}.exe"; then
27590      input_to_shortpath="${new_path}.exe"
27591    elif test -f "${new_path}.cmd"; then
27592      input_to_shortpath="${new_path}.cmd"
27593    else
27594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27595$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27598      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27599    fi
27600  else
27601    input_to_shortpath="$new_path"
27602  fi
27603
27604  # Call helper function which possibly converts this using DOS-style short mode.
27605  # If so, the updated path is stored in $new_path.
27606  new_path="$input_to_shortpath"
27607
27608  input_path="$input_to_shortpath"
27609  # Check if we need to convert this using DOS-style short mode. If the path
27610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27611  # take no chances and rewrite it.
27612  # Note: m4 eats our [], so we need to use [ and ] instead.
27613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27614  if test "x$has_forbidden_chars" != x; then
27615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27619      # Going to short mode and back again did indeed matter. Since short mode is
27620      # case insensitive, let's make it lowercase to improve readability.
27621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27622      # Now convert it back to Unix-stile (cygpath)
27623      input_path=`$CYGPATH -u "$shortmode_path"`
27624      new_path="$input_path"
27625    fi
27626  fi
27627
27628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27629  if test "x$test_cygdrive_prefix" = x; then
27630    # As a simple fix, exclude /usr/bin since it's not a real path.
27631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27633      # a path prefixed by /cygdrive for fixpath to work.
27634      new_path="$CYGWIN_ROOT_PATH$input_path"
27635    fi
27636  fi
27637
27638  # remove trailing .exe if any
27639  new_path="${new_path/%.exe/}"
27640
27641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27642
27643  # First separate the path from the arguments. This will split at the first
27644  # space.
27645  complete="$STRIP"
27646  path="${complete%% *}"
27647  tmp="$complete EOL"
27648  arguments="${tmp#* }"
27649
27650  # Input might be given as Windows format, start by converting to
27651  # unix format.
27652  new_path="$path"
27653
27654  windows_path="$new_path"
27655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27656    unix_path=`$CYGPATH -u "$windows_path"`
27657    new_path="$unix_path"
27658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27660    new_path="$unix_path"
27661  fi
27662
27663
27664  # Now try to locate executable using which
27665  new_path=`$WHICH "$new_path" 2> /dev/null`
27666
27667  if test "x$new_path" = x; then
27668    # Oops. Which didn't find the executable.
27669    # The splitting of arguments from the executable at a space might have been incorrect,
27670    # since paths with space are more likely in Windows. Give it another try with the whole
27671    # argument.
27672    path="$complete"
27673    arguments="EOL"
27674    new_path="$path"
27675
27676  windows_path="$new_path"
27677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27678    unix_path=`$CYGPATH -u "$windows_path"`
27679    new_path="$unix_path"
27680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27682    new_path="$unix_path"
27683  fi
27684
27685
27686    new_path=`$WHICH "$new_path" 2> /dev/null`
27687
27688    if test "x$new_path" = x; then
27689      # It's still not found. Now this is an unrecoverable error.
27690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27691$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27692      has_space=`$ECHO "$complete" | $GREP " "`
27693      if test "x$has_space" != x; then
27694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27696      fi
27697      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27698    fi
27699  fi
27700
27701  # Now new_path has a complete unix path to the binary
27702  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27703    # Keep paths in /bin as-is, but remove trailing .exe if any
27704    new_path="${new_path/%.exe/}"
27705    # Do not save /bin paths to all_fixpath_prefixes!
27706  else
27707    # Not in mixed or Windows style, start by that.
27708    new_path=`cmd //c echo $new_path`
27709
27710  input_path="$new_path"
27711  # Check if we need to convert this using DOS-style short mode. If the path
27712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27713  # take no chances and rewrite it.
27714  # Note: m4 eats our [], so we need to use [ and ] instead.
27715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27716  if test "x$has_forbidden_chars" != x; then
27717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27719  fi
27720
27721    # Output is in $new_path
27722
27723  windows_path="$new_path"
27724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27725    unix_path=`$CYGPATH -u "$windows_path"`
27726    new_path="$unix_path"
27727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27729    new_path="$unix_path"
27730  fi
27731
27732    # remove trailing .exe if any
27733    new_path="${new_path/%.exe/}"
27734
27735    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27736    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27737  fi
27738
27739  else
27740    # We're on a posix platform. Hooray! :)
27741    # First separate the path from the arguments. This will split at the first
27742    # space.
27743    complete="$STRIP"
27744    path="${complete%% *}"
27745    tmp="$complete EOL"
27746    arguments="${tmp#* }"
27747
27748    # Cannot rely on the command "which" here since it doesn't always work.
27749    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27750    if test -z "$is_absolute_path"; then
27751      # Path to executable is not absolute. Find it.
27752      IFS_save="$IFS"
27753      IFS=:
27754      for p in $PATH; do
27755        if test -f "$p/$path" && test -x "$p/$path"; then
27756          new_path="$p/$path"
27757          break
27758        fi
27759      done
27760      IFS="$IFS_save"
27761    else
27762      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27763$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27764      new_path="$path"
27765    fi
27766
27767    if test "x$new_path" = x; then
27768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27769$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27770      has_space=`$ECHO "$complete" | $GREP " "`
27771      if test "x$has_space" != x; then
27772        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27774      fi
27775      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27776    fi
27777  fi
27778
27779  # Now join together the path and the arguments once again
27780  if test "x$arguments" != xEOL; then
27781    new_complete="$new_path ${arguments% *}"
27782  else
27783    new_complete="$new_path"
27784  fi
27785
27786  if test "x$complete" != "x$new_complete"; then
27787    STRIP="$new_complete"
27788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27789$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27790  fi
27791
27792  fi
27793
27794  # objcopy is used for moving debug symbols to separate files when
27795  # full debug symbols are enabled.
27796  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27797    if test -n "$ac_tool_prefix"; then
27798  for ac_prog in gobjcopy objcopy
27799  do
27800    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27803$as_echo_n "checking for $ac_word... " >&6; }
27804if ${ac_cv_prog_OBJCOPY+:} false; then :
27805  $as_echo_n "(cached) " >&6
27806else
27807  if test -n "$OBJCOPY"; then
27808  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27809else
27810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27811for as_dir in $PATH
27812do
27813  IFS=$as_save_IFS
27814  test -z "$as_dir" && as_dir=.
27815    for ac_exec_ext in '' $ac_executable_extensions; do
27816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27817    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27819    break 2
27820  fi
27821done
27822  done
27823IFS=$as_save_IFS
27824
27825fi
27826fi
27827OBJCOPY=$ac_cv_prog_OBJCOPY
27828if test -n "$OBJCOPY"; then
27829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27830$as_echo "$OBJCOPY" >&6; }
27831else
27832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27833$as_echo "no" >&6; }
27834fi
27835
27836
27837    test -n "$OBJCOPY" && break
27838  done
27839fi
27840if test -z "$OBJCOPY"; then
27841  ac_ct_OBJCOPY=$OBJCOPY
27842  for ac_prog in gobjcopy objcopy
27843do
27844  # Extract the first word of "$ac_prog", so it can be a program name with args.
27845set dummy $ac_prog; ac_word=$2
27846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27847$as_echo_n "checking for $ac_word... " >&6; }
27848if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27849  $as_echo_n "(cached) " >&6
27850else
27851  if test -n "$ac_ct_OBJCOPY"; then
27852  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27853else
27854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27855for as_dir in $PATH
27856do
27857  IFS=$as_save_IFS
27858  test -z "$as_dir" && as_dir=.
27859    for ac_exec_ext in '' $ac_executable_extensions; do
27860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27861    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27863    break 2
27864  fi
27865done
27866  done
27867IFS=$as_save_IFS
27868
27869fi
27870fi
27871ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27872if test -n "$ac_ct_OBJCOPY"; then
27873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27874$as_echo "$ac_ct_OBJCOPY" >&6; }
27875else
27876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27877$as_echo "no" >&6; }
27878fi
27879
27880
27881  test -n "$ac_ct_OBJCOPY" && break
27882done
27883
27884  if test "x$ac_ct_OBJCOPY" = x; then
27885    OBJCOPY=""
27886  else
27887    case $cross_compiling:$ac_tool_warned in
27888yes:)
27889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27891ac_tool_warned=yes ;;
27892esac
27893    OBJCOPY=$ac_ct_OBJCOPY
27894  fi
27895fi
27896
27897    # Only call fixup if objcopy was found.
27898    if test -n "$OBJCOPY"; then
27899
27900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27901
27902  # First separate the path from the arguments. This will split at the first
27903  # space.
27904  complete="$OBJCOPY"
27905  path="${complete%% *}"
27906  tmp="$complete EOL"
27907  arguments="${tmp#* }"
27908
27909  # Input might be given as Windows format, start by converting to
27910  # unix format.
27911  new_path=`$CYGPATH -u "$path"`
27912
27913  # Now try to locate executable using which
27914  new_path=`$WHICH "$new_path" 2> /dev/null`
27915  # bat and cmd files are not always considered executable in cygwin causing which
27916  # to not find them
27917  if test "x$new_path" = x \
27918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27920    new_path=`$CYGPATH -u "$path"`
27921  fi
27922  if test "x$new_path" = x; then
27923    # Oops. Which didn't find the executable.
27924    # The splitting of arguments from the executable at a space might have been incorrect,
27925    # since paths with space are more likely in Windows. Give it another try with the whole
27926    # argument.
27927    path="$complete"
27928    arguments="EOL"
27929    new_path=`$CYGPATH -u "$path"`
27930    new_path=`$WHICH "$new_path" 2> /dev/null`
27931    # bat and cmd files are not always considered executable in cygwin causing which
27932    # to not find them
27933    if test "x$new_path" = x \
27934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27936      new_path=`$CYGPATH -u "$path"`
27937    fi
27938    if test "x$new_path" = x; then
27939      # It's still not found. Now this is an unrecoverable error.
27940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27941$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27942      has_space=`$ECHO "$complete" | $GREP " "`
27943      if test "x$has_space" != x; then
27944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27946      fi
27947      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27948    fi
27949  fi
27950
27951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27954  # "foo.exe" is OK but "foo" is an error.
27955  #
27956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27957  # It is also a way to make sure we got the proper file name for the real test later on.
27958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27959  if test "x$test_shortpath" = x; then
27960    # Short path failed, file does not exist as specified.
27961    # Try adding .exe or .cmd
27962    if test -f "${new_path}.exe"; then
27963      input_to_shortpath="${new_path}.exe"
27964    elif test -f "${new_path}.cmd"; then
27965      input_to_shortpath="${new_path}.cmd"
27966    else
27967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27968$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27971      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27972    fi
27973  else
27974    input_to_shortpath="$new_path"
27975  fi
27976
27977  # Call helper function which possibly converts this using DOS-style short mode.
27978  # If so, the updated path is stored in $new_path.
27979  new_path="$input_to_shortpath"
27980
27981  input_path="$input_to_shortpath"
27982  # Check if we need to convert this using DOS-style short mode. If the path
27983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27984  # take no chances and rewrite it.
27985  # Note: m4 eats our [], so we need to use [ and ] instead.
27986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27987  if test "x$has_forbidden_chars" != x; then
27988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27992      # Going to short mode and back again did indeed matter. Since short mode is
27993      # case insensitive, let's make it lowercase to improve readability.
27994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27995      # Now convert it back to Unix-stile (cygpath)
27996      input_path=`$CYGPATH -u "$shortmode_path"`
27997      new_path="$input_path"
27998    fi
27999  fi
28000
28001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28002  if test "x$test_cygdrive_prefix" = x; then
28003    # As a simple fix, exclude /usr/bin since it's not a real path.
28004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28006      # a path prefixed by /cygdrive for fixpath to work.
28007      new_path="$CYGWIN_ROOT_PATH$input_path"
28008    fi
28009  fi
28010
28011  # remove trailing .exe if any
28012  new_path="${new_path/%.exe/}"
28013
28014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28015
28016  # First separate the path from the arguments. This will split at the first
28017  # space.
28018  complete="$OBJCOPY"
28019  path="${complete%% *}"
28020  tmp="$complete EOL"
28021  arguments="${tmp#* }"
28022
28023  # Input might be given as Windows format, start by converting to
28024  # unix format.
28025  new_path="$path"
28026
28027  windows_path="$new_path"
28028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28029    unix_path=`$CYGPATH -u "$windows_path"`
28030    new_path="$unix_path"
28031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28033    new_path="$unix_path"
28034  fi
28035
28036
28037  # Now try to locate executable using which
28038  new_path=`$WHICH "$new_path" 2> /dev/null`
28039
28040  if test "x$new_path" = x; then
28041    # Oops. Which didn't find the executable.
28042    # The splitting of arguments from the executable at a space might have been incorrect,
28043    # since paths with space are more likely in Windows. Give it another try with the whole
28044    # argument.
28045    path="$complete"
28046    arguments="EOL"
28047    new_path="$path"
28048
28049  windows_path="$new_path"
28050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28051    unix_path=`$CYGPATH -u "$windows_path"`
28052    new_path="$unix_path"
28053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28055    new_path="$unix_path"
28056  fi
28057
28058
28059    new_path=`$WHICH "$new_path" 2> /dev/null`
28060
28061    if test "x$new_path" = x; then
28062      # It's still not found. Now this is an unrecoverable error.
28063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28064$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28065      has_space=`$ECHO "$complete" | $GREP " "`
28066      if test "x$has_space" != x; then
28067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28069      fi
28070      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28071    fi
28072  fi
28073
28074  # Now new_path has a complete unix path to the binary
28075  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28076    # Keep paths in /bin as-is, but remove trailing .exe if any
28077    new_path="${new_path/%.exe/}"
28078    # Do not save /bin paths to all_fixpath_prefixes!
28079  else
28080    # Not in mixed or Windows style, start by that.
28081    new_path=`cmd //c echo $new_path`
28082
28083  input_path="$new_path"
28084  # Check if we need to convert this using DOS-style short mode. If the path
28085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28086  # take no chances and rewrite it.
28087  # Note: m4 eats our [], so we need to use [ and ] instead.
28088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28089  if test "x$has_forbidden_chars" != x; then
28090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28092  fi
28093
28094    # Output is in $new_path
28095
28096  windows_path="$new_path"
28097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098    unix_path=`$CYGPATH -u "$windows_path"`
28099    new_path="$unix_path"
28100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28102    new_path="$unix_path"
28103  fi
28104
28105    # remove trailing .exe if any
28106    new_path="${new_path/%.exe/}"
28107
28108    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28109    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28110  fi
28111
28112  else
28113    # We're on a posix platform. Hooray! :)
28114    # First separate the path from the arguments. This will split at the first
28115    # space.
28116    complete="$OBJCOPY"
28117    path="${complete%% *}"
28118    tmp="$complete EOL"
28119    arguments="${tmp#* }"
28120
28121    # Cannot rely on the command "which" here since it doesn't always work.
28122    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28123    if test -z "$is_absolute_path"; then
28124      # Path to executable is not absolute. Find it.
28125      IFS_save="$IFS"
28126      IFS=:
28127      for p in $PATH; do
28128        if test -f "$p/$path" && test -x "$p/$path"; then
28129          new_path="$p/$path"
28130          break
28131        fi
28132      done
28133      IFS="$IFS_save"
28134    else
28135      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28136$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28137      new_path="$path"
28138    fi
28139
28140    if test "x$new_path" = x; then
28141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28142$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28143      has_space=`$ECHO "$complete" | $GREP " "`
28144      if test "x$has_space" != x; then
28145        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28147      fi
28148      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28149    fi
28150  fi
28151
28152  # Now join together the path and the arguments once again
28153  if test "x$arguments" != xEOL; then
28154    new_complete="$new_path ${arguments% *}"
28155  else
28156    new_complete="$new_path"
28157  fi
28158
28159  if test "x$complete" != "x$new_complete"; then
28160    OBJCOPY="$new_complete"
28161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28162$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28163  fi
28164
28165    fi
28166  fi
28167
28168  if test -n "$ac_tool_prefix"; then
28169  for ac_prog in gobjdump objdump
28170  do
28171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28174$as_echo_n "checking for $ac_word... " >&6; }
28175if ${ac_cv_prog_OBJDUMP+:} false; then :
28176  $as_echo_n "(cached) " >&6
28177else
28178  if test -n "$OBJDUMP"; then
28179  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28180else
28181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28182for as_dir in $PATH
28183do
28184  IFS=$as_save_IFS
28185  test -z "$as_dir" && as_dir=.
28186    for ac_exec_ext in '' $ac_executable_extensions; do
28187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28188    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28190    break 2
28191  fi
28192done
28193  done
28194IFS=$as_save_IFS
28195
28196fi
28197fi
28198OBJDUMP=$ac_cv_prog_OBJDUMP
28199if test -n "$OBJDUMP"; then
28200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28201$as_echo "$OBJDUMP" >&6; }
28202else
28203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28204$as_echo "no" >&6; }
28205fi
28206
28207
28208    test -n "$OBJDUMP" && break
28209  done
28210fi
28211if test -z "$OBJDUMP"; then
28212  ac_ct_OBJDUMP=$OBJDUMP
28213  for ac_prog in gobjdump objdump
28214do
28215  # Extract the first word of "$ac_prog", so it can be a program name with args.
28216set dummy $ac_prog; ac_word=$2
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28218$as_echo_n "checking for $ac_word... " >&6; }
28219if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28220  $as_echo_n "(cached) " >&6
28221else
28222  if test -n "$ac_ct_OBJDUMP"; then
28223  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28224else
28225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28226for as_dir in $PATH
28227do
28228  IFS=$as_save_IFS
28229  test -z "$as_dir" && as_dir=.
28230    for ac_exec_ext in '' $ac_executable_extensions; do
28231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28232    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28234    break 2
28235  fi
28236done
28237  done
28238IFS=$as_save_IFS
28239
28240fi
28241fi
28242ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28243if test -n "$ac_ct_OBJDUMP"; then
28244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28245$as_echo "$ac_ct_OBJDUMP" >&6; }
28246else
28247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28248$as_echo "no" >&6; }
28249fi
28250
28251
28252  test -n "$ac_ct_OBJDUMP" && break
28253done
28254
28255  if test "x$ac_ct_OBJDUMP" = x; then
28256    OBJDUMP=""
28257  else
28258    case $cross_compiling:$ac_tool_warned in
28259yes:)
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28262ac_tool_warned=yes ;;
28263esac
28264    OBJDUMP=$ac_ct_OBJDUMP
28265  fi
28266fi
28267
28268  if test "x$OBJDUMP" != x; then
28269    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28270
28271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28272
28273  # First separate the path from the arguments. This will split at the first
28274  # space.
28275  complete="$OBJDUMP"
28276  path="${complete%% *}"
28277  tmp="$complete EOL"
28278  arguments="${tmp#* }"
28279
28280  # Input might be given as Windows format, start by converting to
28281  # unix format.
28282  new_path=`$CYGPATH -u "$path"`
28283
28284  # Now try to locate executable using which
28285  new_path=`$WHICH "$new_path" 2> /dev/null`
28286  # bat and cmd files are not always considered executable in cygwin causing which
28287  # to not find them
28288  if test "x$new_path" = x \
28289      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28290      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28291    new_path=`$CYGPATH -u "$path"`
28292  fi
28293  if test "x$new_path" = x; then
28294    # Oops. Which didn't find the executable.
28295    # The splitting of arguments from the executable at a space might have been incorrect,
28296    # since paths with space are more likely in Windows. Give it another try with the whole
28297    # argument.
28298    path="$complete"
28299    arguments="EOL"
28300    new_path=`$CYGPATH -u "$path"`
28301    new_path=`$WHICH "$new_path" 2> /dev/null`
28302    # bat and cmd files are not always considered executable in cygwin causing which
28303    # to not find them
28304    if test "x$new_path" = x \
28305        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28306        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28307      new_path=`$CYGPATH -u "$path"`
28308    fi
28309    if test "x$new_path" = x; then
28310      # It's still not found. Now this is an unrecoverable error.
28311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28312$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28313      has_space=`$ECHO "$complete" | $GREP " "`
28314      if test "x$has_space" != x; then
28315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28317      fi
28318      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28319    fi
28320  fi
28321
28322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28325  # "foo.exe" is OK but "foo" is an error.
28326  #
28327  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28328  # It is also a way to make sure we got the proper file name for the real test later on.
28329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28330  if test "x$test_shortpath" = x; then
28331    # Short path failed, file does not exist as specified.
28332    # Try adding .exe or .cmd
28333    if test -f "${new_path}.exe"; then
28334      input_to_shortpath="${new_path}.exe"
28335    elif test -f "${new_path}.cmd"; then
28336      input_to_shortpath="${new_path}.cmd"
28337    else
28338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28339$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28342      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28343    fi
28344  else
28345    input_to_shortpath="$new_path"
28346  fi
28347
28348  # Call helper function which possibly converts this using DOS-style short mode.
28349  # If so, the updated path is stored in $new_path.
28350  new_path="$input_to_shortpath"
28351
28352  input_path="$input_to_shortpath"
28353  # Check if we need to convert this using DOS-style short mode. If the path
28354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28355  # take no chances and rewrite it.
28356  # Note: m4 eats our [], so we need to use [ and ] instead.
28357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28358  if test "x$has_forbidden_chars" != x; then
28359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28363      # Going to short mode and back again did indeed matter. Since short mode is
28364      # case insensitive, let's make it lowercase to improve readability.
28365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28366      # Now convert it back to Unix-stile (cygpath)
28367      input_path=`$CYGPATH -u "$shortmode_path"`
28368      new_path="$input_path"
28369    fi
28370  fi
28371
28372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28373  if test "x$test_cygdrive_prefix" = x; then
28374    # As a simple fix, exclude /usr/bin since it's not a real path.
28375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28377      # a path prefixed by /cygdrive for fixpath to work.
28378      new_path="$CYGWIN_ROOT_PATH$input_path"
28379    fi
28380  fi
28381
28382  # remove trailing .exe if any
28383  new_path="${new_path/%.exe/}"
28384
28385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28386
28387  # First separate the path from the arguments. This will split at the first
28388  # space.
28389  complete="$OBJDUMP"
28390  path="${complete%% *}"
28391  tmp="$complete EOL"
28392  arguments="${tmp#* }"
28393
28394  # Input might be given as Windows format, start by converting to
28395  # unix format.
28396  new_path="$path"
28397
28398  windows_path="$new_path"
28399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28400    unix_path=`$CYGPATH -u "$windows_path"`
28401    new_path="$unix_path"
28402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28404    new_path="$unix_path"
28405  fi
28406
28407
28408  # Now try to locate executable using which
28409  new_path=`$WHICH "$new_path" 2> /dev/null`
28410
28411  if test "x$new_path" = x; then
28412    # Oops. Which didn't find the executable.
28413    # The splitting of arguments from the executable at a space might have been incorrect,
28414    # since paths with space are more likely in Windows. Give it another try with the whole
28415    # argument.
28416    path="$complete"
28417    arguments="EOL"
28418    new_path="$path"
28419
28420  windows_path="$new_path"
28421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28422    unix_path=`$CYGPATH -u "$windows_path"`
28423    new_path="$unix_path"
28424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28426    new_path="$unix_path"
28427  fi
28428
28429
28430    new_path=`$WHICH "$new_path" 2> /dev/null`
28431
28432    if test "x$new_path" = x; then
28433      # It's still not found. Now this is an unrecoverable error.
28434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28435$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28436      has_space=`$ECHO "$complete" | $GREP " "`
28437      if test "x$has_space" != x; then
28438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28440      fi
28441      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28442    fi
28443  fi
28444
28445  # Now new_path has a complete unix path to the binary
28446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28447    # Keep paths in /bin as-is, but remove trailing .exe if any
28448    new_path="${new_path/%.exe/}"
28449    # Do not save /bin paths to all_fixpath_prefixes!
28450  else
28451    # Not in mixed or Windows style, start by that.
28452    new_path=`cmd //c echo $new_path`
28453
28454  input_path="$new_path"
28455  # Check if we need to convert this using DOS-style short mode. If the path
28456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28457  # take no chances and rewrite it.
28458  # Note: m4 eats our [], so we need to use [ and ] instead.
28459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28460  if test "x$has_forbidden_chars" != x; then
28461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28463  fi
28464
28465    # Output is in $new_path
28466
28467  windows_path="$new_path"
28468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28469    unix_path=`$CYGPATH -u "$windows_path"`
28470    new_path="$unix_path"
28471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28473    new_path="$unix_path"
28474  fi
28475
28476    # remove trailing .exe if any
28477    new_path="${new_path/%.exe/}"
28478
28479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28481  fi
28482
28483  else
28484    # We're on a posix platform. Hooray! :)
28485    # First separate the path from the arguments. This will split at the first
28486    # space.
28487    complete="$OBJDUMP"
28488    path="${complete%% *}"
28489    tmp="$complete EOL"
28490    arguments="${tmp#* }"
28491
28492    # Cannot rely on the command "which" here since it doesn't always work.
28493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28494    if test -z "$is_absolute_path"; then
28495      # Path to executable is not absolute. Find it.
28496      IFS_save="$IFS"
28497      IFS=:
28498      for p in $PATH; do
28499        if test -f "$p/$path" && test -x "$p/$path"; then
28500          new_path="$p/$path"
28501          break
28502        fi
28503      done
28504      IFS="$IFS_save"
28505    else
28506      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28507$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28508      new_path="$path"
28509    fi
28510
28511    if test "x$new_path" = x; then
28512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28513$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28514      has_space=`$ECHO "$complete" | $GREP " "`
28515      if test "x$has_space" != x; then
28516        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28518      fi
28519      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28520    fi
28521  fi
28522
28523  # Now join together the path and the arguments once again
28524  if test "x$arguments" != xEOL; then
28525    new_complete="$new_path ${arguments% *}"
28526  else
28527    new_complete="$new_path"
28528  fi
28529
28530  if test "x$complete" != "x$new_complete"; then
28531    OBJDUMP="$new_complete"
28532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28533$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28534  fi
28535
28536  fi
28537
28538  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28539    # Extract the first word of "lipo", so it can be a program name with args.
28540set dummy lipo; ac_word=$2
28541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28542$as_echo_n "checking for $ac_word... " >&6; }
28543if ${ac_cv_path_LIPO+:} false; then :
28544  $as_echo_n "(cached) " >&6
28545else
28546  case $LIPO in
28547  [\\/]* | ?:[\\/]*)
28548  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28549  ;;
28550  *)
28551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28552for as_dir in $PATH
28553do
28554  IFS=$as_save_IFS
28555  test -z "$as_dir" && as_dir=.
28556    for ac_exec_ext in '' $ac_executable_extensions; do
28557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28558    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28560    break 2
28561  fi
28562done
28563  done
28564IFS=$as_save_IFS
28565
28566  ;;
28567esac
28568fi
28569LIPO=$ac_cv_path_LIPO
28570if test -n "$LIPO"; then
28571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28572$as_echo "$LIPO" >&6; }
28573else
28574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28575$as_echo "no" >&6; }
28576fi
28577
28578
28579
28580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28581
28582  # First separate the path from the arguments. This will split at the first
28583  # space.
28584  complete="$LIPO"
28585  path="${complete%% *}"
28586  tmp="$complete EOL"
28587  arguments="${tmp#* }"
28588
28589  # Input might be given as Windows format, start by converting to
28590  # unix format.
28591  new_path=`$CYGPATH -u "$path"`
28592
28593  # Now try to locate executable using which
28594  new_path=`$WHICH "$new_path" 2> /dev/null`
28595  # bat and cmd files are not always considered executable in cygwin causing which
28596  # to not find them
28597  if test "x$new_path" = x \
28598      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28599      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28600    new_path=`$CYGPATH -u "$path"`
28601  fi
28602  if test "x$new_path" = x; then
28603    # Oops. Which didn't find the executable.
28604    # The splitting of arguments from the executable at a space might have been incorrect,
28605    # since paths with space are more likely in Windows. Give it another try with the whole
28606    # argument.
28607    path="$complete"
28608    arguments="EOL"
28609    new_path=`$CYGPATH -u "$path"`
28610    new_path=`$WHICH "$new_path" 2> /dev/null`
28611    # bat and cmd files are not always considered executable in cygwin causing which
28612    # to not find them
28613    if test "x$new_path" = x \
28614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28616      new_path=`$CYGPATH -u "$path"`
28617    fi
28618    if test "x$new_path" = x; then
28619      # It's still not found. Now this is an unrecoverable error.
28620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28621$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28622      has_space=`$ECHO "$complete" | $GREP " "`
28623      if test "x$has_space" != x; then
28624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28626      fi
28627      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28628    fi
28629  fi
28630
28631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28634  # "foo.exe" is OK but "foo" is an error.
28635  #
28636  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28637  # It is also a way to make sure we got the proper file name for the real test later on.
28638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28639  if test "x$test_shortpath" = x; then
28640    # Short path failed, file does not exist as specified.
28641    # Try adding .exe or .cmd
28642    if test -f "${new_path}.exe"; then
28643      input_to_shortpath="${new_path}.exe"
28644    elif test -f "${new_path}.cmd"; then
28645      input_to_shortpath="${new_path}.cmd"
28646    else
28647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28648$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28651      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28652    fi
28653  else
28654    input_to_shortpath="$new_path"
28655  fi
28656
28657  # Call helper function which possibly converts this using DOS-style short mode.
28658  # If so, the updated path is stored in $new_path.
28659  new_path="$input_to_shortpath"
28660
28661  input_path="$input_to_shortpath"
28662  # Check if we need to convert this using DOS-style short mode. If the path
28663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28664  # take no chances and rewrite it.
28665  # Note: m4 eats our [], so we need to use [ and ] instead.
28666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28667  if test "x$has_forbidden_chars" != x; then
28668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28672      # Going to short mode and back again did indeed matter. Since short mode is
28673      # case insensitive, let's make it lowercase to improve readability.
28674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28675      # Now convert it back to Unix-stile (cygpath)
28676      input_path=`$CYGPATH -u "$shortmode_path"`
28677      new_path="$input_path"
28678    fi
28679  fi
28680
28681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28682  if test "x$test_cygdrive_prefix" = x; then
28683    # As a simple fix, exclude /usr/bin since it's not a real path.
28684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28686      # a path prefixed by /cygdrive for fixpath to work.
28687      new_path="$CYGWIN_ROOT_PATH$input_path"
28688    fi
28689  fi
28690
28691  # remove trailing .exe if any
28692  new_path="${new_path/%.exe/}"
28693
28694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28695
28696  # First separate the path from the arguments. This will split at the first
28697  # space.
28698  complete="$LIPO"
28699  path="${complete%% *}"
28700  tmp="$complete EOL"
28701  arguments="${tmp#* }"
28702
28703  # Input might be given as Windows format, start by converting to
28704  # unix format.
28705  new_path="$path"
28706
28707  windows_path="$new_path"
28708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28709    unix_path=`$CYGPATH -u "$windows_path"`
28710    new_path="$unix_path"
28711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28713    new_path="$unix_path"
28714  fi
28715
28716
28717  # Now try to locate executable using which
28718  new_path=`$WHICH "$new_path" 2> /dev/null`
28719
28720  if test "x$new_path" = x; then
28721    # Oops. Which didn't find the executable.
28722    # The splitting of arguments from the executable at a space might have been incorrect,
28723    # since paths with space are more likely in Windows. Give it another try with the whole
28724    # argument.
28725    path="$complete"
28726    arguments="EOL"
28727    new_path="$path"
28728
28729  windows_path="$new_path"
28730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28731    unix_path=`$CYGPATH -u "$windows_path"`
28732    new_path="$unix_path"
28733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28735    new_path="$unix_path"
28736  fi
28737
28738
28739    new_path=`$WHICH "$new_path" 2> /dev/null`
28740
28741    if test "x$new_path" = x; then
28742      # It's still not found. Now this is an unrecoverable error.
28743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28744$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28745      has_space=`$ECHO "$complete" | $GREP " "`
28746      if test "x$has_space" != x; then
28747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28749      fi
28750      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28751    fi
28752  fi
28753
28754  # Now new_path has a complete unix path to the binary
28755  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28756    # Keep paths in /bin as-is, but remove trailing .exe if any
28757    new_path="${new_path/%.exe/}"
28758    # Do not save /bin paths to all_fixpath_prefixes!
28759  else
28760    # Not in mixed or Windows style, start by that.
28761    new_path=`cmd //c echo $new_path`
28762
28763  input_path="$new_path"
28764  # Check if we need to convert this using DOS-style short mode. If the path
28765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28766  # take no chances and rewrite it.
28767  # Note: m4 eats our [], so we need to use [ and ] instead.
28768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28769  if test "x$has_forbidden_chars" != x; then
28770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28772  fi
28773
28774    # Output is in $new_path
28775
28776  windows_path="$new_path"
28777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28778    unix_path=`$CYGPATH -u "$windows_path"`
28779    new_path="$unix_path"
28780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28782    new_path="$unix_path"
28783  fi
28784
28785    # remove trailing .exe if any
28786    new_path="${new_path/%.exe/}"
28787
28788    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28789    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28790  fi
28791
28792  else
28793    # We're on a posix platform. Hooray! :)
28794    # First separate the path from the arguments. This will split at the first
28795    # space.
28796    complete="$LIPO"
28797    path="${complete%% *}"
28798    tmp="$complete EOL"
28799    arguments="${tmp#* }"
28800
28801    # Cannot rely on the command "which" here since it doesn't always work.
28802    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28803    if test -z "$is_absolute_path"; then
28804      # Path to executable is not absolute. Find it.
28805      IFS_save="$IFS"
28806      IFS=:
28807      for p in $PATH; do
28808        if test -f "$p/$path" && test -x "$p/$path"; then
28809          new_path="$p/$path"
28810          break
28811        fi
28812      done
28813      IFS="$IFS_save"
28814    else
28815      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28816$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28817      new_path="$path"
28818    fi
28819
28820    if test "x$new_path" = x; then
28821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28822$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28823      has_space=`$ECHO "$complete" | $GREP " "`
28824      if test "x$has_space" != x; then
28825        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28826$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28827      fi
28828      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28829    fi
28830  fi
28831
28832  # Now join together the path and the arguments once again
28833  if test "x$arguments" != xEOL; then
28834    new_complete="$new_path ${arguments% *}"
28835  else
28836    new_complete="$new_path"
28837  fi
28838
28839  if test "x$complete" != "x$new_complete"; then
28840    LIPO="$new_complete"
28841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28842$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28843  fi
28844
28845  fi
28846
28847
28848
28849  # Restore old path without tools dir
28850  PATH="$OLD_PATH"
28851
28852
28853# FIXME: Currently we must test this after paths but before flags. Fix!
28854
28855# And we can test some aspects on the target using configure macros.
28856
28857
28858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28859$as_echo_n "checking for ANSI C header files... " >&6; }
28860if ${ac_cv_header_stdc+:} false; then :
28861  $as_echo_n "(cached) " >&6
28862else
28863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28864/* end confdefs.h.  */
28865#include <stdlib.h>
28866#include <stdarg.h>
28867#include <string.h>
28868#include <float.h>
28869
28870int
28871main ()
28872{
28873
28874  ;
28875  return 0;
28876}
28877_ACEOF
28878if ac_fn_cxx_try_compile "$LINENO"; then :
28879  ac_cv_header_stdc=yes
28880else
28881  ac_cv_header_stdc=no
28882fi
28883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28884
28885if test $ac_cv_header_stdc = yes; then
28886  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28888/* end confdefs.h.  */
28889#include <string.h>
28890
28891_ACEOF
28892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28893  $EGREP "memchr" >/dev/null 2>&1; then :
28894
28895else
28896  ac_cv_header_stdc=no
28897fi
28898rm -f conftest*
28899
28900fi
28901
28902if test $ac_cv_header_stdc = yes; then
28903  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28905/* end confdefs.h.  */
28906#include <stdlib.h>
28907
28908_ACEOF
28909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28910  $EGREP "free" >/dev/null 2>&1; then :
28911
28912else
28913  ac_cv_header_stdc=no
28914fi
28915rm -f conftest*
28916
28917fi
28918
28919if test $ac_cv_header_stdc = yes; then
28920  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28921  if test "$cross_compiling" = yes; then :
28922  :
28923else
28924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28925/* end confdefs.h.  */
28926#include <ctype.h>
28927#include <stdlib.h>
28928#if ((' ' & 0x0FF) == 0x020)
28929# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28930# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28931#else
28932# define ISLOWER(c) \
28933		   (('a' <= (c) && (c) <= 'i') \
28934		     || ('j' <= (c) && (c) <= 'r') \
28935		     || ('s' <= (c) && (c) <= 'z'))
28936# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28937#endif
28938
28939#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28940int
28941main ()
28942{
28943  int i;
28944  for (i = 0; i < 256; i++)
28945    if (XOR (islower (i), ISLOWER (i))
28946	|| toupper (i) != TOUPPER (i))
28947      return 2;
28948  return 0;
28949}
28950_ACEOF
28951if ac_fn_cxx_try_run "$LINENO"; then :
28952
28953else
28954  ac_cv_header_stdc=no
28955fi
28956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28957  conftest.$ac_objext conftest.beam conftest.$ac_ext
28958fi
28959
28960fi
28961fi
28962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28963$as_echo "$ac_cv_header_stdc" >&6; }
28964if test $ac_cv_header_stdc = yes; then
28965
28966$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28967
28968fi
28969
28970# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28971for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28972		  inttypes.h stdint.h unistd.h
28973do :
28974  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28975ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28976"
28977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28978  cat >>confdefs.h <<_ACEOF
28979#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28980_ACEOF
28981
28982fi
28983
28984done
28985
28986
28987
28988  ###############################################################################
28989  #
28990  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28991  # (The JVM can use 32 or 64 bit Java pointers but that decision
28992  # is made at runtime.)
28993  #
28994
28995  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28996    # Always specify -m flag on Solaris
28997    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28998
28999  # When we add flags to the "official" CFLAGS etc, we need to
29000  # keep track of these additions in ADDED_CFLAGS etc. These
29001  # will later be checked to make sure only controlled additions
29002  # have been made to CFLAGS etc.
29003  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29004  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29005  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29006
29007  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29008  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29009  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29010
29011  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29012  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29013  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29014
29015  elif test "x$COMPILE_TYPE" = xreduced; then
29016    if test "x$OPENJDK_TARGET_OS" != xwindows; then
29017      # Specify -m if running reduced on other Posix platforms
29018
29019  # When we add flags to the "official" CFLAGS etc, we need to
29020  # keep track of these additions in ADDED_CFLAGS etc. These
29021  # will later be checked to make sure only controlled additions
29022  # have been made to CFLAGS etc.
29023  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29024  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29025  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29026
29027  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29028  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29029  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29030
29031  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29032  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29033  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29034
29035    fi
29036  fi
29037
29038  # Make compilation sanity check
29039  for ac_header in stdio.h
29040do :
29041  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
29042if test "x$ac_cv_header_stdio_h" = xyes; then :
29043  cat >>confdefs.h <<_ACEOF
29044#define HAVE_STDIO_H 1
29045_ACEOF
29046
29047else
29048
29049    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
29050$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
29051    if test "x$COMPILE_TYPE" = xreduced; then
29052      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
29053$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
29054    elif test "x$COMPILE_TYPE" = xcross; then
29055      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
29056$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
29057    fi
29058    as_fn_error $? "Cannot continue." "$LINENO" 5
29059
29060fi
29061
29062done
29063
29064
29065  # The cast to long int works around a bug in the HP C Compiler
29066# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29067# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29068# This bug is HP SR number 8606223364.
29069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29070$as_echo_n "checking size of int *... " >&6; }
29071if ${ac_cv_sizeof_int_p+:} false; then :
29072  $as_echo_n "(cached) " >&6
29073else
29074  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29075
29076else
29077  if test "$ac_cv_type_int_p" = yes; then
29078     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29080as_fn_error 77 "cannot compute sizeof (int *)
29081See \`config.log' for more details" "$LINENO" 5; }
29082   else
29083     ac_cv_sizeof_int_p=0
29084   fi
29085fi
29086
29087fi
29088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29089$as_echo "$ac_cv_sizeof_int_p" >&6; }
29090
29091
29092
29093cat >>confdefs.h <<_ACEOF
29094#define SIZEOF_INT_P $ac_cv_sizeof_int_p
29095_ACEOF
29096
29097
29098
29099  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
29100  if test "x$ac_cv_sizeof_int_p" = x; then
29101    # The test failed, lets stick to the assumed value.
29102    { $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
29103$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29104  else
29105    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29106
29107    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29108      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
29109      # Let's try to implicitely set the compilers target architecture and retry the test
29110      { $as_echo "$as_me:${as_lineno-$LINENO}: 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)." >&5
29111$as_echo "$as_me: 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)." >&6;}
29112      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
29113$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
29114
29115  # When we add flags to the "official" CFLAGS etc, we need to
29116  # keep track of these additions in ADDED_CFLAGS etc. These
29117  # will later be checked to make sure only controlled additions
29118  # have been made to CFLAGS etc.
29119  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29120  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29121  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29122
29123  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29124  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29125  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29126
29127  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29128  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29129  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29130
29131
29132      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29133      unset ac_cv_sizeof_int_p
29134      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29135      cat >>confdefs.h <<_ACEOF
29136#undef SIZEOF_INT_P
29137_ACEOF
29138
29139      # The cast to long int works around a bug in the HP C Compiler
29140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29142# This bug is HP SR number 8606223364.
29143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29144$as_echo_n "checking size of int *... " >&6; }
29145if ${ac_cv_sizeof_int_p+:} false; then :
29146  $as_echo_n "(cached) " >&6
29147else
29148  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29149
29150else
29151  if test "$ac_cv_type_int_p" = yes; then
29152     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29154as_fn_error 77 "cannot compute sizeof (int *)
29155See \`config.log' for more details" "$LINENO" 5; }
29156   else
29157     ac_cv_sizeof_int_p=0
29158   fi
29159fi
29160
29161fi
29162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29163$as_echo "$ac_cv_sizeof_int_p" >&6; }
29164
29165
29166
29167cat >>confdefs.h <<_ACEOF
29168#define SIZEOF_INT_P $ac_cv_sizeof_int_p
29169_ACEOF
29170
29171
29172
29173      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29174
29175      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29176        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
29177      fi
29178    fi
29179  fi
29180
29181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29182$as_echo_n "checking for target address size... " >&6; }
29183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29184$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29185
29186
29187  ###############################################################################
29188  #
29189  # Is the target little of big endian?
29190  #
29191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29192$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29193if ${ac_cv_c_bigendian+:} false; then :
29194  $as_echo_n "(cached) " >&6
29195else
29196  ac_cv_c_bigendian=unknown
29197    # See if we're dealing with a universal compiler.
29198    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29199/* end confdefs.h.  */
29200#ifndef __APPLE_CC__
29201	       not a universal capable compiler
29202	     #endif
29203	     typedef int dummy;
29204
29205_ACEOF
29206if ac_fn_cxx_try_compile "$LINENO"; then :
29207
29208	# Check for potential -arch flags.  It is not universal unless
29209	# there are at least two -arch flags with different values.
29210	ac_arch=
29211	ac_prev=
29212	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29213	 if test -n "$ac_prev"; then
29214	   case $ac_word in
29215	     i?86 | x86_64 | ppc | ppc64)
29216	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29217		 ac_arch=$ac_word
29218	       else
29219		 ac_cv_c_bigendian=universal
29220		 break
29221	       fi
29222	       ;;
29223	   esac
29224	   ac_prev=
29225	 elif test "x$ac_word" = "x-arch"; then
29226	   ac_prev=arch
29227	 fi
29228       done
29229fi
29230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29231    if test $ac_cv_c_bigendian = unknown; then
29232      # See if sys/param.h defines the BYTE_ORDER macro.
29233      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29234/* end confdefs.h.  */
29235#include <sys/types.h>
29236	     #include <sys/param.h>
29237
29238int
29239main ()
29240{
29241#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29242		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29243		     && LITTLE_ENDIAN)
29244	      bogus endian macros
29245	     #endif
29246
29247  ;
29248  return 0;
29249}
29250_ACEOF
29251if ac_fn_cxx_try_compile "$LINENO"; then :
29252  # It does; now see whether it defined to BIG_ENDIAN or not.
29253	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29254/* end confdefs.h.  */
29255#include <sys/types.h>
29256		#include <sys/param.h>
29257
29258int
29259main ()
29260{
29261#if BYTE_ORDER != BIG_ENDIAN
29262		 not big endian
29263		#endif
29264
29265  ;
29266  return 0;
29267}
29268_ACEOF
29269if ac_fn_cxx_try_compile "$LINENO"; then :
29270  ac_cv_c_bigendian=yes
29271else
29272  ac_cv_c_bigendian=no
29273fi
29274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29275fi
29276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29277    fi
29278    if test $ac_cv_c_bigendian = unknown; then
29279      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29280      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29281/* end confdefs.h.  */
29282#include <limits.h>
29283
29284int
29285main ()
29286{
29287#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29288	      bogus endian macros
29289	     #endif
29290
29291  ;
29292  return 0;
29293}
29294_ACEOF
29295if ac_fn_cxx_try_compile "$LINENO"; then :
29296  # It does; now see whether it defined to _BIG_ENDIAN or not.
29297	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29298/* end confdefs.h.  */
29299#include <limits.h>
29300
29301int
29302main ()
29303{
29304#ifndef _BIG_ENDIAN
29305		 not big endian
29306		#endif
29307
29308  ;
29309  return 0;
29310}
29311_ACEOF
29312if ac_fn_cxx_try_compile "$LINENO"; then :
29313  ac_cv_c_bigendian=yes
29314else
29315  ac_cv_c_bigendian=no
29316fi
29317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29318fi
29319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29320    fi
29321    if test $ac_cv_c_bigendian = unknown; then
29322      # Compile a test program.
29323      if test "$cross_compiling" = yes; then :
29324  # Try to guess by grepping values from an object file.
29325	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29326/* end confdefs.h.  */
29327short int ascii_mm[] =
29328		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29329		short int ascii_ii[] =
29330		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29331		int use_ascii (int i) {
29332		  return ascii_mm[i] + ascii_ii[i];
29333		}
29334		short int ebcdic_ii[] =
29335		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29336		short int ebcdic_mm[] =
29337		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29338		int use_ebcdic (int i) {
29339		  return ebcdic_mm[i] + ebcdic_ii[i];
29340		}
29341		extern int foo;
29342
29343int
29344main ()
29345{
29346return use_ascii (foo) == use_ebcdic (foo);
29347  ;
29348  return 0;
29349}
29350_ACEOF
29351if ac_fn_cxx_try_compile "$LINENO"; then :
29352  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29353	      ac_cv_c_bigendian=yes
29354	    fi
29355	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29356	      if test "$ac_cv_c_bigendian" = unknown; then
29357		ac_cv_c_bigendian=no
29358	      else
29359		# finding both strings is unlikely to happen, but who knows?
29360		ac_cv_c_bigendian=unknown
29361	      fi
29362	    fi
29363fi
29364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29365else
29366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29367/* end confdefs.h.  */
29368$ac_includes_default
29369int
29370main ()
29371{
29372
29373	     /* Are we little or big endian?  From Harbison&Steele.  */
29374	     union
29375	     {
29376	       long int l;
29377	       char c[sizeof (long int)];
29378	     } u;
29379	     u.l = 1;
29380	     return u.c[sizeof (long int) - 1] == 1;
29381
29382  ;
29383  return 0;
29384}
29385_ACEOF
29386if ac_fn_cxx_try_run "$LINENO"; then :
29387  ac_cv_c_bigendian=no
29388else
29389  ac_cv_c_bigendian=yes
29390fi
29391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29392  conftest.$ac_objext conftest.beam conftest.$ac_ext
29393fi
29394
29395    fi
29396fi
29397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29398$as_echo "$ac_cv_c_bigendian" >&6; }
29399 case $ac_cv_c_bigendian in #(
29400   yes)
29401     ENDIAN="big";; #(
29402   no)
29403     ENDIAN="little" ;; #(
29404   universal)
29405     ENDIAN="universal_endianness"
29406     ;; #(
29407   *)
29408     ENDIAN="unknown" ;;
29409 esac
29410
29411
29412  if test "x$ENDIAN" = xuniversal_endianness; then
29413    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29414  fi
29415  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29416    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
29417  fi
29418
29419
29420# Configure flags for the tools
29421
29422
29423  ###############################################################################
29424  #
29425  # How to compile shared libraries.
29426  #
29427
29428  if test "x$GCC" = xyes; then
29429    COMPILER_NAME=gcc
29430    PICFLAG="-fPIC"
29431    LIBRARY_PREFIX=lib
29432    SHARED_LIBRARY='lib$1.so'
29433    STATIC_LIBRARY='lib$1.a'
29434    SHARED_LIBRARY_FLAGS="-shared"
29435    SHARED_LIBRARY_SUFFIX='.so'
29436    STATIC_LIBRARY_SUFFIX='.a'
29437    OBJ_SUFFIX='.o'
29438    EXE_SUFFIX=''
29439    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29440    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29441    C_FLAG_REORDER=''
29442    CXX_FLAG_REORDER=''
29443    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29444    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29445    LD="$CC"
29446    LDEXE="$CC"
29447    LDCXX="$CXX"
29448    LDEXECXX="$CXX"
29449    POST_STRIP_CMD="$STRIP -g"
29450
29451    # Linking is different on MacOSX
29452    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29453      # Might change in the future to clang.
29454      COMPILER_NAME=gcc
29455      SHARED_LIBRARY='lib$1.dylib'
29456      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29457      SHARED_LIBRARY_SUFFIX='.dylib'
29458      EXE_SUFFIX=''
29459      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29460      SET_SHARED_LIBRARY_MAPFILE=''
29461      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29462      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29463      POST_STRIP_CMD="$STRIP -S"
29464    fi
29465  else
29466    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29467      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29468      COMPILER_NAME=ossc
29469      PICFLAG="-KPIC"
29470      LIBRARY_PREFIX=lib
29471      SHARED_LIBRARY='lib$1.so'
29472      STATIC_LIBRARY='lib$1.a'
29473      SHARED_LIBRARY_FLAGS="-G"
29474      SHARED_LIBRARY_SUFFIX='.so'
29475      STATIC_LIBRARY_SUFFIX='.a'
29476      OBJ_SUFFIX='.o'
29477      EXE_SUFFIX=''
29478      SET_SHARED_LIBRARY_NAME=''
29479      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29480      C_FLAG_REORDER='-xF'
29481      CXX_FLAG_REORDER='-xF'
29482      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29483      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29484      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29485      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29486      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29487      POST_STRIP_CMD="$STRIP -x"
29488      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29489    fi
29490    if test "x$OPENJDK_TARGET_OS" = xaix; then
29491        COMPILER_NAME=xlc
29492        PICFLAG="-qpic=large"
29493        LIBRARY_PREFIX=lib
29494        SHARED_LIBRARY='lib$1.so'
29495        STATIC_LIBRARY='lib$1.a'
29496        SHARED_LIBRARY_FLAGS="-qmkshrobj"
29497        SHARED_LIBRARY_SUFFIX='.so'
29498        STATIC_LIBRARY_SUFFIX='.a'
29499        OBJ_SUFFIX='.o'
29500        EXE_SUFFIX=''
29501        SET_SHARED_LIBRARY_NAME=''
29502        SET_SHARED_LIBRARY_MAPFILE=''
29503        C_FLAG_REORDER=''
29504        CXX_FLAG_REORDER=''
29505        SET_SHARED_LIBRARY_ORIGIN=''
29506        SET_EXECUTABLE_ORIGIN=""
29507        CFLAGS_JDK=""
29508        CXXFLAGS_JDK=""
29509        CFLAGS_JDKLIB_EXTRA=''
29510        POST_STRIP_CMD="$STRIP -X32_64"
29511        POST_MCS_CMD=""
29512    fi
29513    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29514      # If it is not gcc, then assume it is the MS Visual Studio compiler
29515      COMPILER_NAME=cl
29516      PICFLAG=""
29517      LIBRARY_PREFIX=
29518      SHARED_LIBRARY='$1.dll'
29519      STATIC_LIBRARY='$1.lib'
29520      SHARED_LIBRARY_FLAGS="-LD"
29521      SHARED_LIBRARY_SUFFIX='.dll'
29522      STATIC_LIBRARY_SUFFIX='.lib'
29523      OBJ_SUFFIX='.obj'
29524      EXE_SUFFIX='.exe'
29525      SET_SHARED_LIBRARY_NAME=''
29526      SET_SHARED_LIBRARY_MAPFILE=''
29527      SET_SHARED_LIBRARY_ORIGIN=''
29528      SET_EXECUTABLE_ORIGIN=''
29529    fi
29530  fi
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550  # The (cross) compiler is now configured, we can now test capabilities
29551  # of the target platform.
29552
29553
29554
29555  ###############################################################################
29556  #
29557  # Setup the opt flags for different compilers
29558  # and different operating systems.
29559  #
29560
29561  #
29562  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29563  #
29564  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29565    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29566    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29567    CFLAGS="$CFLAGS -mstackrealign"
29568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29569$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29570    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29571/* end confdefs.h.  */
29572int main() { return 0; }
29573_ACEOF
29574if ac_fn_cxx_try_link "$LINENO"; then :
29575
29576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29577$as_echo "yes" >&6; }
29578
29579else
29580
29581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29582$as_echo "no" >&6; }
29583          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29584
29585
29586fi
29587rm -f core conftest.err conftest.$ac_objext \
29588    conftest$ac_exeext conftest.$ac_ext
29589  fi
29590
29591  C_FLAG_DEPS="-MMD -MF"
29592  CXX_FLAG_DEPS="-MMD -MF"
29593
29594  case $COMPILER_TYPE in
29595    CC )
29596      case $COMPILER_NAME in
29597        gcc )
29598          case $OPENJDK_TARGET_OS in
29599            macosx )
29600              # On MacOSX we optimize for size, something
29601              # we should do for all platforms?
29602              C_O_FLAG_HI="-Os"
29603              C_O_FLAG_NORM="-Os"
29604              C_O_FLAG_NONE=""
29605              ;;
29606            *)
29607              C_O_FLAG_HI="-O3"
29608              C_O_FLAG_NORM="-O2"
29609              C_O_FLAG_NONE="-O0"
29610              ;;
29611          esac
29612          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29613          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29614          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29615          CFLAGS_DEBUG_SYMBOLS="-g"
29616          CXXFLAGS_DEBUG_SYMBOLS="-g"
29617          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29618            CFLAGS_DEBUG_SYMBOLS="-g1"
29619            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29620          fi
29621          ;;
29622        ossc )
29623          #
29624          # Forte has different names for this with their C++ compiler...
29625          #
29626          C_FLAG_DEPS="-xMMD -xMF"
29627          CXX_FLAG_DEPS="-xMMD -xMF"
29628
29629          # Extra options used with HIGHEST
29630          #
29631          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29632          #          done with care, there are some assumptions below that need to
29633          #          be understood about the use of pointers, and IEEE behavior.
29634          #
29635          # Use non-standard floating point mode (not IEEE 754)
29636          CC_HIGHEST="$CC_HIGHEST -fns"
29637          # Do some simplification of floating point arithmetic (not IEEE 754)
29638          CC_HIGHEST="$CC_HIGHEST -fsimple"
29639          # Use single precision floating point with 'float'
29640          CC_HIGHEST="$CC_HIGHEST -fsingle"
29641          # Assume memory references via basic pointer types do not alias
29642          #   (Source with excessing pointer casting and data access with mixed
29643          #    pointer types are not recommended)
29644          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29645          # Use intrinsic or inline versions for math/std functions
29646          #   (If you expect perfect errno behavior, do not use this)
29647          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29648          # Loop data dependency optimizations (need -xO3 or higher)
29649          CC_HIGHEST="$CC_HIGHEST -xdepend"
29650          # Pointer parameters to functions do not overlap
29651          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29652          #    If you pass in multiple pointers to the same data, do not use this)
29653          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29654          # Inline some library routines
29655          #   (If you expect perfect errno behavior, do not use this)
29656          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29657          # Use optimized math routines
29658          #   (If you expect perfect errno behavior, do not use this)
29659          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29660          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29661
29662          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29663            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29664            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29665          fi
29666
29667          case $OPENJDK_TARGET_CPU_ARCH in
29668            x86)
29669              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29670              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29671              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29672              C_O_FLAG_NONE="-xregs=no%frameptr"
29673              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29674              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29675              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29676              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29677              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29678                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29679                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29680              fi
29681              ;;
29682            sparc)
29683              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29684              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29685              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29686              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29687              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29688              C_O_FLAG_NONE=""
29689              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29690              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29691              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29692              CXX_O_FLAG_NONE=""
29693              ;;
29694          esac
29695
29696          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29697          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29698          ;;
29699        xlc )
29700          C_FLAG_DEPS="-qmakedep=gcc -MF"
29701          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29702          C_O_FLAG_HIGHEST="-O3"
29703          C_O_FLAG_HI="-O3 -qstrict"
29704          C_O_FLAG_NORM="-O2"
29705          C_O_FLAG_NONE=""
29706          CXX_O_FLAG_HIGHEST="-O3"
29707          CXX_O_FLAG_HI="-O3 -qstrict"
29708          CXX_O_FLAG_NORM="-O2"
29709          CXX_O_FLAG_NONE=""
29710          CFLAGS_DEBUG_SYMBOLS="-g"
29711          CXXFLAGS_DEBUG_SYMBOLS="-g"
29712          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29713          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29714          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29715          ;;
29716      esac
29717      ;;
29718    CL )
29719      C_O_FLAG_HIGHEST="-O2"
29720      C_O_FLAG_HI="-O1"
29721      C_O_FLAG_NORM="-O1"
29722      C_O_FLAG_NONE="-Od"
29723      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29724      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29725      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29726      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29727      ;;
29728  esac
29729
29730  if test -z "$C_O_FLAG_HIGHEST"; then
29731    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29732  fi
29733
29734  if test -z "$CXX_O_FLAG_HIGHEST"; then
29735    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29736  fi
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29752    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29753$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29754  fi
29755
29756  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29757    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29758$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29759  fi
29760
29761  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29762    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29763$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29764  fi
29765
29766
29767# Check whether --with-extra-cflags was given.
29768if test "${with_extra_cflags+set}" = set; then :
29769  withval=$with_extra_cflags;
29770fi
29771
29772
29773
29774# Check whether --with-extra-cxxflags was given.
29775if test "${with_extra_cxxflags+set}" = set; then :
29776  withval=$with_extra_cxxflags;
29777fi
29778
29779
29780
29781# Check whether --with-extra-ldflags was given.
29782if test "${with_extra_ldflags+set}" = set; then :
29783  withval=$with_extra_ldflags;
29784fi
29785
29786
29787  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29788  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29789  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29790
29791  # Hotspot needs these set in their legacy form
29792  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29793  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29794  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29795
29796
29797
29798
29799
29800  ###############################################################################
29801  #
29802  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29803  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29804  #
29805  case $COMPILER_NAME in
29806    gcc )
29807      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29808      -pipe \
29809      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29810      case $OPENJDK_TARGET_CPU_ARCH in
29811        arm )
29812          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29813          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29814          ;;
29815        ppc )
29816          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29817          ;;
29818        * )
29819          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29820          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29821          ;;
29822      esac
29823      ;;
29824    ossc )
29825      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29826      case $OPENJDK_TARGET_CPU_ARCH in
29827        x86 )
29828          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29829          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29830          ;;
29831      esac
29832
29833      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29834      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29835
29836      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29837      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29838      ;;
29839    xlc )
29840      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29841      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29842
29843      LDFLAGS_JDK="$LDFLAGS_JDK"
29844      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29845      ;;
29846    cl )
29847      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29848      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29849      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29850      -DWIN32 -DIAL"
29851      case $OPENJDK_TARGET_CPU in
29852        x86 )
29853          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29854          ;;
29855        x86_64 )
29856          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29857          ;;
29858      esac
29859      ;;
29860  esac
29861
29862  ###############################################################################
29863
29864  # Adjust flags according to debug level.
29865  case $DEBUG_LEVEL in
29866    fastdebug )
29867      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29868      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29869      C_O_FLAG_HI="$C_O_FLAG_NORM"
29870      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29871      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29872      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29873      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29874      ;;
29875    slowdebug )
29876      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29877      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29878      C_O_FLAG_HI="$C_O_FLAG_NONE"
29879      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29880      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29881      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29882      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29883      ;;
29884  esac
29885
29886  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29887
29888  # The package path is used only on macosx?
29889  PACKAGE_PATH=/opt/local
29890
29891
29892  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29893    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29894    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29895    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29896    #   Note: -Dmacro         is the same as    #define macro 1
29897    #         -Dmacro=        is the same as    #define macro
29898    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29899      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29900    else
29901      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29902    fi
29903  else
29904    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29905  fi
29906  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29907    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29908  fi
29909  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29910    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29911  fi
29912  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29913    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29914  fi
29915  if test "x$OPENJDK_TARGET_OS" = xaix; then
29916    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29917  fi
29918  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29919    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29920    # Setting these parameters makes it an error to link to macosx APIs that are
29921    # newer than the given OS version and makes the linked binaries compatible even
29922    # if built on a newer version of the OS.
29923    # The expected format is X.Y.Z
29924    MACOSX_VERSION_MIN=10.7.0
29925
29926    # The macro takes the version with no dots, ex: 1070
29927    # Let the flags variables get resolved in make for easier override on make
29928    # command line.
29929    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29930    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29931  fi
29932  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29933    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29934  fi
29935  if test "x$DEBUG_LEVEL" = xrelease; then
29936    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29937  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29938    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29939  fi
29940  else
29941    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29942  fi
29943
29944  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29945  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29946
29947  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29948      -I${JDK_OUTPUTDIR}/include \
29949      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29950      -I${JDK_TOPDIR}/src/share/javavm/export \
29951      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29952      -I${JDK_TOPDIR}/src/share/native/common \
29953      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29954
29955  # The shared libraries are compiled using the picflag.
29956  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29957  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29958
29959  # Executable flags
29960  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29961  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29962
29963  # Now this is odd. The JDK native libraries have to link against libjvm.so
29964  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29965  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29966  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29967  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29968  # libraries will link to whatever is in memory. Yuck.
29969  #
29970  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29971  if test "x$COMPILER_NAME" = xcl; then
29972    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29973    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29974      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29975    fi
29976    # TODO: make -debug optional "--disable-full-debug-symbols"
29977    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29978    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29979    LDFLAGS_JDKLIB_SUFFIX=""
29980    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29981      LDFLAGS_STACK_SIZE=1048576
29982    else
29983      LDFLAGS_STACK_SIZE=327680
29984    fi
29985    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29986  else
29987    if test "x$COMPILER_NAME" = xgcc; then
29988      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29989      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29990      if test -n "$HAS_GNU_HASH"; then
29991        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29992      fi
29993      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29994        # And since we now know that the linker is gnu, then add -z defs, to forbid
29995        # undefined symbols in object files.
29996        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29997        if test "x$DEBUG_LEVEL" = "xrelease"; then
29998          # When building release libraries, tell the linker optimize them.
29999          # Should this be supplied to the OSS linker as well?
30000          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
30001        fi
30002      fi
30003    fi
30004    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
30005        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
30006
30007    # On some platforms (mac) the linker warns about non existing -L dirs.
30008    # Add server first if available. Linking aginst client does not always produce the same results.
30009    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
30010    # Default to server for other variants.
30011    if test "x$JVM_VARIANT_SERVER" = xtrue; then
30012      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30013    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
30014      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
30015    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
30016      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
30017    else
30018      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30019    fi
30020
30021    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
30022    if test "x$COMPILER_NAME" = xossc; then
30023      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
30024    fi
30025
30026    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
30027    if test "x$OPENJDK_TARGET_OS" = xlinux; then
30028      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
30029    fi
30030  fi
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046  # Some Zero and Shark settings.
30047  # ZERO_ARCHFLAG tells the compiler which mode to build for
30048  case "${OPENJDK_TARGET_CPU}" in
30049    s390)
30050      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
30051      ;;
30052    *)
30053      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30054  esac
30055
30056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
30057$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
30058  supports=yes
30059
30060  saved_cflags="$CFLAGS"
30061  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
30062  ac_ext=c
30063ac_cpp='$CPP $CPPFLAGS'
30064ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30065ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30066ac_compiler_gnu=$ac_cv_c_compiler_gnu
30067
30068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30069/* end confdefs.h.  */
30070int i;
30071_ACEOF
30072if ac_fn_c_try_compile "$LINENO"; then :
30073
30074else
30075  supports=no
30076fi
30077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30078  ac_ext=cpp
30079ac_cpp='$CXXCPP $CPPFLAGS'
30080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30083
30084  CFLAGS="$saved_cflags"
30085
30086  saved_cxxflags="$CXXFLAGS"
30087  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
30088  ac_ext=cpp
30089ac_cpp='$CXXCPP $CPPFLAGS'
30090ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30091ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30092ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30093
30094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30095/* end confdefs.h.  */
30096int i;
30097_ACEOF
30098if ac_fn_cxx_try_compile "$LINENO"; then :
30099
30100else
30101  supports=no
30102fi
30103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30104  ac_ext=cpp
30105ac_cpp='$CXXCPP $CPPFLAGS'
30106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30109
30110  CXXFLAGS="$saved_cxxflags"
30111
30112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30113$as_echo "$supports" >&6; }
30114  if test "x$supports" = "xyes" ; then
30115    :
30116  else
30117    ZERO_ARCHFLAG=""
30118  fi
30119
30120
30121
30122  # Check that the compiler supports -mX (or -qX on AIX) flags
30123  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30124
30125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30126$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30127  supports=yes
30128
30129  saved_cflags="$CFLAGS"
30130  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30131  ac_ext=c
30132ac_cpp='$CPP $CPPFLAGS'
30133ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30134ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30135ac_compiler_gnu=$ac_cv_c_compiler_gnu
30136
30137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30138/* end confdefs.h.  */
30139int i;
30140_ACEOF
30141if ac_fn_c_try_compile "$LINENO"; then :
30142
30143else
30144  supports=no
30145fi
30146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30147  ac_ext=cpp
30148ac_cpp='$CXXCPP $CPPFLAGS'
30149ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30150ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30151ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30152
30153  CFLAGS="$saved_cflags"
30154
30155  saved_cxxflags="$CXXFLAGS"
30156  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30157  ac_ext=cpp
30158ac_cpp='$CXXCPP $CPPFLAGS'
30159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30162
30163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30164/* end confdefs.h.  */
30165int i;
30166_ACEOF
30167if ac_fn_cxx_try_compile "$LINENO"; then :
30168
30169else
30170  supports=no
30171fi
30172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30173  ac_ext=cpp
30174ac_cpp='$CXXCPP $CPPFLAGS'
30175ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30176ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30177ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30178
30179  CXXFLAGS="$saved_cxxflags"
30180
30181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30182$as_echo "$supports" >&6; }
30183  if test "x$supports" = "xyes" ; then
30184    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30185  else
30186    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30187  fi
30188
30189
30190
30191
30192  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30193  USING_BROKEN_SUSE_LD=no
30194  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30196$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30197    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30198    echo "int main() { }" > main.c
30199    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30201$as_echo "no" >&6; }
30202      USING_BROKEN_SUSE_LD=no
30203    else
30204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30205$as_echo "yes" >&6; }
30206      USING_BROKEN_SUSE_LD=yes
30207    fi
30208    rm -rf version-script.map main.c
30209  fi
30210
30211
30212
30213# Setup debug symbols (need objcopy from the toolchain for that)
30214
30215  #
30216  # ENABLE_DEBUG_SYMBOLS
30217  # This must be done after the toolchain is setup, since we're looking at objcopy.
30218  #
30219  # Check whether --enable-debug-symbols was given.
30220if test "${enable_debug_symbols+set}" = set; then :
30221  enableval=$enable_debug_symbols;
30222fi
30223
30224
30225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30226$as_echo_n "checking if we should generate debug symbols... " >&6; }
30227
30228  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30229    # explicit enabling of enable-debug-symbols and can't find objcopy
30230    #   this is an error
30231    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30232  fi
30233
30234  if test "x$enable_debug_symbols" = "xyes"; then
30235    ENABLE_DEBUG_SYMBOLS=true
30236  elif test "x$enable_debug_symbols" = "xno"; then
30237    ENABLE_DEBUG_SYMBOLS=false
30238  else
30239    # Default is on if objcopy is found
30240    if test "x$OBJCOPY" != x; then
30241      ENABLE_DEBUG_SYMBOLS=true
30242    # MacOS X and Windows don't use objcopy but default is on for those OSes
30243    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30244      ENABLE_DEBUG_SYMBOLS=true
30245    else
30246      ENABLE_DEBUG_SYMBOLS=false
30247    fi
30248  fi
30249
30250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30251$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30252
30253  #
30254  # ZIP_DEBUGINFO_FILES
30255  #
30256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30257$as_echo_n "checking if we should zip debug-info files... " >&6; }
30258  # Check whether --enable-zip-debug-info was given.
30259if test "${enable_zip_debug_info+set}" = set; then :
30260  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30261else
30262  enable_zip_debug_info="yes"
30263fi
30264
30265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30266$as_echo "${enable_zip_debug_info}" >&6; }
30267
30268  if test "x${enable_zip_debug_info}" = "xno"; then
30269    ZIP_DEBUGINFO_FILES=false
30270  else
30271    ZIP_DEBUGINFO_FILES=true
30272  fi
30273
30274
30275
30276
30277
30278
30279
30280###############################################################################
30281#
30282# Check dependencies for external and internal libraries.
30283#
30284###############################################################################
30285
30286# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30287
30288  # When using cygwin or msys, we need a wrapper binary that renames
30289  # /cygdrive/c/ arguments into c:/ arguments and peeks into
30290  # @files and rewrites these too! This wrapper binary is
30291  # called fixpath.
30292  FIXPATH=
30293  if test "x$OPENJDK_BUILD_OS" = xwindows; then
30294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30295$as_echo_n "checking if fixpath can be created... " >&6; }
30296    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30297    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30298    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30299      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30300      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30301      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30302      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30303    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30304      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30305      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30306
30307      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30308      # @ was chosen as separator to minimize risk of other tools messing around with it
30309      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30310      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30311
30312      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30313    fi
30314    rm -f $OUTPUT_ROOT/fixpath*
30315    cd $OUTPUT_ROOT
30316    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30317    cd $CURDIR
30318
30319    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30321$as_echo "no" >&6; }
30322      cat $OUTPUT_ROOT/fixpath1.log
30323      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30324    fi
30325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30326$as_echo "yes" >&6; }
30327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30328$as_echo_n "checking if fixpath.exe works... " >&6; }
30329    cd $OUTPUT_ROOT
30330    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30331    cd $CURDIR
30332    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30334$as_echo "no" >&6; }
30335      cat $OUTPUT_ROOT/fixpath2.log
30336      as_fn_error $? "fixpath did not work!" "$LINENO" 5
30337    fi
30338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30339$as_echo "yes" >&6; }
30340    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30341  fi
30342
30343
30344
30345
30346
30347
30348  ###############################################################################
30349  #
30350  # OS specific settings that we never will need to probe.
30351  #
30352  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30354$as_echo_n "checking what is not needed on Linux?... " >&6; }
30355    PULSE_NOT_NEEDED=yes
30356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30357$as_echo "pulse" >&6; }
30358  fi
30359
30360  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30362$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30363    ALSA_NOT_NEEDED=yes
30364    PULSE_NOT_NEEDED=yes
30365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30366$as_echo "alsa pulse" >&6; }
30367  fi
30368
30369  if test "x$OPENJDK_TARGET_OS" = xaix; then
30370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30371$as_echo_n "checking what is not needed on AIX?... " >&6; }
30372    ALSA_NOT_NEEDED=yes
30373    PULSE_NOT_NEEDED=yes
30374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30375$as_echo "alsa pulse" >&6; }
30376  fi
30377
30378
30379  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30381$as_echo_n "checking what is not needed on Windows?... " >&6; }
30382    CUPS_NOT_NEEDED=yes
30383    ALSA_NOT_NEEDED=yes
30384    PULSE_NOT_NEEDED=yes
30385    X11_NOT_NEEDED=yes
30386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30387$as_echo "alsa cups pulse x11" >&6; }
30388  fi
30389
30390  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30392$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30393    ALSA_NOT_NEEDED=yes
30394    PULSE_NOT_NEEDED=yes
30395    X11_NOT_NEEDED=yes
30396    # If the java runtime framework is disabled, then we need X11.
30397    # This will be adjusted below.
30398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30399$as_echo "alsa pulse x11" >&6; }
30400  fi
30401
30402  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30404$as_echo_n "checking what is not needed on bsd?... " >&6; }
30405    ALSA_NOT_NEEDED=yes
30406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30407$as_echo "alsa" >&6; }
30408  fi
30409
30410  if test "x$OPENJDK" = "xfalse"; then
30411    FREETYPE_NOT_NEEDED=yes
30412  fi
30413
30414  if test "x$SUPPORT_HEADFUL" = xno; then
30415    X11_NOT_NEEDED=yes
30416  fi
30417
30418  ###############################################################################
30419  #
30420  # Check for MacOSX support for OpenJDK.
30421  #
30422
30423
30424  # Check whether --enable-macosx-runtime-support was given.
30425if test "${enable_macosx_runtime_support+set}" = set; then :
30426  enableval=$enable_macosx_runtime_support;
30427fi
30428
30429  if test "x$enable_macosx_runtime_support" != x; then
30430    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30431$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30432  fi
30433
30434
30435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30436$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30437  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30439$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30440  else
30441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30442$as_echo "no" >&6; }
30443  fi
30444
30445
30446
30447  ###############################################################################
30448  #
30449  # Check for X Windows
30450  #
30451
30452  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30453  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30454  # --x-libraries for the sysroot, if that seems to be correct.
30455  if test "x$SYS_ROOT" != "x/"; then
30456    if test "x$x_includes" = xNONE; then
30457      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30458        x_includes="$SYS_ROOT/usr/X11R6/include"
30459      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30460        x_includes="$SYS_ROOT/usr/include"
30461      fi
30462    fi
30463    if test "x$x_libraries" = xNONE; then
30464      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30465        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30466      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30467        x_libraries="$SYS_ROOT/usr/lib64"
30468      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30469        x_libraries="$SYS_ROOT/usr/lib"
30470      fi
30471    fi
30472  fi
30473
30474  # Now let autoconf do it's magic
30475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30476$as_echo_n "checking for X... " >&6; }
30477
30478
30479# Check whether --with-x was given.
30480if test "${with_x+set}" = set; then :
30481  withval=$with_x;
30482fi
30483
30484# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30485if test "x$with_x" = xno; then
30486  # The user explicitly disabled X.
30487  have_x=disabled
30488else
30489  case $x_includes,$x_libraries in #(
30490    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30491    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30492  $as_echo_n "(cached) " >&6
30493else
30494  # One or both of the vars are not set, and there is no cached value.
30495ac_x_includes=no ac_x_libraries=no
30496rm -f -r conftest.dir
30497if mkdir conftest.dir; then
30498  cd conftest.dir
30499  cat >Imakefile <<'_ACEOF'
30500incroot:
30501	@echo incroot='${INCROOT}'
30502usrlibdir:
30503	@echo usrlibdir='${USRLIBDIR}'
30504libdir:
30505	@echo libdir='${LIBDIR}'
30506_ACEOF
30507  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30508    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30509    for ac_var in incroot usrlibdir libdir; do
30510      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30511    done
30512    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30513    for ac_extension in a so sl dylib la dll; do
30514      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30515	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30516	ac_im_usrlibdir=$ac_im_libdir; break
30517      fi
30518    done
30519    # Screen out bogus values from the imake configuration.  They are
30520    # bogus both because they are the default anyway, and because
30521    # using them would break gcc on systems where it needs fixed includes.
30522    case $ac_im_incroot in
30523	/usr/include) ac_x_includes= ;;
30524	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30525    esac
30526    case $ac_im_usrlibdir in
30527	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30528	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30529    esac
30530  fi
30531  cd ..
30532  rm -f -r conftest.dir
30533fi
30534
30535# Standard set of common directories for X headers.
30536# Check X11 before X11Rn because it is often a symlink to the current release.
30537ac_x_header_dirs='
30538/usr/X11/include
30539/usr/X11R7/include
30540/usr/X11R6/include
30541/usr/X11R5/include
30542/usr/X11R4/include
30543
30544/usr/include/X11
30545/usr/include/X11R7
30546/usr/include/X11R6
30547/usr/include/X11R5
30548/usr/include/X11R4
30549
30550/usr/local/X11/include
30551/usr/local/X11R7/include
30552/usr/local/X11R6/include
30553/usr/local/X11R5/include
30554/usr/local/X11R4/include
30555
30556/usr/local/include/X11
30557/usr/local/include/X11R7
30558/usr/local/include/X11R6
30559/usr/local/include/X11R5
30560/usr/local/include/X11R4
30561
30562/usr/X386/include
30563/usr/x386/include
30564/usr/XFree86/include/X11
30565
30566/usr/include
30567/usr/local/include
30568/usr/unsupported/include
30569/usr/athena/include
30570/usr/local/x11r5/include
30571/usr/lpp/Xamples/include
30572
30573/usr/openwin/include
30574/usr/openwin/share/include'
30575
30576if test "$ac_x_includes" = no; then
30577  # Guess where to find include files, by looking for Xlib.h.
30578  # First, try using that file with no special directory specified.
30579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30580/* end confdefs.h.  */
30581#include <X11/Xlib.h>
30582_ACEOF
30583if ac_fn_cxx_try_cpp "$LINENO"; then :
30584  # We can compile using X headers with no special include directory.
30585ac_x_includes=
30586else
30587  for ac_dir in $ac_x_header_dirs; do
30588  if test -r "$ac_dir/X11/Xlib.h"; then
30589    ac_x_includes=$ac_dir
30590    break
30591  fi
30592done
30593fi
30594rm -f conftest.err conftest.i conftest.$ac_ext
30595fi # $ac_x_includes = no
30596
30597if test "$ac_x_libraries" = no; then
30598  # Check for the libraries.
30599  # See if we find them without any special options.
30600  # Don't add to $LIBS permanently.
30601  ac_save_LIBS=$LIBS
30602  LIBS="-lX11 $LIBS"
30603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30604/* end confdefs.h.  */
30605#include <X11/Xlib.h>
30606int
30607main ()
30608{
30609XrmInitialize ()
30610  ;
30611  return 0;
30612}
30613_ACEOF
30614if ac_fn_cxx_try_link "$LINENO"; then :
30615  LIBS=$ac_save_LIBS
30616# We can link X programs with no special library path.
30617ac_x_libraries=
30618else
30619  LIBS=$ac_save_LIBS
30620for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30621do
30622  # Don't even attempt the hair of trying to link an X program!
30623  for ac_extension in a so sl dylib la dll; do
30624    if test -r "$ac_dir/libX11.$ac_extension"; then
30625      ac_x_libraries=$ac_dir
30626      break 2
30627    fi
30628  done
30629done
30630fi
30631rm -f core conftest.err conftest.$ac_objext \
30632    conftest$ac_exeext conftest.$ac_ext
30633fi # $ac_x_libraries = no
30634
30635case $ac_x_includes,$ac_x_libraries in #(
30636  no,* | *,no | *\'*)
30637    # Didn't find X, or a directory has "'" in its name.
30638    ac_cv_have_x="have_x=no";; #(
30639  *)
30640    # Record where we found X for the cache.
30641    ac_cv_have_x="have_x=yes\
30642	ac_x_includes='$ac_x_includes'\
30643	ac_x_libraries='$ac_x_libraries'"
30644esac
30645fi
30646;; #(
30647    *) have_x=yes;;
30648  esac
30649  eval "$ac_cv_have_x"
30650fi # $with_x != no
30651
30652if test "$have_x" != yes; then
30653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30654$as_echo "$have_x" >&6; }
30655  no_x=yes
30656else
30657  # If each of the values was on the command line, it overrides each guess.
30658  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30659  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30660  # Update the cache value to reflect the command line values.
30661  ac_cv_have_x="have_x=yes\
30662	ac_x_includes='$x_includes'\
30663	ac_x_libraries='$x_libraries'"
30664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30665$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30666fi
30667
30668  if test "$no_x" = yes; then
30669  # Not all programs may use this symbol, but it does not hurt to define it.
30670
30671$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30672
30673  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30674else
30675  if test -n "$x_includes"; then
30676    X_CFLAGS="$X_CFLAGS -I$x_includes"
30677  fi
30678
30679  # It would also be nice to do this for all -L options, not just this one.
30680  if test -n "$x_libraries"; then
30681    X_LIBS="$X_LIBS -L$x_libraries"
30682    # For Solaris; some versions of Sun CC require a space after -R and
30683    # others require no space.  Words are not sufficient . . . .
30684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30685$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30686    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30687    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30688    ac_cxx_werror_flag=yes
30689    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30690/* end confdefs.h.  */
30691
30692int
30693main ()
30694{
30695
30696  ;
30697  return 0;
30698}
30699_ACEOF
30700if ac_fn_cxx_try_link "$LINENO"; then :
30701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30702$as_echo "no" >&6; }
30703       X_LIBS="$X_LIBS -R$x_libraries"
30704else
30705  LIBS="$ac_xsave_LIBS -R $x_libraries"
30706       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30707/* end confdefs.h.  */
30708
30709int
30710main ()
30711{
30712
30713  ;
30714  return 0;
30715}
30716_ACEOF
30717if ac_fn_cxx_try_link "$LINENO"; then :
30718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30719$as_echo "yes" >&6; }
30720	  X_LIBS="$X_LIBS -R $x_libraries"
30721else
30722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30723$as_echo "neither works" >&6; }
30724fi
30725rm -f core conftest.err conftest.$ac_objext \
30726    conftest$ac_exeext conftest.$ac_ext
30727fi
30728rm -f core conftest.err conftest.$ac_objext \
30729    conftest$ac_exeext conftest.$ac_ext
30730    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30731    LIBS=$ac_xsave_LIBS
30732  fi
30733
30734  # Check for system-dependent libraries X programs must link with.
30735  # Do this before checking for the system-independent R6 libraries
30736  # (-lICE), since we may need -lsocket or whatever for X linking.
30737
30738  if test "$ISC" = yes; then
30739    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30740  else
30741    # Martyn Johnson says this is needed for Ultrix, if the X
30742    # libraries were built with DECnet support.  And Karl Berry says
30743    # the Alpha needs dnet_stub (dnet does not exist).
30744    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30745    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30746/* end confdefs.h.  */
30747
30748/* Override any GCC internal prototype to avoid an error.
30749   Use char because int might match the return type of a GCC
30750   builtin and then its argument prototype would still apply.  */
30751#ifdef __cplusplus
30752extern "C"
30753#endif
30754char XOpenDisplay ();
30755int
30756main ()
30757{
30758return XOpenDisplay ();
30759  ;
30760  return 0;
30761}
30762_ACEOF
30763if ac_fn_cxx_try_link "$LINENO"; then :
30764
30765else
30766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30767$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30768if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30769  $as_echo_n "(cached) " >&6
30770else
30771  ac_check_lib_save_LIBS=$LIBS
30772LIBS="-ldnet  $LIBS"
30773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30774/* end confdefs.h.  */
30775
30776/* Override any GCC internal prototype to avoid an error.
30777   Use char because int might match the return type of a GCC
30778   builtin and then its argument prototype would still apply.  */
30779#ifdef __cplusplus
30780extern "C"
30781#endif
30782char dnet_ntoa ();
30783int
30784main ()
30785{
30786return dnet_ntoa ();
30787  ;
30788  return 0;
30789}
30790_ACEOF
30791if ac_fn_cxx_try_link "$LINENO"; then :
30792  ac_cv_lib_dnet_dnet_ntoa=yes
30793else
30794  ac_cv_lib_dnet_dnet_ntoa=no
30795fi
30796rm -f core conftest.err conftest.$ac_objext \
30797    conftest$ac_exeext conftest.$ac_ext
30798LIBS=$ac_check_lib_save_LIBS
30799fi
30800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30801$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30802if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30803  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30804fi
30805
30806    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30807      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30808$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30809if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30810  $as_echo_n "(cached) " >&6
30811else
30812  ac_check_lib_save_LIBS=$LIBS
30813LIBS="-ldnet_stub  $LIBS"
30814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30815/* end confdefs.h.  */
30816
30817/* Override any GCC internal prototype to avoid an error.
30818   Use char because int might match the return type of a GCC
30819   builtin and then its argument prototype would still apply.  */
30820#ifdef __cplusplus
30821extern "C"
30822#endif
30823char dnet_ntoa ();
30824int
30825main ()
30826{
30827return dnet_ntoa ();
30828  ;
30829  return 0;
30830}
30831_ACEOF
30832if ac_fn_cxx_try_link "$LINENO"; then :
30833  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30834else
30835  ac_cv_lib_dnet_stub_dnet_ntoa=no
30836fi
30837rm -f core conftest.err conftest.$ac_objext \
30838    conftest$ac_exeext conftest.$ac_ext
30839LIBS=$ac_check_lib_save_LIBS
30840fi
30841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30842$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30843if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30844  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30845fi
30846
30847    fi
30848fi
30849rm -f core conftest.err conftest.$ac_objext \
30850    conftest$ac_exeext conftest.$ac_ext
30851    LIBS="$ac_xsave_LIBS"
30852
30853    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30854    # to get the SysV transport functions.
30855    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30856    # needs -lnsl.
30857    # The nsl library prevents programs from opening the X display
30858    # on Irix 5.2, according to T.E. Dickey.
30859    # The functions gethostbyname, getservbyname, and inet_addr are
30860    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30861    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30862if test "x$ac_cv_func_gethostbyname" = xyes; then :
30863
30864fi
30865
30866    if test $ac_cv_func_gethostbyname = no; then
30867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30868$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30869if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30870  $as_echo_n "(cached) " >&6
30871else
30872  ac_check_lib_save_LIBS=$LIBS
30873LIBS="-lnsl  $LIBS"
30874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30875/* end confdefs.h.  */
30876
30877/* Override any GCC internal prototype to avoid an error.
30878   Use char because int might match the return type of a GCC
30879   builtin and then its argument prototype would still apply.  */
30880#ifdef __cplusplus
30881extern "C"
30882#endif
30883char gethostbyname ();
30884int
30885main ()
30886{
30887return gethostbyname ();
30888  ;
30889  return 0;
30890}
30891_ACEOF
30892if ac_fn_cxx_try_link "$LINENO"; then :
30893  ac_cv_lib_nsl_gethostbyname=yes
30894else
30895  ac_cv_lib_nsl_gethostbyname=no
30896fi
30897rm -f core conftest.err conftest.$ac_objext \
30898    conftest$ac_exeext conftest.$ac_ext
30899LIBS=$ac_check_lib_save_LIBS
30900fi
30901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30902$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30903if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30904  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30905fi
30906
30907      if test $ac_cv_lib_nsl_gethostbyname = no; then
30908	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30909$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30910if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30911  $as_echo_n "(cached) " >&6
30912else
30913  ac_check_lib_save_LIBS=$LIBS
30914LIBS="-lbsd  $LIBS"
30915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30916/* end confdefs.h.  */
30917
30918/* Override any GCC internal prototype to avoid an error.
30919   Use char because int might match the return type of a GCC
30920   builtin and then its argument prototype would still apply.  */
30921#ifdef __cplusplus
30922extern "C"
30923#endif
30924char gethostbyname ();
30925int
30926main ()
30927{
30928return gethostbyname ();
30929  ;
30930  return 0;
30931}
30932_ACEOF
30933if ac_fn_cxx_try_link "$LINENO"; then :
30934  ac_cv_lib_bsd_gethostbyname=yes
30935else
30936  ac_cv_lib_bsd_gethostbyname=no
30937fi
30938rm -f core conftest.err conftest.$ac_objext \
30939    conftest$ac_exeext conftest.$ac_ext
30940LIBS=$ac_check_lib_save_LIBS
30941fi
30942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30943$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30944if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30945  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30946fi
30947
30948      fi
30949    fi
30950
30951    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30952    # socket/setsockopt and other routines are undefined under SCO ODT
30953    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30954    # on later versions), says Simon Leinen: it contains gethostby*
30955    # variants that don't use the name server (or something).  -lsocket
30956    # must be given before -lnsl if both are needed.  We assume that
30957    # if connect needs -lnsl, so does gethostbyname.
30958    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30959if test "x$ac_cv_func_connect" = xyes; then :
30960
30961fi
30962
30963    if test $ac_cv_func_connect = no; then
30964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30965$as_echo_n "checking for connect in -lsocket... " >&6; }
30966if ${ac_cv_lib_socket_connect+:} false; then :
30967  $as_echo_n "(cached) " >&6
30968else
30969  ac_check_lib_save_LIBS=$LIBS
30970LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30972/* end confdefs.h.  */
30973
30974/* Override any GCC internal prototype to avoid an error.
30975   Use char because int might match the return type of a GCC
30976   builtin and then its argument prototype would still apply.  */
30977#ifdef __cplusplus
30978extern "C"
30979#endif
30980char connect ();
30981int
30982main ()
30983{
30984return connect ();
30985  ;
30986  return 0;
30987}
30988_ACEOF
30989if ac_fn_cxx_try_link "$LINENO"; then :
30990  ac_cv_lib_socket_connect=yes
30991else
30992  ac_cv_lib_socket_connect=no
30993fi
30994rm -f core conftest.err conftest.$ac_objext \
30995    conftest$ac_exeext conftest.$ac_ext
30996LIBS=$ac_check_lib_save_LIBS
30997fi
30998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30999$as_echo "$ac_cv_lib_socket_connect" >&6; }
31000if test "x$ac_cv_lib_socket_connect" = xyes; then :
31001  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
31002fi
31003
31004    fi
31005
31006    # Guillermo Gomez says -lposix is necessary on A/UX.
31007    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
31008if test "x$ac_cv_func_remove" = xyes; then :
31009
31010fi
31011
31012    if test $ac_cv_func_remove = no; then
31013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
31014$as_echo_n "checking for remove in -lposix... " >&6; }
31015if ${ac_cv_lib_posix_remove+:} false; then :
31016  $as_echo_n "(cached) " >&6
31017else
31018  ac_check_lib_save_LIBS=$LIBS
31019LIBS="-lposix  $LIBS"
31020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31021/* end confdefs.h.  */
31022
31023/* Override any GCC internal prototype to avoid an error.
31024   Use char because int might match the return type of a GCC
31025   builtin and then its argument prototype would still apply.  */
31026#ifdef __cplusplus
31027extern "C"
31028#endif
31029char remove ();
31030int
31031main ()
31032{
31033return remove ();
31034  ;
31035  return 0;
31036}
31037_ACEOF
31038if ac_fn_cxx_try_link "$LINENO"; then :
31039  ac_cv_lib_posix_remove=yes
31040else
31041  ac_cv_lib_posix_remove=no
31042fi
31043rm -f core conftest.err conftest.$ac_objext \
31044    conftest$ac_exeext conftest.$ac_ext
31045LIBS=$ac_check_lib_save_LIBS
31046fi
31047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
31048$as_echo "$ac_cv_lib_posix_remove" >&6; }
31049if test "x$ac_cv_lib_posix_remove" = xyes; then :
31050  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
31051fi
31052
31053    fi
31054
31055    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
31056    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
31057if test "x$ac_cv_func_shmat" = xyes; then :
31058
31059fi
31060
31061    if test $ac_cv_func_shmat = no; then
31062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
31063$as_echo_n "checking for shmat in -lipc... " >&6; }
31064if ${ac_cv_lib_ipc_shmat+:} false; then :
31065  $as_echo_n "(cached) " >&6
31066else
31067  ac_check_lib_save_LIBS=$LIBS
31068LIBS="-lipc  $LIBS"
31069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31070/* end confdefs.h.  */
31071
31072/* Override any GCC internal prototype to avoid an error.
31073   Use char because int might match the return type of a GCC
31074   builtin and then its argument prototype would still apply.  */
31075#ifdef __cplusplus
31076extern "C"
31077#endif
31078char shmat ();
31079int
31080main ()
31081{
31082return shmat ();
31083  ;
31084  return 0;
31085}
31086_ACEOF
31087if ac_fn_cxx_try_link "$LINENO"; then :
31088  ac_cv_lib_ipc_shmat=yes
31089else
31090  ac_cv_lib_ipc_shmat=no
31091fi
31092rm -f core conftest.err conftest.$ac_objext \
31093    conftest$ac_exeext conftest.$ac_ext
31094LIBS=$ac_check_lib_save_LIBS
31095fi
31096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
31097$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
31098if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
31099  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
31100fi
31101
31102    fi
31103  fi
31104
31105  # Check for libraries that X11R6 Xt/Xaw programs need.
31106  ac_save_LDFLAGS=$LDFLAGS
31107  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
31108  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
31109  # check for ICE first), but we must link in the order -lSM -lICE or
31110  # we get undefined symbols.  So assume we have SM if we have ICE.
31111  # These have to be linked with before -lX11, unlike the other
31112  # libraries we check for below, so use a different variable.
31113  # John Interrante, Karl Berry
31114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31115$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31116if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31117  $as_echo_n "(cached) " >&6
31118else
31119  ac_check_lib_save_LIBS=$LIBS
31120LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31122/* end confdefs.h.  */
31123
31124/* Override any GCC internal prototype to avoid an error.
31125   Use char because int might match the return type of a GCC
31126   builtin and then its argument prototype would still apply.  */
31127#ifdef __cplusplus
31128extern "C"
31129#endif
31130char IceConnectionNumber ();
31131int
31132main ()
31133{
31134return IceConnectionNumber ();
31135  ;
31136  return 0;
31137}
31138_ACEOF
31139if ac_fn_cxx_try_link "$LINENO"; then :
31140  ac_cv_lib_ICE_IceConnectionNumber=yes
31141else
31142  ac_cv_lib_ICE_IceConnectionNumber=no
31143fi
31144rm -f core conftest.err conftest.$ac_objext \
31145    conftest$ac_exeext conftest.$ac_ext
31146LIBS=$ac_check_lib_save_LIBS
31147fi
31148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31149$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31150if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31151  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31152fi
31153
31154  LDFLAGS=$ac_save_LDFLAGS
31155
31156fi
31157
31158
31159  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31160  # this doesn't make sense so we remove it.
31161  if test "x$COMPILE_TYPE" = xcross; then
31162    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31163  fi
31164
31165  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31166
31167  # Print a helpful message on how to acquire the necessary build dependency.
31168  # x11 is the help tag: freetype, cups, pulse, alsa etc
31169  MISSING_DEPENDENCY=x11
31170
31171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31172    cygwin_help $MISSING_DEPENDENCY
31173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31174    msys_help $MISSING_DEPENDENCY
31175  else
31176    PKGHANDLER_COMMAND=
31177
31178    case $PKGHANDLER in
31179      apt-get)
31180        apt_help     $MISSING_DEPENDENCY ;;
31181      yum)
31182        yum_help     $MISSING_DEPENDENCY ;;
31183      port)
31184        port_help    $MISSING_DEPENDENCY ;;
31185      pkgutil)
31186        pkgutil_help $MISSING_DEPENDENCY ;;
31187      pkgadd)
31188        pkgadd_help  $MISSING_DEPENDENCY ;;
31189    esac
31190
31191    if test "x$PKGHANDLER_COMMAND" != x; then
31192      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31193    fi
31194  fi
31195
31196    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31197  fi
31198
31199  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31200    OPENWIN_HOME="/usr/openwin"
31201  fi
31202
31203
31204
31205  #
31206  # Weird Sol10 something check...TODO change to try compile
31207  #
31208  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31209    if test "`uname -r`" = "5.10"; then
31210      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31211        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31212      fi
31213    fi
31214  fi
31215
31216  ac_ext=c
31217ac_cpp='$CPP $CPPFLAGS'
31218ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31219ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31220ac_compiler_gnu=$ac_cv_c_compiler_gnu
31221
31222  OLD_CFLAGS="$CFLAGS"
31223  CFLAGS="$CFLAGS $X_CFLAGS"
31224
31225  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31226  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31227do :
31228  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31229ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31230        # include <X11/Xlib.h>
31231        # include <X11/Xutil.h>
31232
31233
31234"
31235if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31236  cat >>confdefs.h <<_ACEOF
31237#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31238_ACEOF
31239 X11_A_OK=yes
31240else
31241  X11_A_OK=no; break
31242fi
31243
31244done
31245
31246
31247  CFLAGS="$OLD_CFLAGS"
31248  ac_ext=cpp
31249ac_cpp='$CXXCPP $CPPFLAGS'
31250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31253
31254
31255  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31256
31257  # Print a helpful message on how to acquire the necessary build dependency.
31258  # x11 is the help tag: freetype, cups, pulse, alsa etc
31259  MISSING_DEPENDENCY=x11
31260
31261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31262    cygwin_help $MISSING_DEPENDENCY
31263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31264    msys_help $MISSING_DEPENDENCY
31265  else
31266    PKGHANDLER_COMMAND=
31267
31268    case $PKGHANDLER in
31269      apt-get)
31270        apt_help     $MISSING_DEPENDENCY ;;
31271      yum)
31272        yum_help     $MISSING_DEPENDENCY ;;
31273      port)
31274        port_help    $MISSING_DEPENDENCY ;;
31275      pkgutil)
31276        pkgutil_help $MISSING_DEPENDENCY ;;
31277      pkgadd)
31278        pkgadd_help  $MISSING_DEPENDENCY ;;
31279    esac
31280
31281    if test "x$PKGHANDLER_COMMAND" != x; then
31282      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31283    fi
31284  fi
31285
31286    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31287  fi
31288
31289
31290
31291
31292
31293
31294  ###############################################################################
31295  #
31296  # The common unix printing system cups is used to print from java.
31297  #
31298
31299# Check whether --with-cups was given.
31300if test "${with_cups+set}" = set; then :
31301  withval=$with_cups;
31302fi
31303
31304
31305# Check whether --with-cups-include was given.
31306if test "${with_cups_include+set}" = set; then :
31307  withval=$with_cups_include;
31308fi
31309
31310
31311  if test "x$CUPS_NOT_NEEDED" = xyes; then
31312    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31313      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31314$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31315    fi
31316    CUPS_CFLAGS=
31317  else
31318    CUPS_FOUND=no
31319
31320    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31321      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31322    fi
31323
31324    if test "x${with_cups}" != x; then
31325      CUPS_CFLAGS="-I${with_cups}/include"
31326      CUPS_FOUND=yes
31327    fi
31328    if test "x${with_cups_include}" != x; then
31329      CUPS_CFLAGS="-I${with_cups_include}"
31330      CUPS_FOUND=yes
31331    fi
31332    if test "x$CUPS_FOUND" = xno; then
31333
31334
31335  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31336    # Source the builddeps file again, to make sure it uses the latest variables!
31337    . $builddepsfile
31338    # Look for a target and build machine specific resource!
31339    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31340    if test "x$resource" = x; then
31341      # Ok, lets instead look for a target specific resource
31342      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31343    fi
31344    if test "x$resource" = x; then
31345      # Ok, lets instead look for a build specific resource
31346      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31347    fi
31348    if test "x$resource" = x; then
31349      # Ok, lets instead look for a generic resource
31350      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31351      resource=${builddep_cups}
31352    fi
31353    if test "x$resource" != x; then
31354      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31355$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31356      # If the resource in the builddeps.conf file is an existing directory,
31357      # for example /java/linux/cups
31358      if test -d ${resource}; then
31359        depdir=${resource}
31360      else
31361
31362  # cups is for example mymodule
31363  # $resource is for example libs/general/libmymod_1_2_3.zip
31364  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31365  # $with_builddeps_dir is for example /localhome/builddeps
31366  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31367  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31368  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31369  filename=`basename $resource`
31370  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31371  filebase=${filename%%.*}
31372  extension=${filename#*.}
31373  installdir=$with_builddeps_dir/$filebase
31374  if test ! -f $installdir/$filename.unpacked; then
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31376$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31377    if test ! -d $installdir; then
31378      mkdir -p $installdir
31379    fi
31380    if test ! -d $installdir; then
31381      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31382    fi
31383    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31384    touch $tmpfile
31385    if test ! -f $tmpfile; then
31386      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31387    fi
31388
31389  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31390  # $tmpfile is the local file name for the downloaded file.
31391  VALID_TOOL=no
31392  if test "x$BDEPS_FTP" = xwget; then
31393    VALID_TOOL=yes
31394    wget -O $tmpfile $with_builddeps_server/$resource
31395  fi
31396  if test "x$BDEPS_FTP" = xlftp; then
31397    VALID_TOOL=yes
31398    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31399  fi
31400  if test "x$BDEPS_FTP" = xftp; then
31401    VALID_TOOL=yes
31402    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31403    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31404    FTPUSERPWD=${FTPSERVER%%@*}
31405    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31406      FTPUSER=${userpwd%%:*}
31407      FTPPWD=${userpwd#*@}
31408      FTPSERVER=${FTPSERVER#*@}
31409    else
31410      FTPUSER=ftp
31411      FTPPWD=ftp
31412    fi
31413    # the "pass" command does not work on some
31414    # ftp clients (read ftp.exe) but if it works,
31415    # passive mode is better!
31416    ( \
31417        echo "user $FTPUSER $FTPPWD"        ; \
31418        echo "pass"                         ; \
31419        echo "bin"                          ; \
31420        echo "get $FTPPATH $tmpfile"              ; \
31421    ) | ftp -in $FTPSERVER
31422  fi
31423  if test "x$VALID_TOOL" != xyes; then
31424    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31425  fi
31426
31427    mv $tmpfile $installdir/$filename
31428    if test ! -s $installdir/$filename; then
31429      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31430    fi
31431    case "$extension" in
31432      zip)  echo "Unzipping $installdir/$filename..."
31433        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31434        ;;
31435      tar.gz) echo "Untaring $installdir/$filename..."
31436        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31437        ;;
31438      tgz) echo "Untaring $installdir/$filename..."
31439        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31440        ;;
31441      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31442        ;;
31443    esac
31444  fi
31445  if test -f $installdir/$filename.unpacked; then
31446    depdir=$installdir
31447  fi
31448
31449      fi
31450      # Source the builddeps file again, because in the previous command, the depdir
31451      # was updated to point at the current build dependency install directory.
31452      . $builddepsfile
31453      # Now extract variables from the builddeps.conf files.
31454      theroot=${builddep_cups_ROOT}
31455      thecflags=${builddep_cups_CFLAGS}
31456      thelibs=${builddep_cups_LIBS}
31457      if test "x$depdir" = x; then
31458        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31459      fi
31460      CUPS=$depdir
31461      if test "x$theroot" != x; then
31462        CUPS="$theroot"
31463      fi
31464      if test "x$thecflags" != x; then
31465        CUPS_CFLAGS="$thecflags"
31466      fi
31467      if test "x$thelibs" != x; then
31468        CUPS_LIBS="$thelibs"
31469      fi
31470      CUPS_FOUND=yes
31471
31472    fi
31473
31474  fi
31475
31476    fi
31477    if test "x$CUPS_FOUND" = xno; then
31478      # Are the cups headers installed in the default /usr/include location?
31479      for ac_header in cups/cups.h cups/ppd.h
31480do :
31481  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31482ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31483if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31484  cat >>confdefs.h <<_ACEOF
31485#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31486_ACEOF
31487
31488            CUPS_FOUND=yes
31489            CUPS_CFLAGS=
31490            DEFAULT_CUPS=yes
31491
31492
31493fi
31494
31495done
31496
31497    fi
31498    if test "x$CUPS_FOUND" = xno; then
31499      # Getting nervous now? Lets poke around for standard Solaris third-party
31500      # package installation locations.
31501      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31502$as_echo_n "checking for cups headers... " >&6; }
31503      if test -s /opt/sfw/cups/include/cups/cups.h; then
31504        # An SFW package seems to be installed!
31505        CUPS_FOUND=yes
31506        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31507      elif test -s /opt/csw/include/cups/cups.h; then
31508        # A CSW package seems to be installed!
31509        CUPS_FOUND=yes
31510        CUPS_CFLAGS="-I/opt/csw/include"
31511      fi
31512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31513$as_echo "$CUPS_FOUND" >&6; }
31514    fi
31515    if test "x$CUPS_FOUND" = xno; then
31516
31517  # Print a helpful message on how to acquire the necessary build dependency.
31518  # cups is the help tag: freetype, cups, pulse, alsa etc
31519  MISSING_DEPENDENCY=cups
31520
31521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31522    cygwin_help $MISSING_DEPENDENCY
31523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31524    msys_help $MISSING_DEPENDENCY
31525  else
31526    PKGHANDLER_COMMAND=
31527
31528    case $PKGHANDLER in
31529      apt-get)
31530        apt_help     $MISSING_DEPENDENCY ;;
31531      yum)
31532        yum_help     $MISSING_DEPENDENCY ;;
31533      port)
31534        port_help    $MISSING_DEPENDENCY ;;
31535      pkgutil)
31536        pkgutil_help $MISSING_DEPENDENCY ;;
31537      pkgadd)
31538        pkgadd_help  $MISSING_DEPENDENCY ;;
31539    esac
31540
31541    if test "x$PKGHANDLER_COMMAND" != x; then
31542      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31543    fi
31544  fi
31545
31546      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31547    fi
31548  fi
31549
31550
31551
31552
31553
31554
31555  ###############################################################################
31556  #
31557  # The ubiquitous freetype library is used to render fonts.
31558  #
31559
31560# Check whether --with-freetype was given.
31561if test "${with_freetype+set}" = set; then :
31562  withval=$with_freetype;
31563fi
31564
31565
31566# Check whether --with-freetype-include was given.
31567if test "${with_freetype_include+set}" = set; then :
31568  withval=$with_freetype_include;
31569fi
31570
31571
31572# Check whether --with-freetype-lib was given.
31573if test "${with_freetype_lib+set}" = set; then :
31574  withval=$with_freetype_lib;
31575fi
31576
31577  # Check whether --enable-freetype-bundling was given.
31578if test "${enable_freetype_bundling+set}" = set; then :
31579  enableval=$enable_freetype_bundling;
31580fi
31581
31582
31583  FREETYPE_CFLAGS=
31584  FREETYPE_LIBS=
31585  FREETYPE_BUNDLE_LIB_PATH=
31586
31587  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31588    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31589      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31590$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31591    fi
31592    if test "x$enable_freetype_bundling" != x; then
31593      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31594$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31595    fi
31596  else
31597    # freetype is needed to build; go get it!
31598
31599    BUNDLE_FREETYPE="$enable_freetype_bundling"
31600
31601    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31602      # User has specified settings
31603
31604      if test "x$BUNDLE_FREETYPE" = x; then
31605        # If not specified, default is to bundle freetype
31606        BUNDLE_FREETYPE=yes
31607      fi
31608
31609      if test "x$with_freetype" != x; then
31610        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31611        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31612      fi
31613
31614      # Allow --with-freetype-lib and --with-freetype-include to override
31615      if test "x$with_freetype_include" != x; then
31616        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31617      fi
31618      if test "x$with_freetype_lib" != x; then
31619        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31620      fi
31621
31622      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31623        # Okay, we got it. Check that it works.
31624
31625  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31626  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31627  METHOD="--with-freetype"
31628
31629  # First check if the files exists.
31630  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31631    # We found an arbitrary include file. That's a good sign.
31632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31633$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31634    FOUND_FREETYPE=yes
31635
31636    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31637    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31638      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31640      FOUND_FREETYPE=no
31641    else
31642      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31643        # On Windows, we will need both .lib and .dll file.
31644        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31645          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31646$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31647          FOUND_FREETYPE=no
31648        fi
31649      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
31650        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31651        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31652      fi
31653    fi
31654  fi
31655
31656  if test "x$FOUND_FREETYPE" = xyes; then
31657
31658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31659
31660  # Input might be given as Windows format, start by converting to
31661  # unix format.
31662  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31663  new_path=`$CYGPATH -u "$path"`
31664
31665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31668  # "foo.exe" is OK but "foo" is an error.
31669  #
31670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31671  # It is also a way to make sure we got the proper file name for the real test later on.
31672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31673  if test "x$test_shortpath" = x; then
31674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31676    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31677  fi
31678
31679  # Call helper function which possibly converts this using DOS-style short mode.
31680  # If so, the updated path is stored in $new_path.
31681
31682  input_path="$new_path"
31683  # Check if we need to convert this using DOS-style short mode. If the path
31684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31685  # take no chances and rewrite it.
31686  # Note: m4 eats our [], so we need to use [ and ] instead.
31687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31688  if test "x$has_forbidden_chars" != x; then
31689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31693      # Going to short mode and back again did indeed matter. Since short mode is
31694      # case insensitive, let's make it lowercase to improve readability.
31695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31696      # Now convert it back to Unix-stile (cygpath)
31697      input_path=`$CYGPATH -u "$shortmode_path"`
31698      new_path="$input_path"
31699    fi
31700  fi
31701
31702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31703  if test "x$test_cygdrive_prefix" = x; then
31704    # As a simple fix, exclude /usr/bin since it's not a real path.
31705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31707      # a path prefixed by /cygdrive for fixpath to work.
31708      new_path="$CYGWIN_ROOT_PATH$input_path"
31709    fi
31710  fi
31711
31712
31713  if test "x$path" != "x$new_path"; then
31714    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31717  fi
31718
31719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31720
31721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31722  has_colon=`$ECHO $path | $GREP ^.:`
31723  new_path="$path"
31724  if test "x$has_colon" = x; then
31725    # Not in mixed or Windows style, start by that.
31726    new_path=`cmd //c echo $path`
31727  fi
31728
31729
31730  input_path="$new_path"
31731  # Check if we need to convert this using DOS-style short mode. If the path
31732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31733  # take no chances and rewrite it.
31734  # Note: m4 eats our [], so we need to use [ and ] instead.
31735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31736  if test "x$has_forbidden_chars" != x; then
31737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31739  fi
31740
31741
31742  windows_path="$new_path"
31743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31744    unix_path=`$CYGPATH -u "$windows_path"`
31745    new_path="$unix_path"
31746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31748    new_path="$unix_path"
31749  fi
31750
31751  if test "x$path" != "x$new_path"; then
31752    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31755  fi
31756
31757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31759
31760  else
31761    # We're on a posix platform. Hooray! :)
31762    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31763    has_space=`$ECHO "$path" | $GREP " "`
31764    if test "x$has_space" != x; then
31765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31768    fi
31769
31770    # Use eval to expand a potential ~
31771    eval path="$path"
31772    if test ! -f "$path" && test ! -d "$path"; then
31773      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31774    fi
31775
31776    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31777  fi
31778
31779
31780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31781
31782  # Input might be given as Windows format, start by converting to
31783  # unix format.
31784  path="$POTENTIAL_FREETYPE_LIB_PATH"
31785  new_path=`$CYGPATH -u "$path"`
31786
31787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31790  # "foo.exe" is OK but "foo" is an error.
31791  #
31792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31793  # It is also a way to make sure we got the proper file name for the real test later on.
31794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31795  if test "x$test_shortpath" = x; then
31796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31799  fi
31800
31801  # Call helper function which possibly converts this using DOS-style short mode.
31802  # If so, the updated path is stored in $new_path.
31803
31804  input_path="$new_path"
31805  # Check if we need to convert this using DOS-style short mode. If the path
31806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31807  # take no chances and rewrite it.
31808  # Note: m4 eats our [], so we need to use [ and ] instead.
31809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31810  if test "x$has_forbidden_chars" != x; then
31811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31815      # Going to short mode and back again did indeed matter. Since short mode is
31816      # case insensitive, let's make it lowercase to improve readability.
31817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31818      # Now convert it back to Unix-stile (cygpath)
31819      input_path=`$CYGPATH -u "$shortmode_path"`
31820      new_path="$input_path"
31821    fi
31822  fi
31823
31824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31825  if test "x$test_cygdrive_prefix" = x; then
31826    # As a simple fix, exclude /usr/bin since it's not a real path.
31827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31829      # a path prefixed by /cygdrive for fixpath to work.
31830      new_path="$CYGWIN_ROOT_PATH$input_path"
31831    fi
31832  fi
31833
31834
31835  if test "x$path" != "x$new_path"; then
31836    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31839  fi
31840
31841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31842
31843  path="$POTENTIAL_FREETYPE_LIB_PATH"
31844  has_colon=`$ECHO $path | $GREP ^.:`
31845  new_path="$path"
31846  if test "x$has_colon" = x; then
31847    # Not in mixed or Windows style, start by that.
31848    new_path=`cmd //c echo $path`
31849  fi
31850
31851
31852  input_path="$new_path"
31853  # Check if we need to convert this using DOS-style short mode. If the path
31854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31855  # take no chances and rewrite it.
31856  # Note: m4 eats our [], so we need to use [ and ] instead.
31857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31858  if test "x$has_forbidden_chars" != x; then
31859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31861  fi
31862
31863
31864  windows_path="$new_path"
31865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31866    unix_path=`$CYGPATH -u "$windows_path"`
31867    new_path="$unix_path"
31868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31870    new_path="$unix_path"
31871  fi
31872
31873  if test "x$path" != "x$new_path"; then
31874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31877  fi
31878
31879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31881
31882  else
31883    # We're on a posix platform. Hooray! :)
31884    path="$POTENTIAL_FREETYPE_LIB_PATH"
31885    has_space=`$ECHO "$path" | $GREP " "`
31886    if test "x$has_space" != x; then
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31890    fi
31891
31892    # Use eval to expand a potential ~
31893    eval path="$path"
31894    if test ! -f "$path" && test ! -d "$path"; then
31895      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31896    fi
31897
31898    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31899  fi
31900
31901
31902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31904$as_echo_n "checking for freetype includes... " >&6; }
31905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31909$as_echo_n "checking for freetype libraries... " >&6; }
31910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31911$as_echo "$FREETYPE_LIB_PATH" >&6; }
31912  fi
31913
31914        if test "x$FOUND_FREETYPE" != xyes; then
31915          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31916        fi
31917      else
31918        # User specified only one of lib or include. This is an error.
31919        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31920          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31921$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31922          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31923        else
31924          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31925$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31926          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31927        fi
31928      fi
31929    else
31930      # User did not specify settings, but we need freetype. Try to locate it.
31931
31932      if test "x$BUNDLE_FREETYPE" = x; then
31933        # If not specified, default is to bundle freetype only on windows
31934        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31935          BUNDLE_FREETYPE=yes
31936        else
31937          BUNDLE_FREETYPE=no
31938        fi
31939      fi
31940
31941      if test "x$FOUND_FREETYPE" != xyes; then
31942        # Check builddeps
31943
31944
31945  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31946    # Source the builddeps file again, to make sure it uses the latest variables!
31947    . $builddepsfile
31948    # Look for a target and build machine specific resource!
31949    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31950    if test "x$resource" = x; then
31951      # Ok, lets instead look for a target specific resource
31952      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31953    fi
31954    if test "x$resource" = x; then
31955      # Ok, lets instead look for a build specific resource
31956      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31957    fi
31958    if test "x$resource" = x; then
31959      # Ok, lets instead look for a generic resource
31960      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31961      resource=${builddep_freetype2}
31962    fi
31963    if test "x$resource" != x; then
31964      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31965$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31966      # If the resource in the builddeps.conf file is an existing directory,
31967      # for example /java/linux/cups
31968      if test -d ${resource}; then
31969        depdir=${resource}
31970      else
31971
31972  # freetype2 is for example mymodule
31973  # $resource is for example libs/general/libmymod_1_2_3.zip
31974  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31975  # $with_builddeps_dir is for example /localhome/builddeps
31976  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31977  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31978  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31979  filename=`basename $resource`
31980  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31981  filebase=${filename%%.*}
31982  extension=${filename#*.}
31983  installdir=$with_builddeps_dir/$filebase
31984  if test ! -f $installdir/$filename.unpacked; then
31985    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31986$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31987    if test ! -d $installdir; then
31988      mkdir -p $installdir
31989    fi
31990    if test ! -d $installdir; then
31991      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31992    fi
31993    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31994    touch $tmpfile
31995    if test ! -f $tmpfile; then
31996      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31997    fi
31998
31999  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32000  # $tmpfile is the local file name for the downloaded file.
32001  VALID_TOOL=no
32002  if test "x$BDEPS_FTP" = xwget; then
32003    VALID_TOOL=yes
32004    wget -O $tmpfile $with_builddeps_server/$resource
32005  fi
32006  if test "x$BDEPS_FTP" = xlftp; then
32007    VALID_TOOL=yes
32008    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32009  fi
32010  if test "x$BDEPS_FTP" = xftp; then
32011    VALID_TOOL=yes
32012    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32013    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32014    FTPUSERPWD=${FTPSERVER%%@*}
32015    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32016      FTPUSER=${userpwd%%:*}
32017      FTPPWD=${userpwd#*@}
32018      FTPSERVER=${FTPSERVER#*@}
32019    else
32020      FTPUSER=ftp
32021      FTPPWD=ftp
32022    fi
32023    # the "pass" command does not work on some
32024    # ftp clients (read ftp.exe) but if it works,
32025    # passive mode is better!
32026    ( \
32027        echo "user $FTPUSER $FTPPWD"        ; \
32028        echo "pass"                         ; \
32029        echo "bin"                          ; \
32030        echo "get $FTPPATH $tmpfile"              ; \
32031    ) | ftp -in $FTPSERVER
32032  fi
32033  if test "x$VALID_TOOL" != xyes; then
32034    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32035  fi
32036
32037    mv $tmpfile $installdir/$filename
32038    if test ! -s $installdir/$filename; then
32039      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32040    fi
32041    case "$extension" in
32042      zip)  echo "Unzipping $installdir/$filename..."
32043        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32044        ;;
32045      tar.gz) echo "Untaring $installdir/$filename..."
32046        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32047        ;;
32048      tgz) echo "Untaring $installdir/$filename..."
32049        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32050        ;;
32051      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32052        ;;
32053    esac
32054  fi
32055  if test -f $installdir/$filename.unpacked; then
32056    depdir=$installdir
32057  fi
32058
32059      fi
32060      # Source the builddeps file again, because in the previous command, the depdir
32061      # was updated to point at the current build dependency install directory.
32062      . $builddepsfile
32063      # Now extract variables from the builddeps.conf files.
32064      theroot=${builddep_freetype2_ROOT}
32065      thecflags=${builddep_freetype2_CFLAGS}
32066      thelibs=${builddep_freetype2_LIBS}
32067      if test "x$depdir" = x; then
32068        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
32069      fi
32070      FREETYPE=$depdir
32071      if test "x$theroot" != x; then
32072        FREETYPE="$theroot"
32073      fi
32074      if test "x$thecflags" != x; then
32075        FREETYPE_CFLAGS="$thecflags"
32076      fi
32077      if test "x$thelibs" != x; then
32078        FREETYPE_LIBS="$thelibs"
32079      fi
32080      FOUND_FREETYPE=yes
32081      else FOUND_FREETYPE=no
32082
32083    fi
32084    else FOUND_FREETYPE=no
32085
32086  fi
32087
32088        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32089        if test "x$FOUND_FREETYPE" = xyes; then
32090          if test "x$BUNDLE_FREETYPE" = xyes; then
32091            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
32092$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
32093            FOUND_FREETYPE=no
32094          else
32095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32096$as_echo_n "checking for freetype... " >&6; }
32097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
32098$as_echo "yes (using builddeps)" >&6; }
32099          fi
32100        fi
32101      fi
32102
32103      if test "x$FOUND_FREETYPE" != xyes; then
32104        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
32105        if test "x$PKG_CONFIG" != x; then
32106
32107pkg_failed=no
32108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
32109$as_echo_n "checking for FREETYPE... " >&6; }
32110
32111if test -n "$FREETYPE_CFLAGS"; then
32112    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
32113 elif test -n "$PKG_CONFIG"; then
32114    if test -n "$PKG_CONFIG" && \
32115    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32116  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32117  ac_status=$?
32118  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32119  test $ac_status = 0; }; then
32120  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
32121else
32122  pkg_failed=yes
32123fi
32124 else
32125    pkg_failed=untried
32126fi
32127if test -n "$FREETYPE_LIBS"; then
32128    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
32129 elif test -n "$PKG_CONFIG"; then
32130    if test -n "$PKG_CONFIG" && \
32131    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32132  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32133  ac_status=$?
32134  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32135  test $ac_status = 0; }; then
32136  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
32137else
32138  pkg_failed=yes
32139fi
32140 else
32141    pkg_failed=untried
32142fi
32143
32144
32145
32146if test $pkg_failed = yes; then
32147
32148if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32149        _pkg_short_errors_supported=yes
32150else
32151        _pkg_short_errors_supported=no
32152fi
32153        if test $_pkg_short_errors_supported = yes; then
32154	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32155        else
32156	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32157        fi
32158	# Put the nasty error message in config.log where it belongs
32159	echo "$FREETYPE_PKG_ERRORS" >&5
32160
32161	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32162$as_echo "no" >&6; }
32163                FOUND_FREETYPE=no
32164elif test $pkg_failed = untried; then
32165	FOUND_FREETYPE=no
32166else
32167	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32168	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32170$as_echo "yes" >&6; }
32171	FOUND_FREETYPE=yes
32172fi
32173          if test "x$FOUND_FREETYPE" = xyes; then
32174            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32175            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32176            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32177            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32178              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32179            fi
32180            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32181            if test "x$BUNDLE_FREETYPE" = xyes; then
32182              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32183$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32184              FOUND_FREETYPE=no
32185            else
32186              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32187$as_echo_n "checking for freetype... " >&6; }
32188              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32189$as_echo "yes (using pkg-config)" >&6; }
32190            fi
32191          fi
32192        fi
32193      fi
32194
32195      if test "x$FOUND_FREETYPE" != xyes; then
32196        # Check in well-known locations
32197        if test "x$OPENJDK_TARGET_OS" = xwindows; then
32198          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32199
32200  windows_path="$FREETYPE_BASE_DIR"
32201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32202    unix_path=`$CYGPATH -u "$windows_path"`
32203    FREETYPE_BASE_DIR="$unix_path"
32204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32206    FREETYPE_BASE_DIR="$unix_path"
32207  fi
32208
32209
32210  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32211  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32212  METHOD="well-known location"
32213
32214  # First check if the files exists.
32215  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32216    # We found an arbitrary include file. That's a good sign.
32217    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32218$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32219    FOUND_FREETYPE=yes
32220
32221    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32222    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32223      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32224$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32225      FOUND_FREETYPE=no
32226    else
32227      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32228        # On Windows, we will need both .lib and .dll file.
32229        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32230          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32232          FOUND_FREETYPE=no
32233        fi
32234      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32235        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32236        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32237      fi
32238    fi
32239  fi
32240
32241  if test "x$FOUND_FREETYPE" = xyes; then
32242
32243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32244
32245  # Input might be given as Windows format, start by converting to
32246  # unix format.
32247  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32248  new_path=`$CYGPATH -u "$path"`
32249
32250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32253  # "foo.exe" is OK but "foo" is an error.
32254  #
32255  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32256  # It is also a way to make sure we got the proper file name for the real test later on.
32257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32258  if test "x$test_shortpath" = x; then
32259    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32260$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32261    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32262  fi
32263
32264  # Call helper function which possibly converts this using DOS-style short mode.
32265  # If so, the updated path is stored in $new_path.
32266
32267  input_path="$new_path"
32268  # Check if we need to convert this using DOS-style short mode. If the path
32269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32270  # take no chances and rewrite it.
32271  # Note: m4 eats our [], so we need to use [ and ] instead.
32272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32273  if test "x$has_forbidden_chars" != x; then
32274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32278      # Going to short mode and back again did indeed matter. Since short mode is
32279      # case insensitive, let's make it lowercase to improve readability.
32280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32281      # Now convert it back to Unix-stile (cygpath)
32282      input_path=`$CYGPATH -u "$shortmode_path"`
32283      new_path="$input_path"
32284    fi
32285  fi
32286
32287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32288  if test "x$test_cygdrive_prefix" = x; then
32289    # As a simple fix, exclude /usr/bin since it's not a real path.
32290    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32292      # a path prefixed by /cygdrive for fixpath to work.
32293      new_path="$CYGWIN_ROOT_PATH$input_path"
32294    fi
32295  fi
32296
32297
32298  if test "x$path" != "x$new_path"; then
32299    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32301$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32302  fi
32303
32304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32305
32306  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32307  has_colon=`$ECHO $path | $GREP ^.:`
32308  new_path="$path"
32309  if test "x$has_colon" = x; then
32310    # Not in mixed or Windows style, start by that.
32311    new_path=`cmd //c echo $path`
32312  fi
32313
32314
32315  input_path="$new_path"
32316  # Check if we need to convert this using DOS-style short mode. If the path
32317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32318  # take no chances and rewrite it.
32319  # Note: m4 eats our [], so we need to use [ and ] instead.
32320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32321  if test "x$has_forbidden_chars" != x; then
32322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32324  fi
32325
32326
32327  windows_path="$new_path"
32328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32329    unix_path=`$CYGPATH -u "$windows_path"`
32330    new_path="$unix_path"
32331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32333    new_path="$unix_path"
32334  fi
32335
32336  if test "x$path" != "x$new_path"; then
32337    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32339$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32340  fi
32341
32342  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32343  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32344
32345  else
32346    # We're on a posix platform. Hooray! :)
32347    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32348    has_space=`$ECHO "$path" | $GREP " "`
32349    if test "x$has_space" != x; then
32350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32351$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32352      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32353    fi
32354
32355    # Use eval to expand a potential ~
32356    eval path="$path"
32357    if test ! -f "$path" && test ! -d "$path"; then
32358      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32359    fi
32360
32361    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32362  fi
32363
32364
32365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32366
32367  # Input might be given as Windows format, start by converting to
32368  # unix format.
32369  path="$POTENTIAL_FREETYPE_LIB_PATH"
32370  new_path=`$CYGPATH -u "$path"`
32371
32372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32375  # "foo.exe" is OK but "foo" is an error.
32376  #
32377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32378  # It is also a way to make sure we got the proper file name for the real test later on.
32379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32380  if test "x$test_shortpath" = x; then
32381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32383    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32384  fi
32385
32386  # Call helper function which possibly converts this using DOS-style short mode.
32387  # If so, the updated path is stored in $new_path.
32388
32389  input_path="$new_path"
32390  # Check if we need to convert this using DOS-style short mode. If the path
32391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32392  # take no chances and rewrite it.
32393  # Note: m4 eats our [], so we need to use [ and ] instead.
32394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32395  if test "x$has_forbidden_chars" != x; then
32396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32400      # Going to short mode and back again did indeed matter. Since short mode is
32401      # case insensitive, let's make it lowercase to improve readability.
32402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32403      # Now convert it back to Unix-stile (cygpath)
32404      input_path=`$CYGPATH -u "$shortmode_path"`
32405      new_path="$input_path"
32406    fi
32407  fi
32408
32409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32410  if test "x$test_cygdrive_prefix" = x; then
32411    # As a simple fix, exclude /usr/bin since it's not a real path.
32412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32414      # a path prefixed by /cygdrive for fixpath to work.
32415      new_path="$CYGWIN_ROOT_PATH$input_path"
32416    fi
32417  fi
32418
32419
32420  if test "x$path" != "x$new_path"; then
32421    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32424  fi
32425
32426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32427
32428  path="$POTENTIAL_FREETYPE_LIB_PATH"
32429  has_colon=`$ECHO $path | $GREP ^.:`
32430  new_path="$path"
32431  if test "x$has_colon" = x; then
32432    # Not in mixed or Windows style, start by that.
32433    new_path=`cmd //c echo $path`
32434  fi
32435
32436
32437  input_path="$new_path"
32438  # Check if we need to convert this using DOS-style short mode. If the path
32439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32440  # take no chances and rewrite it.
32441  # Note: m4 eats our [], so we need to use [ and ] instead.
32442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32443  if test "x$has_forbidden_chars" != x; then
32444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32446  fi
32447
32448
32449  windows_path="$new_path"
32450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32451    unix_path=`$CYGPATH -u "$windows_path"`
32452    new_path="$unix_path"
32453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32455    new_path="$unix_path"
32456  fi
32457
32458  if test "x$path" != "x$new_path"; then
32459    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32462  fi
32463
32464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32466
32467  else
32468    # We're on a posix platform. Hooray! :)
32469    path="$POTENTIAL_FREETYPE_LIB_PATH"
32470    has_space=`$ECHO "$path" | $GREP " "`
32471    if test "x$has_space" != x; then
32472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32474      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32475    fi
32476
32477    # Use eval to expand a potential ~
32478    eval path="$path"
32479    if test ! -f "$path" && test ! -d "$path"; then
32480      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32481    fi
32482
32483    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32484  fi
32485
32486
32487    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32489$as_echo_n "checking for freetype includes... " >&6; }
32490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32491$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32492    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32494$as_echo_n "checking for freetype libraries... " >&6; }
32495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32496$as_echo "$FREETYPE_LIB_PATH" >&6; }
32497  fi
32498
32499          if test "x$FOUND_FREETYPE" != xyes; then
32500            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32501
32502  windows_path="$FREETYPE_BASE_DIR"
32503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32504    unix_path=`$CYGPATH -u "$windows_path"`
32505    FREETYPE_BASE_DIR="$unix_path"
32506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32508    FREETYPE_BASE_DIR="$unix_path"
32509  fi
32510
32511
32512  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32513  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32514  METHOD="well-known location"
32515
32516  # First check if the files exists.
32517  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32518    # We found an arbitrary include file. That's a good sign.
32519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32520$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32521    FOUND_FREETYPE=yes
32522
32523    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32524    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32525      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32526$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32527      FOUND_FREETYPE=no
32528    else
32529      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32530        # On Windows, we will need both .lib and .dll file.
32531        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32532          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32533$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32534          FOUND_FREETYPE=no
32535        fi
32536      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32537        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32538        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32539      fi
32540    fi
32541  fi
32542
32543  if test "x$FOUND_FREETYPE" = xyes; then
32544
32545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32546
32547  # Input might be given as Windows format, start by converting to
32548  # unix format.
32549  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32550  new_path=`$CYGPATH -u "$path"`
32551
32552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32555  # "foo.exe" is OK but "foo" is an error.
32556  #
32557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32558  # It is also a way to make sure we got the proper file name for the real test later on.
32559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32560  if test "x$test_shortpath" = x; then
32561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32563    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32564  fi
32565
32566  # Call helper function which possibly converts this using DOS-style short mode.
32567  # If so, the updated path is stored in $new_path.
32568
32569  input_path="$new_path"
32570  # Check if we need to convert this using DOS-style short mode. If the path
32571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32572  # take no chances and rewrite it.
32573  # Note: m4 eats our [], so we need to use [ and ] instead.
32574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32575  if test "x$has_forbidden_chars" != x; then
32576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32580      # Going to short mode and back again did indeed matter. Since short mode is
32581      # case insensitive, let's make it lowercase to improve readability.
32582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32583      # Now convert it back to Unix-stile (cygpath)
32584      input_path=`$CYGPATH -u "$shortmode_path"`
32585      new_path="$input_path"
32586    fi
32587  fi
32588
32589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32590  if test "x$test_cygdrive_prefix" = x; then
32591    # As a simple fix, exclude /usr/bin since it's not a real path.
32592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32594      # a path prefixed by /cygdrive for fixpath to work.
32595      new_path="$CYGWIN_ROOT_PATH$input_path"
32596    fi
32597  fi
32598
32599
32600  if test "x$path" != "x$new_path"; then
32601    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32604  fi
32605
32606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32607
32608  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32609  has_colon=`$ECHO $path | $GREP ^.:`
32610  new_path="$path"
32611  if test "x$has_colon" = x; then
32612    # Not in mixed or Windows style, start by that.
32613    new_path=`cmd //c echo $path`
32614  fi
32615
32616
32617  input_path="$new_path"
32618  # Check if we need to convert this using DOS-style short mode. If the path
32619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32620  # take no chances and rewrite it.
32621  # Note: m4 eats our [], so we need to use [ and ] instead.
32622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32623  if test "x$has_forbidden_chars" != x; then
32624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32626  fi
32627
32628
32629  windows_path="$new_path"
32630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32631    unix_path=`$CYGPATH -u "$windows_path"`
32632    new_path="$unix_path"
32633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32635    new_path="$unix_path"
32636  fi
32637
32638  if test "x$path" != "x$new_path"; then
32639    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32642  fi
32643
32644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32646
32647  else
32648    # We're on a posix platform. Hooray! :)
32649    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32650    has_space=`$ECHO "$path" | $GREP " "`
32651    if test "x$has_space" != x; then
32652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32654      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32655    fi
32656
32657    # Use eval to expand a potential ~
32658    eval path="$path"
32659    if test ! -f "$path" && test ! -d "$path"; then
32660      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32661    fi
32662
32663    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32664  fi
32665
32666
32667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32668
32669  # Input might be given as Windows format, start by converting to
32670  # unix format.
32671  path="$POTENTIAL_FREETYPE_LIB_PATH"
32672  new_path=`$CYGPATH -u "$path"`
32673
32674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32677  # "foo.exe" is OK but "foo" is an error.
32678  #
32679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32680  # It is also a way to make sure we got the proper file name for the real test later on.
32681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32682  if test "x$test_shortpath" = x; then
32683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32686  fi
32687
32688  # Call helper function which possibly converts this using DOS-style short mode.
32689  # If so, the updated path is stored in $new_path.
32690
32691  input_path="$new_path"
32692  # Check if we need to convert this using DOS-style short mode. If the path
32693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32694  # take no chances and rewrite it.
32695  # Note: m4 eats our [], so we need to use [ and ] instead.
32696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32697  if test "x$has_forbidden_chars" != x; then
32698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32702      # Going to short mode and back again did indeed matter. Since short mode is
32703      # case insensitive, let's make it lowercase to improve readability.
32704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32705      # Now convert it back to Unix-stile (cygpath)
32706      input_path=`$CYGPATH -u "$shortmode_path"`
32707      new_path="$input_path"
32708    fi
32709  fi
32710
32711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32712  if test "x$test_cygdrive_prefix" = x; then
32713    # As a simple fix, exclude /usr/bin since it's not a real path.
32714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32716      # a path prefixed by /cygdrive for fixpath to work.
32717      new_path="$CYGWIN_ROOT_PATH$input_path"
32718    fi
32719  fi
32720
32721
32722  if test "x$path" != "x$new_path"; then
32723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32726  fi
32727
32728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32729
32730  path="$POTENTIAL_FREETYPE_LIB_PATH"
32731  has_colon=`$ECHO $path | $GREP ^.:`
32732  new_path="$path"
32733  if test "x$has_colon" = x; then
32734    # Not in mixed or Windows style, start by that.
32735    new_path=`cmd //c echo $path`
32736  fi
32737
32738
32739  input_path="$new_path"
32740  # Check if we need to convert this using DOS-style short mode. If the path
32741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32742  # take no chances and rewrite it.
32743  # Note: m4 eats our [], so we need to use [ and ] instead.
32744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32745  if test "x$has_forbidden_chars" != x; then
32746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32748  fi
32749
32750
32751  windows_path="$new_path"
32752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32753    unix_path=`$CYGPATH -u "$windows_path"`
32754    new_path="$unix_path"
32755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32757    new_path="$unix_path"
32758  fi
32759
32760  if test "x$path" != "x$new_path"; then
32761    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32764  fi
32765
32766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32768
32769  else
32770    # We're on a posix platform. Hooray! :)
32771    path="$POTENTIAL_FREETYPE_LIB_PATH"
32772    has_space=`$ECHO "$path" | $GREP " "`
32773    if test "x$has_space" != x; then
32774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32776      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32777    fi
32778
32779    # Use eval to expand a potential ~
32780    eval path="$path"
32781    if test ! -f "$path" && test ! -d "$path"; then
32782      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32783    fi
32784
32785    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32786  fi
32787
32788
32789    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32791$as_echo_n "checking for freetype includes... " >&6; }
32792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32793$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32794    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32796$as_echo_n "checking for freetype libraries... " >&6; }
32797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32798$as_echo "$FREETYPE_LIB_PATH" >&6; }
32799  fi
32800
32801          fi
32802        else
32803          if test "x$SYS_ROOT" = "x/"; then
32804            FREETYPE_ROOT=
32805          else
32806            FREETYPE_ROOT="$SYS_ROOT"
32807          fi
32808          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32809
32810  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32811  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32812  METHOD="well-known location"
32813
32814  # First check if the files exists.
32815  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32816    # We found an arbitrary include file. That's a good sign.
32817    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32818$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32819    FOUND_FREETYPE=yes
32820
32821    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32822    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32823      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32824$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32825      FOUND_FREETYPE=no
32826    else
32827      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32828        # On Windows, we will need both .lib and .dll file.
32829        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32830          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32831$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32832          FOUND_FREETYPE=no
32833        fi
32834      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32835        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32836        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32837      fi
32838    fi
32839  fi
32840
32841  if test "x$FOUND_FREETYPE" = xyes; then
32842
32843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32844
32845  # Input might be given as Windows format, start by converting to
32846  # unix format.
32847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32848  new_path=`$CYGPATH -u "$path"`
32849
32850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32853  # "foo.exe" is OK but "foo" is an error.
32854  #
32855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32856  # It is also a way to make sure we got the proper file name for the real test later on.
32857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32858  if test "x$test_shortpath" = x; then
32859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32861    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32862  fi
32863
32864  # Call helper function which possibly converts this using DOS-style short mode.
32865  # If so, the updated path is stored in $new_path.
32866
32867  input_path="$new_path"
32868  # Check if we need to convert this using DOS-style short mode. If the path
32869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32870  # take no chances and rewrite it.
32871  # Note: m4 eats our [], so we need to use [ and ] instead.
32872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32873  if test "x$has_forbidden_chars" != x; then
32874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32878      # Going to short mode and back again did indeed matter. Since short mode is
32879      # case insensitive, let's make it lowercase to improve readability.
32880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32881      # Now convert it back to Unix-stile (cygpath)
32882      input_path=`$CYGPATH -u "$shortmode_path"`
32883      new_path="$input_path"
32884    fi
32885  fi
32886
32887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32888  if test "x$test_cygdrive_prefix" = x; then
32889    # As a simple fix, exclude /usr/bin since it's not a real path.
32890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32892      # a path prefixed by /cygdrive for fixpath to work.
32893      new_path="$CYGWIN_ROOT_PATH$input_path"
32894    fi
32895  fi
32896
32897
32898  if test "x$path" != "x$new_path"; then
32899    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32901$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32902  fi
32903
32904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32905
32906  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32907  has_colon=`$ECHO $path | $GREP ^.:`
32908  new_path="$path"
32909  if test "x$has_colon" = x; then
32910    # Not in mixed or Windows style, start by that.
32911    new_path=`cmd //c echo $path`
32912  fi
32913
32914
32915  input_path="$new_path"
32916  # Check if we need to convert this using DOS-style short mode. If the path
32917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32918  # take no chances and rewrite it.
32919  # Note: m4 eats our [], so we need to use [ and ] instead.
32920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32921  if test "x$has_forbidden_chars" != x; then
32922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32924  fi
32925
32926
32927  windows_path="$new_path"
32928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32929    unix_path=`$CYGPATH -u "$windows_path"`
32930    new_path="$unix_path"
32931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32933    new_path="$unix_path"
32934  fi
32935
32936  if test "x$path" != "x$new_path"; then
32937    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32939$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32940  fi
32941
32942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32944
32945  else
32946    # We're on a posix platform. Hooray! :)
32947    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32948    has_space=`$ECHO "$path" | $GREP " "`
32949    if test "x$has_space" != x; then
32950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32951$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32952      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32953    fi
32954
32955    # Use eval to expand a potential ~
32956    eval path="$path"
32957    if test ! -f "$path" && test ! -d "$path"; then
32958      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32959    fi
32960
32961    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32962  fi
32963
32964
32965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32966
32967  # Input might be given as Windows format, start by converting to
32968  # unix format.
32969  path="$POTENTIAL_FREETYPE_LIB_PATH"
32970  new_path=`$CYGPATH -u "$path"`
32971
32972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32975  # "foo.exe" is OK but "foo" is an error.
32976  #
32977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32978  # It is also a way to make sure we got the proper file name for the real test later on.
32979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32980  if test "x$test_shortpath" = x; then
32981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32983    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32984  fi
32985
32986  # Call helper function which possibly converts this using DOS-style short mode.
32987  # If so, the updated path is stored in $new_path.
32988
32989  input_path="$new_path"
32990  # Check if we need to convert this using DOS-style short mode. If the path
32991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32992  # take no chances and rewrite it.
32993  # Note: m4 eats our [], so we need to use [ and ] instead.
32994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32995  if test "x$has_forbidden_chars" != x; then
32996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33000      # Going to short mode and back again did indeed matter. Since short mode is
33001      # case insensitive, let's make it lowercase to improve readability.
33002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33003      # Now convert it back to Unix-stile (cygpath)
33004      input_path=`$CYGPATH -u "$shortmode_path"`
33005      new_path="$input_path"
33006    fi
33007  fi
33008
33009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33010  if test "x$test_cygdrive_prefix" = x; then
33011    # As a simple fix, exclude /usr/bin since it's not a real path.
33012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33014      # a path prefixed by /cygdrive for fixpath to work.
33015      new_path="$CYGWIN_ROOT_PATH$input_path"
33016    fi
33017  fi
33018
33019
33020  if test "x$path" != "x$new_path"; then
33021    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33024  fi
33025
33026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33027
33028  path="$POTENTIAL_FREETYPE_LIB_PATH"
33029  has_colon=`$ECHO $path | $GREP ^.:`
33030  new_path="$path"
33031  if test "x$has_colon" = x; then
33032    # Not in mixed or Windows style, start by that.
33033    new_path=`cmd //c echo $path`
33034  fi
33035
33036
33037  input_path="$new_path"
33038  # Check if we need to convert this using DOS-style short mode. If the path
33039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33040  # take no chances and rewrite it.
33041  # Note: m4 eats our [], so we need to use [ and ] instead.
33042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33043  if test "x$has_forbidden_chars" != x; then
33044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33046  fi
33047
33048
33049  windows_path="$new_path"
33050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33051    unix_path=`$CYGPATH -u "$windows_path"`
33052    new_path="$unix_path"
33053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33055    new_path="$unix_path"
33056  fi
33057
33058  if test "x$path" != "x$new_path"; then
33059    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33062  fi
33063
33064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33066
33067  else
33068    # We're on a posix platform. Hooray! :)
33069    path="$POTENTIAL_FREETYPE_LIB_PATH"
33070    has_space=`$ECHO "$path" | $GREP " "`
33071    if test "x$has_space" != x; then
33072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33074      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33075    fi
33076
33077    # Use eval to expand a potential ~
33078    eval path="$path"
33079    if test ! -f "$path" && test ! -d "$path"; then
33080      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33081    fi
33082
33083    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33084  fi
33085
33086
33087    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33089$as_echo_n "checking for freetype includes... " >&6; }
33090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33091$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33092    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33094$as_echo_n "checking for freetype libraries... " >&6; }
33095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33096$as_echo "$FREETYPE_LIB_PATH" >&6; }
33097  fi
33098
33099
33100          if test "x$FOUND_FREETYPE" != xyes; then
33101            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
33102
33103  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33104  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
33105  METHOD="well-known location"
33106
33107  # First check if the files exists.
33108  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33109    # We found an arbitrary include file. That's a good sign.
33110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33111$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33112    FOUND_FREETYPE=yes
33113
33114    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33115    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33116      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33117$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33118      FOUND_FREETYPE=no
33119    else
33120      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33121        # On Windows, we will need both .lib and .dll file.
33122        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33123          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33124$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33125          FOUND_FREETYPE=no
33126        fi
33127      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33128        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33129        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33130      fi
33131    fi
33132  fi
33133
33134  if test "x$FOUND_FREETYPE" = xyes; then
33135
33136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33137
33138  # Input might be given as Windows format, start by converting to
33139  # unix format.
33140  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33141  new_path=`$CYGPATH -u "$path"`
33142
33143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33146  # "foo.exe" is OK but "foo" is an error.
33147  #
33148  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33149  # It is also a way to make sure we got the proper file name for the real test later on.
33150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33151  if test "x$test_shortpath" = x; then
33152    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33153$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33154    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33155  fi
33156
33157  # Call helper function which possibly converts this using DOS-style short mode.
33158  # If so, the updated path is stored in $new_path.
33159
33160  input_path="$new_path"
33161  # Check if we need to convert this using DOS-style short mode. If the path
33162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33163  # take no chances and rewrite it.
33164  # Note: m4 eats our [], so we need to use [ and ] instead.
33165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33166  if test "x$has_forbidden_chars" != x; then
33167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33171      # Going to short mode and back again did indeed matter. Since short mode is
33172      # case insensitive, let's make it lowercase to improve readability.
33173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33174      # Now convert it back to Unix-stile (cygpath)
33175      input_path=`$CYGPATH -u "$shortmode_path"`
33176      new_path="$input_path"
33177    fi
33178  fi
33179
33180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33181  if test "x$test_cygdrive_prefix" = x; then
33182    # As a simple fix, exclude /usr/bin since it's not a real path.
33183    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33185      # a path prefixed by /cygdrive for fixpath to work.
33186      new_path="$CYGWIN_ROOT_PATH$input_path"
33187    fi
33188  fi
33189
33190
33191  if test "x$path" != "x$new_path"; then
33192    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33194$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33195  fi
33196
33197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33198
33199  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33200  has_colon=`$ECHO $path | $GREP ^.:`
33201  new_path="$path"
33202  if test "x$has_colon" = x; then
33203    # Not in mixed or Windows style, start by that.
33204    new_path=`cmd //c echo $path`
33205  fi
33206
33207
33208  input_path="$new_path"
33209  # Check if we need to convert this using DOS-style short mode. If the path
33210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33211  # take no chances and rewrite it.
33212  # Note: m4 eats our [], so we need to use [ and ] instead.
33213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33214  if test "x$has_forbidden_chars" != x; then
33215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33217  fi
33218
33219
33220  windows_path="$new_path"
33221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33222    unix_path=`$CYGPATH -u "$windows_path"`
33223    new_path="$unix_path"
33224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33226    new_path="$unix_path"
33227  fi
33228
33229  if test "x$path" != "x$new_path"; then
33230    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33232$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33233  fi
33234
33235  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33236  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33237
33238  else
33239    # We're on a posix platform. Hooray! :)
33240    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33241    has_space=`$ECHO "$path" | $GREP " "`
33242    if test "x$has_space" != x; then
33243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33244$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33245      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33246    fi
33247
33248    # Use eval to expand a potential ~
33249    eval path="$path"
33250    if test ! -f "$path" && test ! -d "$path"; then
33251      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33252    fi
33253
33254    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33255  fi
33256
33257
33258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33259
33260  # Input might be given as Windows format, start by converting to
33261  # unix format.
33262  path="$POTENTIAL_FREETYPE_LIB_PATH"
33263  new_path=`$CYGPATH -u "$path"`
33264
33265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33268  # "foo.exe" is OK but "foo" is an error.
33269  #
33270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33271  # It is also a way to make sure we got the proper file name for the real test later on.
33272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33273  if test "x$test_shortpath" = x; then
33274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33275$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33276    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33277  fi
33278
33279  # Call helper function which possibly converts this using DOS-style short mode.
33280  # If so, the updated path is stored in $new_path.
33281
33282  input_path="$new_path"
33283  # Check if we need to convert this using DOS-style short mode. If the path
33284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33285  # take no chances and rewrite it.
33286  # Note: m4 eats our [], so we need to use [ and ] instead.
33287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33288  if test "x$has_forbidden_chars" != x; then
33289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33293      # Going to short mode and back again did indeed matter. Since short mode is
33294      # case insensitive, let's make it lowercase to improve readability.
33295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33296      # Now convert it back to Unix-stile (cygpath)
33297      input_path=`$CYGPATH -u "$shortmode_path"`
33298      new_path="$input_path"
33299    fi
33300  fi
33301
33302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33303  if test "x$test_cygdrive_prefix" = x; then
33304    # As a simple fix, exclude /usr/bin since it's not a real path.
33305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33307      # a path prefixed by /cygdrive for fixpath to work.
33308      new_path="$CYGWIN_ROOT_PATH$input_path"
33309    fi
33310  fi
33311
33312
33313  if test "x$path" != "x$new_path"; then
33314    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33316$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33317  fi
33318
33319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33320
33321  path="$POTENTIAL_FREETYPE_LIB_PATH"
33322  has_colon=`$ECHO $path | $GREP ^.:`
33323  new_path="$path"
33324  if test "x$has_colon" = x; then
33325    # Not in mixed or Windows style, start by that.
33326    new_path=`cmd //c echo $path`
33327  fi
33328
33329
33330  input_path="$new_path"
33331  # Check if we need to convert this using DOS-style short mode. If the path
33332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33333  # take no chances and rewrite it.
33334  # Note: m4 eats our [], so we need to use [ and ] instead.
33335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33336  if test "x$has_forbidden_chars" != x; then
33337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33339  fi
33340
33341
33342  windows_path="$new_path"
33343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33344    unix_path=`$CYGPATH -u "$windows_path"`
33345    new_path="$unix_path"
33346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33348    new_path="$unix_path"
33349  fi
33350
33351  if test "x$path" != "x$new_path"; then
33352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33355  fi
33356
33357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33359
33360  else
33361    # We're on a posix platform. Hooray! :)
33362    path="$POTENTIAL_FREETYPE_LIB_PATH"
33363    has_space=`$ECHO "$path" | $GREP " "`
33364    if test "x$has_space" != x; then
33365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33367      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33368    fi
33369
33370    # Use eval to expand a potential ~
33371    eval path="$path"
33372    if test ! -f "$path" && test ! -d "$path"; then
33373      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33374    fi
33375
33376    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33377  fi
33378
33379
33380    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33382$as_echo_n "checking for freetype includes... " >&6; }
33383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33384$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33385    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33387$as_echo_n "checking for freetype libraries... " >&6; }
33388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33389$as_echo "$FREETYPE_LIB_PATH" >&6; }
33390  fi
33391
33392          fi
33393
33394          if test "x$FOUND_FREETYPE" != xyes; then
33395            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33396            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33397
33398  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33399  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33400  METHOD="well-known location"
33401
33402  # First check if the files exists.
33403  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33404    # We found an arbitrary include file. That's a good sign.
33405    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33406$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33407    FOUND_FREETYPE=yes
33408
33409    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33410    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33411      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33412$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33413      FOUND_FREETYPE=no
33414    else
33415      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33416        # On Windows, we will need both .lib and .dll file.
33417        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33418          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33419$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33420          FOUND_FREETYPE=no
33421        fi
33422      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33423        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33424        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33425      fi
33426    fi
33427  fi
33428
33429  if test "x$FOUND_FREETYPE" = xyes; then
33430
33431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33432
33433  # Input might be given as Windows format, start by converting to
33434  # unix format.
33435  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33436  new_path=`$CYGPATH -u "$path"`
33437
33438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33441  # "foo.exe" is OK but "foo" is an error.
33442  #
33443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33444  # It is also a way to make sure we got the proper file name for the real test later on.
33445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33446  if test "x$test_shortpath" = x; then
33447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33448$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33449    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33450  fi
33451
33452  # Call helper function which possibly converts this using DOS-style short mode.
33453  # If so, the updated path is stored in $new_path.
33454
33455  input_path="$new_path"
33456  # Check if we need to convert this using DOS-style short mode. If the path
33457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33458  # take no chances and rewrite it.
33459  # Note: m4 eats our [], so we need to use [ and ] instead.
33460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33461  if test "x$has_forbidden_chars" != x; then
33462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33466      # Going to short mode and back again did indeed matter. Since short mode is
33467      # case insensitive, let's make it lowercase to improve readability.
33468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33469      # Now convert it back to Unix-stile (cygpath)
33470      input_path=`$CYGPATH -u "$shortmode_path"`
33471      new_path="$input_path"
33472    fi
33473  fi
33474
33475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33476  if test "x$test_cygdrive_prefix" = x; then
33477    # As a simple fix, exclude /usr/bin since it's not a real path.
33478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33480      # a path prefixed by /cygdrive for fixpath to work.
33481      new_path="$CYGWIN_ROOT_PATH$input_path"
33482    fi
33483  fi
33484
33485
33486  if test "x$path" != "x$new_path"; then
33487    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33489$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33490  fi
33491
33492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33493
33494  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33495  has_colon=`$ECHO $path | $GREP ^.:`
33496  new_path="$path"
33497  if test "x$has_colon" = x; then
33498    # Not in mixed or Windows style, start by that.
33499    new_path=`cmd //c echo $path`
33500  fi
33501
33502
33503  input_path="$new_path"
33504  # Check if we need to convert this using DOS-style short mode. If the path
33505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33506  # take no chances and rewrite it.
33507  # Note: m4 eats our [], so we need to use [ and ] instead.
33508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33509  if test "x$has_forbidden_chars" != x; then
33510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33512  fi
33513
33514
33515  windows_path="$new_path"
33516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33517    unix_path=`$CYGPATH -u "$windows_path"`
33518    new_path="$unix_path"
33519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33521    new_path="$unix_path"
33522  fi
33523
33524  if test "x$path" != "x$new_path"; then
33525    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33527$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33528  fi
33529
33530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33532
33533  else
33534    # We're on a posix platform. Hooray! :)
33535    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33536    has_space=`$ECHO "$path" | $GREP " "`
33537    if test "x$has_space" != x; then
33538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33539$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33540      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33541    fi
33542
33543    # Use eval to expand a potential ~
33544    eval path="$path"
33545    if test ! -f "$path" && test ! -d "$path"; then
33546      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33547    fi
33548
33549    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33550  fi
33551
33552
33553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33554
33555  # Input might be given as Windows format, start by converting to
33556  # unix format.
33557  path="$POTENTIAL_FREETYPE_LIB_PATH"
33558  new_path=`$CYGPATH -u "$path"`
33559
33560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33563  # "foo.exe" is OK but "foo" is an error.
33564  #
33565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33566  # It is also a way to make sure we got the proper file name for the real test later on.
33567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33568  if test "x$test_shortpath" = x; then
33569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33571    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33572  fi
33573
33574  # Call helper function which possibly converts this using DOS-style short mode.
33575  # If so, the updated path is stored in $new_path.
33576
33577  input_path="$new_path"
33578  # Check if we need to convert this using DOS-style short mode. If the path
33579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33580  # take no chances and rewrite it.
33581  # Note: m4 eats our [], so we need to use [ and ] instead.
33582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33583  if test "x$has_forbidden_chars" != x; then
33584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33588      # Going to short mode and back again did indeed matter. Since short mode is
33589      # case insensitive, let's make it lowercase to improve readability.
33590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33591      # Now convert it back to Unix-stile (cygpath)
33592      input_path=`$CYGPATH -u "$shortmode_path"`
33593      new_path="$input_path"
33594    fi
33595  fi
33596
33597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33598  if test "x$test_cygdrive_prefix" = x; then
33599    # As a simple fix, exclude /usr/bin since it's not a real path.
33600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33602      # a path prefixed by /cygdrive for fixpath to work.
33603      new_path="$CYGWIN_ROOT_PATH$input_path"
33604    fi
33605  fi
33606
33607
33608  if test "x$path" != "x$new_path"; then
33609    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33612  fi
33613
33614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33615
33616  path="$POTENTIAL_FREETYPE_LIB_PATH"
33617  has_colon=`$ECHO $path | $GREP ^.:`
33618  new_path="$path"
33619  if test "x$has_colon" = x; then
33620    # Not in mixed or Windows style, start by that.
33621    new_path=`cmd //c echo $path`
33622  fi
33623
33624
33625  input_path="$new_path"
33626  # Check if we need to convert this using DOS-style short mode. If the path
33627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33628  # take no chances and rewrite it.
33629  # Note: m4 eats our [], so we need to use [ and ] instead.
33630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33631  if test "x$has_forbidden_chars" != x; then
33632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33634  fi
33635
33636
33637  windows_path="$new_path"
33638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33639    unix_path=`$CYGPATH -u "$windows_path"`
33640    new_path="$unix_path"
33641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33643    new_path="$unix_path"
33644  fi
33645
33646  if test "x$path" != "x$new_path"; then
33647    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33650  fi
33651
33652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33654
33655  else
33656    # We're on a posix platform. Hooray! :)
33657    path="$POTENTIAL_FREETYPE_LIB_PATH"
33658    has_space=`$ECHO "$path" | $GREP " "`
33659    if test "x$has_space" != x; then
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33662      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33663    fi
33664
33665    # Use eval to expand a potential ~
33666    eval path="$path"
33667    if test ! -f "$path" && test ! -d "$path"; then
33668      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33669    fi
33670
33671    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33672  fi
33673
33674
33675    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33677$as_echo_n "checking for freetype includes... " >&6; }
33678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33679$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33680    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33682$as_echo_n "checking for freetype libraries... " >&6; }
33683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33684$as_echo "$FREETYPE_LIB_PATH" >&6; }
33685  fi
33686
33687            else
33688
33689  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33690  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33691  METHOD="well-known location"
33692
33693  # First check if the files exists.
33694  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33695    # We found an arbitrary include file. That's a good sign.
33696    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33697$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33698    FOUND_FREETYPE=yes
33699
33700    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33701    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33702      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33703$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33704      FOUND_FREETYPE=no
33705    else
33706      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33707        # On Windows, we will need both .lib and .dll file.
33708        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33709          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33710$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33711          FOUND_FREETYPE=no
33712        fi
33713      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33714        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33715        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33716      fi
33717    fi
33718  fi
33719
33720  if test "x$FOUND_FREETYPE" = xyes; then
33721
33722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33723
33724  # Input might be given as Windows format, start by converting to
33725  # unix format.
33726  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33727  new_path=`$CYGPATH -u "$path"`
33728
33729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33732  # "foo.exe" is OK but "foo" is an error.
33733  #
33734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33735  # It is also a way to make sure we got the proper file name for the real test later on.
33736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33737  if test "x$test_shortpath" = x; then
33738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33740    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33741  fi
33742
33743  # Call helper function which possibly converts this using DOS-style short mode.
33744  # If so, the updated path is stored in $new_path.
33745
33746  input_path="$new_path"
33747  # Check if we need to convert this using DOS-style short mode. If the path
33748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33749  # take no chances and rewrite it.
33750  # Note: m4 eats our [], so we need to use [ and ] instead.
33751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33752  if test "x$has_forbidden_chars" != x; then
33753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33757      # Going to short mode and back again did indeed matter. Since short mode is
33758      # case insensitive, let's make it lowercase to improve readability.
33759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33760      # Now convert it back to Unix-stile (cygpath)
33761      input_path=`$CYGPATH -u "$shortmode_path"`
33762      new_path="$input_path"
33763    fi
33764  fi
33765
33766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33767  if test "x$test_cygdrive_prefix" = x; then
33768    # As a simple fix, exclude /usr/bin since it's not a real path.
33769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33771      # a path prefixed by /cygdrive for fixpath to work.
33772      new_path="$CYGWIN_ROOT_PATH$input_path"
33773    fi
33774  fi
33775
33776
33777  if test "x$path" != "x$new_path"; then
33778    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33780$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33781  fi
33782
33783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33784
33785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33786  has_colon=`$ECHO $path | $GREP ^.:`
33787  new_path="$path"
33788  if test "x$has_colon" = x; then
33789    # Not in mixed or Windows style, start by that.
33790    new_path=`cmd //c echo $path`
33791  fi
33792
33793
33794  input_path="$new_path"
33795  # Check if we need to convert this using DOS-style short mode. If the path
33796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33797  # take no chances and rewrite it.
33798  # Note: m4 eats our [], so we need to use [ and ] instead.
33799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33800  if test "x$has_forbidden_chars" != x; then
33801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33803  fi
33804
33805
33806  windows_path="$new_path"
33807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33808    unix_path=`$CYGPATH -u "$windows_path"`
33809    new_path="$unix_path"
33810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33812    new_path="$unix_path"
33813  fi
33814
33815  if test "x$path" != "x$new_path"; then
33816    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33818$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33819  fi
33820
33821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33823
33824  else
33825    # We're on a posix platform. Hooray! :)
33826    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33827    has_space=`$ECHO "$path" | $GREP " "`
33828    if test "x$has_space" != x; then
33829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33831      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33832    fi
33833
33834    # Use eval to expand a potential ~
33835    eval path="$path"
33836    if test ! -f "$path" && test ! -d "$path"; then
33837      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33838    fi
33839
33840    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33841  fi
33842
33843
33844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33845
33846  # Input might be given as Windows format, start by converting to
33847  # unix format.
33848  path="$POTENTIAL_FREETYPE_LIB_PATH"
33849  new_path=`$CYGPATH -u "$path"`
33850
33851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33854  # "foo.exe" is OK but "foo" is an error.
33855  #
33856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33857  # It is also a way to make sure we got the proper file name for the real test later on.
33858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33859  if test "x$test_shortpath" = x; then
33860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33863  fi
33864
33865  # Call helper function which possibly converts this using DOS-style short mode.
33866  # If so, the updated path is stored in $new_path.
33867
33868  input_path="$new_path"
33869  # Check if we need to convert this using DOS-style short mode. If the path
33870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33871  # take no chances and rewrite it.
33872  # Note: m4 eats our [], so we need to use [ and ] instead.
33873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33874  if test "x$has_forbidden_chars" != x; then
33875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33879      # Going to short mode and back again did indeed matter. Since short mode is
33880      # case insensitive, let's make it lowercase to improve readability.
33881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33882      # Now convert it back to Unix-stile (cygpath)
33883      input_path=`$CYGPATH -u "$shortmode_path"`
33884      new_path="$input_path"
33885    fi
33886  fi
33887
33888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33889  if test "x$test_cygdrive_prefix" = x; then
33890    # As a simple fix, exclude /usr/bin since it's not a real path.
33891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33893      # a path prefixed by /cygdrive for fixpath to work.
33894      new_path="$CYGWIN_ROOT_PATH$input_path"
33895    fi
33896  fi
33897
33898
33899  if test "x$path" != "x$new_path"; then
33900    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33903  fi
33904
33905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33906
33907  path="$POTENTIAL_FREETYPE_LIB_PATH"
33908  has_colon=`$ECHO $path | $GREP ^.:`
33909  new_path="$path"
33910  if test "x$has_colon" = x; then
33911    # Not in mixed or Windows style, start by that.
33912    new_path=`cmd //c echo $path`
33913  fi
33914
33915
33916  input_path="$new_path"
33917  # Check if we need to convert this using DOS-style short mode. If the path
33918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33919  # take no chances and rewrite it.
33920  # Note: m4 eats our [], so we need to use [ and ] instead.
33921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33922  if test "x$has_forbidden_chars" != x; then
33923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33925  fi
33926
33927
33928  windows_path="$new_path"
33929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33930    unix_path=`$CYGPATH -u "$windows_path"`
33931    new_path="$unix_path"
33932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33934    new_path="$unix_path"
33935  fi
33936
33937  if test "x$path" != "x$new_path"; then
33938    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33941  fi
33942
33943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33945
33946  else
33947    # We're on a posix platform. Hooray! :)
33948    path="$POTENTIAL_FREETYPE_LIB_PATH"
33949    has_space=`$ECHO "$path" | $GREP " "`
33950    if test "x$has_space" != x; then
33951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33954    fi
33955
33956    # Use eval to expand a potential ~
33957    eval path="$path"
33958    if test ! -f "$path" && test ! -d "$path"; then
33959      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33960    fi
33961
33962    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33963  fi
33964
33965
33966    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33968$as_echo_n "checking for freetype includes... " >&6; }
33969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33970$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33971    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33973$as_echo_n "checking for freetype libraries... " >&6; }
33974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33975$as_echo "$FREETYPE_LIB_PATH" >&6; }
33976  fi
33977
33978              if test "x$FOUND_FREETYPE" != xyes; then
33979
33980  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33981  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33982  METHOD="well-known location"
33983
33984  # First check if the files exists.
33985  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33986    # We found an arbitrary include file. That's a good sign.
33987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33988$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33989    FOUND_FREETYPE=yes
33990
33991    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33992    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33993      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33994$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33995      FOUND_FREETYPE=no
33996    else
33997      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33998        # On Windows, we will need both .lib and .dll file.
33999        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
34000          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
34001$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
34002          FOUND_FREETYPE=no
34003        fi
34004      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
34005        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
34006        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
34007      fi
34008    fi
34009  fi
34010
34011  if test "x$FOUND_FREETYPE" = xyes; then
34012
34013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34014
34015  # Input might be given as Windows format, start by converting to
34016  # unix format.
34017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34018  new_path=`$CYGPATH -u "$path"`
34019
34020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34023  # "foo.exe" is OK but "foo" is an error.
34024  #
34025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34026  # It is also a way to make sure we got the proper file name for the real test later on.
34027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34028  if test "x$test_shortpath" = x; then
34029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34031    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
34032  fi
34033
34034  # Call helper function which possibly converts this using DOS-style short mode.
34035  # If so, the updated path is stored in $new_path.
34036
34037  input_path="$new_path"
34038  # Check if we need to convert this using DOS-style short mode. If the path
34039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34040  # take no chances and rewrite it.
34041  # Note: m4 eats our [], so we need to use [ and ] instead.
34042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34043  if test "x$has_forbidden_chars" != x; then
34044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34048      # Going to short mode and back again did indeed matter. Since short mode is
34049      # case insensitive, let's make it lowercase to improve readability.
34050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34051      # Now convert it back to Unix-stile (cygpath)
34052      input_path=`$CYGPATH -u "$shortmode_path"`
34053      new_path="$input_path"
34054    fi
34055  fi
34056
34057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34058  if test "x$test_cygdrive_prefix" = x; then
34059    # As a simple fix, exclude /usr/bin since it's not a real path.
34060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34062      # a path prefixed by /cygdrive for fixpath to work.
34063      new_path="$CYGWIN_ROOT_PATH$input_path"
34064    fi
34065  fi
34066
34067
34068  if test "x$path" != "x$new_path"; then
34069    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34071$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34072  fi
34073
34074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34075
34076  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34077  has_colon=`$ECHO $path | $GREP ^.:`
34078  new_path="$path"
34079  if test "x$has_colon" = x; then
34080    # Not in mixed or Windows style, start by that.
34081    new_path=`cmd //c echo $path`
34082  fi
34083
34084
34085  input_path="$new_path"
34086  # Check if we need to convert this using DOS-style short mode. If the path
34087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34088  # take no chances and rewrite it.
34089  # Note: m4 eats our [], so we need to use [ and ] instead.
34090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34091  if test "x$has_forbidden_chars" != x; then
34092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34094  fi
34095
34096
34097  windows_path="$new_path"
34098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34099    unix_path=`$CYGPATH -u "$windows_path"`
34100    new_path="$unix_path"
34101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34103    new_path="$unix_path"
34104  fi
34105
34106  if test "x$path" != "x$new_path"; then
34107    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34110  fi
34111
34112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34114
34115  else
34116    # We're on a posix platform. Hooray! :)
34117    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34118    has_space=`$ECHO "$path" | $GREP " "`
34119    if test "x$has_space" != x; then
34120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34122      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34123    fi
34124
34125    # Use eval to expand a potential ~
34126    eval path="$path"
34127    if test ! -f "$path" && test ! -d "$path"; then
34128      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34129    fi
34130
34131    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34132  fi
34133
34134
34135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34136
34137  # Input might be given as Windows format, start by converting to
34138  # unix format.
34139  path="$POTENTIAL_FREETYPE_LIB_PATH"
34140  new_path=`$CYGPATH -u "$path"`
34141
34142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34145  # "foo.exe" is OK but "foo" is an error.
34146  #
34147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34148  # It is also a way to make sure we got the proper file name for the real test later on.
34149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34150  if test "x$test_shortpath" = x; then
34151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34153    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34154  fi
34155
34156  # Call helper function which possibly converts this using DOS-style short mode.
34157  # If so, the updated path is stored in $new_path.
34158
34159  input_path="$new_path"
34160  # Check if we need to convert this using DOS-style short mode. If the path
34161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34162  # take no chances and rewrite it.
34163  # Note: m4 eats our [], so we need to use [ and ] instead.
34164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34165  if test "x$has_forbidden_chars" != x; then
34166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34170      # Going to short mode and back again did indeed matter. Since short mode is
34171      # case insensitive, let's make it lowercase to improve readability.
34172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34173      # Now convert it back to Unix-stile (cygpath)
34174      input_path=`$CYGPATH -u "$shortmode_path"`
34175      new_path="$input_path"
34176    fi
34177  fi
34178
34179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34180  if test "x$test_cygdrive_prefix" = x; then
34181    # As a simple fix, exclude /usr/bin since it's not a real path.
34182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34184      # a path prefixed by /cygdrive for fixpath to work.
34185      new_path="$CYGWIN_ROOT_PATH$input_path"
34186    fi
34187  fi
34188
34189
34190  if test "x$path" != "x$new_path"; then
34191    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34194  fi
34195
34196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34197
34198  path="$POTENTIAL_FREETYPE_LIB_PATH"
34199  has_colon=`$ECHO $path | $GREP ^.:`
34200  new_path="$path"
34201  if test "x$has_colon" = x; then
34202    # Not in mixed or Windows style, start by that.
34203    new_path=`cmd //c echo $path`
34204  fi
34205
34206
34207  input_path="$new_path"
34208  # Check if we need to convert this using DOS-style short mode. If the path
34209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34210  # take no chances and rewrite it.
34211  # Note: m4 eats our [], so we need to use [ and ] instead.
34212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34213  if test "x$has_forbidden_chars" != x; then
34214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34216  fi
34217
34218
34219  windows_path="$new_path"
34220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34221    unix_path=`$CYGPATH -u "$windows_path"`
34222    new_path="$unix_path"
34223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34225    new_path="$unix_path"
34226  fi
34227
34228  if test "x$path" != "x$new_path"; then
34229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34232  fi
34233
34234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34236
34237  else
34238    # We're on a posix platform. Hooray! :)
34239    path="$POTENTIAL_FREETYPE_LIB_PATH"
34240    has_space=`$ECHO "$path" | $GREP " "`
34241    if test "x$has_space" != x; then
34242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34245    fi
34246
34247    # Use eval to expand a potential ~
34248    eval path="$path"
34249    if test ! -f "$path" && test ! -d "$path"; then
34250      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34251    fi
34252
34253    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34254  fi
34255
34256
34257    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34259$as_echo_n "checking for freetype includes... " >&6; }
34260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34261$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34262    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34264$as_echo_n "checking for freetype libraries... " >&6; }
34265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34266$as_echo "$FREETYPE_LIB_PATH" >&6; }
34267  fi
34268
34269              fi
34270            fi
34271          fi
34272        fi
34273      fi # end check in well-known locations
34274
34275      if test "x$FOUND_FREETYPE" != xyes; then
34276
34277  # Print a helpful message on how to acquire the necessary build dependency.
34278  # freetype is the help tag: freetype, cups, pulse, alsa etc
34279  MISSING_DEPENDENCY=freetype
34280
34281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34282    cygwin_help $MISSING_DEPENDENCY
34283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34284    msys_help $MISSING_DEPENDENCY
34285  else
34286    PKGHANDLER_COMMAND=
34287
34288    case $PKGHANDLER in
34289      apt-get)
34290        apt_help     $MISSING_DEPENDENCY ;;
34291      yum)
34292        yum_help     $MISSING_DEPENDENCY ;;
34293      port)
34294        port_help    $MISSING_DEPENDENCY ;;
34295      pkgutil)
34296        pkgutil_help $MISSING_DEPENDENCY ;;
34297      pkgadd)
34298        pkgadd_help  $MISSING_DEPENDENCY ;;
34299    esac
34300
34301    if test "x$PKGHANDLER_COMMAND" != x; then
34302      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34303    fi
34304  fi
34305
34306        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34307      fi
34308    fi # end user specified settings
34309
34310    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34311    if test "x$FREETYPE_CFLAGS" = x; then
34312
34313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34314
34315  # Input might be given as Windows format, start by converting to
34316  # unix format.
34317  path="$FREETYPE_INCLUDE_PATH"
34318  new_path=`$CYGPATH -u "$path"`
34319
34320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34323  # "foo.exe" is OK but "foo" is an error.
34324  #
34325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34326  # It is also a way to make sure we got the proper file name for the real test later on.
34327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34328  if test "x$test_shortpath" = x; then
34329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34330$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34331    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34332  fi
34333
34334  # Call helper function which possibly converts this using DOS-style short mode.
34335  # If so, the updated path is stored in $new_path.
34336
34337  input_path="$new_path"
34338  # Check if we need to convert this using DOS-style short mode. If the path
34339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34340  # take no chances and rewrite it.
34341  # Note: m4 eats our [], so we need to use [ and ] instead.
34342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34343  if test "x$has_forbidden_chars" != x; then
34344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34348      # Going to short mode and back again did indeed matter. Since short mode is
34349      # case insensitive, let's make it lowercase to improve readability.
34350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34351      # Now convert it back to Unix-stile (cygpath)
34352      input_path=`$CYGPATH -u "$shortmode_path"`
34353      new_path="$input_path"
34354    fi
34355  fi
34356
34357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34358  if test "x$test_cygdrive_prefix" = x; then
34359    # As a simple fix, exclude /usr/bin since it's not a real path.
34360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34362      # a path prefixed by /cygdrive for fixpath to work.
34363      new_path="$CYGWIN_ROOT_PATH$input_path"
34364    fi
34365  fi
34366
34367
34368  if test "x$path" != "x$new_path"; then
34369    FREETYPE_INCLUDE_PATH="$new_path"
34370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34371$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34372  fi
34373
34374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34375
34376  path="$FREETYPE_INCLUDE_PATH"
34377  has_colon=`$ECHO $path | $GREP ^.:`
34378  new_path="$path"
34379  if test "x$has_colon" = x; then
34380    # Not in mixed or Windows style, start by that.
34381    new_path=`cmd //c echo $path`
34382  fi
34383
34384
34385  input_path="$new_path"
34386  # Check if we need to convert this using DOS-style short mode. If the path
34387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34388  # take no chances and rewrite it.
34389  # Note: m4 eats our [], so we need to use [ and ] instead.
34390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34391  if test "x$has_forbidden_chars" != x; then
34392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34394  fi
34395
34396
34397  windows_path="$new_path"
34398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34399    unix_path=`$CYGPATH -u "$windows_path"`
34400    new_path="$unix_path"
34401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34403    new_path="$unix_path"
34404  fi
34405
34406  if test "x$path" != "x$new_path"; then
34407    FREETYPE_INCLUDE_PATH="$new_path"
34408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34409$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34410  fi
34411
34412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34414
34415  else
34416    # We're on a posix platform. Hooray! :)
34417    path="$FREETYPE_INCLUDE_PATH"
34418    has_space=`$ECHO "$path" | $GREP " "`
34419    if test "x$has_space" != x; then
34420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34421$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34422      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34423    fi
34424
34425    # Use eval to expand a potential ~
34426    eval path="$path"
34427    if test ! -f "$path" && test ! -d "$path"; then
34428      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34429    fi
34430
34431    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34432  fi
34433
34434      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34435        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34436      else
34437        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34438      fi
34439    fi
34440
34441    if test "x$FREETYPE_LIBS" = x; then
34442
34443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34444
34445  # Input might be given as Windows format, start by converting to
34446  # unix format.
34447  path="$FREETYPE_LIB_PATH"
34448  new_path=`$CYGPATH -u "$path"`
34449
34450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34453  # "foo.exe" is OK but "foo" is an error.
34454  #
34455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34456  # It is also a way to make sure we got the proper file name for the real test later on.
34457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34458  if test "x$test_shortpath" = x; then
34459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34460$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34461    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34462  fi
34463
34464  # Call helper function which possibly converts this using DOS-style short mode.
34465  # If so, the updated path is stored in $new_path.
34466
34467  input_path="$new_path"
34468  # Check if we need to convert this using DOS-style short mode. If the path
34469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34470  # take no chances and rewrite it.
34471  # Note: m4 eats our [], so we need to use [ and ] instead.
34472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34473  if test "x$has_forbidden_chars" != x; then
34474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34478      # Going to short mode and back again did indeed matter. Since short mode is
34479      # case insensitive, let's make it lowercase to improve readability.
34480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34481      # Now convert it back to Unix-stile (cygpath)
34482      input_path=`$CYGPATH -u "$shortmode_path"`
34483      new_path="$input_path"
34484    fi
34485  fi
34486
34487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34488  if test "x$test_cygdrive_prefix" = x; then
34489    # As a simple fix, exclude /usr/bin since it's not a real path.
34490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34492      # a path prefixed by /cygdrive for fixpath to work.
34493      new_path="$CYGWIN_ROOT_PATH$input_path"
34494    fi
34495  fi
34496
34497
34498  if test "x$path" != "x$new_path"; then
34499    FREETYPE_LIB_PATH="$new_path"
34500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34501$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34502  fi
34503
34504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34505
34506  path="$FREETYPE_LIB_PATH"
34507  has_colon=`$ECHO $path | $GREP ^.:`
34508  new_path="$path"
34509  if test "x$has_colon" = x; then
34510    # Not in mixed or Windows style, start by that.
34511    new_path=`cmd //c echo $path`
34512  fi
34513
34514
34515  input_path="$new_path"
34516  # Check if we need to convert this using DOS-style short mode. If the path
34517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34518  # take no chances and rewrite it.
34519  # Note: m4 eats our [], so we need to use [ and ] instead.
34520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34521  if test "x$has_forbidden_chars" != x; then
34522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34524  fi
34525
34526
34527  windows_path="$new_path"
34528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34529    unix_path=`$CYGPATH -u "$windows_path"`
34530    new_path="$unix_path"
34531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34533    new_path="$unix_path"
34534  fi
34535
34536  if test "x$path" != "x$new_path"; then
34537    FREETYPE_LIB_PATH="$new_path"
34538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34539$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34540  fi
34541
34542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34544
34545  else
34546    # We're on a posix platform. Hooray! :)
34547    path="$FREETYPE_LIB_PATH"
34548    has_space=`$ECHO "$path" | $GREP " "`
34549    if test "x$has_space" != x; then
34550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34551$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34552      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34553    fi
34554
34555    # Use eval to expand a potential ~
34556    eval path="$path"
34557    if test ! -f "$path" && test ! -d "$path"; then
34558      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34559    fi
34560
34561    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34562  fi
34563
34564      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34565        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34566      else
34567        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34568      fi
34569    fi
34570
34571    # Try to compile it
34572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34573$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34574    ac_ext=cpp
34575ac_cpp='$CXXCPP $CPPFLAGS'
34576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34579
34580    PREV_CXXCFLAGS="$CXXFLAGS"
34581    PREV_LIBS="$LIBS"
34582    PREV_CXX="$CXX"
34583    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34584    LIBS="$LIBS $FREETYPE_LIBS"
34585    CXX="$FIXPATH $CXX"
34586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34587/* end confdefs.h.  */
34588
34589          #include<ft2build.h>
34590          #include FT_FREETYPE_H
34591          int main () {
34592            FT_Init_FreeType(NULL);
34593            return 0;
34594          }
34595
34596_ACEOF
34597if ac_fn_cxx_try_link "$LINENO"; then :
34598
34599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34600$as_echo "yes" >&6; }
34601
34602else
34603
34604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34605$as_echo "no" >&6; }
34606          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34607$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34608          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34609$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34610
34611
34612  # Print a helpful message on how to acquire the necessary build dependency.
34613  # freetype is the help tag: freetype, cups, pulse, alsa etc
34614  MISSING_DEPENDENCY=freetype
34615
34616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34617    cygwin_help $MISSING_DEPENDENCY
34618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34619    msys_help $MISSING_DEPENDENCY
34620  else
34621    PKGHANDLER_COMMAND=
34622
34623    case $PKGHANDLER in
34624      apt-get)
34625        apt_help     $MISSING_DEPENDENCY ;;
34626      yum)
34627        yum_help     $MISSING_DEPENDENCY ;;
34628      port)
34629        port_help    $MISSING_DEPENDENCY ;;
34630      pkgutil)
34631        pkgutil_help $MISSING_DEPENDENCY ;;
34632      pkgadd)
34633        pkgadd_help  $MISSING_DEPENDENCY ;;
34634    esac
34635
34636    if test "x$PKGHANDLER_COMMAND" != x; then
34637      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34638    fi
34639  fi
34640
34641
34642          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34643
34644
34645fi
34646rm -f core conftest.err conftest.$ac_objext \
34647    conftest$ac_exeext conftest.$ac_ext
34648    CXXCFLAGS="$PREV_CXXFLAGS"
34649    LIBS="$PREV_LIBS"
34650    CXX="$PREV_CXX"
34651    ac_ext=cpp
34652ac_cpp='$CXXCPP $CPPFLAGS'
34653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34656
34657
34658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34659$as_echo_n "checking if we should bundle freetype... " >&6; }
34660    if test "x$BUNDLE_FREETYPE" = xyes; then
34661      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34662    fi
34663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34664$as_echo "$BUNDLE_FREETYPE" >&6; }
34665
34666  fi # end freetype needed
34667
34668
34669
34670
34671
34672
34673
34674  ###############################################################################
34675  #
34676  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34677  #
34678
34679# Check whether --with-alsa was given.
34680if test "${with_alsa+set}" = set; then :
34681  withval=$with_alsa;
34682fi
34683
34684
34685# Check whether --with-alsa-include was given.
34686if test "${with_alsa_include+set}" = set; then :
34687  withval=$with_alsa_include;
34688fi
34689
34690
34691# Check whether --with-alsa-lib was given.
34692if test "${with_alsa_lib+set}" = set; then :
34693  withval=$with_alsa_lib;
34694fi
34695
34696
34697  if test "x$ALSA_NOT_NEEDED" = xyes; then
34698    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34699      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34700$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34701    fi
34702    ALSA_CFLAGS=
34703    ALSA_LIBS=
34704  else
34705    ALSA_FOUND=no
34706
34707    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34708      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34709    fi
34710
34711    if test "x${with_alsa}" != x; then
34712      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34713      ALSA_CFLAGS="-I${with_alsa}/include"
34714      ALSA_FOUND=yes
34715    fi
34716    if test "x${with_alsa_include}" != x; then
34717      ALSA_CFLAGS="-I${with_alsa_include}"
34718      ALSA_FOUND=yes
34719    fi
34720    if test "x${with_alsa_lib}" != x; then
34721      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34722      ALSA_FOUND=yes
34723    fi
34724    if test "x$ALSA_FOUND" = xno; then
34725
34726
34727  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34728    # Source the builddeps file again, to make sure it uses the latest variables!
34729    . $builddepsfile
34730    # Look for a target and build machine specific resource!
34731    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34732    if test "x$resource" = x; then
34733      # Ok, lets instead look for a target specific resource
34734      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34735    fi
34736    if test "x$resource" = x; then
34737      # Ok, lets instead look for a build specific resource
34738      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34739    fi
34740    if test "x$resource" = x; then
34741      # Ok, lets instead look for a generic resource
34742      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34743      resource=${builddep_alsa}
34744    fi
34745    if test "x$resource" != x; then
34746      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34747$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34748      # If the resource in the builddeps.conf file is an existing directory,
34749      # for example /java/linux/cups
34750      if test -d ${resource}; then
34751        depdir=${resource}
34752      else
34753
34754  # alsa is for example mymodule
34755  # $resource is for example libs/general/libmymod_1_2_3.zip
34756  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34757  # $with_builddeps_dir is for example /localhome/builddeps
34758  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34759  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34760  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34761  filename=`basename $resource`
34762  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34763  filebase=${filename%%.*}
34764  extension=${filename#*.}
34765  installdir=$with_builddeps_dir/$filebase
34766  if test ! -f $installdir/$filename.unpacked; then
34767    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34768$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34769    if test ! -d $installdir; then
34770      mkdir -p $installdir
34771    fi
34772    if test ! -d $installdir; then
34773      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34774    fi
34775    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34776    touch $tmpfile
34777    if test ! -f $tmpfile; then
34778      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34779    fi
34780
34781  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34782  # $tmpfile is the local file name for the downloaded file.
34783  VALID_TOOL=no
34784  if test "x$BDEPS_FTP" = xwget; then
34785    VALID_TOOL=yes
34786    wget -O $tmpfile $with_builddeps_server/$resource
34787  fi
34788  if test "x$BDEPS_FTP" = xlftp; then
34789    VALID_TOOL=yes
34790    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34791  fi
34792  if test "x$BDEPS_FTP" = xftp; then
34793    VALID_TOOL=yes
34794    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34795    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34796    FTPUSERPWD=${FTPSERVER%%@*}
34797    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34798      FTPUSER=${userpwd%%:*}
34799      FTPPWD=${userpwd#*@}
34800      FTPSERVER=${FTPSERVER#*@}
34801    else
34802      FTPUSER=ftp
34803      FTPPWD=ftp
34804    fi
34805    # the "pass" command does not work on some
34806    # ftp clients (read ftp.exe) but if it works,
34807    # passive mode is better!
34808    ( \
34809        echo "user $FTPUSER $FTPPWD"        ; \
34810        echo "pass"                         ; \
34811        echo "bin"                          ; \
34812        echo "get $FTPPATH $tmpfile"              ; \
34813    ) | ftp -in $FTPSERVER
34814  fi
34815  if test "x$VALID_TOOL" != xyes; then
34816    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34817  fi
34818
34819    mv $tmpfile $installdir/$filename
34820    if test ! -s $installdir/$filename; then
34821      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34822    fi
34823    case "$extension" in
34824      zip)  echo "Unzipping $installdir/$filename..."
34825        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34826        ;;
34827      tar.gz) echo "Untaring $installdir/$filename..."
34828        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34829        ;;
34830      tgz) echo "Untaring $installdir/$filename..."
34831        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34832        ;;
34833      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34834        ;;
34835    esac
34836  fi
34837  if test -f $installdir/$filename.unpacked; then
34838    depdir=$installdir
34839  fi
34840
34841      fi
34842      # Source the builddeps file again, because in the previous command, the depdir
34843      # was updated to point at the current build dependency install directory.
34844      . $builddepsfile
34845      # Now extract variables from the builddeps.conf files.
34846      theroot=${builddep_alsa_ROOT}
34847      thecflags=${builddep_alsa_CFLAGS}
34848      thelibs=${builddep_alsa_LIBS}
34849      if test "x$depdir" = x; then
34850        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34851      fi
34852      ALSA=$depdir
34853      if test "x$theroot" != x; then
34854        ALSA="$theroot"
34855      fi
34856      if test "x$thecflags" != x; then
34857        ALSA_CFLAGS="$thecflags"
34858      fi
34859      if test "x$thelibs" != x; then
34860        ALSA_LIBS="$thelibs"
34861      fi
34862      ALSA_FOUND=yes
34863      else ALSA_FOUND=no
34864
34865    fi
34866    else ALSA_FOUND=no
34867
34868  fi
34869
34870    fi
34871    if test "x$ALSA_FOUND" = xno; then
34872
34873pkg_failed=no
34874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34875$as_echo_n "checking for ALSA... " >&6; }
34876
34877if test -n "$ALSA_CFLAGS"; then
34878    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34879 elif test -n "$PKG_CONFIG"; then
34880    if test -n "$PKG_CONFIG" && \
34881    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34882  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34883  ac_status=$?
34884  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34885  test $ac_status = 0; }; then
34886  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34887else
34888  pkg_failed=yes
34889fi
34890 else
34891    pkg_failed=untried
34892fi
34893if test -n "$ALSA_LIBS"; then
34894    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34895 elif test -n "$PKG_CONFIG"; then
34896    if test -n "$PKG_CONFIG" && \
34897    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34898  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34899  ac_status=$?
34900  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34901  test $ac_status = 0; }; then
34902  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34903else
34904  pkg_failed=yes
34905fi
34906 else
34907    pkg_failed=untried
34908fi
34909
34910
34911
34912if test $pkg_failed = yes; then
34913
34914if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34915        _pkg_short_errors_supported=yes
34916else
34917        _pkg_short_errors_supported=no
34918fi
34919        if test $_pkg_short_errors_supported = yes; then
34920	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34921        else
34922	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34923        fi
34924	# Put the nasty error message in config.log where it belongs
34925	echo "$ALSA_PKG_ERRORS" >&5
34926
34927	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34928$as_echo "no" >&6; }
34929                ALSA_FOUND=no
34930elif test $pkg_failed = untried; then
34931	ALSA_FOUND=no
34932else
34933	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34934	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34936$as_echo "yes" >&6; }
34937	ALSA_FOUND=yes
34938fi
34939    fi
34940    if test "x$ALSA_FOUND" = xno; then
34941      for ac_header in alsa/asoundlib.h
34942do :
34943  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34944if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34945  cat >>confdefs.h <<_ACEOF
34946#define HAVE_ALSA_ASOUNDLIB_H 1
34947_ACEOF
34948
34949            ALSA_FOUND=yes
34950            ALSA_CFLAGS=-Iignoreme
34951            ALSA_LIBS=-lasound
34952            DEFAULT_ALSA=yes
34953
34954else
34955  ALSA_FOUND=no
34956fi
34957
34958done
34959
34960    fi
34961    if test "x$ALSA_FOUND" = xno; then
34962
34963  # Print a helpful message on how to acquire the necessary build dependency.
34964  # alsa is the help tag: freetype, cups, pulse, alsa etc
34965  MISSING_DEPENDENCY=alsa
34966
34967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34968    cygwin_help $MISSING_DEPENDENCY
34969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34970    msys_help $MISSING_DEPENDENCY
34971  else
34972    PKGHANDLER_COMMAND=
34973
34974    case $PKGHANDLER in
34975      apt-get)
34976        apt_help     $MISSING_DEPENDENCY ;;
34977      yum)
34978        yum_help     $MISSING_DEPENDENCY ;;
34979      port)
34980        port_help    $MISSING_DEPENDENCY ;;
34981      pkgutil)
34982        pkgutil_help $MISSING_DEPENDENCY ;;
34983      pkgadd)
34984        pkgadd_help  $MISSING_DEPENDENCY ;;
34985    esac
34986
34987    if test "x$PKGHANDLER_COMMAND" != x; then
34988      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34989    fi
34990  fi
34991
34992      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34993    fi
34994  fi
34995
34996
34997
34998
34999
35000
35001  ###############################################################################
35002  #
35003  # Check for the jpeg library
35004  #
35005
35006  USE_EXTERNAL_LIBJPEG=true
35007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
35008$as_echo_n "checking for main in -ljpeg... " >&6; }
35009if ${ac_cv_lib_jpeg_main+:} false; then :
35010  $as_echo_n "(cached) " >&6
35011else
35012  ac_check_lib_save_LIBS=$LIBS
35013LIBS="-ljpeg  $LIBS"
35014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35015/* end confdefs.h.  */
35016
35017
35018int
35019main ()
35020{
35021return main ();
35022  ;
35023  return 0;
35024}
35025_ACEOF
35026if ac_fn_cxx_try_link "$LINENO"; then :
35027  ac_cv_lib_jpeg_main=yes
35028else
35029  ac_cv_lib_jpeg_main=no
35030fi
35031rm -f core conftest.err conftest.$ac_objext \
35032    conftest$ac_exeext conftest.$ac_ext
35033LIBS=$ac_check_lib_save_LIBS
35034fi
35035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
35036$as_echo "$ac_cv_lib_jpeg_main" >&6; }
35037if test "x$ac_cv_lib_jpeg_main" = xyes; then :
35038  cat >>confdefs.h <<_ACEOF
35039#define HAVE_LIBJPEG 1
35040_ACEOF
35041
35042  LIBS="-ljpeg $LIBS"
35043
35044else
35045   USE_EXTERNAL_LIBJPEG=false
35046      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
35047$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
35048
35049fi
35050
35051
35052
35053  ###############################################################################
35054  #
35055  # Check for the gif library
35056  #
35057
35058
35059# Check whether --with-giflib was given.
35060if test "${with_giflib+set}" = set; then :
35061  withval=$with_giflib;
35062fi
35063
35064
35065
35066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
35067$as_echo_n "checking for which giflib to use... " >&6; }
35068
35069  # default is bundled
35070  DEFAULT_GIFLIB=bundled
35071
35072  #
35073  # if user didn't specify, use DEFAULT_GIFLIB
35074  #
35075  if test "x${with_giflib}" = "x"; then
35076    with_giflib=${DEFAULT_GIFLIB}
35077  fi
35078
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
35080$as_echo "${with_giflib}" >&6; }
35081
35082  if test "x${with_giflib}" = "xbundled"; then
35083    USE_EXTERNAL_LIBGIF=false
35084  elif test "x${with_giflib}" = "xsystem"; then
35085    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
35086if test "x$ac_cv_header_gif_lib_h" = xyes; then :
35087
35088else
35089   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
35090fi
35091
35092
35093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
35094$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
35095if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
35096  $as_echo_n "(cached) " >&6
35097else
35098  ac_check_lib_save_LIBS=$LIBS
35099LIBS="-lgif  $LIBS"
35100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35101/* end confdefs.h.  */
35102
35103/* Override any GCC internal prototype to avoid an error.
35104   Use char because int might match the return type of a GCC
35105   builtin and then its argument prototype would still apply.  */
35106#ifdef __cplusplus
35107extern "C"
35108#endif
35109char DGifGetCode ();
35110int
35111main ()
35112{
35113return DGifGetCode ();
35114  ;
35115  return 0;
35116}
35117_ACEOF
35118if ac_fn_cxx_try_link "$LINENO"; then :
35119  ac_cv_lib_gif_DGifGetCode=yes
35120else
35121  ac_cv_lib_gif_DGifGetCode=no
35122fi
35123rm -f core conftest.err conftest.$ac_objext \
35124    conftest$ac_exeext conftest.$ac_ext
35125LIBS=$ac_check_lib_save_LIBS
35126fi
35127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
35128$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
35129if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
35130  cat >>confdefs.h <<_ACEOF
35131#define HAVE_LIBGIF 1
35132_ACEOF
35133
35134  LIBS="-lgif $LIBS"
35135
35136else
35137   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
35138fi
35139
35140
35141    USE_EXTERNAL_LIBGIF=true
35142  else
35143    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
35144  fi
35145
35146
35147  ###############################################################################
35148  #
35149  # Check for the zlib library
35150  #
35151
35152
35153# Check whether --with-zlib was given.
35154if test "${with_zlib+set}" = set; then :
35155  withval=$with_zlib;
35156fi
35157
35158
35159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35160$as_echo_n "checking for compress in -lz... " >&6; }
35161if ${ac_cv_lib_z_compress+:} false; then :
35162  $as_echo_n "(cached) " >&6
35163else
35164  ac_check_lib_save_LIBS=$LIBS
35165LIBS="-lz  $LIBS"
35166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35167/* end confdefs.h.  */
35168
35169/* Override any GCC internal prototype to avoid an error.
35170   Use char because int might match the return type of a GCC
35171   builtin and then its argument prototype would still apply.  */
35172#ifdef __cplusplus
35173extern "C"
35174#endif
35175char compress ();
35176int
35177main ()
35178{
35179return compress ();
35180  ;
35181  return 0;
35182}
35183_ACEOF
35184if ac_fn_cxx_try_link "$LINENO"; then :
35185  ac_cv_lib_z_compress=yes
35186else
35187  ac_cv_lib_z_compress=no
35188fi
35189rm -f core conftest.err conftest.$ac_objext \
35190    conftest$ac_exeext conftest.$ac_ext
35191LIBS=$ac_check_lib_save_LIBS
35192fi
35193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35194$as_echo "$ac_cv_lib_z_compress" >&6; }
35195if test "x$ac_cv_lib_z_compress" = xyes; then :
35196   ZLIB_FOUND=yes
35197else
35198   ZLIB_FOUND=no
35199fi
35200
35201
35202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35203$as_echo_n "checking for which zlib to use... " >&6; }
35204
35205  DEFAULT_ZLIB=bundled
35206  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35207    #
35208    # On macosx default is system...on others default is
35209    #
35210    DEFAULT_ZLIB=system
35211  fi
35212
35213  if test "x${ZLIB_FOUND}" != "xyes"; then
35214    #
35215    # If we don't find any system...set default to bundled
35216    #
35217    DEFAULT_ZLIB=bundled
35218  fi
35219
35220  #
35221  # If user didn't specify, use DEFAULT_ZLIB
35222  #
35223  if test "x${with_zlib}" = "x"; then
35224    with_zlib=${DEFAULT_ZLIB}
35225  fi
35226
35227  if test "x${with_zlib}" = "xbundled"; then
35228    USE_EXTERNAL_LIBZ=false
35229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35230$as_echo "bundled" >&6; }
35231  elif test "x${with_zlib}" = "xsystem"; then
35232    if test "x${ZLIB_FOUND}" = "xyes"; then
35233      USE_EXTERNAL_LIBZ=true
35234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35235$as_echo "system" >&6; }
35236    else
35237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35238$as_echo "system not found" >&6; }
35239      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35240    fi
35241  else
35242    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35243  fi
35244
35245
35246
35247  ###############################################################################
35248  LIBZIP_CAN_USE_MMAP=true
35249
35250
35251
35252  ###############################################################################
35253  #
35254  # Check if altzone exists in time.h
35255  #
35256
35257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35258/* end confdefs.h.  */
35259#include <time.h>
35260int
35261main ()
35262{
35263return (int)altzone;
35264  ;
35265  return 0;
35266}
35267_ACEOF
35268if ac_fn_cxx_try_link "$LINENO"; then :
35269  has_altzone=yes
35270else
35271  has_altzone=no
35272fi
35273rm -f core conftest.err conftest.$ac_objext \
35274    conftest$ac_exeext conftest.$ac_ext
35275  if test "x$has_altzone" = xyes; then
35276
35277$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35278
35279  fi
35280
35281  ###############################################################################
35282  #
35283  # Check the maths library
35284  #
35285
35286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35287$as_echo_n "checking for cos in -lm... " >&6; }
35288if ${ac_cv_lib_m_cos+:} false; then :
35289  $as_echo_n "(cached) " >&6
35290else
35291  ac_check_lib_save_LIBS=$LIBS
35292LIBS="-lm  $LIBS"
35293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35294/* end confdefs.h.  */
35295
35296/* Override any GCC internal prototype to avoid an error.
35297   Use char because int might match the return type of a GCC
35298   builtin and then its argument prototype would still apply.  */
35299#ifdef __cplusplus
35300extern "C"
35301#endif
35302char cos ();
35303int
35304main ()
35305{
35306return cos ();
35307  ;
35308  return 0;
35309}
35310_ACEOF
35311if ac_fn_cxx_try_link "$LINENO"; then :
35312  ac_cv_lib_m_cos=yes
35313else
35314  ac_cv_lib_m_cos=no
35315fi
35316rm -f core conftest.err conftest.$ac_objext \
35317    conftest$ac_exeext conftest.$ac_ext
35318LIBS=$ac_check_lib_save_LIBS
35319fi
35320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35321$as_echo "$ac_cv_lib_m_cos" >&6; }
35322if test "x$ac_cv_lib_m_cos" = xyes; then :
35323  cat >>confdefs.h <<_ACEOF
35324#define HAVE_LIBM 1
35325_ACEOF
35326
35327  LIBS="-lm $LIBS"
35328
35329else
35330
35331        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35332$as_echo "$as_me: Maths library was not found" >&6;}
35333
35334
35335fi
35336
35337
35338
35339  ###############################################################################
35340  #
35341  # Check for libdl.so
35342
35343  save_LIBS="$LIBS"
35344  LIBS=""
35345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35346$as_echo_n "checking for dlopen in -ldl... " >&6; }
35347if ${ac_cv_lib_dl_dlopen+:} false; then :
35348  $as_echo_n "(cached) " >&6
35349else
35350  ac_check_lib_save_LIBS=$LIBS
35351LIBS="-ldl  $LIBS"
35352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35353/* end confdefs.h.  */
35354
35355/* Override any GCC internal prototype to avoid an error.
35356   Use char because int might match the return type of a GCC
35357   builtin and then its argument prototype would still apply.  */
35358#ifdef __cplusplus
35359extern "C"
35360#endif
35361char dlopen ();
35362int
35363main ()
35364{
35365return dlopen ();
35366  ;
35367  return 0;
35368}
35369_ACEOF
35370if ac_fn_cxx_try_link "$LINENO"; then :
35371  ac_cv_lib_dl_dlopen=yes
35372else
35373  ac_cv_lib_dl_dlopen=no
35374fi
35375rm -f core conftest.err conftest.$ac_objext \
35376    conftest$ac_exeext conftest.$ac_ext
35377LIBS=$ac_check_lib_save_LIBS
35378fi
35379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35380$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35381if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35382  cat >>confdefs.h <<_ACEOF
35383#define HAVE_LIBDL 1
35384_ACEOF
35385
35386  LIBS="-ldl $LIBS"
35387
35388fi
35389
35390  LIBDL="$LIBS"
35391
35392  LIBS="$save_LIBS"
35393
35394
35395  ###############################################################################
35396  #
35397  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35398  # dynamic build is configured on command line.
35399  #
35400
35401# Check whether --with-stdc++lib was given.
35402if test "${with_stdc__lib+set}" = set; then :
35403  withval=$with_stdc__lib;
35404        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35405                && test "x$with_stdc__lib" != xdefault; then
35406          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35407        fi
35408
35409else
35410  with_stdc__lib=default
35411
35412fi
35413
35414
35415  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35416    # Test if -lstdc++ works.
35417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35418$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35419    ac_ext=cpp
35420ac_cpp='$CXXCPP $CPPFLAGS'
35421ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35422ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35423ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35424
35425    OLD_CXXFLAGS="$CXXFLAGS"
35426    CXXFLAGS="$CXXFLAGS -lstdc++"
35427    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35428/* end confdefs.h.  */
35429
35430int
35431main ()
35432{
35433return 0;
35434  ;
35435  return 0;
35436}
35437_ACEOF
35438if ac_fn_cxx_try_link "$LINENO"; then :
35439  has_dynamic_libstdcxx=yes
35440else
35441  has_dynamic_libstdcxx=no
35442fi
35443rm -f core conftest.err conftest.$ac_objext \
35444    conftest$ac_exeext conftest.$ac_ext
35445    CXXFLAGS="$OLD_CXXFLAGS"
35446    ac_ext=cpp
35447ac_cpp='$CXXCPP $CPPFLAGS'
35448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35451
35452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35453$as_echo "$has_dynamic_libstdcxx" >&6; }
35454
35455    # Test if stdc++ can be linked statically.
35456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35457$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35458    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35459    ac_ext=cpp
35460ac_cpp='$CXXCPP $CPPFLAGS'
35461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35464
35465    OLD_LIBS="$LIBS"
35466    OLD_CXX="$CXX"
35467    LIBS="$STATIC_STDCXX_FLAGS"
35468    CXX="$CC"
35469    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35470/* end confdefs.h.  */
35471
35472int
35473main ()
35474{
35475return 0;
35476  ;
35477  return 0;
35478}
35479_ACEOF
35480if ac_fn_cxx_try_link "$LINENO"; then :
35481  has_static_libstdcxx=yes
35482else
35483  has_static_libstdcxx=no
35484fi
35485rm -f core conftest.err conftest.$ac_objext \
35486    conftest$ac_exeext conftest.$ac_ext
35487    LIBS="$OLD_LIBS"
35488    CXX="$OLD_CXX"
35489    ac_ext=cpp
35490ac_cpp='$CXXCPP $CPPFLAGS'
35491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35494
35495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35496$as_echo "$has_static_libstdcxx" >&6; }
35497
35498    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35499      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35500    fi
35501
35502    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35503      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35504    fi
35505
35506    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35507      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35508    fi
35509
35510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35511$as_echo_n "checking how to link with libstdc++... " >&6; }
35512    # If dynamic was requested, it's available since it would fail above otherwise.
35513    # If dynamic wasn't requested, go with static unless it isn't available.
35514    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35515      LIBCXX="$LIBCXX -lstdc++"
35516      LDCXX="$CXX"
35517      STATIC_CXX_SETTING="STATIC_CXX=false"
35518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35519$as_echo "dynamic" >&6; }
35520    else
35521      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35522      LDCXX="$CC"
35523      STATIC_CXX_SETTING="STATIC_CXX=true"
35524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35525$as_echo "static" >&6; }
35526    fi
35527  fi
35528
35529
35530  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35531    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35532
35533pkg_failed=no
35534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35535$as_echo_n "checking for LIBFFI... " >&6; }
35536
35537if test -n "$LIBFFI_CFLAGS"; then
35538    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35539 elif test -n "$PKG_CONFIG"; then
35540    if test -n "$PKG_CONFIG" && \
35541    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35542  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35543  ac_status=$?
35544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35545  test $ac_status = 0; }; then
35546  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35547else
35548  pkg_failed=yes
35549fi
35550 else
35551    pkg_failed=untried
35552fi
35553if test -n "$LIBFFI_LIBS"; then
35554    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35555 elif test -n "$PKG_CONFIG"; then
35556    if test -n "$PKG_CONFIG" && \
35557    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35558  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35559  ac_status=$?
35560  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35561  test $ac_status = 0; }; then
35562  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35563else
35564  pkg_failed=yes
35565fi
35566 else
35567    pkg_failed=untried
35568fi
35569
35570
35571
35572if test $pkg_failed = yes; then
35573
35574if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35575        _pkg_short_errors_supported=yes
35576else
35577        _pkg_short_errors_supported=no
35578fi
35579        if test $_pkg_short_errors_supported = yes; then
35580	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35581        else
35582	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35583        fi
35584	# Put the nasty error message in config.log where it belongs
35585	echo "$LIBFFI_PKG_ERRORS" >&5
35586
35587	as_fn_error $? "Package requirements (libffi) were not met:
35588
35589$LIBFFI_PKG_ERRORS
35590
35591Consider adjusting the PKG_CONFIG_PATH environment variable if you
35592installed software in a non-standard prefix.
35593
35594Alternatively, you may set the environment variables LIBFFI_CFLAGS
35595and LIBFFI_LIBS to avoid the need to call pkg-config.
35596See the pkg-config man page for more details.
35597" "$LINENO" 5
35598elif test $pkg_failed = untried; then
35599	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35601as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35602is in your PATH or set the PKG_CONFIG environment variable to the full
35603path to pkg-config.
35604
35605Alternatively, you may set the environment variables LIBFFI_CFLAGS
35606and LIBFFI_LIBS to avoid the need to call pkg-config.
35607See the pkg-config man page for more details.
35608
35609To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35610See \`config.log' for more details" "$LINENO" 5; }
35611else
35612	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35613	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35615$as_echo "yes" >&6; }
35616	:
35617fi
35618
35619  fi
35620
35621  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35622    # Extract the first word of "llvm-config", so it can be a program name with args.
35623set dummy llvm-config; ac_word=$2
35624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35625$as_echo_n "checking for $ac_word... " >&6; }
35626if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35627  $as_echo_n "(cached) " >&6
35628else
35629  if test -n "$LLVM_CONFIG"; then
35630  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35631else
35632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35633for as_dir in $PATH
35634do
35635  IFS=$as_save_IFS
35636  test -z "$as_dir" && as_dir=.
35637    for ac_exec_ext in '' $ac_executable_extensions; do
35638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35639    ac_cv_prog_LLVM_CONFIG="llvm-config"
35640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35641    break 2
35642  fi
35643done
35644  done
35645IFS=$as_save_IFS
35646
35647fi
35648fi
35649LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35650if test -n "$LLVM_CONFIG"; then
35651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35652$as_echo "$LLVM_CONFIG" >&6; }
35653else
35654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35655$as_echo "no" >&6; }
35656fi
35657
35658
35659
35660    if test "x$LLVM_CONFIG" != xllvm-config; then
35661      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35662    fi
35663
35664    llvm_components="jit mcjit engine nativecodegen native"
35665    unset LLVM_CFLAGS
35666    for flag in $("$LLVM_CONFIG" --cxxflags); do
35667      if echo "${flag}" | grep -q '^-[ID]'; then
35668        if test "${flag}" != "-D_DEBUG" ; then
35669          if test "${LLVM_CFLAGS}" != "" ; then
35670            LLVM_CFLAGS="${LLVM_CFLAGS} "
35671          fi
35672          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35673        fi
35674      fi
35675    done
35676    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35677    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35678
35679    unset LLVM_LDFLAGS
35680    for flag in $("${LLVM_CONFIG}" --ldflags); do
35681      if echo "${flag}" | grep -q '^-L'; then
35682        if test "${LLVM_LDFLAGS}" != ""; then
35683          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35684        fi
35685        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35686      fi
35687    done
35688
35689    unset LLVM_LIBS
35690    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35691      if echo "${flag}" | grep -q '^-l'; then
35692        if test "${LLVM_LIBS}" != ""; then
35693          LLVM_LIBS="${LLVM_LIBS} "
35694        fi
35695        LLVM_LIBS="${LLVM_LIBS}${flag}"
35696      fi
35697    done
35698
35699
35700
35701
35702  fi
35703
35704  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35705  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35706    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35707  fi
35708
35709  # TODO better (platform agnostic) test
35710  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35711    LIBCXX="-lstdc++"
35712  fi
35713
35714
35715
35716
35717
35718###############################################################################
35719#
35720# We need to do some final tweaking, when everything else is done.
35721#
35722###############################################################################
35723
35724
35725  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35726
35727
35728  # The name of the Service Agent jar.
35729  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35730  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35731    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35732  fi
35733
35734
35735
35736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35737$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35738
35739    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35740      ENABLE_INTREE_EC=yes
35741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35742$as_echo "yes" >&6; }
35743    else
35744      ENABLE_INTREE_EC=no
35745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35746$as_echo "no" >&6; }
35747    fi
35748
35749
35750
35751
35752###############################################################################
35753#
35754# Configure parts of the build that only affect the build performance,
35755# not the result.
35756#
35757###############################################################################
35758
35759
35760  # How many cores do we have on this build system?
35761
35762# Check whether --with-num-cores was given.
35763if test "${with_num_cores+set}" = set; then :
35764  withval=$with_num_cores;
35765fi
35766
35767  if test "x$with_num_cores" = x; then
35768    # The number of cores were not specified, try to probe them.
35769
35770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35771$as_echo_n "checking for number of cores... " >&6; }
35772  NUM_CORES=1
35773  FOUND_CORES=no
35774
35775  if test -f /proc/cpuinfo; then
35776    # Looks like a Linux (or cygwin) system
35777    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35778    FOUND_CORES=yes
35779  elif test -x /usr/sbin/psrinfo; then
35780    # Looks like a Solaris system
35781    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35782    FOUND_CORES=yes
35783  elif test -x /usr/sbin/system_profiler; then
35784    # Looks like a MacOSX system
35785    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35786    FOUND_CORES=yes
35787  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35788    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35789    FOUND_CORES=yes
35790  elif test -n "$NUMBER_OF_PROCESSORS"; then
35791    # On windows, look in the env
35792    NUM_CORES=$NUMBER_OF_PROCESSORS
35793    FOUND_CORES=yes
35794  fi
35795
35796  if test "x$FOUND_CORES" = xyes; then
35797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35798$as_echo "$NUM_CORES" >&6; }
35799  else
35800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35801$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35802    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35803$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35804  fi
35805
35806  else
35807    NUM_CORES=$with_num_cores
35808  fi
35809
35810
35811
35812  # How much memory do we have on this build system?
35813
35814# Check whether --with-memory-size was given.
35815if test "${with_memory_size+set}" = set; then :
35816  withval=$with_memory_size;
35817fi
35818
35819  if test "x$with_memory_size" = x; then
35820    # The memory size was not specified, try to probe it.
35821
35822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35823$as_echo_n "checking for memory size... " >&6; }
35824  # Default to 1024 MB
35825  MEMORY_SIZE=1024
35826  FOUND_MEM=no
35827
35828  if test -f /proc/meminfo; then
35829    # Looks like a Linux (or cygwin) system
35830    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35831    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35832    FOUND_MEM=yes
35833  elif test -x /usr/sbin/prtconf; then
35834    # Looks like a Solaris or AIX system
35835    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35836    FOUND_MEM=yes
35837  elif test -x /usr/sbin/system_profiler; then
35838    # Looks like a MacOSX system
35839    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35840    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35841    FOUND_MEM=yes
35842  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35843    # Windows, but without cygwin
35844    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35845    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35846    FOUND_MEM=yes
35847  fi
35848
35849  if test "x$FOUND_MEM" = xyes; then
35850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35851$as_echo "$MEMORY_SIZE MB" >&6; }
35852  else
35853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35854$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35855    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35856$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35857  fi
35858
35859  else
35860    MEMORY_SIZE=$with_memory_size
35861  fi
35862
35863
35864
35865  # Provide a decent default number of parallel jobs for make depending on
35866  # number of cores, amount of memory and machine architecture.
35867
35868# Check whether --with-jobs was given.
35869if test "${with_jobs+set}" = set; then :
35870  withval=$with_jobs;
35871fi
35872
35873  if test "x$with_jobs" = x; then
35874    # Number of jobs was not specified, calculate.
35875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35876$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35877    # Approximate memory in GB, rounding up a bit.
35878    memory_gb=`expr $MEMORY_SIZE / 1100`
35879    # Pick the lowest of memory in gb and number of cores.
35880    if test "$memory_gb" -lt "$NUM_CORES"; then
35881      JOBS="$memory_gb"
35882    else
35883      JOBS="$NUM_CORES"
35884      # On bigger machines, leave some room for other processes to run
35885      if test "$JOBS" -gt "4"; then
35886        JOBS=`expr $JOBS '*' 90 / 100`
35887      fi
35888    fi
35889    # Cap number of jobs to 16
35890    if test "$JOBS" -gt "16"; then
35891      JOBS=16
35892    fi
35893    if test "$JOBS" -eq "0"; then
35894      JOBS=1
35895    fi
35896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35897$as_echo "$JOBS" >&6; }
35898  else
35899    JOBS=$with_jobs
35900  fi
35901
35902
35903
35904# Setup smart javac (after cores and memory have been setup)
35905
35906
35907# Check whether --with-sjavac-server-java was given.
35908if test "${with_sjavac_server_java+set}" = set; then :
35909  withval=$with_sjavac_server_java;
35910fi
35911
35912
35913  if test "x$with_sjavac_server_java" != x; then
35914    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35915    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35916    if test "x$FOUND_VERSION" = x; then
35917      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35918    fi
35919  else
35920    SJAVAC_SERVER_JAVA=""
35921    # Hotspot specific options.
35922
35923  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35924  $ECHO "Command: $JAVA -verbosegc -version" >&5
35925  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35926  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35927  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35928  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35929    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35930    JVM_ARG_OK=true
35931  else
35932    $ECHO "Arg failed:" >&5
35933    $ECHO "$OUTPUT" >&5
35934    JVM_ARG_OK=false
35935  fi
35936
35937    # JRockit specific options.
35938
35939  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35940  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35941  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35942  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35943  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35944  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35945    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35946    JVM_ARG_OK=true
35947  else
35948    $ECHO "Arg failed:" >&5
35949    $ECHO "$OUTPUT" >&5
35950    JVM_ARG_OK=false
35951  fi
35952
35953    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35954  fi
35955
35956
35957  if test "$MEMORY_SIZE" -gt "2500"; then
35958
35959  $ECHO "Check if jvm arg is ok: -d64" >&5
35960  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35961  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35962  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35963  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35964  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35965    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35966    JVM_ARG_OK=true
35967  else
35968    $ECHO "Arg failed:" >&5
35969    $ECHO "$OUTPUT" >&5
35970    JVM_ARG_OK=false
35971  fi
35972
35973    if test "$JVM_ARG_OK" = true; then
35974      JVM_64BIT=true
35975      JVM_ARG_OK=false
35976    fi
35977  fi
35978
35979  if test "$JVM_64BIT" = true; then
35980    if test "$MEMORY_SIZE" -gt "17000"; then
35981
35982  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35983  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35984  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35985  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35986  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35987  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35988    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35989    JVM_ARG_OK=true
35990  else
35991    $ECHO "Arg failed:" >&5
35992    $ECHO "$OUTPUT" >&5
35993    JVM_ARG_OK=false
35994  fi
35995
35996    fi
35997    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35998
35999  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
36000  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
36001  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
36002  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36003  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36004  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36005    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
36006    JVM_ARG_OK=true
36007  else
36008    $ECHO "Arg failed:" >&5
36009    $ECHO "$OUTPUT" >&5
36010    JVM_ARG_OK=false
36011  fi
36012
36013    fi
36014    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
36015
36016  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
36017  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
36018  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
36019  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36020  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36021  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36022    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
36023    JVM_ARG_OK=true
36024  else
36025    $ECHO "Arg failed:" >&5
36026    $ECHO "$OUTPUT" >&5
36027    JVM_ARG_OK=false
36028  fi
36029
36030    fi
36031    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
36032
36033  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
36034  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
36035  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
36036  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36037  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36038  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36039    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
36040    JVM_ARG_OK=true
36041  else
36042    $ECHO "Arg failed:" >&5
36043    $ECHO "$OUTPUT" >&5
36044    JVM_ARG_OK=false
36045  fi
36046
36047    fi
36048  fi
36049  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
36050
36051  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
36052  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
36053  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
36054  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36055  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36056  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36057    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
36058    JVM_ARG_OK=true
36059  else
36060    $ECHO "Arg failed:" >&5
36061    $ECHO "$OUTPUT" >&5
36062    JVM_ARG_OK=false
36063  fi
36064
36065  fi
36066  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
36067
36068  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
36069  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
36070  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
36071  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36072  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36073  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36074    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
36075    JVM_ARG_OK=true
36076  else
36077    $ECHO "Arg failed:" >&5
36078    $ECHO "$OUTPUT" >&5
36079    JVM_ARG_OK=false
36080  fi
36081
36082  fi
36083  if test "$JVM_ARG_OK" = false; then
36084
36085  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
36086  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
36087  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
36088  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36089  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36091    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
36092    JVM_ARG_OK=true
36093  else
36094    $ECHO "Arg failed:" >&5
36095    $ECHO "$OUTPUT" >&5
36096    JVM_ARG_OK=false
36097  fi
36098
36099  fi
36100
36101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
36102$as_echo_n "checking whether to use sjavac... " >&6; }
36103  # Check whether --enable-sjavac was given.
36104if test "${enable_sjavac+set}" = set; then :
36105  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
36106else
36107  ENABLE_SJAVAC='no'
36108fi
36109
36110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
36111$as_echo "$ENABLE_SJAVAC" >&6; }
36112
36113
36114  if test "x$ENABLE_SJAVAC" = xyes; then
36115    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
36116  else
36117    SJAVAC_SERVER_DIR=
36118  fi
36119
36120
36121
36122# Can the C/C++ compiler use precompiled headers?
36123
36124
36125  ###############################################################################
36126  #
36127  # Can the C/C++ compiler use precompiled headers?
36128  #
36129  # Check whether --enable-precompiled-headers was given.
36130if test "${enable_precompiled_headers+set}" = set; then :
36131  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
36132else
36133  ENABLE_PRECOMPH=yes
36134fi
36135
36136
36137  USE_PRECOMPILED_HEADER=1
36138  if test "x$ENABLE_PRECOMPH" = xno; then
36139    USE_PRECOMPILED_HEADER=0
36140  fi
36141
36142  if test "x$ENABLE_PRECOMPH" = xyes; then
36143    # Check that the compiler actually supports precomp headers.
36144    if test "x$GCC" = xyes; then
36145      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
36146$as_echo_n "checking that precompiled headers work... " >&6; }
36147      echo "int alfa();" > conftest.h
36148      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
36149      if test ! -f conftest.hpp.gch; then
36150        USE_PRECOMPILED_HEADER=0
36151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36152$as_echo "no" >&6; }
36153      else
36154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36155$as_echo "yes" >&6; }
36156      fi
36157      rm -f conftest.h conftest.hpp.gch
36158    fi
36159  fi
36160
36161
36162
36163
36164# Setup use of ccache, if available
36165
36166  # Check whether --enable-ccache was given.
36167if test "${enable_ccache+set}" = set; then :
36168  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
36169else
36170  ENABLE_CCACHE=yes
36171fi
36172
36173  if test "x$ENABLE_CCACHE" = xyes; then
36174    OLD_PATH="$PATH"
36175    if test "x$TOOLS_DIR" != x; then
36176      PATH=$TOOLS_DIR:$PATH
36177    fi
36178    # Extract the first word of "ccache", so it can be a program name with args.
36179set dummy ccache; ac_word=$2
36180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36181$as_echo_n "checking for $ac_word... " >&6; }
36182if ${ac_cv_path_CCACHE+:} false; then :
36183  $as_echo_n "(cached) " >&6
36184else
36185  case $CCACHE in
36186  [\\/]* | ?:[\\/]*)
36187  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36188  ;;
36189  *)
36190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36191for as_dir in $PATH
36192do
36193  IFS=$as_save_IFS
36194  test -z "$as_dir" && as_dir=.
36195    for ac_exec_ext in '' $ac_executable_extensions; do
36196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36197    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36199    break 2
36200  fi
36201done
36202  done
36203IFS=$as_save_IFS
36204
36205  ;;
36206esac
36207fi
36208CCACHE=$ac_cv_path_CCACHE
36209if test -n "$CCACHE"; then
36210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36211$as_echo "$CCACHE" >&6; }
36212else
36213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36214$as_echo "no" >&6; }
36215fi
36216
36217
36218    PATH="$OLD_PATH"
36219  else
36220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36221$as_echo_n "checking for ccache... " >&6; }
36222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36223$as_echo "explicitly disabled" >&6; }
36224    CCACHE=
36225  fi
36226
36227
36228
36229# Check whether --with-ccache-dir was given.
36230if test "${with_ccache_dir+set}" = set; then :
36231  withval=$with_ccache_dir;
36232fi
36233
36234
36235  if test "x$with_ccache_dir" != x; then
36236    # When using a non home ccache directory, assume the use is to share ccache files
36237    # with other users. Thus change the umask.
36238    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36239  fi
36240  CCACHE_FOUND=""
36241  if test "x$CCACHE" != x; then
36242
36243  if test "x$CCACHE" != x; then
36244    CCACHE_FOUND="true"
36245    # Only use ccache if it is 3.1.4 or later, which supports
36246    # precompiled headers.
36247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36248$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36249    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36250    if test "x$HAS_GOOD_CCACHE" = x; then
36251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36252$as_echo "no, disabling ccache" >&6; }
36253      CCACHE=
36254    else
36255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36256$as_echo "yes" >&6; }
36257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36258$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36259      PUSHED_FLAGS="$CXXFLAGS"
36260      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36261      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36262/* end confdefs.h.  */
36263
36264int
36265main ()
36266{
36267
36268  ;
36269  return 0;
36270}
36271_ACEOF
36272if ac_fn_cxx_try_compile "$LINENO"; then :
36273  CC_KNOWS_CCACHE_TRICK=yes
36274else
36275  CC_KNOWS_CCACHE_TRICK=no
36276fi
36277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36278      CXXFLAGS="$PUSHED_FLAGS"
36279      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36281$as_echo "yes" >&6; }
36282      else
36283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36284$as_echo "no, disabling ccaching of precompiled headers" >&6; }
36285        CCACHE=
36286      fi
36287    fi
36288  fi
36289
36290  if test "x$CCACHE" != x; then
36291    CCACHE_SLOPPINESS=time_macros
36292    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36293    CCACHE_FLAGS=-fpch-preprocess
36294
36295    if test "x$SET_CCACHE_DIR" != x; then
36296      mkdir -p $CCACHE_DIR > /dev/null 2>&1
36297      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36298    fi
36299  fi
36300
36301  fi
36302
36303
36304###############################################################################
36305#
36306# And now the finish...
36307#
36308###############################################################################
36309
36310# Check for some common pitfalls
36311
36312  if test x"$OPENJDK_BUILD_OS" = xwindows; then
36313    file_to_test="$SRC_ROOT/LICENSE"
36314    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36315      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
36316    fi
36317  fi
36318
36319
36320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36321$as_echo_n "checking if build directory is on local disk... " >&6; }
36322
36323  # df -l lists only local disks; if the given directory is not found then
36324  # a non-zero exit code is given
36325  if test "x$DF" = x; then
36326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36327      # msys does not have df; use Windows "net use" instead.
36328      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36329      if test "x$IS_NETWORK_DISK" = x; then
36330        OUTPUT_DIR_IS_LOCAL="yes"
36331      else
36332        OUTPUT_DIR_IS_LOCAL="no"
36333      fi
36334    else
36335      # No df here, say it's local
36336      OUTPUT_DIR_IS_LOCAL="yes"
36337    fi
36338  else
36339    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36340      OUTPUT_DIR_IS_LOCAL="yes"
36341    else
36342      OUTPUT_DIR_IS_LOCAL="no"
36343    fi
36344  fi
36345
36346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36347$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36348
36349
36350
36351  # Check if the user has any old-style ALT_ variables set.
36352  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36353
36354  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36355  # Since we can't properly handle the dependencies for this, warn the user about the situation
36356  if test -e $OUTPUT_ROOT/spec.gmk; then
36357    IS_RECONFIGURE=yes
36358  else
36359    IS_RECONFIGURE=no
36360  fi
36361
36362  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36363    HIDE_PERFORMANCE_HINTS=yes
36364  else
36365    HIDE_PERFORMANCE_HINTS=no
36366    # Hide it the next time around...
36367    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36368  fi
36369
36370
36371# At the end, call the custom hook. (Dummy macro if no custom sources available)
36372
36373
36374# We're messing a bit with internal autoconf variables to put the config.status
36375# in the output directory instead of the current directory.
36376CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36377
36378# Create the actual output files. Now the main work of configure is done.
36379cat >confcache <<\_ACEOF
36380# This file is a shell script that caches the results of configure
36381# tests run on this system so they can be shared between configure
36382# scripts and configure runs, see configure's option --config-cache.
36383# It is not useful on other systems.  If it contains results you don't
36384# want to keep, you may remove or edit it.
36385#
36386# config.status only pays attention to the cache file if you give it
36387# the --recheck option to rerun configure.
36388#
36389# `ac_cv_env_foo' variables (set or unset) will be overridden when
36390# loading this file, other *unset* `ac_cv_foo' will be assigned the
36391# following values.
36392
36393_ACEOF
36394
36395# The following way of writing the cache mishandles newlines in values,
36396# but we know of no workaround that is simple, portable, and efficient.
36397# So, we kill variables containing newlines.
36398# Ultrix sh set writes to stderr and can't be redirected directly,
36399# and sets the high bit in the cache file unless we assign to the vars.
36400(
36401  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36402    eval ac_val=\$$ac_var
36403    case $ac_val in #(
36404    *${as_nl}*)
36405      case $ac_var in #(
36406      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36407$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36408      esac
36409      case $ac_var in #(
36410      _ | IFS | as_nl) ;; #(
36411      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36412      *) { eval $ac_var=; unset $ac_var;} ;;
36413      esac ;;
36414    esac
36415  done
36416
36417  (set) 2>&1 |
36418    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36419    *${as_nl}ac_space=\ *)
36420      # `set' does not quote correctly, so add quotes: double-quote
36421      # substitution turns \\\\ into \\, and sed turns \\ into \.
36422      sed -n \
36423	"s/'/'\\\\''/g;
36424	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36425      ;; #(
36426    *)
36427      # `set' quotes correctly as required by POSIX, so do not add quotes.
36428      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36429      ;;
36430    esac |
36431    sort
36432) |
36433  sed '
36434     /^ac_cv_env_/b end
36435     t clear
36436     :clear
36437     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36438     t end
36439     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36440     :end' >>confcache
36441if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36442  if test -w "$cache_file"; then
36443    if test "x$cache_file" != "x/dev/null"; then
36444      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36445$as_echo "$as_me: updating cache $cache_file" >&6;}
36446      if test ! -f "$cache_file" || test -h "$cache_file"; then
36447	cat confcache >"$cache_file"
36448      else
36449        case $cache_file in #(
36450        */* | ?:*)
36451	  mv -f confcache "$cache_file"$$ &&
36452	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36453        *)
36454	  mv -f confcache "$cache_file" ;;
36455	esac
36456      fi
36457    fi
36458  else
36459    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36460$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36461  fi
36462fi
36463rm -f confcache
36464
36465test "x$prefix" = xNONE && prefix=$ac_default_prefix
36466# Let make expand exec_prefix.
36467test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36468
36469DEFS=-DHAVE_CONFIG_H
36470
36471ac_libobjs=
36472ac_ltlibobjs=
36473U=
36474for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36475  # 1. Remove the extension, and $U if already installed.
36476  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36477  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36478  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36479  #    will be set to the directory where LIBOBJS objects are built.
36480  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36481  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36482done
36483LIBOBJS=$ac_libobjs
36484
36485LTLIBOBJS=$ac_ltlibobjs
36486
36487
36488
36489: "${CONFIG_STATUS=./config.status}"
36490ac_write_fail=0
36491ac_clean_files_save=$ac_clean_files
36492ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36493{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36494$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36495as_write_fail=0
36496cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36497#! $SHELL
36498# Generated by $as_me.
36499# Run this file to recreate the current configuration.
36500# Compiler output produced by configure, useful for debugging
36501# configure, is in config.log if it exists.
36502
36503debug=false
36504ac_cs_recheck=false
36505ac_cs_silent=false
36506
36507SHELL=\${CONFIG_SHELL-$SHELL}
36508export SHELL
36509_ASEOF
36510cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36511## -------------------- ##
36512## M4sh Initialization. ##
36513## -------------------- ##
36514
36515# Be more Bourne compatible
36516DUALCASE=1; export DUALCASE # for MKS sh
36517if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36518  emulate sh
36519  NULLCMD=:
36520  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36521  # is contrary to our usage.  Disable this feature.
36522  alias -g '${1+"$@"}'='"$@"'
36523  setopt NO_GLOB_SUBST
36524else
36525  case `(set -o) 2>/dev/null` in #(
36526  *posix*) :
36527    set -o posix ;; #(
36528  *) :
36529     ;;
36530esac
36531fi
36532
36533
36534as_nl='
36535'
36536export as_nl
36537# Printing a long string crashes Solaris 7 /usr/bin/printf.
36538as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36539as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36540as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36541# Prefer a ksh shell builtin over an external printf program on Solaris,
36542# but without wasting forks for bash or zsh.
36543if test -z "$BASH_VERSION$ZSH_VERSION" \
36544    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36545  as_echo='print -r --'
36546  as_echo_n='print -rn --'
36547elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36548  as_echo='printf %s\n'
36549  as_echo_n='printf %s'
36550else
36551  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36552    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36553    as_echo_n='/usr/ucb/echo -n'
36554  else
36555    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36556    as_echo_n_body='eval
36557      arg=$1;
36558      case $arg in #(
36559      *"$as_nl"*)
36560	expr "X$arg" : "X\\(.*\\)$as_nl";
36561	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36562      esac;
36563      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36564    '
36565    export as_echo_n_body
36566    as_echo_n='sh -c $as_echo_n_body as_echo'
36567  fi
36568  export as_echo_body
36569  as_echo='sh -c $as_echo_body as_echo'
36570fi
36571
36572# The user is always right.
36573if test "${PATH_SEPARATOR+set}" != set; then
36574  PATH_SEPARATOR=:
36575  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36576    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36577      PATH_SEPARATOR=';'
36578  }
36579fi
36580
36581
36582# IFS
36583# We need space, tab and new line, in precisely that order.  Quoting is
36584# there to prevent editors from complaining about space-tab.
36585# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36586# splitting by setting IFS to empty value.)
36587IFS=" ""	$as_nl"
36588
36589# Find who we are.  Look in the path if we contain no directory separator.
36590as_myself=
36591case $0 in #((
36592  *[\\/]* ) as_myself=$0 ;;
36593  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36594for as_dir in $PATH
36595do
36596  IFS=$as_save_IFS
36597  test -z "$as_dir" && as_dir=.
36598    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36599  done
36600IFS=$as_save_IFS
36601
36602     ;;
36603esac
36604# We did not find ourselves, most probably we were run as `sh COMMAND'
36605# in which case we are not to be found in the path.
36606if test "x$as_myself" = x; then
36607  as_myself=$0
36608fi
36609if test ! -f "$as_myself"; then
36610  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36611  exit 1
36612fi
36613
36614# Unset variables that we do not need and which cause bugs (e.g. in
36615# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36616# suppresses any "Segmentation fault" message there.  '((' could
36617# trigger a bug in pdksh 5.2.14.
36618for as_var in BASH_ENV ENV MAIL MAILPATH
36619do eval test x\${$as_var+set} = xset \
36620  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36621done
36622PS1='$ '
36623PS2='> '
36624PS4='+ '
36625
36626# NLS nuisances.
36627LC_ALL=C
36628export LC_ALL
36629LANGUAGE=C
36630export LANGUAGE
36631
36632# CDPATH.
36633(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36634
36635
36636# as_fn_error STATUS ERROR [LINENO LOG_FD]
36637# ----------------------------------------
36638# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36639# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36640# script with STATUS, using 1 if that was 0.
36641as_fn_error ()
36642{
36643  as_status=$1; test $as_status -eq 0 && as_status=1
36644  if test "$4"; then
36645    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36646    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36647  fi
36648  $as_echo "$as_me: error: $2" >&2
36649  as_fn_exit $as_status
36650} # as_fn_error
36651
36652
36653# as_fn_set_status STATUS
36654# -----------------------
36655# Set $? to STATUS, without forking.
36656as_fn_set_status ()
36657{
36658  return $1
36659} # as_fn_set_status
36660
36661# as_fn_exit STATUS
36662# -----------------
36663# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36664as_fn_exit ()
36665{
36666  set +e
36667  as_fn_set_status $1
36668  exit $1
36669} # as_fn_exit
36670
36671# as_fn_unset VAR
36672# ---------------
36673# Portably unset VAR.
36674as_fn_unset ()
36675{
36676  { eval $1=; unset $1;}
36677}
36678as_unset=as_fn_unset
36679# as_fn_append VAR VALUE
36680# ----------------------
36681# Append the text in VALUE to the end of the definition contained in VAR. Take
36682# advantage of any shell optimizations that allow amortized linear growth over
36683# repeated appends, instead of the typical quadratic growth present in naive
36684# implementations.
36685if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36686  eval 'as_fn_append ()
36687  {
36688    eval $1+=\$2
36689  }'
36690else
36691  as_fn_append ()
36692  {
36693    eval $1=\$$1\$2
36694  }
36695fi # as_fn_append
36696
36697# as_fn_arith ARG...
36698# ------------------
36699# Perform arithmetic evaluation on the ARGs, and store the result in the
36700# global $as_val. Take advantage of shells that can avoid forks. The arguments
36701# must be portable across $(()) and expr.
36702if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36703  eval 'as_fn_arith ()
36704  {
36705    as_val=$(( $* ))
36706  }'
36707else
36708  as_fn_arith ()
36709  {
36710    as_val=`expr "$@" || test $? -eq 1`
36711  }
36712fi # as_fn_arith
36713
36714
36715if expr a : '\(a\)' >/dev/null 2>&1 &&
36716   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36717  as_expr=expr
36718else
36719  as_expr=false
36720fi
36721
36722if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36723  as_basename=basename
36724else
36725  as_basename=false
36726fi
36727
36728if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36729  as_dirname=dirname
36730else
36731  as_dirname=false
36732fi
36733
36734as_me=`$as_basename -- "$0" ||
36735$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36736	 X"$0" : 'X\(//\)$' \| \
36737	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36738$as_echo X/"$0" |
36739    sed '/^.*\/\([^/][^/]*\)\/*$/{
36740	    s//\1/
36741	    q
36742	  }
36743	  /^X\/\(\/\/\)$/{
36744	    s//\1/
36745	    q
36746	  }
36747	  /^X\/\(\/\).*/{
36748	    s//\1/
36749	    q
36750	  }
36751	  s/.*/./; q'`
36752
36753# Avoid depending upon Character Ranges.
36754as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36755as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36756as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36757as_cr_digits='0123456789'
36758as_cr_alnum=$as_cr_Letters$as_cr_digits
36759
36760ECHO_C= ECHO_N= ECHO_T=
36761case `echo -n x` in #(((((
36762-n*)
36763  case `echo 'xy\c'` in
36764  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36765  xy)  ECHO_C='\c';;
36766  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36767       ECHO_T='	';;
36768  esac;;
36769*)
36770  ECHO_N='-n';;
36771esac
36772
36773rm -f conf$$ conf$$.exe conf$$.file
36774if test -d conf$$.dir; then
36775  rm -f conf$$.dir/conf$$.file
36776else
36777  rm -f conf$$.dir
36778  mkdir conf$$.dir 2>/dev/null
36779fi
36780if (echo >conf$$.file) 2>/dev/null; then
36781  if ln -s conf$$.file conf$$ 2>/dev/null; then
36782    as_ln_s='ln -s'
36783    # ... but there are two gotchas:
36784    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36785    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36786    # In both cases, we have to default to `cp -pR'.
36787    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36788      as_ln_s='cp -pR'
36789  elif ln conf$$.file conf$$ 2>/dev/null; then
36790    as_ln_s=ln
36791  else
36792    as_ln_s='cp -pR'
36793  fi
36794else
36795  as_ln_s='cp -pR'
36796fi
36797rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36798rmdir conf$$.dir 2>/dev/null
36799
36800
36801# as_fn_mkdir_p
36802# -------------
36803# Create "$as_dir" as a directory, including parents if necessary.
36804as_fn_mkdir_p ()
36805{
36806
36807  case $as_dir in #(
36808  -*) as_dir=./$as_dir;;
36809  esac
36810  test -d "$as_dir" || eval $as_mkdir_p || {
36811    as_dirs=
36812    while :; do
36813      case $as_dir in #(
36814      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36815      *) as_qdir=$as_dir;;
36816      esac
36817      as_dirs="'$as_qdir' $as_dirs"
36818      as_dir=`$as_dirname -- "$as_dir" ||
36819$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36820	 X"$as_dir" : 'X\(//\)[^/]' \| \
36821	 X"$as_dir" : 'X\(//\)$' \| \
36822	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36823$as_echo X"$as_dir" |
36824    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36825	    s//\1/
36826	    q
36827	  }
36828	  /^X\(\/\/\)[^/].*/{
36829	    s//\1/
36830	    q
36831	  }
36832	  /^X\(\/\/\)$/{
36833	    s//\1/
36834	    q
36835	  }
36836	  /^X\(\/\).*/{
36837	    s//\1/
36838	    q
36839	  }
36840	  s/.*/./; q'`
36841      test -d "$as_dir" && break
36842    done
36843    test -z "$as_dirs" || eval "mkdir $as_dirs"
36844  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36845
36846
36847} # as_fn_mkdir_p
36848if mkdir -p . 2>/dev/null; then
36849  as_mkdir_p='mkdir -p "$as_dir"'
36850else
36851  test -d ./-p && rmdir ./-p
36852  as_mkdir_p=false
36853fi
36854
36855
36856# as_fn_executable_p FILE
36857# -----------------------
36858# Test if FILE is an executable regular file.
36859as_fn_executable_p ()
36860{
36861  test -f "$1" && test -x "$1"
36862} # as_fn_executable_p
36863as_test_x='test -x'
36864as_executable_p=as_fn_executable_p
36865
36866# Sed expression to map a string onto a valid CPP name.
36867as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36868
36869# Sed expression to map a string onto a valid variable name.
36870as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36871
36872
36873exec 6>&1
36874## ----------------------------------- ##
36875## Main body of $CONFIG_STATUS script. ##
36876## ----------------------------------- ##
36877_ASEOF
36878test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36879
36880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36881# Save the log message, to keep $0 and so on meaningful, and to
36882# report actual input values of CONFIG_FILES etc. instead of their
36883# values after options handling.
36884ac_log="
36885This file was extended by OpenJDK $as_me jdk8, which was
36886generated by GNU Autoconf 2.69.  Invocation command line was
36887
36888  CONFIG_FILES    = $CONFIG_FILES
36889  CONFIG_HEADERS  = $CONFIG_HEADERS
36890  CONFIG_LINKS    = $CONFIG_LINKS
36891  CONFIG_COMMANDS = $CONFIG_COMMANDS
36892  $ $0 $@
36893
36894on `(hostname || uname -n) 2>/dev/null | sed 1q`
36895"
36896
36897_ACEOF
36898
36899case $ac_config_files in *"
36900"*) set x $ac_config_files; shift; ac_config_files=$*;;
36901esac
36902
36903case $ac_config_headers in *"
36904"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36905esac
36906
36907
36908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36909# Files that config.status was made for.
36910config_files="$ac_config_files"
36911config_headers="$ac_config_headers"
36912
36913_ACEOF
36914
36915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36916ac_cs_usage="\
36917\`$as_me' instantiates files and other configuration actions
36918from templates according to the current configuration.  Unless the files
36919and actions are specified as TAGs, all are instantiated by default.
36920
36921Usage: $0 [OPTION]... [TAG]...
36922
36923  -h, --help       print this help, then exit
36924  -V, --version    print version number and configuration settings, then exit
36925      --config     print configuration, then exit
36926  -q, --quiet, --silent
36927                   do not print progress messages
36928  -d, --debug      don't remove temporary files
36929      --recheck    update $as_me by reconfiguring in the same conditions
36930      --file=FILE[:TEMPLATE]
36931                   instantiate the configuration file FILE
36932      --header=FILE[:TEMPLATE]
36933                   instantiate the configuration header FILE
36934
36935Configuration files:
36936$config_files
36937
36938Configuration headers:
36939$config_headers
36940
36941Report bugs to <build-dev@openjdk.java.net>.
36942OpenJDK home page: <http://openjdk.java.net>."
36943
36944_ACEOF
36945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36946ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36947ac_cs_version="\\
36948OpenJDK config.status jdk8
36949configured by $0, generated by GNU Autoconf 2.69,
36950  with options \\"\$ac_cs_config\\"
36951
36952Copyright (C) 2012 Free Software Foundation, Inc.
36953This config.status script is free software; the Free Software Foundation
36954gives unlimited permission to copy, distribute and modify it."
36955
36956ac_pwd='$ac_pwd'
36957srcdir='$srcdir'
36958AWK='$AWK'
36959test -n "\$AWK" || AWK=awk
36960_ACEOF
36961
36962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36963# The default lists apply if the user does not specify any file.
36964ac_need_defaults=:
36965while test $# != 0
36966do
36967  case $1 in
36968  --*=?*)
36969    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36970    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36971    ac_shift=:
36972    ;;
36973  --*=)
36974    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36975    ac_optarg=
36976    ac_shift=:
36977    ;;
36978  *)
36979    ac_option=$1
36980    ac_optarg=$2
36981    ac_shift=shift
36982    ;;
36983  esac
36984
36985  case $ac_option in
36986  # Handling of the options.
36987  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36988    ac_cs_recheck=: ;;
36989  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36990    $as_echo "$ac_cs_version"; exit ;;
36991  --config | --confi | --conf | --con | --co | --c )
36992    $as_echo "$ac_cs_config"; exit ;;
36993  --debug | --debu | --deb | --de | --d | -d )
36994    debug=: ;;
36995  --file | --fil | --fi | --f )
36996    $ac_shift
36997    case $ac_optarg in
36998    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36999    '') as_fn_error $? "missing file argument" ;;
37000    esac
37001    as_fn_append CONFIG_FILES " '$ac_optarg'"
37002    ac_need_defaults=false;;
37003  --header | --heade | --head | --hea )
37004    $ac_shift
37005    case $ac_optarg in
37006    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37007    esac
37008    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37009    ac_need_defaults=false;;
37010  --he | --h)
37011    # Conflict between --help and --header
37012    as_fn_error $? "ambiguous option: \`$1'
37013Try \`$0 --help' for more information.";;
37014  --help | --hel | -h )
37015    $as_echo "$ac_cs_usage"; exit ;;
37016  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37017  | -silent | --silent | --silen | --sile | --sil | --si | --s)
37018    ac_cs_silent=: ;;
37019
37020  # This is an error.
37021  -*) as_fn_error $? "unrecognized option: \`$1'
37022Try \`$0 --help' for more information." ;;
37023
37024  *) as_fn_append ac_config_targets " $1"
37025     ac_need_defaults=false ;;
37026
37027  esac
37028  shift
37029done
37030
37031ac_configure_extra_args=
37032
37033if $ac_cs_silent; then
37034  exec 6>/dev/null
37035  ac_configure_extra_args="$ac_configure_extra_args --silent"
37036fi
37037
37038_ACEOF
37039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37040if \$ac_cs_recheck; then
37041  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37042  shift
37043  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37044  CONFIG_SHELL='$SHELL'
37045  export CONFIG_SHELL
37046  exec "\$@"
37047fi
37048
37049_ACEOF
37050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37051exec 5>>config.log
37052{
37053  echo
37054  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37055## Running $as_me. ##
37056_ASBOX
37057  $as_echo "$ac_log"
37058} >&5
37059
37060_ACEOF
37061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37062_ACEOF
37063
37064cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37065
37066# Handling of arguments.
37067for ac_config_target in $ac_config_targets
37068do
37069  case $ac_config_target in
37070    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
37071    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
37072    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
37073    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
37074    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
37075    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
37076    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
37077
37078  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37079  esac
37080done
37081
37082
37083# If the user did not use the arguments to specify the items to instantiate,
37084# then the envvar interface is used.  Set only those that are not.
37085# We use the long form for the default assignment because of an extremely
37086# bizarre bug on SunOS 4.1.3.
37087if $ac_need_defaults; then
37088  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37089  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37090fi
37091
37092# Have a temporary directory for convenience.  Make it in the build tree
37093# simply because there is no reason against having it here, and in addition,
37094# creating and moving files from /tmp can sometimes cause problems.
37095# Hook for its removal unless debugging.
37096# Note that there is a small window in which the directory will not be cleaned:
37097# after its creation but before its name has been assigned to `$tmp'.
37098$debug ||
37099{
37100  tmp= ac_tmp=
37101  trap 'exit_status=$?
37102  : "${ac_tmp:=$tmp}"
37103  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37104' 0
37105  trap 'as_fn_exit 1' 1 2 13 15
37106}
37107# Create a (secure) tmp directory for tmp files.
37108
37109{
37110  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37111  test -d "$tmp"
37112}  ||
37113{
37114  tmp=./conf$$-$RANDOM
37115  (umask 077 && mkdir "$tmp")
37116} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37117ac_tmp=$tmp
37118
37119# Set up the scripts for CONFIG_FILES section.
37120# No need to generate them if there are no CONFIG_FILES.
37121# This happens for instance with `./config.status config.h'.
37122if test -n "$CONFIG_FILES"; then
37123
37124
37125ac_cr=`echo X | tr X '\015'`
37126# On cygwin, bash can eat \r inside `` if the user requested igncr.
37127# But we know of no other shell where ac_cr would be empty at this
37128# point, so we can use a bashism as a fallback.
37129if test "x$ac_cr" = x; then
37130  eval ac_cr=\$\'\\r\'
37131fi
37132ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37133if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37134  ac_cs_awk_cr='\\r'
37135else
37136  ac_cs_awk_cr=$ac_cr
37137fi
37138
37139echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37140_ACEOF
37141
37142
37143{
37144  echo "cat >conf$$subs.awk <<_ACEOF" &&
37145  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37146  echo "_ACEOF"
37147} >conf$$subs.sh ||
37148  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37149ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37150ac_delim='%!_!# '
37151for ac_last_try in false false false false false :; do
37152  . ./conf$$subs.sh ||
37153    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37154
37155  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37156  if test $ac_delim_n = $ac_delim_num; then
37157    break
37158  elif $ac_last_try; then
37159    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37160  else
37161    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37162  fi
37163done
37164rm -f conf$$subs.sh
37165
37166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37167cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37168_ACEOF
37169sed -n '
37170h
37171s/^/S["/; s/!.*/"]=/
37172p
37173g
37174s/^[^!]*!//
37175:repl
37176t repl
37177s/'"$ac_delim"'$//
37178t delim
37179:nl
37180h
37181s/\(.\{148\}\)..*/\1/
37182t more1
37183s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37184p
37185n
37186b repl
37187:more1
37188s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37189p
37190g
37191s/.\{148\}//
37192t nl
37193:delim
37194h
37195s/\(.\{148\}\)..*/\1/
37196t more2
37197s/["\\]/\\&/g; s/^/"/; s/$/"/
37198p
37199b
37200:more2
37201s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37202p
37203g
37204s/.\{148\}//
37205t delim
37206' <conf$$subs.awk | sed '
37207/^[^""]/{
37208  N
37209  s/\n//
37210}
37211' >>$CONFIG_STATUS || ac_write_fail=1
37212rm -f conf$$subs.awk
37213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37214_ACAWK
37215cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37216  for (key in S) S_is_set[key] = 1
37217  FS = ""
37218
37219}
37220{
37221  line = $ 0
37222  nfields = split(line, field, "@")
37223  substed = 0
37224  len = length(field[1])
37225  for (i = 2; i < nfields; i++) {
37226    key = field[i]
37227    keylen = length(key)
37228    if (S_is_set[key]) {
37229      value = S[key]
37230      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37231      len += length(value) + length(field[++i])
37232      substed = 1
37233    } else
37234      len += 1 + keylen
37235  }
37236
37237  print line
37238}
37239
37240_ACAWK
37241_ACEOF
37242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37243if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37244  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37245else
37246  cat
37247fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37248  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37249_ACEOF
37250
37251# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37252# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37253# trailing colons and then remove the whole line if VPATH becomes empty
37254# (actually we leave an empty line to preserve line numbers).
37255if test "x$srcdir" = x.; then
37256  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
37257h
37258s///
37259s/^/:/
37260s/[	 ]*$/:/
37261s/:\$(srcdir):/:/g
37262s/:\${srcdir}:/:/g
37263s/:@srcdir@:/:/g
37264s/^:*//
37265s/:*$//
37266x
37267s/\(=[	 ]*\).*/\1/
37268G
37269s/\n//
37270s/^[^=]*=[	 ]*$//
37271}'
37272fi
37273
37274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37275fi # test -n "$CONFIG_FILES"
37276
37277# Set up the scripts for CONFIG_HEADERS section.
37278# No need to generate them if there are no CONFIG_HEADERS.
37279# This happens for instance with `./config.status Makefile'.
37280if test -n "$CONFIG_HEADERS"; then
37281cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37282BEGIN {
37283_ACEOF
37284
37285# Transform confdefs.h into an awk script `defines.awk', embedded as
37286# here-document in config.status, that substitutes the proper values into
37287# config.h.in to produce config.h.
37288
37289# Create a delimiter string that does not exist in confdefs.h, to ease
37290# handling of long lines.
37291ac_delim='%!_!# '
37292for ac_last_try in false false :; do
37293  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37294  if test -z "$ac_tt"; then
37295    break
37296  elif $ac_last_try; then
37297    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37298  else
37299    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37300  fi
37301done
37302
37303# For the awk script, D is an array of macro values keyed by name,
37304# likewise P contains macro parameters if any.  Preserve backslash
37305# newline sequences.
37306
37307ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37308sed -n '
37309s/.\{148\}/&'"$ac_delim"'/g
37310t rset
37311:rset
37312s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
37313t def
37314d
37315:def
37316s/\\$//
37317t bsnl
37318s/["\\]/\\&/g
37319s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37320D["\1"]=" \3"/p
37321s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
37322d
37323:bsnl
37324s/["\\]/\\&/g
37325s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37326D["\1"]=" \3\\\\\\n"\\/p
37327t cont
37328s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37329t cont
37330d
37331:cont
37332n
37333s/.\{148\}/&'"$ac_delim"'/g
37334t clear
37335:clear
37336s/\\$//
37337t bsnlc
37338s/["\\]/\\&/g; s/^/"/; s/$/"/p
37339d
37340:bsnlc
37341s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37342b cont
37343' <confdefs.h | sed '
37344s/'"$ac_delim"'/"\\\
37345"/g' >>$CONFIG_STATUS || ac_write_fail=1
37346
37347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37348  for (key in D) D_is_set[key] = 1
37349  FS = ""
37350}
37351/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37352  line = \$ 0
37353  split(line, arg, " ")
37354  if (arg[1] == "#") {
37355    defundef = arg[2]
37356    mac1 = arg[3]
37357  } else {
37358    defundef = substr(arg[1], 2)
37359    mac1 = arg[2]
37360  }
37361  split(mac1, mac2, "(") #)
37362  macro = mac2[1]
37363  prefix = substr(line, 1, index(line, defundef) - 1)
37364  if (D_is_set[macro]) {
37365    # Preserve the white space surrounding the "#".
37366    print prefix "define", macro P[macro] D[macro]
37367    next
37368  } else {
37369    # Replace #undef with comments.  This is necessary, for example,
37370    # in the case of _POSIX_SOURCE, which is predefined and required
37371    # on some systems where configure will not decide to define it.
37372    if (defundef == "undef") {
37373      print "/*", prefix defundef, macro, "*/"
37374      next
37375    }
37376  }
37377}
37378{ print }
37379_ACAWK
37380_ACEOF
37381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37382  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37383fi # test -n "$CONFIG_HEADERS"
37384
37385
37386eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37387shift
37388for ac_tag
37389do
37390  case $ac_tag in
37391  :[FHLC]) ac_mode=$ac_tag; continue;;
37392  esac
37393  case $ac_mode$ac_tag in
37394  :[FHL]*:*);;
37395  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37396  :[FH]-) ac_tag=-:-;;
37397  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37398  esac
37399  ac_save_IFS=$IFS
37400  IFS=:
37401  set x $ac_tag
37402  IFS=$ac_save_IFS
37403  shift
37404  ac_file=$1
37405  shift
37406
37407  case $ac_mode in
37408  :L) ac_source=$1;;
37409  :[FH])
37410    ac_file_inputs=
37411    for ac_f
37412    do
37413      case $ac_f in
37414      -) ac_f="$ac_tmp/stdin";;
37415      *) # Look for the file first in the build tree, then in the source tree
37416	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37417	 # because $ac_f cannot contain `:'.
37418	 test -f "$ac_f" ||
37419	   case $ac_f in
37420	   [\\/$]*) false;;
37421	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37422	   esac ||
37423	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37424      esac
37425      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37426      as_fn_append ac_file_inputs " '$ac_f'"
37427    done
37428
37429    # Let's still pretend it is `configure' which instantiates (i.e., don't
37430    # use $as_me), people would be surprised to read:
37431    #    /* config.h.  Generated by config.status.  */
37432    configure_input='Generated from '`
37433	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37434	`' by configure.'
37435    if test x"$ac_file" != x-; then
37436      configure_input="$ac_file.  $configure_input"
37437      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37438$as_echo "$as_me: creating $ac_file" >&6;}
37439    fi
37440    # Neutralize special characters interpreted by sed in replacement strings.
37441    case $configure_input in #(
37442    *\&* | *\|* | *\\* )
37443       ac_sed_conf_input=`$as_echo "$configure_input" |
37444       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37445    *) ac_sed_conf_input=$configure_input;;
37446    esac
37447
37448    case $ac_tag in
37449    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37450      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37451    esac
37452    ;;
37453  esac
37454
37455  ac_dir=`$as_dirname -- "$ac_file" ||
37456$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37457	 X"$ac_file" : 'X\(//\)[^/]' \| \
37458	 X"$ac_file" : 'X\(//\)$' \| \
37459	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37460$as_echo X"$ac_file" |
37461    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37462	    s//\1/
37463	    q
37464	  }
37465	  /^X\(\/\/\)[^/].*/{
37466	    s//\1/
37467	    q
37468	  }
37469	  /^X\(\/\/\)$/{
37470	    s//\1/
37471	    q
37472	  }
37473	  /^X\(\/\).*/{
37474	    s//\1/
37475	    q
37476	  }
37477	  s/.*/./; q'`
37478  as_dir="$ac_dir"; as_fn_mkdir_p
37479  ac_builddir=.
37480
37481case "$ac_dir" in
37482.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37483*)
37484  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37485  # A ".." for each directory in $ac_dir_suffix.
37486  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37487  case $ac_top_builddir_sub in
37488  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37489  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37490  esac ;;
37491esac
37492ac_abs_top_builddir=$ac_pwd
37493ac_abs_builddir=$ac_pwd$ac_dir_suffix
37494# for backward compatibility:
37495ac_top_builddir=$ac_top_build_prefix
37496
37497case $srcdir in
37498  .)  # We are building in place.
37499    ac_srcdir=.
37500    ac_top_srcdir=$ac_top_builddir_sub
37501    ac_abs_top_srcdir=$ac_pwd ;;
37502  [\\/]* | ?:[\\/]* )  # Absolute name.
37503    ac_srcdir=$srcdir$ac_dir_suffix;
37504    ac_top_srcdir=$srcdir
37505    ac_abs_top_srcdir=$srcdir ;;
37506  *) # Relative name.
37507    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37508    ac_top_srcdir=$ac_top_build_prefix$srcdir
37509    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37510esac
37511ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37512
37513
37514  case $ac_mode in
37515  :F)
37516  #
37517  # CONFIG_FILE
37518  #
37519
37520_ACEOF
37521
37522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37523# If the template does not know about datarootdir, expand it.
37524# FIXME: This hack should be removed a few years after 2.60.
37525ac_datarootdir_hack=; ac_datarootdir_seen=
37526ac_sed_dataroot='
37527/datarootdir/ {
37528  p
37529  q
37530}
37531/@datadir@/p
37532/@docdir@/p
37533/@infodir@/p
37534/@localedir@/p
37535/@mandir@/p'
37536case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37537*datarootdir*) ac_datarootdir_seen=yes;;
37538*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37539  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37540$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37541_ACEOF
37542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37543  ac_datarootdir_hack='
37544  s&@datadir@&$datadir&g
37545  s&@docdir@&$docdir&g
37546  s&@infodir@&$infodir&g
37547  s&@localedir@&$localedir&g
37548  s&@mandir@&$mandir&g
37549  s&\\\${datarootdir}&$datarootdir&g' ;;
37550esac
37551_ACEOF
37552
37553# Neutralize VPATH when `$srcdir' = `.'.
37554# Shell code in configure.ac might set extrasub.
37555# FIXME: do we really want to maintain this feature?
37556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37557ac_sed_extra="$ac_vpsub
37558$extrasub
37559_ACEOF
37560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37561:t
37562/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37563s|@configure_input@|$ac_sed_conf_input|;t t
37564s&@top_builddir@&$ac_top_builddir_sub&;t t
37565s&@top_build_prefix@&$ac_top_build_prefix&;t t
37566s&@srcdir@&$ac_srcdir&;t t
37567s&@abs_srcdir@&$ac_abs_srcdir&;t t
37568s&@top_srcdir@&$ac_top_srcdir&;t t
37569s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37570s&@builddir@&$ac_builddir&;t t
37571s&@abs_builddir@&$ac_abs_builddir&;t t
37572s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37573$ac_datarootdir_hack
37574"
37575eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37576  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37577
37578test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37579  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37580  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37581      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37582  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37583which seems to be undefined.  Please make sure it is defined" >&5
37584$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37585which seems to be undefined.  Please make sure it is defined" >&2;}
37586
37587  rm -f "$ac_tmp/stdin"
37588  case $ac_file in
37589  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37590  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37591  esac \
37592  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37593 ;;
37594  :H)
37595  #
37596  # CONFIG_HEADER
37597  #
37598  if test x"$ac_file" != x-; then
37599    {
37600      $as_echo "/* $configure_input  */" \
37601      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37602    } >"$ac_tmp/config.h" \
37603      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37604    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37605      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37606$as_echo "$as_me: $ac_file is unchanged" >&6;}
37607    else
37608      rm -f "$ac_file"
37609      mv "$ac_tmp/config.h" "$ac_file" \
37610	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37611    fi
37612  else
37613    $as_echo "/* $configure_input  */" \
37614      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37615      || as_fn_error $? "could not create -" "$LINENO" 5
37616  fi
37617 ;;
37618
37619
37620  esac
37621
37622done # for ac_tag
37623
37624
37625as_fn_exit 0
37626_ACEOF
37627ac_clean_files=$ac_clean_files_save
37628
37629test $ac_write_fail = 0 ||
37630  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37631
37632
37633# configure is writing to config.log, and then calls config.status.
37634# config.status does its own redirection, appending to config.log.
37635# Unfortunately, on DOS this fails, as config.log is still kept open
37636# by configure, so config.status won't be able to write to it; its
37637# output is simply discarded.  So we exec the FD to /dev/null,
37638# effectively closing config.log, so it can be properly (re)opened and
37639# appended to by config.status.  When coming back to configure, we
37640# need to make the FD available again.
37641if test "$no_create" != yes; then
37642  ac_cs_success=:
37643  ac_config_status_args=
37644  test "$silent" = yes &&
37645    ac_config_status_args="$ac_config_status_args --quiet"
37646  exec 5>/dev/null
37647  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37648  exec 5>>config.log
37649  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37650  # would make configure fail if this is the last instruction.
37651  $ac_cs_success || as_fn_exit 1
37652fi
37653if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37655$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37656fi
37657
37658
37659# Try to move the config.log file to the output directory.
37660if test -e ./config.log; then
37661  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37662fi
37663
37664# Make the compare script executable
37665$CHMOD +x $OUTPUT_ROOT/compare.sh
37666
37667# Finally output some useful information to the user
37668
37669  # Finally output some useful information to the user
37670
37671  if test "x$CCACHE_FOUND" != x; then
37672    if  test "x$HAS_GOOD_CCACHE" = x; then
37673      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37674      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37675    else
37676      CCACHE_STATUS="installed and in use"
37677    fi
37678  else
37679    if test "x$GCC" = xyes; then
37680      CCACHE_STATUS="not installed (consider installing)"
37681      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37682    else
37683      CCACHE_STATUS="not available for your system"
37684    fi
37685  fi
37686
37687  printf "\n"
37688  printf "====================================================\n"
37689  printf "A new configuration has been successfully created in\n"
37690  printf "$OUTPUT_ROOT\n"
37691  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37692    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37693  else
37694    printf "using default settings.\n"
37695  fi
37696
37697  printf "\n"
37698  printf "Configuration summary:\n"
37699  printf "* Debug level:    $DEBUG_LEVEL\n"
37700  printf "* JDK variant:    $JDK_VARIANT\n"
37701  printf "* JVM variants:   $with_jvm_variants\n"
37702  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37703
37704  printf "\n"
37705  printf "Tools summary:\n"
37706  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37707    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37708  fi
37709  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37710  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37711  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37712
37713  printf "\n"
37714  printf "Build performance summary:\n"
37715  printf "* Cores to use:   $JOBS\n"
37716  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37717  printf "* ccache status:  $CCACHE_STATUS\n"
37718  printf "\n"
37719
37720  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37721    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37722    printf "$CCACHE_HELP_MSG\n"
37723
37724  # Print a helpful message on how to acquire the necessary build dependency.
37725  # ccache is the help tag: freetype, cups, pulse, alsa etc
37726  MISSING_DEPENDENCY=ccache
37727
37728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37729    cygwin_help $MISSING_DEPENDENCY
37730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37731    msys_help $MISSING_DEPENDENCY
37732  else
37733    PKGHANDLER_COMMAND=
37734
37735    case $PKGHANDLER in
37736      apt-get)
37737        apt_help     $MISSING_DEPENDENCY ;;
37738      yum)
37739        yum_help     $MISSING_DEPENDENCY ;;
37740      port)
37741        port_help    $MISSING_DEPENDENCY ;;
37742      pkgutil)
37743        pkgutil_help $MISSING_DEPENDENCY ;;
37744      pkgadd)
37745        pkgadd_help  $MISSING_DEPENDENCY ;;
37746    esac
37747
37748    if test "x$PKGHANDLER_COMMAND" != x; then
37749      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37750    fi
37751  fi
37752
37753    printf "$HELP_MSG\n"
37754    printf "\n"
37755  fi
37756
37757  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37758    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37759    printf "will result in longer build times.\n"
37760    printf "\n"
37761  fi
37762
37763  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37764    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37765    printf "These are not respected, and will be ignored. It is recommended\n"
37766    printf "that you clean your environment. The following variables are set:\n"
37767    printf "$FOUND_ALT_VARIABLES\n"
37768    printf "\n"
37769  fi
37770
37771  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37772    printf "WARNING: Your build output directory is not on a local disk.\n"
37773    printf "This will severely degrade build performance!\n"
37774    printf "It is recommended that you create an output directory on a local disk,\n"
37775    printf "and run the configure script again from that directory.\n"
37776    printf "\n"
37777  fi
37778
37779  if test "x$IS_RECONFIGURE" = "xyes"; then
37780    printf "WARNING: The result of this configuration has overridden an older\n"
37781    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37782    printf "proper build. Failure to do so might result in strange build problems.\n"
37783    printf "\n"
37784  fi
37785
37786