generated-configure.sh revision 1775:e1ef7db1e02d
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826VERSION_IS_GA
827VERSION_SHORT
828VERSION_STRING
829VERSION_NUMBER_FOUR_POSITIONS
830VERSION_NUMBER
831VERSION_OPT
832VERSION_BUILD
833VERSION_PRE
834VERSION_PATCH
835VERSION_SECURITY
836VERSION_MINOR
837VERSION_MAJOR
838MACOSX_BUNDLE_ID_BASE
839MACOSX_BUNDLE_NAME_BASE
840COMPANY_NAME
841JDK_RC_PLATFORM_NAME
842PRODUCT_SUFFIX
843PRODUCT_NAME
844LAUNCHER_NAME
845COPYRIGHT_YEAR
846COMPRESS_JARS
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853BDEPS_FTP
854BDEPS_UNZIP
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860SETFILE
861CODESIGN
862XATTR
863DSYMUTIL
864IS_GNU_TIME
865TIME
866STAT
867HG
868READELF
869OTOOL
870LDD
871ZIP
872UNZIP
873FIND_DELETE
874OUTPUT_SYNC
875OUTPUT_SYNC_SUPPORTED
876MAKE
877CHECK_TOOLSDIR_MAKE
878CHECK_TOOLSDIR_GMAKE
879CHECK_MAKE
880CHECK_GMAKE
881PKGHANDLER
882CONFIGURESUPPORT_OUTPUTDIR
883OUTPUT_ROOT
884CONF_NAME
885SPEC
886SDKROOT
887XCODEBUILD
888BUILD_VARIANT_RELEASE
889DEBUG_CLASSFILES
890FASTDEBUG
891VARIANT
892DEBUG_LEVEL
893MACOSX_UNIVERSAL
894INCLUDE_SA
895JVM_VARIANT_CORE
896JVM_VARIANT_ZEROSHARK
897JVM_VARIANT_ZERO
898JVM_VARIANT_KERNEL
899JVM_VARIANT_MINIMAL1
900JVM_VARIANT_CLIENT
901JVM_VARIANT_SERVER
902JVM_VARIANTS
903JVM_INTERPRETER
904JDK_VARIANT
905SET_OPENJDK
906CANONICAL_TOPDIR
907ORIGINAL_TOPDIR
908TOPDIR
909PATH_SEP
910ZERO_ARCHDEF
911DEFINE_CROSS_COMPILE_ARCH
912LP64
913OPENJDK_TARGET_OS_EXPORT_DIR
914OPENJDK_TARGET_CPU_JLI_CFLAGS
915OPENJDK_TARGET_CPU_OSARCH
916OPENJDK_TARGET_CPU_ISADIR
917OPENJDK_TARGET_CPU_LIBDIR
918OPENJDK_TARGET_CPU_LEGACY_LIB
919OPENJDK_TARGET_CPU_LEGACY
920REQUIRED_OS_VERSION
921REQUIRED_OS_NAME
922COMPILE_TYPE
923OPENJDK_TARGET_CPU_ENDIAN
924OPENJDK_TARGET_CPU_BITS
925OPENJDK_TARGET_CPU_ARCH
926OPENJDK_TARGET_CPU
927OPENJDK_TARGET_OS_ENV
928OPENJDK_TARGET_OS_TYPE
929OPENJDK_TARGET_OS
930OPENJDK_BUILD_CPU_ENDIAN
931OPENJDK_BUILD_CPU_BITS
932OPENJDK_BUILD_CPU_ARCH
933OPENJDK_BUILD_CPU
934OPENJDK_BUILD_OS_ENV
935OPENJDK_BUILD_OS_TYPE
936OPENJDK_BUILD_OS
937OPENJDK_BUILD_AUTOCONF_NAME
938OPENJDK_TARGET_AUTOCONF_NAME
939target_os
940target_vendor
941target_cpu
942target
943host_os
944host_vendor
945host_cpu
946host
947build_os
948build_vendor
949build_cpu
950build
951CPIO
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057with_builddeps_conf
1058with_builddeps_server
1059with_builddeps_dir
1060with_builddeps_group
1061enable_headful
1062enable_hotspot_test_in_build
1063with_cacerts_file
1064enable_unlimited_crypto
1065with_copyright_year
1066with_milestone
1067with_update_version
1068with_user_release_suffix
1069with_build_number
1070with_version_string
1071with_version_pre
1072with_version_opt_base
1073with_version_opt_debuglevel
1074with_version_build
1075with_version_major
1076with_version_minor
1077with_version_security
1078with_version_patch
1079with_boot_jdk
1080with_add_source_root
1081with_override_source_root
1082with_adds_and_overrides
1083with_override_langtools
1084with_override_corba
1085with_override_jaxp
1086with_override_jaxws
1087with_override_hotspot
1088with_override_nashorn
1089with_override_jdk
1090with_import_hotspot
1091with_toolchain_type
1092with_toolchain_version
1093with_jtreg
1094with_extra_cflags
1095with_extra_cxxflags
1096with_extra_ldflags
1097enable_warnings_as_errors
1098enable_debug_symbols
1099enable_zip_debug_info
1100enable_native_coverage
1101with_x
1102with_cups
1103with_cups_include
1104with_freetype
1105with_freetype_include
1106with_freetype_lib
1107with_freetype_src
1108enable_freetype_bundling
1109with_alsa
1110with_alsa_include
1111with_alsa_lib
1112with_libjpeg
1113with_giflib
1114with_lcms
1115with_libpng
1116with_zlib
1117with_stdc__lib
1118with_msvcr_dll
1119with_msvcp_dll
1120with_dxsdk
1121with_dxsdk_lib
1122with_dxsdk_include
1123with_num_cores
1124with_memory_size
1125with_jobs
1126with_boot_jdk_jvmargs
1127with_sjavac_server_java
1128enable_sjavac
1129enable_precompiled_headers
1130enable_ccache
1131with_ccache_dir
1132'
1133      ac_precious_vars='build_alias
1134host_alias
1135target_alias
1136BASENAME
1137BASH
1138CAT
1139CHMOD
1140CMP
1141COMM
1142CP
1143CUT
1144DATE
1145DIFF
1146DIRNAME
1147ECHO
1148EXPR
1149FILE
1150FIND
1151HEAD
1152LN
1153LS
1154MKDIR
1155MKTEMP
1156MV
1157NAWK
1158PRINTF
1159RM
1160SH
1161SORT
1162TAIL
1163TAR
1164TEE
1165TOUCH
1166TR
1167UNAME
1168UNIQ
1169WC
1170WHICH
1171XARGS
1172AWK
1173GREP
1174EGREP
1175FGREP
1176SED
1177CYGPATH
1178READLINK
1179DF
1180CPIO
1181UNZIP
1182ZIP
1183LDD
1184OTOOL
1185READELF
1186HG
1187STAT
1188TIME
1189DSYMUTIL
1190XATTR
1191CODESIGN
1192SETFILE
1193PKG_CONFIG
1194JAVA
1195JAVAC
1196JAVAH
1197JAR
1198JARSIGNER
1199CC
1200CFLAGS
1201LDFLAGS
1202LIBS
1203CPPFLAGS
1204CXX
1205CXXFLAGS
1206CCC
1207CPP
1208CXXCPP
1209AS
1210AR
1211LIPO
1212STRIP
1213NM
1214GNM
1215OBJCOPY
1216OBJDUMP
1217BUILD_CC
1218BUILD_CXX
1219BUILD_LD
1220JTREGEXE
1221XMKMF
1222FREETYPE_CFLAGS
1223FREETYPE_LIBS
1224ALSA_CFLAGS
1225ALSA_LIBS
1226LCMS_CFLAGS
1227LCMS_LIBS
1228PNG_CFLAGS
1229PNG_LIBS
1230LIBFFI_CFLAGS
1231LIBFFI_LIBS
1232CCACHE'
1233
1234
1235# Initialize some variables set by options.
1236ac_init_help=
1237ac_init_version=false
1238ac_unrecognized_opts=
1239ac_unrecognized_sep=
1240# The variables have the same names as the options, with
1241# dashes changed to underlines.
1242cache_file=/dev/null
1243exec_prefix=NONE
1244no_create=
1245no_recursion=
1246prefix=NONE
1247program_prefix=NONE
1248program_suffix=NONE
1249program_transform_name=s,x,x,
1250silent=
1251site=
1252srcdir=
1253verbose=
1254x_includes=NONE
1255x_libraries=NONE
1256
1257# Installation directory options.
1258# These are left unexpanded so users can "make install exec_prefix=/foo"
1259# and all the variables that are supposed to be based on exec_prefix
1260# by default will actually change.
1261# Use braces instead of parens because sh, perl, etc. also accept them.
1262# (The list follows the same order as the GNU Coding Standards.)
1263bindir='${exec_prefix}/bin'
1264sbindir='${exec_prefix}/sbin'
1265libexecdir='${exec_prefix}/libexec'
1266datarootdir='${prefix}/share'
1267datadir='${datarootdir}'
1268sysconfdir='${prefix}/etc'
1269sharedstatedir='${prefix}/com'
1270localstatedir='${prefix}/var'
1271includedir='${prefix}/include'
1272oldincludedir='/usr/include'
1273docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1274infodir='${datarootdir}/info'
1275htmldir='${docdir}'
1276dvidir='${docdir}'
1277pdfdir='${docdir}'
1278psdir='${docdir}'
1279libdir='${exec_prefix}/lib'
1280localedir='${datarootdir}/locale'
1281mandir='${datarootdir}/man'
1282
1283ac_prev=
1284ac_dashdash=
1285for ac_option
1286do
1287  # If the previous option needs an argument, assign it.
1288  if test -n "$ac_prev"; then
1289    eval $ac_prev=\$ac_option
1290    ac_prev=
1291    continue
1292  fi
1293
1294  case $ac_option in
1295  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1296  *=)   ac_optarg= ;;
1297  *)    ac_optarg=yes ;;
1298  esac
1299
1300  # Accept the important Cygnus configure options, so we can diagnose typos.
1301
1302  case $ac_dashdash$ac_option in
1303  --)
1304    ac_dashdash=yes ;;
1305
1306  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1307    ac_prev=bindir ;;
1308  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1309    bindir=$ac_optarg ;;
1310
1311  -build | --build | --buil | --bui | --bu)
1312    ac_prev=build_alias ;;
1313  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1314    build_alias=$ac_optarg ;;
1315
1316  -cache-file | --cache-file | --cache-fil | --cache-fi \
1317  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1318    ac_prev=cache_file ;;
1319  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1320  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1321    cache_file=$ac_optarg ;;
1322
1323  --config-cache | -C)
1324    cache_file=config.cache ;;
1325
1326  -datadir | --datadir | --datadi | --datad)
1327    ac_prev=datadir ;;
1328  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1329    datadir=$ac_optarg ;;
1330
1331  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1332  | --dataroo | --dataro | --datar)
1333    ac_prev=datarootdir ;;
1334  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1335  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1336    datarootdir=$ac_optarg ;;
1337
1338  -disable-* | --disable-*)
1339    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1340    # Reject names that are not valid shell variable names.
1341    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1342      as_fn_error $? "invalid feature name: $ac_useropt"
1343    ac_useropt_orig=$ac_useropt
1344    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1345    case $ac_user_opts in
1346      *"
1347"enable_$ac_useropt"
1348"*) ;;
1349      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1350	 ac_unrecognized_sep=', ';;
1351    esac
1352    eval enable_$ac_useropt=no ;;
1353
1354  -docdir | --docdir | --docdi | --doc | --do)
1355    ac_prev=docdir ;;
1356  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1357    docdir=$ac_optarg ;;
1358
1359  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1360    ac_prev=dvidir ;;
1361  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1362    dvidir=$ac_optarg ;;
1363
1364  -enable-* | --enable-*)
1365    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1366    # Reject names that are not valid shell variable names.
1367    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1368      as_fn_error $? "invalid feature name: $ac_useropt"
1369    ac_useropt_orig=$ac_useropt
1370    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1371    case $ac_user_opts in
1372      *"
1373"enable_$ac_useropt"
1374"*) ;;
1375      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1376	 ac_unrecognized_sep=', ';;
1377    esac
1378    eval enable_$ac_useropt=\$ac_optarg ;;
1379
1380  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1381  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1382  | --exec | --exe | --ex)
1383    ac_prev=exec_prefix ;;
1384  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1385  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1386  | --exec=* | --exe=* | --ex=*)
1387    exec_prefix=$ac_optarg ;;
1388
1389  -gas | --gas | --ga | --g)
1390    # Obsolete; use --with-gas.
1391    with_gas=yes ;;
1392
1393  -help | --help | --hel | --he | -h)
1394    ac_init_help=long ;;
1395  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1396    ac_init_help=recursive ;;
1397  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1398    ac_init_help=short ;;
1399
1400  -host | --host | --hos | --ho)
1401    ac_prev=host_alias ;;
1402  -host=* | --host=* | --hos=* | --ho=*)
1403    host_alias=$ac_optarg ;;
1404
1405  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1406    ac_prev=htmldir ;;
1407  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1408  | --ht=*)
1409    htmldir=$ac_optarg ;;
1410
1411  -includedir | --includedir | --includedi | --included | --include \
1412  | --includ | --inclu | --incl | --inc)
1413    ac_prev=includedir ;;
1414  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1415  | --includ=* | --inclu=* | --incl=* | --inc=*)
1416    includedir=$ac_optarg ;;
1417
1418  -infodir | --infodir | --infodi | --infod | --info | --inf)
1419    ac_prev=infodir ;;
1420  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1421    infodir=$ac_optarg ;;
1422
1423  -libdir | --libdir | --libdi | --libd)
1424    ac_prev=libdir ;;
1425  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1426    libdir=$ac_optarg ;;
1427
1428  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1429  | --libexe | --libex | --libe)
1430    ac_prev=libexecdir ;;
1431  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1432  | --libexe=* | --libex=* | --libe=*)
1433    libexecdir=$ac_optarg ;;
1434
1435  -localedir | --localedir | --localedi | --localed | --locale)
1436    ac_prev=localedir ;;
1437  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1438    localedir=$ac_optarg ;;
1439
1440  -localstatedir | --localstatedir | --localstatedi | --localstated \
1441  | --localstate | --localstat | --localsta | --localst | --locals)
1442    ac_prev=localstatedir ;;
1443  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1444  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1445    localstatedir=$ac_optarg ;;
1446
1447  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1448    ac_prev=mandir ;;
1449  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1450    mandir=$ac_optarg ;;
1451
1452  -nfp | --nfp | --nf)
1453    # Obsolete; use --without-fp.
1454    with_fp=no ;;
1455
1456  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1457  | --no-cr | --no-c | -n)
1458    no_create=yes ;;
1459
1460  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1461  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1462    no_recursion=yes ;;
1463
1464  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1465  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1466  | --oldin | --oldi | --old | --ol | --o)
1467    ac_prev=oldincludedir ;;
1468  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1469  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1470  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1471    oldincludedir=$ac_optarg ;;
1472
1473  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1474    ac_prev=prefix ;;
1475  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1476    prefix=$ac_optarg ;;
1477
1478  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1479  | --program-pre | --program-pr | --program-p)
1480    ac_prev=program_prefix ;;
1481  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1482  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1483    program_prefix=$ac_optarg ;;
1484
1485  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1486  | --program-suf | --program-su | --program-s)
1487    ac_prev=program_suffix ;;
1488  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1489  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1490    program_suffix=$ac_optarg ;;
1491
1492  -program-transform-name | --program-transform-name \
1493  | --program-transform-nam | --program-transform-na \
1494  | --program-transform-n | --program-transform- \
1495  | --program-transform | --program-transfor \
1496  | --program-transfo | --program-transf \
1497  | --program-trans | --program-tran \
1498  | --progr-tra | --program-tr | --program-t)
1499    ac_prev=program_transform_name ;;
1500  -program-transform-name=* | --program-transform-name=* \
1501  | --program-transform-nam=* | --program-transform-na=* \
1502  | --program-transform-n=* | --program-transform-=* \
1503  | --program-transform=* | --program-transfor=* \
1504  | --program-transfo=* | --program-transf=* \
1505  | --program-trans=* | --program-tran=* \
1506  | --progr-tra=* | --program-tr=* | --program-t=*)
1507    program_transform_name=$ac_optarg ;;
1508
1509  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1510    ac_prev=pdfdir ;;
1511  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1512    pdfdir=$ac_optarg ;;
1513
1514  -psdir | --psdir | --psdi | --psd | --ps)
1515    ac_prev=psdir ;;
1516  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1517    psdir=$ac_optarg ;;
1518
1519  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1520  | -silent | --silent | --silen | --sile | --sil)
1521    silent=yes ;;
1522
1523  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1524    ac_prev=sbindir ;;
1525  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1526  | --sbi=* | --sb=*)
1527    sbindir=$ac_optarg ;;
1528
1529  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1530  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1531  | --sharedst | --shareds | --shared | --share | --shar \
1532  | --sha | --sh)
1533    ac_prev=sharedstatedir ;;
1534  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1535  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1536  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1537  | --sha=* | --sh=*)
1538    sharedstatedir=$ac_optarg ;;
1539
1540  -site | --site | --sit)
1541    ac_prev=site ;;
1542  -site=* | --site=* | --sit=*)
1543    site=$ac_optarg ;;
1544
1545  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1546    ac_prev=srcdir ;;
1547  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1548    srcdir=$ac_optarg ;;
1549
1550  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1551  | --syscon | --sysco | --sysc | --sys | --sy)
1552    ac_prev=sysconfdir ;;
1553  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1554  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1555    sysconfdir=$ac_optarg ;;
1556
1557  -target | --target | --targe | --targ | --tar | --ta | --t)
1558    ac_prev=target_alias ;;
1559  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1560    target_alias=$ac_optarg ;;
1561
1562  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1563    verbose=yes ;;
1564
1565  -version | --version | --versio | --versi | --vers | -V)
1566    ac_init_version=: ;;
1567
1568  -with-* | --with-*)
1569    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1570    # Reject names that are not valid shell variable names.
1571    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1572      as_fn_error $? "invalid package name: $ac_useropt"
1573    ac_useropt_orig=$ac_useropt
1574    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1575    case $ac_user_opts in
1576      *"
1577"with_$ac_useropt"
1578"*) ;;
1579      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1580	 ac_unrecognized_sep=', ';;
1581    esac
1582    eval with_$ac_useropt=\$ac_optarg ;;
1583
1584  -without-* | --without-*)
1585    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1586    # Reject names that are not valid shell variable names.
1587    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1588      as_fn_error $? "invalid package name: $ac_useropt"
1589    ac_useropt_orig=$ac_useropt
1590    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1591    case $ac_user_opts in
1592      *"
1593"with_$ac_useropt"
1594"*) ;;
1595      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1596	 ac_unrecognized_sep=', ';;
1597    esac
1598    eval with_$ac_useropt=no ;;
1599
1600  --x)
1601    # Obsolete; use --with-x.
1602    with_x=yes ;;
1603
1604  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1605  | --x-incl | --x-inc | --x-in | --x-i)
1606    ac_prev=x_includes ;;
1607  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1608  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1609    x_includes=$ac_optarg ;;
1610
1611  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1612  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1613    ac_prev=x_libraries ;;
1614  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1615  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1616    x_libraries=$ac_optarg ;;
1617
1618  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1619Try \`$0 --help' for more information"
1620    ;;
1621
1622  *=*)
1623    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1624    # Reject names that are not valid shell variable names.
1625    case $ac_envvar in #(
1626      '' | [0-9]* | *[!_$as_cr_alnum]* )
1627      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1628    esac
1629    eval $ac_envvar=\$ac_optarg
1630    export $ac_envvar ;;
1631
1632  *)
1633    # FIXME: should be removed in autoconf 3.0.
1634    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1635    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1636      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1637    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1638    ;;
1639
1640  esac
1641done
1642
1643if test -n "$ac_prev"; then
1644  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1645  as_fn_error $? "missing argument to $ac_option"
1646fi
1647
1648if test -n "$ac_unrecognized_opts"; then
1649  case $enable_option_checking in
1650    no) ;;
1651    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1652    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1653  esac
1654fi
1655
1656# Check all directory arguments for consistency.
1657for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1658		datadir sysconfdir sharedstatedir localstatedir includedir \
1659		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1660		libdir localedir mandir
1661do
1662  eval ac_val=\$$ac_var
1663  # Remove trailing slashes.
1664  case $ac_val in
1665    */ )
1666      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1667      eval $ac_var=\$ac_val;;
1668  esac
1669  # Be sure to have absolute directory names.
1670  case $ac_val in
1671    [\\/$]* | ?:[\\/]* )  continue;;
1672    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1673  esac
1674  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1675done
1676
1677# There might be people who depend on the old broken behavior: `$host'
1678# used to hold the argument of --host etc.
1679# FIXME: To remove some day.
1680build=$build_alias
1681host=$host_alias
1682target=$target_alias
1683
1684# FIXME: To remove some day.
1685if test "x$host_alias" != x; then
1686  if test "x$build_alias" = x; then
1687    cross_compiling=maybe
1688  elif test "x$build_alias" != "x$host_alias"; then
1689    cross_compiling=yes
1690  fi
1691fi
1692
1693ac_tool_prefix=
1694test -n "$host_alias" && ac_tool_prefix=$host_alias-
1695
1696test "$silent" = yes && exec 6>/dev/null
1697
1698
1699ac_pwd=`pwd` && test -n "$ac_pwd" &&
1700ac_ls_di=`ls -di .` &&
1701ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1702  as_fn_error $? "working directory cannot be determined"
1703test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1704  as_fn_error $? "pwd does not report name of working directory"
1705
1706
1707# Find the source files, if location was not specified.
1708if test -z "$srcdir"; then
1709  ac_srcdir_defaulted=yes
1710  # Try the directory containing this script, then the parent directory.
1711  ac_confdir=`$as_dirname -- "$as_myself" ||
1712$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1713	 X"$as_myself" : 'X\(//\)[^/]' \| \
1714	 X"$as_myself" : 'X\(//\)$' \| \
1715	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1716$as_echo X"$as_myself" |
1717    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1718	    s//\1/
1719	    q
1720	  }
1721	  /^X\(\/\/\)[^/].*/{
1722	    s//\1/
1723	    q
1724	  }
1725	  /^X\(\/\/\)$/{
1726	    s//\1/
1727	    q
1728	  }
1729	  /^X\(\/\).*/{
1730	    s//\1/
1731	    q
1732	  }
1733	  s/.*/./; q'`
1734  srcdir=$ac_confdir
1735  if test ! -r "$srcdir/$ac_unique_file"; then
1736    srcdir=..
1737  fi
1738else
1739  ac_srcdir_defaulted=no
1740fi
1741if test ! -r "$srcdir/$ac_unique_file"; then
1742  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1743  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1744fi
1745ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1746ac_abs_confdir=`(
1747	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1748	pwd)`
1749# When building in place, set srcdir=.
1750if test "$ac_abs_confdir" = "$ac_pwd"; then
1751  srcdir=.
1752fi
1753# Remove unnecessary trailing slashes from srcdir.
1754# Double slashes in file names in object file debugging info
1755# mess up M-x gdb in Emacs.
1756case $srcdir in
1757*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1758esac
1759for ac_var in $ac_precious_vars; do
1760  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1761  eval ac_env_${ac_var}_value=\$${ac_var}
1762  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1763  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1764done
1765
1766#
1767# Report the --help message.
1768#
1769if test "$ac_init_help" = "long"; then
1770  # Omit some internal or obsolete options to make the list less imposing.
1771  # This message is too long to be a string in the A/UX 3.1 sh.
1772  cat <<_ACEOF
1773\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1774
1775Usage: $0 [OPTION]... [VAR=VALUE]...
1776
1777To assign environment variables (e.g., CC, CFLAGS...), specify them as
1778VAR=VALUE.  See below for descriptions of some of the useful variables.
1779
1780Defaults for the options are specified in brackets.
1781
1782Configuration:
1783  -h, --help              display this help and exit
1784      --help=short        display options specific to this package
1785      --help=recursive    display the short help of all the included packages
1786  -V, --version           display version information and exit
1787  -q, --quiet, --silent   do not print \`checking ...' messages
1788      --cache-file=FILE   cache test results in FILE [disabled]
1789  -C, --config-cache      alias for \`--cache-file=config.cache'
1790  -n, --no-create         do not create output files
1791      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1792
1793Installation directories:
1794  --prefix=PREFIX         install architecture-independent files in PREFIX
1795                          [$ac_default_prefix]
1796  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1797                          [PREFIX]
1798
1799By default, \`make install' will install all the files in
1800\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1801an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1802for instance \`--prefix=\$HOME'.
1803
1804For better control, use the options below.
1805
1806Fine tuning of the installation directories:
1807  --bindir=DIR            user executables [EPREFIX/bin]
1808  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1809  --libexecdir=DIR        program executables [EPREFIX/libexec]
1810  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1811  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1812  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1813  --libdir=DIR            object code libraries [EPREFIX/lib]
1814  --includedir=DIR        C header files [PREFIX/include]
1815  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1816  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1817  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1818  --infodir=DIR           info documentation [DATAROOTDIR/info]
1819  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1820  --mandir=DIR            man documentation [DATAROOTDIR/man]
1821  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1822  --htmldir=DIR           html documentation [DOCDIR]
1823  --dvidir=DIR            dvi documentation [DOCDIR]
1824  --pdfdir=DIR            pdf documentation [DOCDIR]
1825  --psdir=DIR             ps documentation [DOCDIR]
1826_ACEOF
1827
1828  cat <<\_ACEOF
1829
1830X features:
1831  --x-includes=DIR    X include files are in DIR
1832  --x-libraries=DIR   X library files are in DIR
1833
1834System types:
1835  --build=BUILD     configure for building on BUILD [guessed]
1836  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1837  --target=TARGET   configure for building compilers for TARGET [HOST]
1838_ACEOF
1839fi
1840
1841if test -n "$ac_init_help"; then
1842  case $ac_init_help in
1843     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1844   esac
1845  cat <<\_ACEOF
1846
1847Optional Features:
1848  --disable-option-checking  ignore unrecognized --enable/--with options
1849  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1850  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1851  --enable-openjdk-only   suppress building custom source even if present
1852                          [disabled]
1853  --enable-debug          set the debug level to fastdebug (shorthand for
1854                          --with-debug-level=fastdebug) [disabled]
1855  --disable-headful       disable building headful support (graphical UI
1856                          support) [enabled]
1857  --enable-hotspot-test-in-build
1858                          run the Queens test after Hotspot build [disabled]
1859  --enable-unlimited-crypto
1860                          Enable unlimited crypto policy [disabled]
1861  --disable-warnings-as-errors
1862                          do not consider native warnings to be an error
1863                          [enabled]
1864  --disable-debug-symbols disable generation of debug symbols [enabled]
1865  --disable-zip-debug-info
1866                          disable zipping of debug-info files [enabled]
1867  --enable-native-coverage
1868                          enable native compilation with code coverage
1869                          data[disabled]
1870  --disable-freetype-bundling
1871                          disable bundling of the freetype library with the
1872                          build result [enabled on Windows or when using
1873                          --with-freetype, disabled otherwise]
1874  --enable-sjavac         use sjavac to do fast incremental compiles
1875                          [disabled]
1876  --disable-precompiled-headers
1877                          disable using precompiled headers when compiling C++
1878                          [enabled]
1879  --enable-ccache         enable using ccache to speed up recompilations
1880                          [disabled]
1881
1882Optional Packages:
1883  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1884  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1885  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1886                          support it), e.g. --with-target-bits=32 [guessed]
1887  --with-custom-make-dir  Deprecated. Option is kept for backwards
1888                          compatibility and is ignored
1889  --with-jdk-variant      JDK variant to build (normal) [normal]
1890  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1891  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1892                          client, minimal1, kernel, zero, zeroshark, core)
1893                          [server]
1894  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1895                          optimized (HotSpot build only)) [release]
1896  --with-devkit           use this devkit for compilers, tools and resources
1897  --with-sys-root         alias for --with-sysroot for backwards compatability
1898  --with-sysroot          use this directory as sysroot
1899  --with-tools-dir        alias for --with-toolchain-path for backwards
1900                          compatibility
1901  --with-toolchain-path   prepend these directories when searching for
1902                          toolchain binaries (compilers etc)
1903  --with-extra-path       prepend these directories to the default path
1904  --with-sdk-name         use the platform SDK of the given name. [macosx]
1905  --with-conf-name        use this as the name of the configuration [generated
1906                          from important configuration options]
1907  --with-output-sync      set make output sync type if supported by make.
1908                          [recurse]
1909  --with-builddeps-conf   use this configuration file for the builddeps
1910  --with-builddeps-server download and use build dependencies from this server
1911                          url
1912  --with-builddeps-dir    store downloaded build dependencies here
1913                          [/localhome/builddeps]
1914  --with-builddeps-group  chgrp the downloaded build dependencies to this
1915                          group
1916  --with-cacerts-file     specify alternative cacerts file
1917  --with-copyright-year   Set copyright year value for build [current year]
1918  --with-milestone        Deprecated. Option is kept for backwards
1919                          compatibility and is ignored
1920  --with-update-version   Deprecated. Option is kept for backwards
1921                          compatibility and is ignored
1922  --with-user-release-suffix
1923                          Deprecated. Option is kept for backwards
1924                          compatibility and is ignored
1925  --with-build-number     Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-version-string   Set version string [calculated]
1928  --with-version-pre      Set the base part of the version 'PRE' field
1929                          (pre-release identifier) ['internal']
1930  --with-version-opt-base Set version 'OPT' base field. Debug level will be
1931                          appended. (build metadata)
1932                          [<timestamp>.<user>.<dirname>]
1933  --with-version-opt-debuglevel
1934                          Set version 'OPT' field (build metadata)
1935                          [<timestamp>.<user>.<dirname>]
1936  --with-version-build    Set version 'BUILD' field (build number) [not
1937                          specified]
1938  --with-version-major    Set version 'MAJOR' field (first number) [current
1939                          source value]
1940  --with-version-minor    Set version 'MINOR' field (second number) [current
1941                          source value]
1942  --with-version-security Set version 'SECURITY' field (third number) [current
1943                          source value]
1944  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1945                          specified]
1946  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1947  --with-add-source-root  for each and every source directory, look in this
1948                          additional source root for the same directory; if it
1949                          exists and have files in it, include it in the build
1950  --with-override-source-root
1951                          for each and every source directory, look in this
1952                          override source root for the same directory; if it
1953                          exists, use that directory instead and ignore the
1954                          directory in the original source root
1955  --with-adds-and-overrides
1956                          use the subdirs 'adds' and 'overrides' in the
1957                          specified directory as add-source-root and
1958                          override-source-root
1959  --with-override-langtools
1960                          use this langtools dir for the build
1961  --with-override-corba   use this corba dir for the build
1962  --with-override-jaxp    use this jaxp dir for the build
1963  --with-override-jaxws   use this jaxws dir for the build
1964  --with-override-hotspot use this hotspot dir for the build
1965  --with-override-nashorn use this nashorn dir for the build
1966  --with-override-jdk     use this jdk dir for the build
1967  --with-import-hotspot   import hotspot binaries from this jdk image or
1968                          hotspot build dist dir instead of building from
1969                          source
1970  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1971                          to show possible values [platform dependent]
1972  --with-toolchain-version
1973                          the version of the toolchain to look for, use
1974                          '--help' to show possible values [platform
1975                          dependent]
1976  --with-jtreg            Regression Test Harness [probed]
1977  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1978  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1979  --with-extra-ldflags    extra flags to be used when linking jdk
1980  --with-x                use the X Window System
1981  --with-cups             specify prefix directory for the cups package
1982                          (expecting the headers under PATH/include)
1983  --with-cups-include     specify directory for the cups include files
1984  --with-freetype         specify prefix directory for the freetype package
1985                          (expecting the libraries under PATH/lib and the
1986                          headers under PATH/include)
1987  --with-freetype-include specify directory for the freetype include files
1988  --with-freetype-lib     specify directory for the freetype library
1989  --with-freetype-src     specify directory with freetype sources to
1990                          automatically build the library (experimental,
1991                          Windows-only)
1992  --with-alsa             specify prefix directory for the alsa package
1993                          (expecting the libraries under PATH/lib and the
1994                          headers under PATH/include)
1995  --with-alsa-include     specify directory for the alsa include files
1996  --with-alsa-lib         specify directory for the alsa library
1997  --with-libjpeg          use libjpeg from build system or OpenJDK source
1998                          (system, bundled) [bundled]
1999  --with-giflib           use giflib from build system or OpenJDK source
2000                          (system, bundled) [bundled]
2001  --with-lcms             use lcms2 from build system or OpenJDK source
2002                          (system, bundled) [bundled]
2003  --with-libpng           use libpng from build system or OpenJDK source
2004                          (system, bundled) [bundled]
2005  --with-zlib             use zlib from build system or OpenJDK source
2006                          (system, bundled) [bundled]
2007  --with-stdc++lib=<static>,<dynamic>,<default>
2008                          force linking of the C++ runtime on Linux to either
2009                          static or dynamic, default is static with dynamic as
2010                          fallback
2011  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2012                          (Windows only) [probed]
2013  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2014                          (Windows only) [probed]
2015  --with-dxsdk            Deprecated. Option is kept for backwards
2016                          compatibility and is ignored
2017  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2018                          compatibility and is ignored
2019  --with-dxsdk-include    Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-num-cores        number of cores in the build system, e.g.
2022                          --with-num-cores=8 [probed]
2023  --with-memory-size      memory (in MB) available in the build system, e.g.
2024                          --with-memory-size=1024 [probed]
2025  --with-jobs             number of parallel jobs to let make run [calculated
2026                          based on cores and memory]
2027  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2028                          invocations of boot JDK, overriding the default
2029                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2030                          -enableassertions"
2031  --with-sjavac-server-java
2032                          use this java binary for running the sjavac
2033                          background server [Boot JDK java]
2034  --with-ccache-dir       where to store ccache files [~/.ccache]
2035
2036Some influential environment variables:
2037  BASENAME    Override default value for BASENAME
2038  BASH        Override default value for BASH
2039  CAT         Override default value for CAT
2040  CHMOD       Override default value for CHMOD
2041  CMP         Override default value for CMP
2042  COMM        Override default value for COMM
2043  CP          Override default value for CP
2044  CUT         Override default value for CUT
2045  DATE        Override default value for DATE
2046  DIFF        Override default value for DIFF
2047  DIRNAME     Override default value for DIRNAME
2048  ECHO        Override default value for ECHO
2049  EXPR        Override default value for EXPR
2050  FILE        Override default value for FILE
2051  FIND        Override default value for FIND
2052  HEAD        Override default value for HEAD
2053  LN          Override default value for LN
2054  LS          Override default value for LS
2055  MKDIR       Override default value for MKDIR
2056  MKTEMP      Override default value for MKTEMP
2057  MV          Override default value for MV
2058  NAWK        Override default value for NAWK
2059  PRINTF      Override default value for PRINTF
2060  RM          Override default value for RM
2061  SH          Override default value for SH
2062  SORT        Override default value for SORT
2063  TAIL        Override default value for TAIL
2064  TAR         Override default value for TAR
2065  TEE         Override default value for TEE
2066  TOUCH       Override default value for TOUCH
2067  TR          Override default value for TR
2068  UNAME       Override default value for UNAME
2069  UNIQ        Override default value for UNIQ
2070  WC          Override default value for WC
2071  WHICH       Override default value for WHICH
2072  XARGS       Override default value for XARGS
2073  AWK         Override default value for AWK
2074  GREP        Override default value for GREP
2075  EGREP       Override default value for EGREP
2076  FGREP       Override default value for FGREP
2077  SED         Override default value for SED
2078  CYGPATH     Override default value for CYGPATH
2079  READLINK    Override default value for READLINK
2080  DF          Override default value for DF
2081  CPIO        Override default value for CPIO
2082  UNZIP       Override default value for UNZIP
2083  ZIP         Override default value for ZIP
2084  LDD         Override default value for LDD
2085  OTOOL       Override default value for OTOOL
2086  READELF     Override default value for READELF
2087  HG          Override default value for HG
2088  STAT        Override default value for STAT
2089  TIME        Override default value for TIME
2090  DSYMUTIL    Override default value for DSYMUTIL
2091  XATTR       Override default value for XATTR
2092  CODESIGN    Override default value for CODESIGN
2093  SETFILE     Override default value for SETFILE
2094  PKG_CONFIG  path to pkg-config utility
2095  JAVA        Override default value for JAVA
2096  JAVAC       Override default value for JAVAC
2097  JAVAH       Override default value for JAVAH
2098  JAR         Override default value for JAR
2099  JARSIGNER   Override default value for JARSIGNER
2100  CC          C compiler command
2101  CFLAGS      C compiler flags
2102  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2103              nonstandard directory <lib dir>
2104  LIBS        libraries to pass to the linker, e.g. -l<library>
2105  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2106              you have headers in a nonstandard directory <include dir>
2107  CXX         C++ compiler command
2108  CXXFLAGS    C++ compiler flags
2109  CPP         C preprocessor
2110  CXXCPP      C++ preprocessor
2111  AS          Override default value for AS
2112  AR          Override default value for AR
2113  LIPO        Override default value for LIPO
2114  STRIP       Override default value for STRIP
2115  NM          Override default value for NM
2116  GNM         Override default value for GNM
2117  OBJCOPY     Override default value for OBJCOPY
2118  OBJDUMP     Override default value for OBJDUMP
2119  BUILD_CC    Override default value for BUILD_CC
2120  BUILD_CXX   Override default value for BUILD_CXX
2121  BUILD_LD    Override default value for BUILD_LD
2122  JTREGEXE    Override default value for JTREGEXE
2123  XMKMF       Path to xmkmf, Makefile generator for X Window System
2124  FREETYPE_CFLAGS
2125              C compiler flags for FREETYPE, overriding pkg-config
2126  FREETYPE_LIBS
2127              linker flags for FREETYPE, overriding pkg-config
2128  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2129  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2130  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2131  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2132  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2133  PNG_LIBS    linker flags for PNG, overriding pkg-config
2134  LIBFFI_CFLAGS
2135              C compiler flags for LIBFFI, overriding pkg-config
2136  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2137  CCACHE      Override default value for CCACHE
2138
2139Use these variables to override the choices made by `configure' or to help
2140it to find libraries and programs with nonstandard names/locations.
2141
2142Report bugs to <build-dev@openjdk.java.net>.
2143OpenJDK home page: <http://openjdk.java.net>.
2144_ACEOF
2145ac_status=$?
2146fi
2147
2148if test "$ac_init_help" = "recursive"; then
2149  # If there are subdirs, report their specific --help.
2150  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2151    test -d "$ac_dir" ||
2152      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2153      continue
2154    ac_builddir=.
2155
2156case "$ac_dir" in
2157.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2158*)
2159  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2160  # A ".." for each directory in $ac_dir_suffix.
2161  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2162  case $ac_top_builddir_sub in
2163  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2164  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2165  esac ;;
2166esac
2167ac_abs_top_builddir=$ac_pwd
2168ac_abs_builddir=$ac_pwd$ac_dir_suffix
2169# for backward compatibility:
2170ac_top_builddir=$ac_top_build_prefix
2171
2172case $srcdir in
2173  .)  # We are building in place.
2174    ac_srcdir=.
2175    ac_top_srcdir=$ac_top_builddir_sub
2176    ac_abs_top_srcdir=$ac_pwd ;;
2177  [\\/]* | ?:[\\/]* )  # Absolute name.
2178    ac_srcdir=$srcdir$ac_dir_suffix;
2179    ac_top_srcdir=$srcdir
2180    ac_abs_top_srcdir=$srcdir ;;
2181  *) # Relative name.
2182    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2183    ac_top_srcdir=$ac_top_build_prefix$srcdir
2184    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2185esac
2186ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2187
2188    cd "$ac_dir" || { ac_status=$?; continue; }
2189    # Check for guested configure.
2190    if test -f "$ac_srcdir/configure.gnu"; then
2191      echo &&
2192      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2193    elif test -f "$ac_srcdir/configure"; then
2194      echo &&
2195      $SHELL "$ac_srcdir/configure" --help=recursive
2196    else
2197      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2198    fi || ac_status=$?
2199    cd "$ac_pwd" || { ac_status=$?; break; }
2200  done
2201fi
2202
2203test -n "$ac_init_help" && exit $ac_status
2204if $ac_init_version; then
2205  cat <<\_ACEOF
2206OpenJDK configure jdk9
2207generated by GNU Autoconf 2.69
2208
2209Copyright (C) 2012 Free Software Foundation, Inc.
2210This configure script is free software; the Free Software Foundation
2211gives unlimited permission to copy, distribute and modify it.
2212_ACEOF
2213  exit
2214fi
2215
2216## ------------------------ ##
2217## Autoconf initialization. ##
2218## ------------------------ ##
2219
2220# ac_fn_c_try_compile LINENO
2221# --------------------------
2222# Try to compile conftest.$ac_ext, and return whether this succeeded.
2223ac_fn_c_try_compile ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  rm -f conftest.$ac_objext
2227  if { { ac_try="$ac_compile"
2228case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_compile") 2>conftest.err
2235  ac_status=$?
2236  if test -s conftest.err; then
2237    grep -v '^ *+' conftest.err >conftest.er1
2238    cat conftest.er1 >&5
2239    mv -f conftest.er1 conftest.err
2240  fi
2241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242  test $ac_status = 0; } && {
2243	 test -z "$ac_c_werror_flag" ||
2244	 test ! -s conftest.err
2245       } && test -s conftest.$ac_objext; then :
2246  ac_retval=0
2247else
2248  $as_echo "$as_me: failed program was:" >&5
2249sed 's/^/| /' conftest.$ac_ext >&5
2250
2251	ac_retval=1
2252fi
2253  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2254  as_fn_set_status $ac_retval
2255
2256} # ac_fn_c_try_compile
2257
2258# ac_fn_cxx_try_compile LINENO
2259# ----------------------------
2260# Try to compile conftest.$ac_ext, and return whether this succeeded.
2261ac_fn_cxx_try_compile ()
2262{
2263  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264  rm -f conftest.$ac_objext
2265  if { { ac_try="$ac_compile"
2266case "(($ac_try" in
2267  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2268  *) ac_try_echo=$ac_try;;
2269esac
2270eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2271$as_echo "$ac_try_echo"; } >&5
2272  (eval "$ac_compile") 2>conftest.err
2273  ac_status=$?
2274  if test -s conftest.err; then
2275    grep -v '^ *+' conftest.err >conftest.er1
2276    cat conftest.er1 >&5
2277    mv -f conftest.er1 conftest.err
2278  fi
2279  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2280  test $ac_status = 0; } && {
2281	 test -z "$ac_cxx_werror_flag" ||
2282	 test ! -s conftest.err
2283       } && test -s conftest.$ac_objext; then :
2284  ac_retval=0
2285else
2286  $as_echo "$as_me: failed program was:" >&5
2287sed 's/^/| /' conftest.$ac_ext >&5
2288
2289	ac_retval=1
2290fi
2291  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2292  as_fn_set_status $ac_retval
2293
2294} # ac_fn_cxx_try_compile
2295
2296# ac_fn_c_try_cpp LINENO
2297# ----------------------
2298# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2299ac_fn_c_try_cpp ()
2300{
2301  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302  if { { ac_try="$ac_cpp conftest.$ac_ext"
2303case "(($ac_try" in
2304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2305  *) ac_try_echo=$ac_try;;
2306esac
2307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2308$as_echo "$ac_try_echo"; } >&5
2309  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2310  ac_status=$?
2311  if test -s conftest.err; then
2312    grep -v '^ *+' conftest.err >conftest.er1
2313    cat conftest.er1 >&5
2314    mv -f conftest.er1 conftest.err
2315  fi
2316  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2317  test $ac_status = 0; } > conftest.i && {
2318	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2319	 test ! -s conftest.err
2320       }; then :
2321  ac_retval=0
2322else
2323  $as_echo "$as_me: failed program was:" >&5
2324sed 's/^/| /' conftest.$ac_ext >&5
2325
2326    ac_retval=1
2327fi
2328  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2329  as_fn_set_status $ac_retval
2330
2331} # ac_fn_c_try_cpp
2332
2333# ac_fn_cxx_try_cpp LINENO
2334# ------------------------
2335# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2336ac_fn_cxx_try_cpp ()
2337{
2338  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339  if { { ac_try="$ac_cpp conftest.$ac_ext"
2340case "(($ac_try" in
2341  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2342  *) ac_try_echo=$ac_try;;
2343esac
2344eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2345$as_echo "$ac_try_echo"; } >&5
2346  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2347  ac_status=$?
2348  if test -s conftest.err; then
2349    grep -v '^ *+' conftest.err >conftest.er1
2350    cat conftest.er1 >&5
2351    mv -f conftest.er1 conftest.err
2352  fi
2353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2354  test $ac_status = 0; } > conftest.i && {
2355	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2356	 test ! -s conftest.err
2357       }; then :
2358  ac_retval=0
2359else
2360  $as_echo "$as_me: failed program was:" >&5
2361sed 's/^/| /' conftest.$ac_ext >&5
2362
2363    ac_retval=1
2364fi
2365  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2366  as_fn_set_status $ac_retval
2367
2368} # ac_fn_cxx_try_cpp
2369
2370# ac_fn_c_try_link LINENO
2371# -----------------------
2372# Try to link conftest.$ac_ext, and return whether this succeeded.
2373ac_fn_c_try_link ()
2374{
2375  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376  rm -f conftest.$ac_objext conftest$ac_exeext
2377  if { { ac_try="$ac_link"
2378case "(($ac_try" in
2379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2380  *) ac_try_echo=$ac_try;;
2381esac
2382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2383$as_echo "$ac_try_echo"; } >&5
2384  (eval "$ac_link") 2>conftest.err
2385  ac_status=$?
2386  if test -s conftest.err; then
2387    grep -v '^ *+' conftest.err >conftest.er1
2388    cat conftest.er1 >&5
2389    mv -f conftest.er1 conftest.err
2390  fi
2391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2392  test $ac_status = 0; } && {
2393	 test -z "$ac_c_werror_flag" ||
2394	 test ! -s conftest.err
2395       } && test -s conftest$ac_exeext && {
2396	 test "$cross_compiling" = yes ||
2397	 test -x conftest$ac_exeext
2398       }; then :
2399  ac_retval=0
2400else
2401  $as_echo "$as_me: failed program was:" >&5
2402sed 's/^/| /' conftest.$ac_ext >&5
2403
2404	ac_retval=1
2405fi
2406  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2407  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2408  # interfere with the next link command; also delete a directory that is
2409  # left behind by Apple's compiler.  We do this before executing the actions.
2410  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2411  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412  as_fn_set_status $ac_retval
2413
2414} # ac_fn_c_try_link
2415
2416# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2417# ---------------------------------------------------------
2418# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2419# the include files in INCLUDES and setting the cache variable VAR
2420# accordingly.
2421ac_fn_cxx_check_header_mongrel ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  if eval \${$3+:} false; then :
2425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2426$as_echo_n "checking for $2... " >&6; }
2427if eval \${$3+:} false; then :
2428  $as_echo_n "(cached) " >&6
2429fi
2430eval ac_res=\$$3
2431	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
2433else
2434  # Is the header compilable?
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2436$as_echo_n "checking $2 usability... " >&6; }
2437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439$4
2440#include <$2>
2441_ACEOF
2442if ac_fn_cxx_try_compile "$LINENO"; then :
2443  ac_header_compiler=yes
2444else
2445  ac_header_compiler=no
2446fi
2447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2449$as_echo "$ac_header_compiler" >&6; }
2450
2451# Is the header present?
2452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2453$as_echo_n "checking $2 presence... " >&6; }
2454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2455/* end confdefs.h.  */
2456#include <$2>
2457_ACEOF
2458if ac_fn_cxx_try_cpp "$LINENO"; then :
2459  ac_header_preproc=yes
2460else
2461  ac_header_preproc=no
2462fi
2463rm -f conftest.err conftest.i conftest.$ac_ext
2464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2465$as_echo "$ac_header_preproc" >&6; }
2466
2467# So?  What about this header?
2468case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2469  yes:no: )
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2471$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2473$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2474    ;;
2475  no:yes:* )
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2477$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2479$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2481$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2483$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2485$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2486( $as_echo "## ----------------------------------------- ##
2487## Report this to build-dev@openjdk.java.net ##
2488## ----------------------------------------- ##"
2489     ) | sed "s/^/$as_me: WARNING:     /" >&2
2490    ;;
2491esac
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval \${$3+:} false; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  eval "$3=\$ac_header_compiler"
2498fi
2499eval ac_res=\$$3
2500	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2501$as_echo "$ac_res" >&6; }
2502fi
2503  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504
2505} # ac_fn_cxx_check_header_mongrel
2506
2507# ac_fn_cxx_try_run LINENO
2508# ------------------------
2509# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2510# that executables *can* be run.
2511ac_fn_cxx_try_run ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  if { { ac_try="$ac_link"
2515case "(($ac_try" in
2516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517  *) ac_try_echo=$ac_try;;
2518esac
2519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2520$as_echo "$ac_try_echo"; } >&5
2521  (eval "$ac_link") 2>&5
2522  ac_status=$?
2523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2524  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2525  { { case "(($ac_try" in
2526  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527  *) ac_try_echo=$ac_try;;
2528esac
2529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530$as_echo "$ac_try_echo"; } >&5
2531  (eval "$ac_try") 2>&5
2532  ac_status=$?
2533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534  test $ac_status = 0; }; }; then :
2535  ac_retval=0
2536else
2537  $as_echo "$as_me: program exited with status $ac_status" >&5
2538       $as_echo "$as_me: failed program was:" >&5
2539sed 's/^/| /' conftest.$ac_ext >&5
2540
2541       ac_retval=$ac_status
2542fi
2543  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2544  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545  as_fn_set_status $ac_retval
2546
2547} # ac_fn_cxx_try_run
2548
2549# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2550# ---------------------------------------------------------
2551# Tests whether HEADER exists and can be compiled using the include files in
2552# INCLUDES, setting the cache variable VAR accordingly.
2553ac_fn_cxx_check_header_compile ()
2554{
2555  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2557$as_echo_n "checking for $2... " >&6; }
2558if eval \${$3+:} false; then :
2559  $as_echo_n "(cached) " >&6
2560else
2561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564#include <$2>
2565_ACEOF
2566if ac_fn_cxx_try_compile "$LINENO"; then :
2567  eval "$3=yes"
2568else
2569  eval "$3=no"
2570fi
2571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572fi
2573eval ac_res=\$$3
2574	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575$as_echo "$ac_res" >&6; }
2576  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577
2578} # ac_fn_cxx_check_header_compile
2579
2580# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2581# ----------------------------------------------
2582# Tries to find the compile-time value of EXPR in a program that includes
2583# INCLUDES, setting VAR accordingly. Returns whether the value could be
2584# computed
2585ac_fn_cxx_compute_int ()
2586{
2587  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588  if test "$cross_compiling" = yes; then
2589    # Depending upon the size, compute the lo and hi bounds.
2590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591/* end confdefs.h.  */
2592$4
2593int
2594main ()
2595{
2596static int test_array [1 - 2 * !(($2) >= 0)];
2597test_array [0] = 0;
2598return test_array [0];
2599
2600  ;
2601  return 0;
2602}
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_lo=0 ac_mid=0
2606  while :; do
2607    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608/* end confdefs.h.  */
2609$4
2610int
2611main ()
2612{
2613static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2614test_array [0] = 0;
2615return test_array [0];
2616
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_hi=$ac_mid; break
2623else
2624  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2625			if test $ac_lo -le $ac_mid; then
2626			  ac_lo= ac_hi=
2627			  break
2628			fi
2629			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2630fi
2631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2632  done
2633else
2634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2635/* end confdefs.h.  */
2636$4
2637int
2638main ()
2639{
2640static int test_array [1 - 2 * !(($2) < 0)];
2641test_array [0] = 0;
2642return test_array [0];
2643
2644  ;
2645  return 0;
2646}
2647_ACEOF
2648if ac_fn_cxx_try_compile "$LINENO"; then :
2649  ac_hi=-1 ac_mid=-1
2650  while :; do
2651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2652/* end confdefs.h.  */
2653$4
2654int
2655main ()
2656{
2657static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2658test_array [0] = 0;
2659return test_array [0];
2660
2661  ;
2662  return 0;
2663}
2664_ACEOF
2665if ac_fn_cxx_try_compile "$LINENO"; then :
2666  ac_lo=$ac_mid; break
2667else
2668  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2669			if test $ac_mid -le $ac_hi; then
2670			  ac_lo= ac_hi=
2671			  break
2672			fi
2673			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2674fi
2675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2676  done
2677else
2678  ac_lo= ac_hi=
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681fi
2682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683# Binary search between lo and hi bounds.
2684while test "x$ac_lo" != "x$ac_hi"; do
2685  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=$ac_mid
2702else
2703  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2704fi
2705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706done
2707case $ac_lo in #((
2708?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2709'') ac_retval=1 ;;
2710esac
2711  else
2712    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2713/* end confdefs.h.  */
2714$4
2715static long int longval () { return $2; }
2716static unsigned long int ulongval () { return $2; }
2717#include <stdio.h>
2718#include <stdlib.h>
2719int
2720main ()
2721{
2722
2723  FILE *f = fopen ("conftest.val", "w");
2724  if (! f)
2725    return 1;
2726  if (($2) < 0)
2727    {
2728      long int i = longval ();
2729      if (i != ($2))
2730	return 1;
2731      fprintf (f, "%ld", i);
2732    }
2733  else
2734    {
2735      unsigned long int i = ulongval ();
2736      if (i != ($2))
2737	return 1;
2738      fprintf (f, "%lu", i);
2739    }
2740  /* Do not output a trailing newline, as this causes \r\n confusion
2741     on some platforms.  */
2742  return ferror (f) || fclose (f) != 0;
2743
2744  ;
2745  return 0;
2746}
2747_ACEOF
2748if ac_fn_cxx_try_run "$LINENO"; then :
2749  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2750else
2751  ac_retval=1
2752fi
2753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2754  conftest.$ac_objext conftest.beam conftest.$ac_ext
2755rm -f conftest.val
2756
2757  fi
2758  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759  as_fn_set_status $ac_retval
2760
2761} # ac_fn_cxx_compute_int
2762
2763# ac_fn_cxx_try_link LINENO
2764# -------------------------
2765# Try to link conftest.$ac_ext, and return whether this succeeded.
2766ac_fn_cxx_try_link ()
2767{
2768  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2769  rm -f conftest.$ac_objext conftest$ac_exeext
2770  if { { ac_try="$ac_link"
2771case "(($ac_try" in
2772  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773  *) ac_try_echo=$ac_try;;
2774esac
2775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2776$as_echo "$ac_try_echo"; } >&5
2777  (eval "$ac_link") 2>conftest.err
2778  ac_status=$?
2779  if test -s conftest.err; then
2780    grep -v '^ *+' conftest.err >conftest.er1
2781    cat conftest.er1 >&5
2782    mv -f conftest.er1 conftest.err
2783  fi
2784  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2785  test $ac_status = 0; } && {
2786	 test -z "$ac_cxx_werror_flag" ||
2787	 test ! -s conftest.err
2788       } && test -s conftest$ac_exeext && {
2789	 test "$cross_compiling" = yes ||
2790	 test -x conftest$ac_exeext
2791       }; then :
2792  ac_retval=0
2793else
2794  $as_echo "$as_me: failed program was:" >&5
2795sed 's/^/| /' conftest.$ac_ext >&5
2796
2797	ac_retval=1
2798fi
2799  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2800  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2801  # interfere with the next link command; also delete a directory that is
2802  # left behind by Apple's compiler.  We do this before executing the actions.
2803  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2804  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2805  as_fn_set_status $ac_retval
2806
2807} # ac_fn_cxx_try_link
2808
2809# ac_fn_cxx_check_func LINENO FUNC VAR
2810# ------------------------------------
2811# Tests whether FUNC exists, setting the cache variable VAR accordingly
2812ac_fn_cxx_check_func ()
2813{
2814  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2816$as_echo_n "checking for $2... " >&6; }
2817if eval \${$3+:} false; then :
2818  $as_echo_n "(cached) " >&6
2819else
2820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821/* end confdefs.h.  */
2822/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2823   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2824#define $2 innocuous_$2
2825
2826/* System header to define __stub macros and hopefully few prototypes,
2827    which can conflict with char $2 (); below.
2828    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2829    <limits.h> exists even on freestanding compilers.  */
2830
2831#ifdef __STDC__
2832# include <limits.h>
2833#else
2834# include <assert.h>
2835#endif
2836
2837#undef $2
2838
2839/* Override any GCC internal prototype to avoid an error.
2840   Use char because int might match the return type of a GCC
2841   builtin and then its argument prototype would still apply.  */
2842#ifdef __cplusplus
2843extern "C"
2844#endif
2845char $2 ();
2846/* The GNU C library defines this for functions which it implements
2847    to always fail with ENOSYS.  Some functions are actually named
2848    something starting with __ and the normal name is an alias.  */
2849#if defined __stub_$2 || defined __stub___$2
2850choke me
2851#endif
2852
2853int
2854main ()
2855{
2856return $2 ();
2857  ;
2858  return 0;
2859}
2860_ACEOF
2861if ac_fn_cxx_try_link "$LINENO"; then :
2862  eval "$3=yes"
2863else
2864  eval "$3=no"
2865fi
2866rm -f core conftest.err conftest.$ac_objext \
2867    conftest$ac_exeext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_cxx_check_func
2875
2876# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2877# -------------------------------------------------------
2878# Tests whether HEADER exists and can be compiled using the include files in
2879# INCLUDES, setting the cache variable VAR accordingly.
2880ac_fn_c_check_header_compile ()
2881{
2882  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2884$as_echo_n "checking for $2... " >&6; }
2885if eval \${$3+:} false; then :
2886  $as_echo_n "(cached) " >&6
2887else
2888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2889/* end confdefs.h.  */
2890$4
2891#include <$2>
2892_ACEOF
2893if ac_fn_c_try_compile "$LINENO"; then :
2894  eval "$3=yes"
2895else
2896  eval "$3=no"
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899fi
2900eval ac_res=\$$3
2901	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2902$as_echo "$ac_res" >&6; }
2903  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2904
2905} # ac_fn_c_check_header_compile
2906cat >config.log <<_ACEOF
2907This file contains any messages produced by compilers while
2908running configure, to aid debugging if configure makes a mistake.
2909
2910It was created by OpenJDK $as_me jdk9, which was
2911generated by GNU Autoconf 2.69.  Invocation command line was
2912
2913  $ $0 $@
2914
2915_ACEOF
2916exec 5>>config.log
2917{
2918cat <<_ASUNAME
2919## --------- ##
2920## Platform. ##
2921## --------- ##
2922
2923hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2924uname -m = `(uname -m) 2>/dev/null || echo unknown`
2925uname -r = `(uname -r) 2>/dev/null || echo unknown`
2926uname -s = `(uname -s) 2>/dev/null || echo unknown`
2927uname -v = `(uname -v) 2>/dev/null || echo unknown`
2928
2929/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2930/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2931
2932/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2933/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2934/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2935/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2936/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2937/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2938/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2939
2940_ASUNAME
2941
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945  IFS=$as_save_IFS
2946  test -z "$as_dir" && as_dir=.
2947    $as_echo "PATH: $as_dir"
2948  done
2949IFS=$as_save_IFS
2950
2951} >&5
2952
2953cat >&5 <<_ACEOF
2954
2955
2956## ----------- ##
2957## Core tests. ##
2958## ----------- ##
2959
2960_ACEOF
2961
2962
2963# Keep a trace of the command line.
2964# Strip out --no-create and --no-recursion so they do not pile up.
2965# Strip out --silent because we don't want to record it for future runs.
2966# Also quote any args containing shell meta-characters.
2967# Make two passes to allow for proper duplicate-argument suppression.
2968ac_configure_args=
2969ac_configure_args0=
2970ac_configure_args1=
2971ac_must_keep_next=false
2972for ac_pass in 1 2
2973do
2974  for ac_arg
2975  do
2976    case $ac_arg in
2977    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2978    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2979    | -silent | --silent | --silen | --sile | --sil)
2980      continue ;;
2981    *\'*)
2982      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2983    esac
2984    case $ac_pass in
2985    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2986    2)
2987      as_fn_append ac_configure_args1 " '$ac_arg'"
2988      if test $ac_must_keep_next = true; then
2989	ac_must_keep_next=false # Got value, back to normal.
2990      else
2991	case $ac_arg in
2992	  *=* | --config-cache | -C | -disable-* | --disable-* \
2993	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2994	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2995	  | -with-* | --with-* | -without-* | --without-* | --x)
2996	    case "$ac_configure_args0 " in
2997	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2998	    esac
2999	    ;;
3000	  -* ) ac_must_keep_next=true ;;
3001	esac
3002      fi
3003      as_fn_append ac_configure_args " '$ac_arg'"
3004      ;;
3005    esac
3006  done
3007done
3008{ ac_configure_args0=; unset ac_configure_args0;}
3009{ ac_configure_args1=; unset ac_configure_args1;}
3010
3011# When interrupted or exit'd, cleanup temporary files, and complete
3012# config.log.  We remove comments because anyway the quotes in there
3013# would cause problems or look ugly.
3014# WARNING: Use '\'' to represent an apostrophe within the trap.
3015# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3016trap 'exit_status=$?
3017  # Save into config.log some information that might help in debugging.
3018  {
3019    echo
3020
3021    $as_echo "## ---------------- ##
3022## Cache variables. ##
3023## ---------------- ##"
3024    echo
3025    # The following way of writing the cache mishandles newlines in values,
3026(
3027  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3028    eval ac_val=\$$ac_var
3029    case $ac_val in #(
3030    *${as_nl}*)
3031      case $ac_var in #(
3032      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3033$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3034      esac
3035      case $ac_var in #(
3036      _ | IFS | as_nl) ;; #(
3037      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3038      *) { eval $ac_var=; unset $ac_var;} ;;
3039      esac ;;
3040    esac
3041  done
3042  (set) 2>&1 |
3043    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3044    *${as_nl}ac_space=\ *)
3045      sed -n \
3046	"s/'\''/'\''\\\\'\'''\''/g;
3047	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3048      ;; #(
3049    *)
3050      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3051      ;;
3052    esac |
3053    sort
3054)
3055    echo
3056
3057    $as_echo "## ----------------- ##
3058## Output variables. ##
3059## ----------------- ##"
3060    echo
3061    for ac_var in $ac_subst_vars
3062    do
3063      eval ac_val=\$$ac_var
3064      case $ac_val in
3065      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3066      esac
3067      $as_echo "$ac_var='\''$ac_val'\''"
3068    done | sort
3069    echo
3070
3071    if test -n "$ac_subst_files"; then
3072      $as_echo "## ------------------- ##
3073## File substitutions. ##
3074## ------------------- ##"
3075      echo
3076      for ac_var in $ac_subst_files
3077      do
3078	eval ac_val=\$$ac_var
3079	case $ac_val in
3080	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3081	esac
3082	$as_echo "$ac_var='\''$ac_val'\''"
3083      done | sort
3084      echo
3085    fi
3086
3087    if test -s confdefs.h; then
3088      $as_echo "## ----------- ##
3089## confdefs.h. ##
3090## ----------- ##"
3091      echo
3092      cat confdefs.h
3093      echo
3094    fi
3095    test "$ac_signal" != 0 &&
3096      $as_echo "$as_me: caught signal $ac_signal"
3097    $as_echo "$as_me: exit $exit_status"
3098  } >&5
3099  rm -f core *.core core.conftest.* &&
3100    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3101    exit $exit_status
3102' 0
3103for ac_signal in 1 2 13 15; do
3104  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3105done
3106ac_signal=0
3107
3108# confdefs.h avoids OS command line length limits that DEFS can exceed.
3109rm -f -r conftest* confdefs.h
3110
3111$as_echo "/* confdefs.h */" > confdefs.h
3112
3113# Predefined preprocessor variables.
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_NAME "$PACKAGE_NAME"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3121_ACEOF
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_VERSION "$PACKAGE_VERSION"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_STRING "$PACKAGE_STRING"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_URL "$PACKAGE_URL"
3137_ACEOF
3138
3139
3140# Let the site file select an alternate cache file if it wants to.
3141# Prefer an explicitly selected file to automatically selected ones.
3142ac_site_file1=NONE
3143ac_site_file2=NONE
3144if test -n "$CONFIG_SITE"; then
3145  # We do not want a PATH search for config.site.
3146  case $CONFIG_SITE in #((
3147    -*)  ac_site_file1=./$CONFIG_SITE;;
3148    */*) ac_site_file1=$CONFIG_SITE;;
3149    *)   ac_site_file1=./$CONFIG_SITE;;
3150  esac
3151elif test "x$prefix" != xNONE; then
3152  ac_site_file1=$prefix/share/config.site
3153  ac_site_file2=$prefix/etc/config.site
3154else
3155  ac_site_file1=$ac_default_prefix/share/config.site
3156  ac_site_file2=$ac_default_prefix/etc/config.site
3157fi
3158for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3159do
3160  test "x$ac_site_file" = xNONE && continue
3161  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3162    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3163$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3164    sed 's/^/| /' "$ac_site_file" >&5
3165    . "$ac_site_file" \
3166      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168as_fn_error $? "failed to load site script $ac_site_file
3169See \`config.log' for more details" "$LINENO" 5; }
3170  fi
3171done
3172
3173if test -r "$cache_file"; then
3174  # Some versions of bash will fail to source /dev/null (special files
3175  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3176  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3177    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3178$as_echo "$as_me: loading cache $cache_file" >&6;}
3179    case $cache_file in
3180      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3181      *)                      . "./$cache_file";;
3182    esac
3183  fi
3184else
3185  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3186$as_echo "$as_me: creating cache $cache_file" >&6;}
3187  >$cache_file
3188fi
3189
3190# Check that the precious variables saved in the cache have kept the same
3191# value.
3192ac_cache_corrupted=false
3193for ac_var in $ac_precious_vars; do
3194  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3195  eval ac_new_set=\$ac_env_${ac_var}_set
3196  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3197  eval ac_new_val=\$ac_env_${ac_var}_value
3198  case $ac_old_set,$ac_new_set in
3199    set,)
3200      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3201$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3202      ac_cache_corrupted=: ;;
3203    ,set)
3204      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3205$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3206      ac_cache_corrupted=: ;;
3207    ,);;
3208    *)
3209      if test "x$ac_old_val" != "x$ac_new_val"; then
3210	# differences in whitespace do not lead to failure.
3211	ac_old_val_w=`echo x $ac_old_val`
3212	ac_new_val_w=`echo x $ac_new_val`
3213	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3214	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3215$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3216	  ac_cache_corrupted=:
3217	else
3218	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3219$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3220	  eval $ac_var=\$ac_old_val
3221	fi
3222	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3223$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3224	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3225$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3226      fi;;
3227  esac
3228  # Pass precious variables to config.status.
3229  if test "$ac_new_set" = set; then
3230    case $ac_new_val in
3231    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3232    *) ac_arg=$ac_var=$ac_new_val ;;
3233    esac
3234    case " $ac_configure_args " in
3235      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3236      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3237    esac
3238  fi
3239done
3240if $ac_cache_corrupted; then
3241  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3243  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3244$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3245  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3246fi
3247## -------------------- ##
3248## Main body of script. ##
3249## -------------------- ##
3250
3251ac_ext=c
3252ac_cpp='$CPP $CPPFLAGS'
3253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256
3257
3258
3259ac_aux_dir=
3260for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3261  if test -f "$ac_dir/install-sh"; then
3262    ac_aux_dir=$ac_dir
3263    ac_install_sh="$ac_aux_dir/install-sh -c"
3264    break
3265  elif test -f "$ac_dir/install.sh"; then
3266    ac_aux_dir=$ac_dir
3267    ac_install_sh="$ac_aux_dir/install.sh -c"
3268    break
3269  elif test -f "$ac_dir/shtool"; then
3270    ac_aux_dir=$ac_dir
3271    ac_install_sh="$ac_aux_dir/shtool install -c"
3272    break
3273  fi
3274done
3275if test -z "$ac_aux_dir"; then
3276  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3277fi
3278
3279# These three variables are undocumented and unsupported,
3280# and are intended to be withdrawn in a future Autoconf release.
3281# They can cause serious problems if a builder's source tree is in a directory
3282# whose full name contains unusual characters.
3283ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3284ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3285ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3286
3287
3288# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3289
3290#
3291# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3293#
3294# This code is free software; you can redistribute it and/or modify it
3295# under the terms of the GNU General Public License version 2 only, as
3296# published by the Free Software Foundation.  Oracle designates this
3297# particular file as subject to the "Classpath" exception as provided
3298# by Oracle in the LICENSE file that accompanied this code.
3299#
3300# This code is distributed in the hope that it will be useful, but WITHOUT
3301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3303# version 2 for more details (a copy is included in the LICENSE file that
3304# accompanied this code).
3305#
3306# You should have received a copy of the GNU General Public License version
3307# 2 along with this work; if not, write to the Free Software Foundation,
3308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3309#
3310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3311# or visit www.oracle.com if you need additional information or have any
3312# questions.
3313#
3314
3315#
3316# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3317#
3318# This program is free software; you can redistribute it and/or modify
3319# it under the terms of the GNU General Public License as published by
3320# the Free Software Foundation; either version 2 of the License, or
3321# (at your option) any later version.
3322#
3323# This program is distributed in the hope that it will be useful, but
3324# WITHOUT ANY WARRANTY; without even the implied warranty of
3325# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3326# General Public License for more details.
3327#
3328# You should have received a copy of the GNU General Public License
3329# along with this program; if not, write to the Free Software
3330# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3331#
3332# As a special exception to the GNU General Public License, if you
3333# distribute this file as part of a program that contains a
3334# configuration script generated by Autoconf, you may include it under
3335# the same distribution terms that you use for the rest of that program.
3336
3337# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3338# ----------------------------------
3339# PKG_PROG_PKG_CONFIG
3340
3341# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3342#
3343# Check to see whether a particular set of modules exists.  Similar
3344# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3345#
3346#
3347# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3348# this or PKG_CHECK_MODULES is called, or make sure to call
3349# PKG_CHECK_EXISTS manually
3350# --------------------------------------------------------------
3351
3352
3353
3354# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3355# ---------------------------------------------
3356# _PKG_CONFIG
3357
3358# _PKG_SHORT_ERRORS_SUPPORTED
3359# -----------------------------
3360# _PKG_SHORT_ERRORS_SUPPORTED
3361
3362
3363# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3364# [ACTION-IF-NOT-FOUND])
3365#
3366#
3367# Note that if there is a possibility the first call to
3368# PKG_CHECK_MODULES might not happen, you should be sure to include an
3369# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3370#
3371#
3372# --------------------------------------------------------------
3373# PKG_CHECK_MODULES
3374
3375
3376# Include these first...
3377#
3378# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3380#
3381# This code is free software; you can redistribute it and/or modify it
3382# under the terms of the GNU General Public License version 2 only, as
3383# published by the Free Software Foundation.  Oracle designates this
3384# particular file as subject to the "Classpath" exception as provided
3385# by Oracle in the LICENSE file that accompanied this code.
3386#
3387# This code is distributed in the hope that it will be useful, but WITHOUT
3388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3390# version 2 for more details (a copy is included in the LICENSE file that
3391# accompanied this code).
3392#
3393# You should have received a copy of the GNU General Public License version
3394# 2 along with this work; if not, write to the Free Software Foundation,
3395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3396#
3397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3398# or visit www.oracle.com if you need additional information or have any
3399# questions.
3400#
3401
3402# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3403# If so, then append $1 to $2 \
3404# Also set JVM_ARG_OK to true/false depending on outcome.
3405
3406
3407# Appends a string to a path variable, only adding the : when needed.
3408
3409
3410# Prepends a string to a path variable, only adding the : when needed.
3411
3412
3413# This will make sure the given variable points to a full and proper
3414# path. This means:
3415# 1) There will be no spaces in the path. On unix platforms,
3416#    spaces in the path will result in an error. On Windows,
3417#    the path will be rewritten using short-style to be space-free.
3418# 2) The path will be absolute, and it will be in unix-style (on
3419#     cygwin).
3420# $1: The name of the variable to fix
3421
3422
3423# This will make sure the given variable points to a executable
3424# with a full and proper path. This means:
3425# 1) There will be no spaces in the path. On unix platforms,
3426#    spaces in the path will result in an error. On Windows,
3427#    the path will be rewritten using short-style to be space-free.
3428# 2) The path will be absolute, and it will be in unix-style (on
3429#     cygwin).
3430# Any arguments given to the executable is preserved.
3431# If the input variable does not have a directory specification, then
3432# it need to be in the PATH.
3433# $1: The name of the variable to fix
3434
3435
3436
3437
3438# Register a --with argument but mark it as deprecated
3439# $1: The name of the with argument to deprecate, not including --with-
3440
3441
3442# Register a --enable argument but mark it as deprecated
3443# $1: The name of the with argument to deprecate, not including --enable-
3444# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3445
3446
3447
3448
3449# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3450# $1: variable to check
3451
3452
3453# Check that there are no unprocessed overridden variables left.
3454# If so, they are an incorrect argument and we will exit with an error.
3455
3456
3457# Setup a tool for the given variable. If correctly specified by the user,
3458# use that value, otherwise search for the tool using the supplied code snippet.
3459# $1: variable to set
3460# $2: code snippet to call to look for the tool
3461
3462
3463# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3464# $1: variable to set
3465# $2: executable name (or list of names) to look for
3466
3467
3468# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3469# $1: variable to set
3470# $2: executable name (or list of names) to look for
3471
3472
3473# Like BASIC_PATH_PROGS but fails if no tool was found.
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Like BASIC_SETUP_TOOL but fails if no tool was found.
3479# $1: variable to set
3480# $2: autoconf macro to call to look for the special tool
3481
3482
3483# Setup the most fundamental tools that relies on not much else to set up,
3484# but is used by much of the early bootstrap code.
3485
3486
3487# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3488
3489
3490# Evaluates platform specific overrides for devkit variables.
3491# $1: Name of variable
3492
3493
3494
3495
3496
3497
3498#%%% Simple tools %%%
3499
3500# Check if we have found a usable version of make
3501# $1: the path to a potential make binary (or empty)
3502# $2: the description on how we found this
3503
3504
3505
3506
3507# Goes looking for a usable version of GNU make.
3508
3509
3510
3511
3512
3513
3514# Check if build directory is on local disk. If not possible to determine,
3515# we prefer to claim it's local.
3516# Argument 1: directory to test
3517# Argument 2: what to do if it is on local disk
3518# Argument 3: what to do otherwise (remote disk or failure)
3519
3520
3521# Check that source files have basic read permissions set. This might
3522# not be the case in cygwin in certain conditions.
3523
3524
3525
3526
3527# Check for support for specific options in bash
3528
3529
3530# Code to run after AC_OUTPUT
3531
3532
3533#
3534# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3535# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3536#
3537# This code is free software; you can redistribute it and/or modify it
3538# under the terms of the GNU General Public License version 2 only, as
3539# published by the Free Software Foundation.  Oracle designates this
3540# particular file as subject to the "Classpath" exception as provided
3541# by Oracle in the LICENSE file that accompanied this code.
3542#
3543# This code is distributed in the hope that it will be useful, but WITHOUT
3544# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3545# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3546# version 2 for more details (a copy is included in the LICENSE file that
3547# accompanied this code).
3548#
3549# You should have received a copy of the GNU General Public License version
3550# 2 along with this work; if not, write to the Free Software Foundation,
3551# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3552#
3553# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3554# or visit www.oracle.com if you need additional information or have any
3555# questions.
3556#
3557
3558
3559
3560
3561
3562# Helper function which possibly converts a path using DOS-style short mode.
3563# If so, the updated path is stored in $new_path.
3564# $1: The path to check
3565
3566
3567# Helper function which possibly converts a path using DOS-style short mode.
3568# If so, the updated path is stored in $new_path.
3569# $1: The path to check
3570
3571
3572# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3573# and could probably be heavily simplified. However, all changes in this
3574# area tend to need lot of testing in different scenarios, and in lack of
3575# proper unit testing, cleaning this up has not been deemed worth the effort
3576# at the moment.
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3587
3588
3589
3590
3591#
3592# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3593# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3594#
3595# This code is free software; you can redistribute it and/or modify it
3596# under the terms of the GNU General Public License version 2 only, as
3597# published by the Free Software Foundation.  Oracle designates this
3598# particular file as subject to the "Classpath" exception as provided
3599# by Oracle in the LICENSE file that accompanied this code.
3600#
3601# This code is distributed in the hope that it will be useful, but WITHOUT
3602# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3603# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3604# version 2 for more details (a copy is included in the LICENSE file that
3605# accompanied this code).
3606#
3607# You should have received a copy of the GNU General Public License version
3608# 2 along with this work; if not, write to the Free Software Foundation,
3609# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3610#
3611# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3612# or visit www.oracle.com if you need additional information or have any
3613# questions.
3614#
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626# ... then the rest
3627#
3628# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3629# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3630#
3631# This code is free software; you can redistribute it and/or modify it
3632# under the terms of the GNU General Public License version 2 only, as
3633# published by the Free Software Foundation.  Oracle designates this
3634# particular file as subject to the "Classpath" exception as provided
3635# by Oracle in the LICENSE file that accompanied this code.
3636#
3637# This code is distributed in the hope that it will be useful, but WITHOUT
3638# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3639# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3640# version 2 for more details (a copy is included in the LICENSE file that
3641# accompanied this code).
3642#
3643# You should have received a copy of the GNU General Public License version
3644# 2 along with this work; if not, write to the Free Software Foundation,
3645# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3646#
3647# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3648# or visit www.oracle.com if you need additional information or have any
3649# questions.
3650#
3651
3652########################################################################
3653# This file handles detection of the Boot JDK. The Boot JDK detection
3654# process has been developed as a response to solve a complex real-world
3655# problem. Initially, it was simple, but it has grown as platform after
3656# platform, idiosyncracy after idiosyncracy has been supported.
3657#
3658# The basic idea is this:
3659# 1) You need an acceptable *) JDK to use as a Boot JDK
3660# 2) There are several ways to locate a JDK, that are mostly platform
3661#    dependent **)
3662# 3) You can have multiple JDKs installed
3663# 4) If possible, configure should try to dig out an acceptable JDK
3664#    automatically, without having to resort to command-line options
3665#
3666# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3667#     javac) and not a JRE, etc.
3668#
3669# **) On Windows we typically use a well-known path.
3670#     On MacOSX we typically use the tool java_home.
3671#     On Linux we typically find javac in the $PATH, and then follow a
3672#     chain of symlinks that often ends up in a real JDK.
3673#
3674# This leads to the code where we check in different ways to locate a
3675# JDK, and if one is found, check if it is acceptable. If not, we print
3676# our reasons for rejecting it (useful when debugging non-working
3677# configure situations) and continue checking the next one.
3678########################################################################
3679
3680# Execute the check given as argument, and verify the result
3681# If the Boot JDK was previously found, do nothing
3682# $1 A command line (typically autoconf macro) to execute
3683
3684
3685# Test: Is bootjdk explicitely set by command line arguments?
3686
3687
3688# Test: Is bootjdk available from builddeps?
3689
3690
3691# Test: Is $JAVA_HOME set?
3692
3693
3694# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3695
3696
3697# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3698# $1: Argument to the java_home binary (optional)
3699
3700
3701# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3702
3703
3704# Look for a jdk in the given path. If there are multiple, try to select the newest.
3705# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3706# $1 = Path to directory containing jdk installations.
3707# $2 = String to append to the found JDK directory to get the proper JDK home
3708
3709
3710# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3711# environmental variable as base for where to look.
3712# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3713
3714
3715# Test: Is there a JDK installed in default, well-known locations?
3716
3717
3718# Check that a command-line tool in the Boot JDK is correct
3719# $1 = name of variable to assign
3720# $2 = name of binary
3721
3722
3723###############################################################################
3724#
3725# We need a Boot JDK to bootstrap the build.
3726#
3727
3728
3729
3730
3731
3732#
3733# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3734# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3735#
3736# This code is free software; you can redistribute it and/or modify it
3737# under the terms of the GNU General Public License version 2 only, as
3738# published by the Free Software Foundation.  Oracle designates this
3739# particular file as subject to the "Classpath" exception as provided
3740# by Oracle in the LICENSE file that accompanied this code.
3741#
3742# This code is distributed in the hope that it will be useful, but WITHOUT
3743# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3744# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3745# version 2 for more details (a copy is included in the LICENSE file that
3746# accompanied this code).
3747#
3748# You should have received a copy of the GNU General Public License version
3749# 2 along with this work; if not, write to the Free Software Foundation,
3750# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3751#
3752# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3753# or visit www.oracle.com if you need additional information or have any
3754# questions.
3755#
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776#
3777# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3778# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3779#
3780# This code is free software; you can redistribute it and/or modify it
3781# under the terms of the GNU General Public License version 2 only, as
3782# published by the Free Software Foundation.  Oracle designates this
3783# particular file as subject to the "Classpath" exception as provided
3784# by Oracle in the LICENSE file that accompanied this code.
3785#
3786# This code is distributed in the hope that it will be useful, but WITHOUT
3787# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3788# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3789# version 2 for more details (a copy is included in the LICENSE file that
3790# accompanied this code).
3791#
3792# You should have received a copy of the GNU General Public License version
3793# 2 along with this work; if not, write to the Free Software Foundation,
3794# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3795#
3796# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3797# or visit www.oracle.com if you need additional information or have any
3798# questions.
3799#
3800
3801
3802
3803
3804
3805# Documentation on common flags used for solstudio in HIGHEST.
3806#
3807# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3808#          done with care, there are some assumptions below that need to
3809#          be understood about the use of pointers, and IEEE behavior.
3810#
3811# -fns: Use non-standard floating point mode (not IEEE 754)
3812# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3813# -fsingle: Use single precision floating point with 'float'
3814# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3815#   (Source with excessing pointer casting and data access with mixed
3816#    pointer types are not recommended)
3817# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3818#   (If you expect perfect errno behavior, do not use this)
3819# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3820# -xrestrict: Pointer parameters to functions do not overlap
3821#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3822#    If you pass in multiple pointers to the same data, do not use this)
3823# -xlibmil: Inline some library routines
3824#   (If you expect perfect errno behavior, do not use this)
3825# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3826#   (If you expect perfect errno behavior, do not use this)
3827#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3828
3829    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3830    # Bug?
3831    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3832    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3833    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3834    #fi
3835
3836
3837
3838
3839
3840# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3841#                                   [RUN-IF-FALSE])
3842# ------------------------------------------------------------
3843# Check that the c and c++ compilers support an argument
3844
3845
3846# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3847#                                    [RUN-IF-FALSE])
3848# ------------------------------------------------------------
3849# Check that the linker support an argument
3850
3851
3852
3853
3854#
3855# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3856# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3857#
3858# This code is free software; you can redistribute it and/or modify it
3859# under the terms of the GNU General Public License version 2 only, as
3860# published by the Free Software Foundation.  Oracle designates this
3861# particular file as subject to the "Classpath" exception as provided
3862# by Oracle in the LICENSE file that accompanied this code.
3863#
3864# This code is distributed in the hope that it will be useful, but WITHOUT
3865# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3866# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3867# version 2 for more details (a copy is included in the LICENSE file that
3868# accompanied this code).
3869#
3870# You should have received a copy of the GNU General Public License version
3871# 2 along with this work; if not, write to the Free Software Foundation,
3872# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3873#
3874# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3875# or visit www.oracle.com if you need additional information or have any
3876# questions.
3877#
3878
3879
3880
3881
3882
3883cygwin_help() {
3884  case $1 in
3885    unzip)
3886      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888      ;;
3889    zip)
3890      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3892      ;;
3893    make)
3894      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3895      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3896      ;;
3897    freetype)
3898      HELP_MSG="
3899The freetype library can now be build during the configure process.
3900Download the freetype sources and unpack them into an arbitrary directory:
3901
3902wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3903tar -xzf freetype-2.5.3.tar.gz
3904
3905Then run configure with '--with-freetype-src=<freetype_src>'. This will
3906automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3907builds or into '<freetype_src>/lib32' for 32-bit builds.
3908Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3909and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3910      ;;
3911  esac
3912}
3913
3914msys_help() {
3915  PKGHANDLER_COMMAND=""
3916}
3917
3918apt_help() {
3919  case $1 in
3920    devkit)
3921      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3922    openjdk)
3923      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3924    alsa)
3925      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3926    cups)
3927      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3928    freetype)
3929      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3930    pulse)
3931      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3932    x11)
3933      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3934    ccache)
3935      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3936  esac
3937}
3938
3939yum_help() {
3940  case $1 in
3941    devkit)
3942      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3943    openjdk)
3944      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3945    alsa)
3946      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3947    cups)
3948      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3949    freetype)
3950      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3951    pulse)
3952      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3953    x11)
3954      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3955    ccache)
3956      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3957  esac
3958}
3959
3960port_help() {
3961  PKGHANDLER_COMMAND=""
3962}
3963
3964pkgutil_help() {
3965  PKGHANDLER_COMMAND=""
3966}
3967
3968pkgadd_help() {
3969  PKGHANDLER_COMMAND=""
3970}
3971
3972# This function will check if we're called from the "configure" wrapper while
3973# printing --help. If so, we will print out additional information that can
3974# only be extracted within the autoconf script, and then exit. This must be
3975# called at the very beginning in configure.ac.
3976
3977
3978
3979
3980
3981
3982#
3983# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3984# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3985#
3986# This code is free software; you can redistribute it and/or modify it
3987# under the terms of the GNU General Public License version 2 only, as
3988# published by the Free Software Foundation.  Oracle designates this
3989# particular file as subject to the "Classpath" exception as provided
3990# by Oracle in the LICENSE file that accompanied this code.
3991#
3992# This code is distributed in the hope that it will be useful, but WITHOUT
3993# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3994# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3995# version 2 for more details (a copy is included in the LICENSE file that
3996# accompanied this code).
3997#
3998# You should have received a copy of the GNU General Public License version
3999# 2 along with this work; if not, write to the Free Software Foundation,
4000# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4001#
4002# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4003# or visit www.oracle.com if you need additional information or have any
4004# questions.
4005#
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016###############################################################################
4017#
4018# Should we build only OpenJDK even if closed sources are present?
4019#
4020
4021
4022
4023
4024
4025
4026###############################################################################
4027#
4028# Enable or disable the elliptic curve crypto implementation
4029#
4030
4031
4032
4033
4034
4035################################################################################
4036#
4037# Gcov coverage data for hotspot
4038#
4039
4040
4041#
4042# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4043# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4044#
4045# This code is free software; you can redistribute it and/or modify it
4046# under the terms of the GNU General Public License version 2 only, as
4047# published by the Free Software Foundation.  Oracle designates this
4048# particular file as subject to the "Classpath" exception as provided
4049# by Oracle in the LICENSE file that accompanied this code.
4050#
4051# This code is distributed in the hope that it will be useful, but WITHOUT
4052# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4053# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4054# version 2 for more details (a copy is included in the LICENSE file that
4055# accompanied this code).
4056#
4057# You should have received a copy of the GNU General Public License version
4058# 2 along with this work; if not, write to the Free Software Foundation,
4059# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4060#
4061# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4062# or visit www.oracle.com if you need additional information or have any
4063# questions.
4064#
4065
4066###############################################################################
4067#
4068# Setup version numbers
4069#
4070
4071# Verify that a given string represents a valid version number, and assign it
4072# to a variable.
4073
4074# Argument 1: the variable to assign to
4075# Argument 2: the value given by the user
4076
4077
4078
4079
4080#
4081# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4082# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4083#
4084# This code is free software; you can redistribute it and/or modify it
4085# under the terms of the GNU General Public License version 2 only, as
4086# published by the Free Software Foundation.  Oracle designates this
4087# particular file as subject to the "Classpath" exception as provided
4088# by Oracle in the LICENSE file that accompanied this code.
4089#
4090# This code is distributed in the hope that it will be useful, but WITHOUT
4091# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4092# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4093# version 2 for more details (a copy is included in the LICENSE file that
4094# accompanied this code).
4095#
4096# You should have received a copy of the GNU General Public License version
4097# 2 along with this work; if not, write to the Free Software Foundation,
4098# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4099#
4100# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4101# or visit www.oracle.com if you need additional information or have any
4102# questions.
4103#
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125#
4126# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4127# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4128#
4129# This code is free software; you can redistribute it and/or modify it
4130# under the terms of the GNU General Public License version 2 only, as
4131# published by the Free Software Foundation.  Oracle designates this
4132# particular file as subject to the "Classpath" exception as provided
4133# by Oracle in the LICENSE file that accompanied this code.
4134#
4135# This code is distributed in the hope that it will be useful, but WITHOUT
4136# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4137# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4138# version 2 for more details (a copy is included in the LICENSE file that
4139# accompanied this code).
4140#
4141# You should have received a copy of the GNU General Public License version
4142# 2 along with this work; if not, write to the Free Software Foundation,
4143# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4144#
4145# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4146# or visit www.oracle.com if you need additional information or have any
4147# questions.
4148#
4149
4150# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4151# Converts autoconf style CPU name to OpenJDK style, into
4152# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4153
4154
4155# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4156# Converts autoconf style OS name to OpenJDK style, into
4157# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4158
4159
4160# Expects $host_os $host_cpu $build_os and $build_cpu
4161# and $with_target_bits to have been setup!
4162#
4163# Translate the standard triplet(quadruplet) definition
4164# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4165# OPENJDK_BUILD_OS, etc.
4166
4167
4168# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4169# accordingly. Must be done after setting up build and target system, but before
4170# doing anything else with these values.
4171
4172
4173# Setup the legacy variables, for controlling the old makefiles.
4174#
4175
4176
4177
4178
4179#%%% Build and target systems %%%
4180
4181
4182
4183
4184# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4185# Add -mX to various FLAGS variables.
4186
4187
4188
4189
4190
4191
4192#
4193# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4194# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4195#
4196# This code is free software; you can redistribute it and/or modify it
4197# under the terms of the GNU General Public License version 2 only, as
4198# published by the Free Software Foundation.  Oracle designates this
4199# particular file as subject to the "Classpath" exception as provided
4200# by Oracle in the LICENSE file that accompanied this code.
4201#
4202# This code is distributed in the hope that it will be useful, but WITHOUT
4203# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4204# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4205# version 2 for more details (a copy is included in the LICENSE file that
4206# accompanied this code).
4207#
4208# You should have received a copy of the GNU General Public License version
4209# 2 along with this work; if not, write to the Free Software Foundation,
4210# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4211#
4212# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4213# or visit www.oracle.com if you need additional information or have any
4214# questions.
4215#
4216
4217
4218
4219
4220
4221
4222
4223
4224#
4225# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4226# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4227#
4228# This code is free software; you can redistribute it and/or modify it
4229# under the terms of the GNU General Public License version 2 only, as
4230# published by the Free Software Foundation.  Oracle designates this
4231# particular file as subject to the "Classpath" exception as provided
4232# by Oracle in the LICENSE file that accompanied this code.
4233#
4234# This code is distributed in the hope that it will be useful, but WITHOUT
4235# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4236# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4237# version 2 for more details (a copy is included in the LICENSE file that
4238# accompanied this code).
4239#
4240# You should have received a copy of the GNU General Public License version
4241# 2 along with this work; if not, write to the Free Software Foundation,
4242# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4243#
4244# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4245# or visit www.oracle.com if you need additional information or have any
4246# questions.
4247#
4248
4249########################################################################
4250# This file is responsible for detecting, verifying and setting up the
4251# toolchain, i.e. the compiler, linker and related utilities. It will setup
4252# proper paths to the binaries, but it will not setup any flags.
4253#
4254# The binaries used is determined by the toolchain type, which is the family of
4255# compilers and related tools that are used.
4256########################################################################
4257
4258
4259# All valid toolchains, regardless of platform (used by help.m4)
4260VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4261
4262# These toolchains are valid on different platforms
4263VALID_TOOLCHAINS_linux="gcc clang"
4264VALID_TOOLCHAINS_solaris="solstudio"
4265VALID_TOOLCHAINS_macosx="gcc clang"
4266VALID_TOOLCHAINS_aix="xlc"
4267VALID_TOOLCHAINS_windows="microsoft"
4268
4269# Toolchain descriptions
4270TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4271TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4272TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4273TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4274TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4275
4276# Setup a number of variables describing how native output files are
4277# named on this platform/toolchain.
4278
4279
4280# Determine which toolchain type to use, and make sure it is valid for this
4281# platform. Setup various information about the selected toolchain.
4282
4283
4284# Before we start detecting the toolchain executables, we might need some
4285# special setup, e.g. additional paths etc.
4286
4287
4288# Restore path, etc
4289
4290
4291# Check if a compiler is of the toolchain type we expect, and save the version
4292# information from it. If the compiler does not match the expected type,
4293# this function will abort using AC_MSG_ERROR. If it matches, the version will
4294# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4295# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4296#
4297# $1 = compiler to test (CC or CXX)
4298# $2 = human readable name of compiler (C or C++)
4299
4300
4301# Try to locate the given C or C++ compiler in the path, or otherwise.
4302#
4303# $1 = compiler to test (CC or CXX)
4304# $2 = human readable name of compiler (C or C++)
4305# $3 = list of compiler names to search for
4306
4307
4308# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4309# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4310# archiver (AR). Verify that the compilers are correct according to the
4311# toolchain type.
4312
4313
4314# Setup additional tools that is considered a part of the toolchain, but not the
4315# core part. Many of these are highly platform-specific and do not exist,
4316# and/or are not needed on all platforms.
4317
4318
4319# Setup the build tools (i.e, the compiler and linker used to build programs
4320# that should be run on the build platform, not the target platform, as a build
4321# helper). Since the non-cross-compile case uses the normal, target compilers
4322# for this, we can only do this after these have been setup.
4323
4324
4325# Setup legacy variables that are still needed as alternative ways to refer to
4326# parts of the toolchain.
4327
4328
4329# Do some additional checks on the detected tools.
4330
4331
4332# Setup the JTReg Regression Test Harness.
4333
4334
4335#
4336# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4337# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4338#
4339# This code is free software; you can redistribute it and/or modify it
4340# under the terms of the GNU General Public License version 2 only, as
4341# published by the Free Software Foundation.  Oracle designates this
4342# particular file as subject to the "Classpath" exception as provided
4343# by Oracle in the LICENSE file that accompanied this code.
4344#
4345# This code is distributed in the hope that it will be useful, but WITHOUT
4346# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4347# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4348# version 2 for more details (a copy is included in the LICENSE file that
4349# accompanied this code).
4350#
4351# You should have received a copy of the GNU General Public License version
4352# 2 along with this work; if not, write to the Free Software Foundation,
4353# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4354#
4355# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4356# or visit www.oracle.com if you need additional information or have any
4357# questions.
4358#
4359
4360################################################################################
4361# The order of these defines the priority by which we try to find them.
4362VALID_VS_VERSIONS="2013 2012 2010"
4363
4364VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4365VS_VERSION_INTERNAL_2010=100
4366VS_MSVCR_2010=msvcr100.dll
4367# We don't use msvcp on Visual Studio 2010
4368#VS_MSVCP_2010=msvcp100.dll
4369VS_ENVVAR_2010="VS100COMNTOOLS"
4370VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4371VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4372VS_VS_PLATFORM_NAME_2010="v100"
4373VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4374
4375VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4376VS_VERSION_INTERNAL_2012=110
4377VS_MSVCR_2012=msvcr110.dll
4378VS_MSVCP_2012=msvcp110.dll
4379VS_ENVVAR_2012="VS110COMNTOOLS"
4380VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4381VS_SDK_INSTALLDIR_2012=
4382VS_VS_PLATFORM_NAME_2012="v110"
4383VS_SDK_PLATFORM_NAME_2012=
4384
4385VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4386VS_VERSION_INTERNAL_2013=120
4387VS_MSVCR_2013=msvcr120.dll
4388VS_MSVCP_2013=msvcp120.dll
4389VS_ENVVAR_2013="VS120COMNTOOLS"
4390VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4391VS_SDK_INSTALLDIR_2013=
4392VS_VS_PLATFORM_NAME_2013="v120"
4393VS_SDK_PLATFORM_NAME_2013=
4394
4395################################################################################
4396
4397
4398
4399################################################################################
4400
4401
4402
4403################################################################################
4404# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4405# build environment and assigns it to VS_ENV_CMD
4406
4407
4408################################################################################
4409
4410
4411
4412################################################################################
4413# Check if the VS env variables were setup prior to running configure.
4414# If not, then find vcvarsall.bat and run it automatically, and integrate
4415# the set env variables into the spec file.
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430# This line needs to be here, verbatim, after all includes and the dummy hook
4431# definitions. It is replaced with custom functionality when building
4432# custom sources.
4433#CUSTOM_AUTOCONF_INCLUDE
4434
4435# Do not change or remove the following line, it is needed for consistency checks:
4436DATE_WHEN_GENERATED=1443614957
4437
4438###############################################################################
4439#
4440# Initialization / Boot-strapping
4441#
4442# The bootstrapping process needs to solve the "chicken or the egg" problem,
4443# thus it jumps back and forth, each time gaining something needed later on.
4444#
4445###############################################################################
4446
4447# If we are requested to print additional help, do that and then exit.
4448# This must be the very first call.
4449
4450  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4451    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4452    $PRINTF "Which are valid to use depends on the build platform.\n"
4453    for toolchain in $VALID_TOOLCHAINS_all; do
4454      # Use indirect variable referencing
4455      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4456      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4457      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4458    done
4459
4460    # And now exit directly
4461    exit 0
4462  fi
4463
4464
4465# Basic initialization that must happen first of all in the normal process.
4466
4467  # Save the original command line. This is passed to us by the wrapper configure script.
4468
4469  # Save the path variable before it gets changed
4470  ORIGINAL_PATH="$PATH"
4471
4472  DATE_WHEN_CONFIGURED=`LANG=C date`
4473
4474  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4475$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4476  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4477$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4478
4479
4480  # Start with tools that do not need have cross compilation support
4481  # and can be expected to be found in the default PATH. These tools are
4482  # used by configure. Nor are these tools expected to be found in the
4483  # devkit from the builddeps server either, since they are
4484  # needed to download the devkit.
4485
4486  # First are all the simple required tools.
4487
4488
4489
4490  # Publish this variable in the help.
4491
4492
4493  if test "x$BASENAME" = x; then
4494    # The variable is not set by user, try to locate tool using the code snippet
4495    for ac_prog in basename
4496do
4497  # Extract the first word of "$ac_prog", so it can be a program name with args.
4498set dummy $ac_prog; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_path_BASENAME+:} false; then :
4502  $as_echo_n "(cached) " >&6
4503else
4504  case $BASENAME in
4505  [\\/]* | ?:[\\/]*)
4506  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4507  ;;
4508  *)
4509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in $PATH
4511do
4512  IFS=$as_save_IFS
4513  test -z "$as_dir" && as_dir=.
4514    for ac_exec_ext in '' $ac_executable_extensions; do
4515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518    break 2
4519  fi
4520done
4521  done
4522IFS=$as_save_IFS
4523
4524  ;;
4525esac
4526fi
4527BASENAME=$ac_cv_path_BASENAME
4528if test -n "$BASENAME"; then
4529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4530$as_echo "$BASENAME" >&6; }
4531else
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
4534fi
4535
4536
4537  test -n "$BASENAME" && break
4538done
4539
4540  else
4541    # The variable is set, but is it from the command line or the environment?
4542
4543    # Try to remove the string !BASENAME! from our list.
4544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4546      # If it failed, the variable was not from the command line. Ignore it,
4547      # but warn the user (except for BASH, which is always set by the calling BASH).
4548      if test "xBASENAME" != xBASH; then
4549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4550$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4551      fi
4552      # Try to locate tool using the code snippet
4553      for ac_prog in basename
4554do
4555  # Extract the first word of "$ac_prog", so it can be a program name with args.
4556set dummy $ac_prog; ac_word=$2
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558$as_echo_n "checking for $ac_word... " >&6; }
4559if ${ac_cv_path_BASENAME+:} false; then :
4560  $as_echo_n "(cached) " >&6
4561else
4562  case $BASENAME in
4563  [\\/]* | ?:[\\/]*)
4564  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4565  ;;
4566  *)
4567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568for as_dir in $PATH
4569do
4570  IFS=$as_save_IFS
4571  test -z "$as_dir" && as_dir=.
4572    for ac_exec_ext in '' $ac_executable_extensions; do
4573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4574    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576    break 2
4577  fi
4578done
4579  done
4580IFS=$as_save_IFS
4581
4582  ;;
4583esac
4584fi
4585BASENAME=$ac_cv_path_BASENAME
4586if test -n "$BASENAME"; then
4587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4588$as_echo "$BASENAME" >&6; }
4589else
4590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591$as_echo "no" >&6; }
4592fi
4593
4594
4595  test -n "$BASENAME" && break
4596done
4597
4598    else
4599      # If it succeeded, then it was overridden by the user. We will use it
4600      # for the tool.
4601
4602      # First remove it from the list of overridden variables, so we can test
4603      # for unknown variables in the end.
4604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4605
4606      # Check if the provided tool contains a complete path.
4607      tool_specified="$BASENAME"
4608      tool_basename="${tool_specified##*/}"
4609      if test "x$tool_basename" = "x$tool_specified"; then
4610        # A command without a complete path is provided, search $PATH.
4611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4612$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4613        # Extract the first word of "$tool_basename", so it can be a program name with args.
4614set dummy $tool_basename; 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_BASENAME+:} false; then :
4618  $as_echo_n "(cached) " >&6
4619else
4620  case $BASENAME in
4621  [\\/]* | ?:[\\/]*)
4622  ac_cv_path_BASENAME="$BASENAME" # 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_BASENAME="$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
4643BASENAME=$ac_cv_path_BASENAME
4644if test -n "$BASENAME"; then
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4646$as_echo "$BASENAME" >&6; }
4647else
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649$as_echo "no" >&6; }
4650fi
4651
4652
4653        if test "x$BASENAME" = x; then
4654          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4655        fi
4656      else
4657        # Otherwise we believe it is a complete path. Use it as it is.
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4659$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4661$as_echo_n "checking for BASENAME... " >&6; }
4662        if test ! -x "$tool_specified"; then
4663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4664$as_echo "not found" >&6; }
4665          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4666        fi
4667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4668$as_echo "$tool_specified" >&6; }
4669      fi
4670    fi
4671  fi
4672
4673
4674
4675  if test "x$BASENAME" = x; then
4676    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4677  fi
4678
4679
4680
4681
4682
4683  # Publish this variable in the help.
4684
4685
4686  if test "x$BASH" = x; then
4687    # The variable is not set by user, try to locate tool using the code snippet
4688    for ac_prog in bash
4689do
4690  # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if ${ac_cv_path_BASH+:} false; then :
4695  $as_echo_n "(cached) " >&6
4696else
4697  case $BASH in
4698  [\\/]* | ?:[\\/]*)
4699  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4700  ;;
4701  *)
4702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705  IFS=$as_save_IFS
4706  test -z "$as_dir" && as_dir=.
4707    for ac_exec_ext in '' $ac_executable_extensions; do
4708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4709    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4711    break 2
4712  fi
4713done
4714  done
4715IFS=$as_save_IFS
4716
4717  ;;
4718esac
4719fi
4720BASH=$ac_cv_path_BASH
4721if test -n "$BASH"; then
4722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4723$as_echo "$BASH" >&6; }
4724else
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
4727fi
4728
4729
4730  test -n "$BASH" && break
4731done
4732
4733  else
4734    # The variable is set, but is it from the command line or the environment?
4735
4736    # Try to remove the string !BASH! from our list.
4737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4739      # If it failed, the variable was not from the command line. Ignore it,
4740      # but warn the user (except for BASH, which is always set by the calling BASH).
4741      if test "xBASH" != xBASH; then
4742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4743$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4744      fi
4745      # Try to locate tool using the code snippet
4746      for ac_prog in bash
4747do
4748  # Extract the first word of "$ac_prog", so it can be a program name with args.
4749set dummy $ac_prog; ac_word=$2
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
4752if ${ac_cv_path_BASH+:} false; then :
4753  $as_echo_n "(cached) " >&6
4754else
4755  case $BASH in
4756  [\\/]* | ?:[\\/]*)
4757  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4758  ;;
4759  *)
4760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763  IFS=$as_save_IFS
4764  test -z "$as_dir" && as_dir=.
4765    for ac_exec_ext in '' $ac_executable_extensions; do
4766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769    break 2
4770  fi
4771done
4772  done
4773IFS=$as_save_IFS
4774
4775  ;;
4776esac
4777fi
4778BASH=$ac_cv_path_BASH
4779if test -n "$BASH"; then
4780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4781$as_echo "$BASH" >&6; }
4782else
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787
4788  test -n "$BASH" && break
4789done
4790
4791    else
4792      # If it succeeded, then it was overridden by the user. We will use it
4793      # for the tool.
4794
4795      # First remove it from the list of overridden variables, so we can test
4796      # for unknown variables in the end.
4797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4798
4799      # Check if the provided tool contains a complete path.
4800      tool_specified="$BASH"
4801      tool_basename="${tool_specified##*/}"
4802      if test "x$tool_basename" = "x$tool_specified"; then
4803        # A command without a complete path is provided, search $PATH.
4804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4805$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4806        # Extract the first word of "$tool_basename", so it can be a program name with args.
4807set dummy $tool_basename; ac_word=$2
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809$as_echo_n "checking for $ac_word... " >&6; }
4810if ${ac_cv_path_BASH+:} false; then :
4811  $as_echo_n "(cached) " >&6
4812else
4813  case $BASH in
4814  [\\/]* | ?:[\\/]*)
4815  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4816  ;;
4817  *)
4818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in $PATH
4820do
4821  IFS=$as_save_IFS
4822  test -z "$as_dir" && as_dir=.
4823    for ac_exec_ext in '' $ac_executable_extensions; do
4824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4825    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827    break 2
4828  fi
4829done
4830  done
4831IFS=$as_save_IFS
4832
4833  ;;
4834esac
4835fi
4836BASH=$ac_cv_path_BASH
4837if test -n "$BASH"; then
4838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4839$as_echo "$BASH" >&6; }
4840else
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844
4845
4846        if test "x$BASH" = x; then
4847          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4848        fi
4849      else
4850        # Otherwise we believe it is a complete path. Use it as it is.
4851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4852$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4854$as_echo_n "checking for BASH... " >&6; }
4855        if test ! -x "$tool_specified"; then
4856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4857$as_echo "not found" >&6; }
4858          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4859        fi
4860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4861$as_echo "$tool_specified" >&6; }
4862      fi
4863    fi
4864  fi
4865
4866
4867
4868  if test "x$BASH" = x; then
4869    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4870  fi
4871
4872
4873
4874
4875
4876  # Publish this variable in the help.
4877
4878
4879  if test "x$CAT" = x; then
4880    # The variable is not set by user, try to locate tool using the code snippet
4881    for ac_prog in cat
4882do
4883  # Extract the first word of "$ac_prog", so it can be a program name with args.
4884set dummy $ac_prog; ac_word=$2
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CAT+:} false; then :
4888  $as_echo_n "(cached) " >&6
4889else
4890  case $CAT in
4891  [\\/]* | ?:[\\/]*)
4892  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4893  ;;
4894  *)
4895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in $PATH
4897do
4898  IFS=$as_save_IFS
4899  test -z "$as_dir" && as_dir=.
4900    for ac_exec_ext in '' $ac_executable_extensions; do
4901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4902    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904    break 2
4905  fi
4906done
4907  done
4908IFS=$as_save_IFS
4909
4910  ;;
4911esac
4912fi
4913CAT=$ac_cv_path_CAT
4914if test -n "$CAT"; then
4915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4916$as_echo "$CAT" >&6; }
4917else
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
4922
4923  test -n "$CAT" && break
4924done
4925
4926  else
4927    # The variable is set, but is it from the command line or the environment?
4928
4929    # Try to remove the string !CAT! from our list.
4930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4932      # If it failed, the variable was not from the command line. Ignore it,
4933      # but warn the user (except for BASH, which is always set by the calling BASH).
4934      if test "xCAT" != xBASH; then
4935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4936$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4937      fi
4938      # Try to locate tool using the code snippet
4939      for ac_prog in cat
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_CAT+:} false; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $CAT in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4960    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971CAT=$ac_cv_path_CAT
4972if test -n "$CAT"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4974$as_echo "$CAT" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$CAT" && break
4982done
4983
4984    else
4985      # If it succeeded, then it was overridden by the user. We will use it
4986      # for the tool.
4987
4988      # First remove it from the list of overridden variables, so we can test
4989      # for unknown variables in the end.
4990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4991
4992      # Check if the provided tool contains a complete path.
4993      tool_specified="$CAT"
4994      tool_basename="${tool_specified##*/}"
4995      if test "x$tool_basename" = "x$tool_specified"; then
4996        # A command without a complete path is provided, search $PATH.
4997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4998$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4999        # Extract the first word of "$tool_basename", so it can be a program name with args.
5000set dummy $tool_basename; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_path_CAT+:} false; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $CAT in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029CAT=$ac_cv_path_CAT
5030if test -n "$CAT"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5032$as_echo "$CAT" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039        if test "x$CAT" = x; then
5040          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5041        fi
5042      else
5043        # Otherwise we believe it is a complete path. Use it as it is.
5044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5045$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5047$as_echo_n "checking for CAT... " >&6; }
5048        if test ! -x "$tool_specified"; then
5049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5050$as_echo "not found" >&6; }
5051          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5052        fi
5053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5054$as_echo "$tool_specified" >&6; }
5055      fi
5056    fi
5057  fi
5058
5059
5060
5061  if test "x$CAT" = x; then
5062    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5063  fi
5064
5065
5066
5067
5068
5069  # Publish this variable in the help.
5070
5071
5072  if test "x$CHMOD" = x; then
5073    # The variable is not set by user, try to locate tool using the code snippet
5074    for ac_prog in chmod
5075do
5076  # Extract the first word of "$ac_prog", so it can be a program name with args.
5077set dummy $ac_prog; ac_word=$2
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
5080if ${ac_cv_path_CHMOD+:} false; then :
5081  $as_echo_n "(cached) " >&6
5082else
5083  case $CHMOD in
5084  [\\/]* | ?:[\\/]*)
5085  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5086  ;;
5087  *)
5088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091  IFS=$as_save_IFS
5092  test -z "$as_dir" && as_dir=.
5093    for ac_exec_ext in '' $ac_executable_extensions; do
5094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5095    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097    break 2
5098  fi
5099done
5100  done
5101IFS=$as_save_IFS
5102
5103  ;;
5104esac
5105fi
5106CHMOD=$ac_cv_path_CHMOD
5107if test -n "$CHMOD"; then
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5109$as_echo "$CHMOD" >&6; }
5110else
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
5113fi
5114
5115
5116  test -n "$CHMOD" && break
5117done
5118
5119  else
5120    # The variable is set, but is it from the command line or the environment?
5121
5122    # Try to remove the string !CHMOD! from our list.
5123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5125      # If it failed, the variable was not from the command line. Ignore it,
5126      # but warn the user (except for BASH, which is always set by the calling BASH).
5127      if test "xCHMOD" != xBASH; then
5128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5129$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5130      fi
5131      # Try to locate tool using the code snippet
5132      for ac_prog in chmod
5133do
5134  # Extract the first word of "$ac_prog", so it can be a program name with args.
5135set dummy $ac_prog; ac_word=$2
5136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137$as_echo_n "checking for $ac_word... " >&6; }
5138if ${ac_cv_path_CHMOD+:} false; then :
5139  $as_echo_n "(cached) " >&6
5140else
5141  case $CHMOD in
5142  [\\/]* | ?:[\\/]*)
5143  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5144  ;;
5145  *)
5146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in $PATH
5148do
5149  IFS=$as_save_IFS
5150  test -z "$as_dir" && as_dir=.
5151    for ac_exec_ext in '' $ac_executable_extensions; do
5152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5153    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155    break 2
5156  fi
5157done
5158  done
5159IFS=$as_save_IFS
5160
5161  ;;
5162esac
5163fi
5164CHMOD=$ac_cv_path_CHMOD
5165if test -n "$CHMOD"; then
5166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5167$as_echo "$CHMOD" >&6; }
5168else
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
5171fi
5172
5173
5174  test -n "$CHMOD" && break
5175done
5176
5177    else
5178      # If it succeeded, then it was overridden by the user. We will use it
5179      # for the tool.
5180
5181      # First remove it from the list of overridden variables, so we can test
5182      # for unknown variables in the end.
5183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5184
5185      # Check if the provided tool contains a complete path.
5186      tool_specified="$CHMOD"
5187      tool_basename="${tool_specified##*/}"
5188      if test "x$tool_basename" = "x$tool_specified"; then
5189        # A command without a complete path is provided, search $PATH.
5190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5192        # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_CHMOD+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $CHMOD in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222CHMOD=$ac_cv_path_CHMOD
5223if test -n "$CHMOD"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5225$as_echo "$CHMOD" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232        if test "x$CHMOD" = x; then
5233          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234        fi
5235      else
5236        # Otherwise we believe it is a complete path. Use it as it is.
5237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5240$as_echo_n "checking for CHMOD... " >&6; }
5241        if test ! -x "$tool_specified"; then
5242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5245        fi
5246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248      fi
5249    fi
5250  fi
5251
5252
5253
5254  if test "x$CHMOD" = x; then
5255    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5256  fi
5257
5258
5259
5260
5261
5262  # Publish this variable in the help.
5263
5264
5265  if test "x$CMP" = x; then
5266    # The variable is not set by user, try to locate tool using the code snippet
5267    for ac_prog in cmp
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272$as_echo_n "checking for $ac_word... " >&6; }
5273if ${ac_cv_path_CMP+:} false; then :
5274  $as_echo_n "(cached) " >&6
5275else
5276  case $CMP in
5277  [\\/]* | ?:[\\/]*)
5278  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5279  ;;
5280  *)
5281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282for as_dir in $PATH
5283do
5284  IFS=$as_save_IFS
5285  test -z "$as_dir" && as_dir=.
5286    for ac_exec_ext in '' $ac_executable_extensions; do
5287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5288    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290    break 2
5291  fi
5292done
5293  done
5294IFS=$as_save_IFS
5295
5296  ;;
5297esac
5298fi
5299CMP=$ac_cv_path_CMP
5300if test -n "$CMP"; then
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5302$as_echo "$CMP" >&6; }
5303else
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
5306fi
5307
5308
5309  test -n "$CMP" && break
5310done
5311
5312  else
5313    # The variable is set, but is it from the command line or the environment?
5314
5315    # Try to remove the string !CMP! from our list.
5316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5318      # If it failed, the variable was not from the command line. Ignore it,
5319      # but warn the user (except for BASH, which is always set by the calling BASH).
5320      if test "xCMP" != xBASH; then
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5322$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5323      fi
5324      # Try to locate tool using the code snippet
5325      for ac_prog in cmp
5326do
5327  # Extract the first word of "$ac_prog", so it can be a program name with args.
5328set dummy $ac_prog; ac_word=$2
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330$as_echo_n "checking for $ac_word... " >&6; }
5331if ${ac_cv_path_CMP+:} false; then :
5332  $as_echo_n "(cached) " >&6
5333else
5334  case $CMP in
5335  [\\/]* | ?:[\\/]*)
5336  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5337  ;;
5338  *)
5339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340for as_dir in $PATH
5341do
5342  IFS=$as_save_IFS
5343  test -z "$as_dir" && as_dir=.
5344    for ac_exec_ext in '' $ac_executable_extensions; do
5345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5346    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348    break 2
5349  fi
5350done
5351  done
5352IFS=$as_save_IFS
5353
5354  ;;
5355esac
5356fi
5357CMP=$ac_cv_path_CMP
5358if test -n "$CMP"; then
5359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5360$as_echo "$CMP" >&6; }
5361else
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365
5366
5367  test -n "$CMP" && break
5368done
5369
5370    else
5371      # If it succeeded, then it was overridden by the user. We will use it
5372      # for the tool.
5373
5374      # First remove it from the list of overridden variables, so we can test
5375      # for unknown variables in the end.
5376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5377
5378      # Check if the provided tool contains a complete path.
5379      tool_specified="$CMP"
5380      tool_basename="${tool_specified##*/}"
5381      if test "x$tool_basename" = "x$tool_specified"; then
5382        # A command without a complete path is provided, search $PATH.
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5384$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5385        # Extract the first word of "$tool_basename", so it can be a program name with args.
5386set dummy $tool_basename; ac_word=$2
5387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388$as_echo_n "checking for $ac_word... " >&6; }
5389if ${ac_cv_path_CMP+:} false; then :
5390  $as_echo_n "(cached) " >&6
5391else
5392  case $CMP in
5393  [\\/]* | ?:[\\/]*)
5394  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5395  ;;
5396  *)
5397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398for as_dir in $PATH
5399do
5400  IFS=$as_save_IFS
5401  test -z "$as_dir" && as_dir=.
5402    for ac_exec_ext in '' $ac_executable_extensions; do
5403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5404    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5406    break 2
5407  fi
5408done
5409  done
5410IFS=$as_save_IFS
5411
5412  ;;
5413esac
5414fi
5415CMP=$ac_cv_path_CMP
5416if test -n "$CMP"; then
5417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5418$as_echo "$CMP" >&6; }
5419else
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
5422fi
5423
5424
5425        if test "x$CMP" = x; then
5426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5427        fi
5428      else
5429        # Otherwise we believe it is a complete path. Use it as it is.
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5431$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5433$as_echo_n "checking for CMP... " >&6; }
5434        if test ! -x "$tool_specified"; then
5435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5436$as_echo "not found" >&6; }
5437          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5438        fi
5439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5440$as_echo "$tool_specified" >&6; }
5441      fi
5442    fi
5443  fi
5444
5445
5446
5447  if test "x$CMP" = x; then
5448    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5449  fi
5450
5451
5452
5453
5454
5455  # Publish this variable in the help.
5456
5457
5458  if test "x$COMM" = x; then
5459    # The variable is not set by user, try to locate tool using the code snippet
5460    for ac_prog in comm
5461do
5462  # Extract the first word of "$ac_prog", so it can be a program name with args.
5463set dummy $ac_prog; ac_word=$2
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465$as_echo_n "checking for $ac_word... " >&6; }
5466if ${ac_cv_path_COMM+:} false; then :
5467  $as_echo_n "(cached) " >&6
5468else
5469  case $COMM in
5470  [\\/]* | ?:[\\/]*)
5471  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5472  ;;
5473  *)
5474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475for as_dir in $PATH
5476do
5477  IFS=$as_save_IFS
5478  test -z "$as_dir" && as_dir=.
5479    for ac_exec_ext in '' $ac_executable_extensions; do
5480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483    break 2
5484  fi
5485done
5486  done
5487IFS=$as_save_IFS
5488
5489  ;;
5490esac
5491fi
5492COMM=$ac_cv_path_COMM
5493if test -n "$COMM"; then
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5495$as_echo "$COMM" >&6; }
5496else
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498$as_echo "no" >&6; }
5499fi
5500
5501
5502  test -n "$COMM" && break
5503done
5504
5505  else
5506    # The variable is set, but is it from the command line or the environment?
5507
5508    # Try to remove the string !COMM! from our list.
5509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5511      # If it failed, the variable was not from the command line. Ignore it,
5512      # but warn the user (except for BASH, which is always set by the calling BASH).
5513      if test "xCOMM" != xBASH; then
5514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5515$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5516      fi
5517      # Try to locate tool using the code snippet
5518      for ac_prog in comm
5519do
5520  # Extract the first word of "$ac_prog", so it can be a program name with args.
5521set dummy $ac_prog; ac_word=$2
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523$as_echo_n "checking for $ac_word... " >&6; }
5524if ${ac_cv_path_COMM+:} false; then :
5525  $as_echo_n "(cached) " >&6
5526else
5527  case $COMM in
5528  [\\/]* | ?:[\\/]*)
5529  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5530  ;;
5531  *)
5532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533for as_dir in $PATH
5534do
5535  IFS=$as_save_IFS
5536  test -z "$as_dir" && as_dir=.
5537    for ac_exec_ext in '' $ac_executable_extensions; do
5538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541    break 2
5542  fi
5543done
5544  done
5545IFS=$as_save_IFS
5546
5547  ;;
5548esac
5549fi
5550COMM=$ac_cv_path_COMM
5551if test -n "$COMM"; then
5552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5553$as_echo "$COMM" >&6; }
5554else
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556$as_echo "no" >&6; }
5557fi
5558
5559
5560  test -n "$COMM" && break
5561done
5562
5563    else
5564      # If it succeeded, then it was overridden by the user. We will use it
5565      # for the tool.
5566
5567      # First remove it from the list of overridden variables, so we can test
5568      # for unknown variables in the end.
5569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5570
5571      # Check if the provided tool contains a complete path.
5572      tool_specified="$COMM"
5573      tool_basename="${tool_specified##*/}"
5574      if test "x$tool_basename" = "x$tool_specified"; then
5575        # A command without a complete path is provided, search $PATH.
5576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5577$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5578        # Extract the first word of "$tool_basename", so it can be a program name with args.
5579set dummy $tool_basename; ac_word=$2
5580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5581$as_echo_n "checking for $ac_word... " >&6; }
5582if ${ac_cv_path_COMM+:} false; then :
5583  $as_echo_n "(cached) " >&6
5584else
5585  case $COMM in
5586  [\\/]* | ?:[\\/]*)
5587  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5588  ;;
5589  *)
5590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591for as_dir in $PATH
5592do
5593  IFS=$as_save_IFS
5594  test -z "$as_dir" && as_dir=.
5595    for ac_exec_ext in '' $ac_executable_extensions; do
5596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5597    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599    break 2
5600  fi
5601done
5602  done
5603IFS=$as_save_IFS
5604
5605  ;;
5606esac
5607fi
5608COMM=$ac_cv_path_COMM
5609if test -n "$COMM"; then
5610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5611$as_echo "$COMM" >&6; }
5612else
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614$as_echo "no" >&6; }
5615fi
5616
5617
5618        if test "x$COMM" = x; then
5619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5620        fi
5621      else
5622        # Otherwise we believe it is a complete path. Use it as it is.
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5624$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5626$as_echo_n "checking for COMM... " >&6; }
5627        if test ! -x "$tool_specified"; then
5628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5629$as_echo "not found" >&6; }
5630          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5631        fi
5632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5633$as_echo "$tool_specified" >&6; }
5634      fi
5635    fi
5636  fi
5637
5638
5639
5640  if test "x$COMM" = x; then
5641    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5642  fi
5643
5644
5645
5646
5647
5648  # Publish this variable in the help.
5649
5650
5651  if test "x$CP" = x; then
5652    # The variable is not set by user, try to locate tool using the code snippet
5653    for ac_prog in cp
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if ${ac_cv_path_CP+:} false; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $CP in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685CP=$ac_cv_path_CP
5686if test -n "$CP"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5688$as_echo "$CP" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$CP" && break
5696done
5697
5698  else
5699    # The variable is set, but is it from the command line or the environment?
5700
5701    # Try to remove the string !CP! from our list.
5702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5704      # If it failed, the variable was not from the command line. Ignore it,
5705      # but warn the user (except for BASH, which is always set by the calling BASH).
5706      if test "xCP" != xBASH; then
5707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5708$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5709      fi
5710      # Try to locate tool using the code snippet
5711      for ac_prog in cp
5712do
5713  # Extract the first word of "$ac_prog", so it can be a program name with args.
5714set dummy $ac_prog; ac_word=$2
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716$as_echo_n "checking for $ac_word... " >&6; }
5717if ${ac_cv_path_CP+:} false; then :
5718  $as_echo_n "(cached) " >&6
5719else
5720  case $CP in
5721  [\\/]* | ?:[\\/]*)
5722  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5723  ;;
5724  *)
5725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726for as_dir in $PATH
5727do
5728  IFS=$as_save_IFS
5729  test -z "$as_dir" && as_dir=.
5730    for ac_exec_ext in '' $ac_executable_extensions; do
5731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734    break 2
5735  fi
5736done
5737  done
5738IFS=$as_save_IFS
5739
5740  ;;
5741esac
5742fi
5743CP=$ac_cv_path_CP
5744if test -n "$CP"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5746$as_echo "$CP" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753  test -n "$CP" && break
5754done
5755
5756    else
5757      # If it succeeded, then it was overridden by the user. We will use it
5758      # for the tool.
5759
5760      # First remove it from the list of overridden variables, so we can test
5761      # for unknown variables in the end.
5762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5763
5764      # Check if the provided tool contains a complete path.
5765      tool_specified="$CP"
5766      tool_basename="${tool_specified##*/}"
5767      if test "x$tool_basename" = "x$tool_specified"; then
5768        # A command without a complete path is provided, search $PATH.
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5770$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5771        # Extract the first word of "$tool_basename", so it can be a program name with args.
5772set dummy $tool_basename; ac_word=$2
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774$as_echo_n "checking for $ac_word... " >&6; }
5775if ${ac_cv_path_CP+:} false; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778  case $CP in
5779  [\\/]* | ?:[\\/]*)
5780  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5781  ;;
5782  *)
5783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784for as_dir in $PATH
5785do
5786  IFS=$as_save_IFS
5787  test -z "$as_dir" && as_dir=.
5788    for ac_exec_ext in '' $ac_executable_extensions; do
5789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792    break 2
5793  fi
5794done
5795  done
5796IFS=$as_save_IFS
5797
5798  ;;
5799esac
5800fi
5801CP=$ac_cv_path_CP
5802if test -n "$CP"; then
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5804$as_echo "$CP" >&6; }
5805else
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808fi
5809
5810
5811        if test "x$CP" = x; then
5812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5813        fi
5814      else
5815        # Otherwise we believe it is a complete path. Use it as it is.
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5817$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5819$as_echo_n "checking for CP... " >&6; }
5820        if test ! -x "$tool_specified"; then
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5822$as_echo "not found" >&6; }
5823          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5824        fi
5825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5826$as_echo "$tool_specified" >&6; }
5827      fi
5828    fi
5829  fi
5830
5831
5832
5833  if test "x$CP" = x; then
5834    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5835  fi
5836
5837
5838
5839
5840
5841  # Publish this variable in the help.
5842
5843
5844  if test "x$CUT" = x; then
5845    # The variable is not set by user, try to locate tool using the code snippet
5846    for ac_prog in cut
5847do
5848  # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_CUT+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $CUT in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878CUT=$ac_cv_path_CUT
5879if test -n "$CUT"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5881$as_echo "$CUT" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888  test -n "$CUT" && break
5889done
5890
5891  else
5892    # The variable is set, but is it from the command line or the environment?
5893
5894    # Try to remove the string !CUT! from our list.
5895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5897      # If it failed, the variable was not from the command line. Ignore it,
5898      # but warn the user (except for BASH, which is always set by the calling BASH).
5899      if test "xCUT" != xBASH; then
5900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5901$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5902      fi
5903      # Try to locate tool using the code snippet
5904      for ac_prog in cut
5905do
5906  # Extract the first word of "$ac_prog", so it can be a program name with args.
5907set dummy $ac_prog; ac_word=$2
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909$as_echo_n "checking for $ac_word... " >&6; }
5910if ${ac_cv_path_CUT+:} false; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913  case $CUT in
5914  [\\/]* | ?:[\\/]*)
5915  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5916  ;;
5917  *)
5918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921  IFS=$as_save_IFS
5922  test -z "$as_dir" && as_dir=.
5923    for ac_exec_ext in '' $ac_executable_extensions; do
5924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5925    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927    break 2
5928  fi
5929done
5930  done
5931IFS=$as_save_IFS
5932
5933  ;;
5934esac
5935fi
5936CUT=$ac_cv_path_CUT
5937if test -n "$CUT"; then
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5939$as_echo "$CUT" >&6; }
5940else
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942$as_echo "no" >&6; }
5943fi
5944
5945
5946  test -n "$CUT" && break
5947done
5948
5949    else
5950      # If it succeeded, then it was overridden by the user. We will use it
5951      # for the tool.
5952
5953      # First remove it from the list of overridden variables, so we can test
5954      # for unknown variables in the end.
5955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5956
5957      # Check if the provided tool contains a complete path.
5958      tool_specified="$CUT"
5959      tool_basename="${tool_specified##*/}"
5960      if test "x$tool_basename" = "x$tool_specified"; then
5961        # A command without a complete path is provided, search $PATH.
5962        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5963$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5964        # Extract the first word of "$tool_basename", so it can be a program name with args.
5965set dummy $tool_basename; ac_word=$2
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
5968if ${ac_cv_path_CUT+:} false; then :
5969  $as_echo_n "(cached) " >&6
5970else
5971  case $CUT in
5972  [\\/]* | ?:[\\/]*)
5973  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5974  ;;
5975  *)
5976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979  IFS=$as_save_IFS
5980  test -z "$as_dir" && as_dir=.
5981    for ac_exec_ext in '' $ac_executable_extensions; do
5982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5983    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985    break 2
5986  fi
5987done
5988  done
5989IFS=$as_save_IFS
5990
5991  ;;
5992esac
5993fi
5994CUT=$ac_cv_path_CUT
5995if test -n "$CUT"; then
5996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5997$as_echo "$CUT" >&6; }
5998else
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000$as_echo "no" >&6; }
6001fi
6002
6003
6004        if test "x$CUT" = x; then
6005          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6006        fi
6007      else
6008        # Otherwise we believe it is a complete path. Use it as it is.
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6010$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6012$as_echo_n "checking for CUT... " >&6; }
6013        if test ! -x "$tool_specified"; then
6014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6015$as_echo "not found" >&6; }
6016          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6017        fi
6018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6019$as_echo "$tool_specified" >&6; }
6020      fi
6021    fi
6022  fi
6023
6024
6025
6026  if test "x$CUT" = x; then
6027    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6028  fi
6029
6030
6031
6032
6033
6034  # Publish this variable in the help.
6035
6036
6037  if test "x$DATE" = x; then
6038    # The variable is not set by user, try to locate tool using the code snippet
6039    for ac_prog in date
6040do
6041  # Extract the first word of "$ac_prog", so it can be a program name with args.
6042set dummy $ac_prog; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if ${ac_cv_path_DATE+:} false; then :
6046  $as_echo_n "(cached) " >&6
6047else
6048  case $DATE in
6049  [\\/]* | ?:[\\/]*)
6050  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6051  ;;
6052  *)
6053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056  IFS=$as_save_IFS
6057  test -z "$as_dir" && as_dir=.
6058    for ac_exec_ext in '' $ac_executable_extensions; do
6059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062    break 2
6063  fi
6064done
6065  done
6066IFS=$as_save_IFS
6067
6068  ;;
6069esac
6070fi
6071DATE=$ac_cv_path_DATE
6072if test -n "$DATE"; then
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6074$as_echo "$DATE" >&6; }
6075else
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081  test -n "$DATE" && break
6082done
6083
6084  else
6085    # The variable is set, but is it from the command line or the environment?
6086
6087    # Try to remove the string !DATE! from our list.
6088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6090      # If it failed, the variable was not from the command line. Ignore it,
6091      # but warn the user (except for BASH, which is always set by the calling BASH).
6092      if test "xDATE" != xBASH; then
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6094$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6095      fi
6096      # Try to locate tool using the code snippet
6097      for ac_prog in date
6098do
6099  # Extract the first word of "$ac_prog", so it can be a program name with args.
6100set dummy $ac_prog; ac_word=$2
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
6103if ${ac_cv_path_DATE+:} false; then :
6104  $as_echo_n "(cached) " >&6
6105else
6106  case $DATE in
6107  [\\/]* | ?:[\\/]*)
6108  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6109  ;;
6110  *)
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_exec_ext in '' $ac_executable_extensions; do
6117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120    break 2
6121  fi
6122done
6123  done
6124IFS=$as_save_IFS
6125
6126  ;;
6127esac
6128fi
6129DATE=$ac_cv_path_DATE
6130if test -n "$DATE"; then
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6132$as_echo "$DATE" >&6; }
6133else
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139  test -n "$DATE" && break
6140done
6141
6142    else
6143      # If it succeeded, then it was overridden by the user. We will use it
6144      # for the tool.
6145
6146      # First remove it from the list of overridden variables, so we can test
6147      # for unknown variables in the end.
6148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6149
6150      # Check if the provided tool contains a complete path.
6151      tool_specified="$DATE"
6152      tool_basename="${tool_specified##*/}"
6153      if test "x$tool_basename" = "x$tool_specified"; then
6154        # A command without a complete path is provided, search $PATH.
6155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6156$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6157        # Extract the first word of "$tool_basename", so it can be a program name with args.
6158set dummy $tool_basename; ac_word=$2
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
6161if ${ac_cv_path_DATE+:} false; then :
6162  $as_echo_n "(cached) " >&6
6163else
6164  case $DATE in
6165  [\\/]* | ?:[\\/]*)
6166  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6167  ;;
6168  *)
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6176    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178    break 2
6179  fi
6180done
6181  done
6182IFS=$as_save_IFS
6183
6184  ;;
6185esac
6186fi
6187DATE=$ac_cv_path_DATE
6188if test -n "$DATE"; then
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6190$as_echo "$DATE" >&6; }
6191else
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197        if test "x$DATE" = x; then
6198          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6199        fi
6200      else
6201        # Otherwise we believe it is a complete path. Use it as it is.
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6203$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6205$as_echo_n "checking for DATE... " >&6; }
6206        if test ! -x "$tool_specified"; then
6207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6208$as_echo "not found" >&6; }
6209          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6210        fi
6211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6212$as_echo "$tool_specified" >&6; }
6213      fi
6214    fi
6215  fi
6216
6217
6218
6219  if test "x$DATE" = x; then
6220    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6221  fi
6222
6223
6224
6225
6226
6227  # Publish this variable in the help.
6228
6229
6230  if test "x$DIFF" = x; then
6231    # The variable is not set by user, try to locate tool using the code snippet
6232    for ac_prog in gdiff diff
6233do
6234  # Extract the first word of "$ac_prog", so it can be a program name with args.
6235set dummy $ac_prog; ac_word=$2
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6237$as_echo_n "checking for $ac_word... " >&6; }
6238if ${ac_cv_path_DIFF+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241  case $DIFF in
6242  [\\/]* | ?:[\\/]*)
6243  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6244  ;;
6245  *)
6246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249  IFS=$as_save_IFS
6250  test -z "$as_dir" && as_dir=.
6251    for ac_exec_ext in '' $ac_executable_extensions; do
6252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6253    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6255    break 2
6256  fi
6257done
6258  done
6259IFS=$as_save_IFS
6260
6261  ;;
6262esac
6263fi
6264DIFF=$ac_cv_path_DIFF
6265if test -n "$DIFF"; then
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6267$as_echo "$DIFF" >&6; }
6268else
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270$as_echo "no" >&6; }
6271fi
6272
6273
6274  test -n "$DIFF" && break
6275done
6276
6277  else
6278    # The variable is set, but is it from the command line or the environment?
6279
6280    # Try to remove the string !DIFF! from our list.
6281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6283      # If it failed, the variable was not from the command line. Ignore it,
6284      # but warn the user (except for BASH, which is always set by the calling BASH).
6285      if test "xDIFF" != xBASH; then
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6287$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6288      fi
6289      # Try to locate tool using the code snippet
6290      for ac_prog in gdiff diff
6291do
6292  # Extract the first word of "$ac_prog", so it can be a program name with args.
6293set dummy $ac_prog; ac_word=$2
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295$as_echo_n "checking for $ac_word... " >&6; }
6296if ${ac_cv_path_DIFF+:} false; then :
6297  $as_echo_n "(cached) " >&6
6298else
6299  case $DIFF in
6300  [\\/]* | ?:[\\/]*)
6301  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6302  ;;
6303  *)
6304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305for as_dir in $PATH
6306do
6307  IFS=$as_save_IFS
6308  test -z "$as_dir" && as_dir=.
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313    break 2
6314  fi
6315done
6316  done
6317IFS=$as_save_IFS
6318
6319  ;;
6320esac
6321fi
6322DIFF=$ac_cv_path_DIFF
6323if test -n "$DIFF"; then
6324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6325$as_echo "$DIFF" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330
6331
6332  test -n "$DIFF" && break
6333done
6334
6335    else
6336      # If it succeeded, then it was overridden by the user. We will use it
6337      # for the tool.
6338
6339      # First remove it from the list of overridden variables, so we can test
6340      # for unknown variables in the end.
6341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6342
6343      # Check if the provided tool contains a complete path.
6344      tool_specified="$DIFF"
6345      tool_basename="${tool_specified##*/}"
6346      if test "x$tool_basename" = "x$tool_specified"; then
6347        # A command without a complete path is provided, search $PATH.
6348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6349$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6350        # Extract the first word of "$tool_basename", so it can be a program name with args.
6351set dummy $tool_basename; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_path_DIFF+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  case $DIFF in
6358  [\\/]* | ?:[\\/]*)
6359  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6360  ;;
6361  *)
6362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365  IFS=$as_save_IFS
6366  test -z "$as_dir" && as_dir=.
6367    for ac_exec_ext in '' $ac_executable_extensions; do
6368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371    break 2
6372  fi
6373done
6374  done
6375IFS=$as_save_IFS
6376
6377  ;;
6378esac
6379fi
6380DIFF=$ac_cv_path_DIFF
6381if test -n "$DIFF"; then
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6383$as_echo "$DIFF" >&6; }
6384else
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389
6390        if test "x$DIFF" = x; then
6391          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6392        fi
6393      else
6394        # Otherwise we believe it is a complete path. Use it as it is.
6395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6396$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6398$as_echo_n "checking for DIFF... " >&6; }
6399        if test ! -x "$tool_specified"; then
6400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6401$as_echo "not found" >&6; }
6402          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6403        fi
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6405$as_echo "$tool_specified" >&6; }
6406      fi
6407    fi
6408  fi
6409
6410
6411
6412  if test "x$DIFF" = x; then
6413    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6414  fi
6415
6416
6417
6418
6419
6420  # Publish this variable in the help.
6421
6422
6423  if test "x$DIRNAME" = x; then
6424    # The variable is not set by user, try to locate tool using the code snippet
6425    for ac_prog in dirname
6426do
6427  # Extract the first word of "$ac_prog", so it can be a program name with args.
6428set dummy $ac_prog; ac_word=$2
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430$as_echo_n "checking for $ac_word... " >&6; }
6431if ${ac_cv_path_DIRNAME+:} false; then :
6432  $as_echo_n "(cached) " >&6
6433else
6434  case $DIRNAME in
6435  [\\/]* | ?:[\\/]*)
6436  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6437  ;;
6438  *)
6439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440for as_dir in $PATH
6441do
6442  IFS=$as_save_IFS
6443  test -z "$as_dir" && as_dir=.
6444    for ac_exec_ext in '' $ac_executable_extensions; do
6445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448    break 2
6449  fi
6450done
6451  done
6452IFS=$as_save_IFS
6453
6454  ;;
6455esac
6456fi
6457DIRNAME=$ac_cv_path_DIRNAME
6458if test -n "$DIRNAME"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6460$as_echo "$DIRNAME" >&6; }
6461else
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466
6467  test -n "$DIRNAME" && break
6468done
6469
6470  else
6471    # The variable is set, but is it from the command line or the environment?
6472
6473    # Try to remove the string !DIRNAME! from our list.
6474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6476      # If it failed, the variable was not from the command line. Ignore it,
6477      # but warn the user (except for BASH, which is always set by the calling BASH).
6478      if test "xDIRNAME" != xBASH; then
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6480$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6481      fi
6482      # Try to locate tool using the code snippet
6483      for ac_prog in dirname
6484do
6485  # Extract the first word of "$ac_prog", so it can be a program name with args.
6486set dummy $ac_prog; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_DIRNAME+:} false; then :
6490  $as_echo_n "(cached) " >&6
6491else
6492  case $DIRNAME in
6493  [\\/]* | ?:[\\/]*)
6494  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6495  ;;
6496  *)
6497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500  IFS=$as_save_IFS
6501  test -z "$as_dir" && as_dir=.
6502    for ac_exec_ext in '' $ac_executable_extensions; do
6503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506    break 2
6507  fi
6508done
6509  done
6510IFS=$as_save_IFS
6511
6512  ;;
6513esac
6514fi
6515DIRNAME=$ac_cv_path_DIRNAME
6516if test -n "$DIRNAME"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6518$as_echo "$DIRNAME" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525  test -n "$DIRNAME" && break
6526done
6527
6528    else
6529      # If it succeeded, then it was overridden by the user. We will use it
6530      # for the tool.
6531
6532      # First remove it from the list of overridden variables, so we can test
6533      # for unknown variables in the end.
6534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6535
6536      # Check if the provided tool contains a complete path.
6537      tool_specified="$DIRNAME"
6538      tool_basename="${tool_specified##*/}"
6539      if test "x$tool_basename" = "x$tool_specified"; then
6540        # A command without a complete path is provided, search $PATH.
6541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6542$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6543        # Extract the first word of "$tool_basename", so it can be a program name with args.
6544set dummy $tool_basename; 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_DIRNAME+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $DIRNAME in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_DIRNAME="$DIRNAME" # 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_DIRNAME="$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
6573DIRNAME=$ac_cv_path_DIRNAME
6574if test -n "$DIRNAME"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6576$as_echo "$DIRNAME" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583        if test "x$DIRNAME" = x; then
6584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6585        fi
6586      else
6587        # Otherwise we believe it is a complete path. Use it as it is.
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6589$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6591$as_echo_n "checking for DIRNAME... " >&6; }
6592        if test ! -x "$tool_specified"; then
6593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6594$as_echo "not found" >&6; }
6595          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6596        fi
6597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6598$as_echo "$tool_specified" >&6; }
6599      fi
6600    fi
6601  fi
6602
6603
6604
6605  if test "x$DIRNAME" = x; then
6606    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6607  fi
6608
6609
6610
6611
6612
6613  # Publish this variable in the help.
6614
6615
6616  if test "x$ECHO" = x; then
6617    # The variable is not set by user, try to locate tool using the code snippet
6618    for ac_prog in echo
6619do
6620  # Extract the first word of "$ac_prog", so it can be a program name with args.
6621set dummy $ac_prog; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_ECHO+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $ECHO in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650ECHO=$ac_cv_path_ECHO
6651if test -n "$ECHO"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6653$as_echo "$ECHO" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660  test -n "$ECHO" && break
6661done
6662
6663  else
6664    # The variable is set, but is it from the command line or the environment?
6665
6666    # Try to remove the string !ECHO! from our list.
6667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6669      # If it failed, the variable was not from the command line. Ignore it,
6670      # but warn the user (except for BASH, which is always set by the calling BASH).
6671      if test "xECHO" != xBASH; then
6672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6673$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6674      fi
6675      # Try to locate tool using the code snippet
6676      for ac_prog in echo
6677do
6678  # Extract the first word of "$ac_prog", so it can be a program name with args.
6679set dummy $ac_prog; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_ECHO+:} false; then :
6683  $as_echo_n "(cached) " >&6
6684else
6685  case $ECHO in
6686  [\\/]* | ?:[\\/]*)
6687  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6688  ;;
6689  *)
6690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in $PATH
6692do
6693  IFS=$as_save_IFS
6694  test -z "$as_dir" && as_dir=.
6695    for ac_exec_ext in '' $ac_executable_extensions; do
6696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699    break 2
6700  fi
6701done
6702  done
6703IFS=$as_save_IFS
6704
6705  ;;
6706esac
6707fi
6708ECHO=$ac_cv_path_ECHO
6709if test -n "$ECHO"; then
6710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6711$as_echo "$ECHO" >&6; }
6712else
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717
6718  test -n "$ECHO" && break
6719done
6720
6721    else
6722      # If it succeeded, then it was overridden by the user. We will use it
6723      # for the tool.
6724
6725      # First remove it from the list of overridden variables, so we can test
6726      # for unknown variables in the end.
6727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6728
6729      # Check if the provided tool contains a complete path.
6730      tool_specified="$ECHO"
6731      tool_basename="${tool_specified##*/}"
6732      if test "x$tool_basename" = "x$tool_specified"; then
6733        # A command without a complete path is provided, search $PATH.
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6735$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6736        # Extract the first word of "$tool_basename", so it can be a program name with args.
6737set dummy $tool_basename; ac_word=$2
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739$as_echo_n "checking for $ac_word... " >&6; }
6740if ${ac_cv_path_ECHO+:} false; then :
6741  $as_echo_n "(cached) " >&6
6742else
6743  case $ECHO in
6744  [\\/]* | ?:[\\/]*)
6745  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6746  ;;
6747  *)
6748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749for as_dir in $PATH
6750do
6751  IFS=$as_save_IFS
6752  test -z "$as_dir" && as_dir=.
6753    for ac_exec_ext in '' $ac_executable_extensions; do
6754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757    break 2
6758  fi
6759done
6760  done
6761IFS=$as_save_IFS
6762
6763  ;;
6764esac
6765fi
6766ECHO=$ac_cv_path_ECHO
6767if test -n "$ECHO"; then
6768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6769$as_echo "$ECHO" >&6; }
6770else
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
6775
6776        if test "x$ECHO" = x; then
6777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6778        fi
6779      else
6780        # Otherwise we believe it is a complete path. Use it as it is.
6781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6782$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6784$as_echo_n "checking for ECHO... " >&6; }
6785        if test ! -x "$tool_specified"; then
6786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6787$as_echo "not found" >&6; }
6788          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6789        fi
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6791$as_echo "$tool_specified" >&6; }
6792      fi
6793    fi
6794  fi
6795
6796
6797
6798  if test "x$ECHO" = x; then
6799    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6800  fi
6801
6802
6803
6804
6805
6806  # Publish this variable in the help.
6807
6808
6809  if test "x$EXPR" = x; then
6810    # The variable is not set by user, try to locate tool using the code snippet
6811    for ac_prog in expr
6812do
6813  # Extract the first word of "$ac_prog", so it can be a program name with args.
6814set dummy $ac_prog; ac_word=$2
6815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_path_EXPR+:} false; then :
6818  $as_echo_n "(cached) " >&6
6819else
6820  case $EXPR in
6821  [\\/]* | ?:[\\/]*)
6822  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6823  ;;
6824  *)
6825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826for as_dir in $PATH
6827do
6828  IFS=$as_save_IFS
6829  test -z "$as_dir" && as_dir=.
6830    for ac_exec_ext in '' $ac_executable_extensions; do
6831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834    break 2
6835  fi
6836done
6837  done
6838IFS=$as_save_IFS
6839
6840  ;;
6841esac
6842fi
6843EXPR=$ac_cv_path_EXPR
6844if test -n "$EXPR"; then
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6846$as_echo "$EXPR" >&6; }
6847else
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849$as_echo "no" >&6; }
6850fi
6851
6852
6853  test -n "$EXPR" && break
6854done
6855
6856  else
6857    # The variable is set, but is it from the command line or the environment?
6858
6859    # Try to remove the string !EXPR! from our list.
6860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6862      # If it failed, the variable was not from the command line. Ignore it,
6863      # but warn the user (except for BASH, which is always set by the calling BASH).
6864      if test "xEXPR" != xBASH; then
6865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6866$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6867      fi
6868      # Try to locate tool using the code snippet
6869      for ac_prog in expr
6870do
6871  # Extract the first word of "$ac_prog", so it can be a program name with args.
6872set dummy $ac_prog; ac_word=$2
6873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874$as_echo_n "checking for $ac_word... " >&6; }
6875if ${ac_cv_path_EXPR+:} false; then :
6876  $as_echo_n "(cached) " >&6
6877else
6878  case $EXPR in
6879  [\\/]* | ?:[\\/]*)
6880  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6881  ;;
6882  *)
6883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884for as_dir in $PATH
6885do
6886  IFS=$as_save_IFS
6887  test -z "$as_dir" && as_dir=.
6888    for ac_exec_ext in '' $ac_executable_extensions; do
6889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892    break 2
6893  fi
6894done
6895  done
6896IFS=$as_save_IFS
6897
6898  ;;
6899esac
6900fi
6901EXPR=$ac_cv_path_EXPR
6902if test -n "$EXPR"; then
6903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6904$as_echo "$EXPR" >&6; }
6905else
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907$as_echo "no" >&6; }
6908fi
6909
6910
6911  test -n "$EXPR" && break
6912done
6913
6914    else
6915      # If it succeeded, then it was overridden by the user. We will use it
6916      # for the tool.
6917
6918      # First remove it from the list of overridden variables, so we can test
6919      # for unknown variables in the end.
6920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6921
6922      # Check if the provided tool contains a complete path.
6923      tool_specified="$EXPR"
6924      tool_basename="${tool_specified##*/}"
6925      if test "x$tool_basename" = "x$tool_specified"; then
6926        # A command without a complete path is provided, search $PATH.
6927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6928$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6929        # Extract the first word of "$tool_basename", so it can be a program name with args.
6930set dummy $tool_basename; ac_word=$2
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6932$as_echo_n "checking for $ac_word... " >&6; }
6933if ${ac_cv_path_EXPR+:} false; then :
6934  $as_echo_n "(cached) " >&6
6935else
6936  case $EXPR in
6937  [\\/]* | ?:[\\/]*)
6938  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6939  ;;
6940  *)
6941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6942for as_dir in $PATH
6943do
6944  IFS=$as_save_IFS
6945  test -z "$as_dir" && as_dir=.
6946    for ac_exec_ext in '' $ac_executable_extensions; do
6947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6948    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6950    break 2
6951  fi
6952done
6953  done
6954IFS=$as_save_IFS
6955
6956  ;;
6957esac
6958fi
6959EXPR=$ac_cv_path_EXPR
6960if test -n "$EXPR"; then
6961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6962$as_echo "$EXPR" >&6; }
6963else
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6965$as_echo "no" >&6; }
6966fi
6967
6968
6969        if test "x$EXPR" = x; then
6970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6971        fi
6972      else
6973        # Otherwise we believe it is a complete path. Use it as it is.
6974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6975$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6977$as_echo_n "checking for EXPR... " >&6; }
6978        if test ! -x "$tool_specified"; then
6979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6980$as_echo "not found" >&6; }
6981          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6982        fi
6983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6984$as_echo "$tool_specified" >&6; }
6985      fi
6986    fi
6987  fi
6988
6989
6990
6991  if test "x$EXPR" = x; then
6992    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6993  fi
6994
6995
6996
6997
6998
6999  # Publish this variable in the help.
7000
7001
7002  if test "x$FILE" = x; then
7003    # The variable is not set by user, try to locate tool using the code snippet
7004    for ac_prog in file
7005do
7006  # Extract the first word of "$ac_prog", so it can be a program name with args.
7007set dummy $ac_prog; ac_word=$2
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7009$as_echo_n "checking for $ac_word... " >&6; }
7010if ${ac_cv_path_FILE+:} false; then :
7011  $as_echo_n "(cached) " >&6
7012else
7013  case $FILE in
7014  [\\/]* | ?:[\\/]*)
7015  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7016  ;;
7017  *)
7018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019for as_dir in $PATH
7020do
7021  IFS=$as_save_IFS
7022  test -z "$as_dir" && as_dir=.
7023    for ac_exec_ext in '' $ac_executable_extensions; do
7024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7025    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7027    break 2
7028  fi
7029done
7030  done
7031IFS=$as_save_IFS
7032
7033  ;;
7034esac
7035fi
7036FILE=$ac_cv_path_FILE
7037if test -n "$FILE"; then
7038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7039$as_echo "$FILE" >&6; }
7040else
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
7043fi
7044
7045
7046  test -n "$FILE" && break
7047done
7048
7049  else
7050    # The variable is set, but is it from the command line or the environment?
7051
7052    # Try to remove the string !FILE! from our list.
7053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7055      # If it failed, the variable was not from the command line. Ignore it,
7056      # but warn the user (except for BASH, which is always set by the calling BASH).
7057      if test "xFILE" != xBASH; then
7058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7059$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7060      fi
7061      # Try to locate tool using the code snippet
7062      for ac_prog in file
7063do
7064  # Extract the first word of "$ac_prog", so it can be a program name with args.
7065set dummy $ac_prog; ac_word=$2
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7067$as_echo_n "checking for $ac_word... " >&6; }
7068if ${ac_cv_path_FILE+:} false; then :
7069  $as_echo_n "(cached) " >&6
7070else
7071  case $FILE in
7072  [\\/]* | ?:[\\/]*)
7073  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7074  ;;
7075  *)
7076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077for as_dir in $PATH
7078do
7079  IFS=$as_save_IFS
7080  test -z "$as_dir" && as_dir=.
7081    for ac_exec_ext in '' $ac_executable_extensions; do
7082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7083    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7085    break 2
7086  fi
7087done
7088  done
7089IFS=$as_save_IFS
7090
7091  ;;
7092esac
7093fi
7094FILE=$ac_cv_path_FILE
7095if test -n "$FILE"; then
7096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7097$as_echo "$FILE" >&6; }
7098else
7099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7100$as_echo "no" >&6; }
7101fi
7102
7103
7104  test -n "$FILE" && break
7105done
7106
7107    else
7108      # If it succeeded, then it was overridden by the user. We will use it
7109      # for the tool.
7110
7111      # First remove it from the list of overridden variables, so we can test
7112      # for unknown variables in the end.
7113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7114
7115      # Check if the provided tool contains a complete path.
7116      tool_specified="$FILE"
7117      tool_basename="${tool_specified##*/}"
7118      if test "x$tool_basename" = "x$tool_specified"; then
7119        # A command without a complete path is provided, search $PATH.
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7121$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7122        # Extract the first word of "$tool_basename", so it can be a program name with args.
7123set dummy $tool_basename; ac_word=$2
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125$as_echo_n "checking for $ac_word... " >&6; }
7126if ${ac_cv_path_FILE+:} false; then :
7127  $as_echo_n "(cached) " >&6
7128else
7129  case $FILE in
7130  [\\/]* | ?:[\\/]*)
7131  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7132  ;;
7133  *)
7134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135for as_dir in $PATH
7136do
7137  IFS=$as_save_IFS
7138  test -z "$as_dir" && as_dir=.
7139    for ac_exec_ext in '' $ac_executable_extensions; do
7140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7141    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143    break 2
7144  fi
7145done
7146  done
7147IFS=$as_save_IFS
7148
7149  ;;
7150esac
7151fi
7152FILE=$ac_cv_path_FILE
7153if test -n "$FILE"; then
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7155$as_echo "$FILE" >&6; }
7156else
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
7159fi
7160
7161
7162        if test "x$FILE" = x; then
7163          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7164        fi
7165      else
7166        # Otherwise we believe it is a complete path. Use it as it is.
7167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7168$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7170$as_echo_n "checking for FILE... " >&6; }
7171        if test ! -x "$tool_specified"; then
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7173$as_echo "not found" >&6; }
7174          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7175        fi
7176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7177$as_echo "$tool_specified" >&6; }
7178      fi
7179    fi
7180  fi
7181
7182
7183
7184  if test "x$FILE" = x; then
7185    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7186  fi
7187
7188
7189
7190
7191
7192  # Publish this variable in the help.
7193
7194
7195  if test "x$FIND" = x; then
7196    # The variable is not set by user, try to locate tool using the code snippet
7197    for ac_prog in find
7198do
7199  # Extract the first word of "$ac_prog", so it can be a program name with args.
7200set dummy $ac_prog; ac_word=$2
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202$as_echo_n "checking for $ac_word... " >&6; }
7203if ${ac_cv_path_FIND+:} false; then :
7204  $as_echo_n "(cached) " >&6
7205else
7206  case $FIND in
7207  [\\/]* | ?:[\\/]*)
7208  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7209  ;;
7210  *)
7211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214  IFS=$as_save_IFS
7215  test -z "$as_dir" && as_dir=.
7216    for ac_exec_ext in '' $ac_executable_extensions; do
7217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220    break 2
7221  fi
7222done
7223  done
7224IFS=$as_save_IFS
7225
7226  ;;
7227esac
7228fi
7229FIND=$ac_cv_path_FIND
7230if test -n "$FIND"; then
7231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7232$as_echo "$FIND" >&6; }
7233else
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
7236fi
7237
7238
7239  test -n "$FIND" && break
7240done
7241
7242  else
7243    # The variable is set, but is it from the command line or the environment?
7244
7245    # Try to remove the string !FIND! from our list.
7246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7248      # If it failed, the variable was not from the command line. Ignore it,
7249      # but warn the user (except for BASH, which is always set by the calling BASH).
7250      if test "xFIND" != xBASH; then
7251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7252$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7253      fi
7254      # Try to locate tool using the code snippet
7255      for ac_prog in find
7256do
7257  # Extract the first word of "$ac_prog", so it can be a program name with args.
7258set dummy $ac_prog; ac_word=$2
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260$as_echo_n "checking for $ac_word... " >&6; }
7261if ${ac_cv_path_FIND+:} false; then :
7262  $as_echo_n "(cached) " >&6
7263else
7264  case $FIND in
7265  [\\/]* | ?:[\\/]*)
7266  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7267  ;;
7268  *)
7269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7270for as_dir in $PATH
7271do
7272  IFS=$as_save_IFS
7273  test -z "$as_dir" && as_dir=.
7274    for ac_exec_ext in '' $ac_executable_extensions; do
7275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7276    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7278    break 2
7279  fi
7280done
7281  done
7282IFS=$as_save_IFS
7283
7284  ;;
7285esac
7286fi
7287FIND=$ac_cv_path_FIND
7288if test -n "$FIND"; then
7289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7290$as_echo "$FIND" >&6; }
7291else
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
7294fi
7295
7296
7297  test -n "$FIND" && break
7298done
7299
7300    else
7301      # If it succeeded, then it was overridden by the user. We will use it
7302      # for the tool.
7303
7304      # First remove it from the list of overridden variables, so we can test
7305      # for unknown variables in the end.
7306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7307
7308      # Check if the provided tool contains a complete path.
7309      tool_specified="$FIND"
7310      tool_basename="${tool_specified##*/}"
7311      if test "x$tool_basename" = "x$tool_specified"; then
7312        # A command without a complete path is provided, search $PATH.
7313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7314$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7315        # Extract the first word of "$tool_basename", so it can be a program name with args.
7316set dummy $tool_basename; ac_word=$2
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7318$as_echo_n "checking for $ac_word... " >&6; }
7319if ${ac_cv_path_FIND+:} false; then :
7320  $as_echo_n "(cached) " >&6
7321else
7322  case $FIND in
7323  [\\/]* | ?:[\\/]*)
7324  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7325  ;;
7326  *)
7327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH
7329do
7330  IFS=$as_save_IFS
7331  test -z "$as_dir" && as_dir=.
7332    for ac_exec_ext in '' $ac_executable_extensions; do
7333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7334    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7336    break 2
7337  fi
7338done
7339  done
7340IFS=$as_save_IFS
7341
7342  ;;
7343esac
7344fi
7345FIND=$ac_cv_path_FIND
7346if test -n "$FIND"; then
7347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7348$as_echo "$FIND" >&6; }
7349else
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351$as_echo "no" >&6; }
7352fi
7353
7354
7355        if test "x$FIND" = x; then
7356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7357        fi
7358      else
7359        # Otherwise we believe it is a complete path. Use it as it is.
7360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7361$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7363$as_echo_n "checking for FIND... " >&6; }
7364        if test ! -x "$tool_specified"; then
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7366$as_echo "not found" >&6; }
7367          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7368        fi
7369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7370$as_echo "$tool_specified" >&6; }
7371      fi
7372    fi
7373  fi
7374
7375
7376
7377  if test "x$FIND" = x; then
7378    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7379  fi
7380
7381
7382
7383
7384
7385  # Publish this variable in the help.
7386
7387
7388  if test "x$HEAD" = x; then
7389    # The variable is not set by user, try to locate tool using the code snippet
7390    for ac_prog in head
7391do
7392  # Extract the first word of "$ac_prog", so it can be a program name with args.
7393set dummy $ac_prog; ac_word=$2
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7395$as_echo_n "checking for $ac_word... " >&6; }
7396if ${ac_cv_path_HEAD+:} false; then :
7397  $as_echo_n "(cached) " >&6
7398else
7399  case $HEAD in
7400  [\\/]* | ?:[\\/]*)
7401  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7402  ;;
7403  *)
7404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7405for as_dir in $PATH
7406do
7407  IFS=$as_save_IFS
7408  test -z "$as_dir" && as_dir=.
7409    for ac_exec_ext in '' $ac_executable_extensions; do
7410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7411    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7413    break 2
7414  fi
7415done
7416  done
7417IFS=$as_save_IFS
7418
7419  ;;
7420esac
7421fi
7422HEAD=$ac_cv_path_HEAD
7423if test -n "$HEAD"; then
7424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7425$as_echo "$HEAD" >&6; }
7426else
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428$as_echo "no" >&6; }
7429fi
7430
7431
7432  test -n "$HEAD" && break
7433done
7434
7435  else
7436    # The variable is set, but is it from the command line or the environment?
7437
7438    # Try to remove the string !HEAD! from our list.
7439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7441      # If it failed, the variable was not from the command line. Ignore it,
7442      # but warn the user (except for BASH, which is always set by the calling BASH).
7443      if test "xHEAD" != xBASH; then
7444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7445$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7446      fi
7447      # Try to locate tool using the code snippet
7448      for ac_prog in head
7449do
7450  # Extract the first word of "$ac_prog", so it can be a program name with args.
7451set dummy $ac_prog; ac_word=$2
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453$as_echo_n "checking for $ac_word... " >&6; }
7454if ${ac_cv_path_HEAD+:} false; then :
7455  $as_echo_n "(cached) " >&6
7456else
7457  case $HEAD in
7458  [\\/]* | ?:[\\/]*)
7459  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7460  ;;
7461  *)
7462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463for as_dir in $PATH
7464do
7465  IFS=$as_save_IFS
7466  test -z "$as_dir" && as_dir=.
7467    for ac_exec_ext in '' $ac_executable_extensions; do
7468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7469    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7471    break 2
7472  fi
7473done
7474  done
7475IFS=$as_save_IFS
7476
7477  ;;
7478esac
7479fi
7480HEAD=$ac_cv_path_HEAD
7481if test -n "$HEAD"; then
7482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7483$as_echo "$HEAD" >&6; }
7484else
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7486$as_echo "no" >&6; }
7487fi
7488
7489
7490  test -n "$HEAD" && break
7491done
7492
7493    else
7494      # If it succeeded, then it was overridden by the user. We will use it
7495      # for the tool.
7496
7497      # First remove it from the list of overridden variables, so we can test
7498      # for unknown variables in the end.
7499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7500
7501      # Check if the provided tool contains a complete path.
7502      tool_specified="$HEAD"
7503      tool_basename="${tool_specified##*/}"
7504      if test "x$tool_basename" = "x$tool_specified"; then
7505        # A command without a complete path is provided, search $PATH.
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7507$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7508        # Extract the first word of "$tool_basename", so it can be a program name with args.
7509set dummy $tool_basename; ac_word=$2
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511$as_echo_n "checking for $ac_word... " >&6; }
7512if ${ac_cv_path_HEAD+:} false; then :
7513  $as_echo_n "(cached) " >&6
7514else
7515  case $HEAD in
7516  [\\/]* | ?:[\\/]*)
7517  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7518  ;;
7519  *)
7520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521for as_dir in $PATH
7522do
7523  IFS=$as_save_IFS
7524  test -z "$as_dir" && as_dir=.
7525    for ac_exec_ext in '' $ac_executable_extensions; do
7526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529    break 2
7530  fi
7531done
7532  done
7533IFS=$as_save_IFS
7534
7535  ;;
7536esac
7537fi
7538HEAD=$ac_cv_path_HEAD
7539if test -n "$HEAD"; then
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7541$as_echo "$HEAD" >&6; }
7542else
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
7546
7547
7548        if test "x$HEAD" = x; then
7549          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7550        fi
7551      else
7552        # Otherwise we believe it is a complete path. Use it as it is.
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7554$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7556$as_echo_n "checking for HEAD... " >&6; }
7557        if test ! -x "$tool_specified"; then
7558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7559$as_echo "not found" >&6; }
7560          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7561        fi
7562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7563$as_echo "$tool_specified" >&6; }
7564      fi
7565    fi
7566  fi
7567
7568
7569
7570  if test "x$HEAD" = x; then
7571    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7572  fi
7573
7574
7575
7576
7577
7578  # Publish this variable in the help.
7579
7580
7581  if test "x$LN" = x; then
7582    # The variable is not set by user, try to locate tool using the code snippet
7583    for ac_prog in ln
7584do
7585  # Extract the first word of "$ac_prog", so it can be a program name with args.
7586set dummy $ac_prog; ac_word=$2
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588$as_echo_n "checking for $ac_word... " >&6; }
7589if ${ac_cv_path_LN+:} false; then :
7590  $as_echo_n "(cached) " >&6
7591else
7592  case $LN in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  test -z "$as_dir" && as_dir=.
7602    for ac_exec_ext in '' $ac_executable_extensions; do
7603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606    break 2
7607  fi
7608done
7609  done
7610IFS=$as_save_IFS
7611
7612  ;;
7613esac
7614fi
7615LN=$ac_cv_path_LN
7616if test -n "$LN"; then
7617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7618$as_echo "$LN" >&6; }
7619else
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
7622fi
7623
7624
7625  test -n "$LN" && break
7626done
7627
7628  else
7629    # The variable is set, but is it from the command line or the environment?
7630
7631    # Try to remove the string !LN! from our list.
7632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7634      # If it failed, the variable was not from the command line. Ignore it,
7635      # but warn the user (except for BASH, which is always set by the calling BASH).
7636      if test "xLN" != xBASH; then
7637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7638$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7639      fi
7640      # Try to locate tool using the code snippet
7641      for ac_prog in ln
7642do
7643  # Extract the first word of "$ac_prog", so it can be a program name with args.
7644set dummy $ac_prog; ac_word=$2
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
7647if ${ac_cv_path_LN+:} false; then :
7648  $as_echo_n "(cached) " >&6
7649else
7650  case $LN in
7651  [\\/]* | ?:[\\/]*)
7652  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7653  ;;
7654  *)
7655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656for as_dir in $PATH
7657do
7658  IFS=$as_save_IFS
7659  test -z "$as_dir" && as_dir=.
7660    for ac_exec_ext in '' $ac_executable_extensions; do
7661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664    break 2
7665  fi
7666done
7667  done
7668IFS=$as_save_IFS
7669
7670  ;;
7671esac
7672fi
7673LN=$ac_cv_path_LN
7674if test -n "$LN"; then
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7676$as_echo "$LN" >&6; }
7677else
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679$as_echo "no" >&6; }
7680fi
7681
7682
7683  test -n "$LN" && break
7684done
7685
7686    else
7687      # If it succeeded, then it was overridden by the user. We will use it
7688      # for the tool.
7689
7690      # First remove it from the list of overridden variables, so we can test
7691      # for unknown variables in the end.
7692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7693
7694      # Check if the provided tool contains a complete path.
7695      tool_specified="$LN"
7696      tool_basename="${tool_specified##*/}"
7697      if test "x$tool_basename" = "x$tool_specified"; then
7698        # A command without a complete path is provided, search $PATH.
7699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7700$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7701        # Extract the first word of "$tool_basename", so it can be a program name with args.
7702set dummy $tool_basename; ac_word=$2
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7704$as_echo_n "checking for $ac_word... " >&6; }
7705if ${ac_cv_path_LN+:} false; then :
7706  $as_echo_n "(cached) " >&6
7707else
7708  case $LN in
7709  [\\/]* | ?:[\\/]*)
7710  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7711  ;;
7712  *)
7713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714for as_dir in $PATH
7715do
7716  IFS=$as_save_IFS
7717  test -z "$as_dir" && as_dir=.
7718    for ac_exec_ext in '' $ac_executable_extensions; do
7719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7722    break 2
7723  fi
7724done
7725  done
7726IFS=$as_save_IFS
7727
7728  ;;
7729esac
7730fi
7731LN=$ac_cv_path_LN
7732if test -n "$LN"; then
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7734$as_echo "$LN" >&6; }
7735else
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738fi
7739
7740
7741        if test "x$LN" = x; then
7742          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7743        fi
7744      else
7745        # Otherwise we believe it is a complete path. Use it as it is.
7746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7747$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7749$as_echo_n "checking for LN... " >&6; }
7750        if test ! -x "$tool_specified"; then
7751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7752$as_echo "not found" >&6; }
7753          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7754        fi
7755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7756$as_echo "$tool_specified" >&6; }
7757      fi
7758    fi
7759  fi
7760
7761
7762
7763  if test "x$LN" = x; then
7764    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7765  fi
7766
7767
7768
7769
7770
7771  # Publish this variable in the help.
7772
7773
7774  if test "x$LS" = x; then
7775    # The variable is not set by user, try to locate tool using the code snippet
7776    for ac_prog in ls
7777do
7778  # Extract the first word of "$ac_prog", so it can be a program name with args.
7779set dummy $ac_prog; ac_word=$2
7780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7781$as_echo_n "checking for $ac_word... " >&6; }
7782if ${ac_cv_path_LS+:} false; then :
7783  $as_echo_n "(cached) " >&6
7784else
7785  case $LS in
7786  [\\/]* | ?:[\\/]*)
7787  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7788  ;;
7789  *)
7790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791for as_dir in $PATH
7792do
7793  IFS=$as_save_IFS
7794  test -z "$as_dir" && as_dir=.
7795    for ac_exec_ext in '' $ac_executable_extensions; do
7796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799    break 2
7800  fi
7801done
7802  done
7803IFS=$as_save_IFS
7804
7805  ;;
7806esac
7807fi
7808LS=$ac_cv_path_LS
7809if test -n "$LS"; then
7810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7811$as_echo "$LS" >&6; }
7812else
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7814$as_echo "no" >&6; }
7815fi
7816
7817
7818  test -n "$LS" && break
7819done
7820
7821  else
7822    # The variable is set, but is it from the command line or the environment?
7823
7824    # Try to remove the string !LS! from our list.
7825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7827      # If it failed, the variable was not from the command line. Ignore it,
7828      # but warn the user (except for BASH, which is always set by the calling BASH).
7829      if test "xLS" != xBASH; then
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7831$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7832      fi
7833      # Try to locate tool using the code snippet
7834      for ac_prog in ls
7835do
7836  # Extract the first word of "$ac_prog", so it can be a program name with args.
7837set dummy $ac_prog; ac_word=$2
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839$as_echo_n "checking for $ac_word... " >&6; }
7840if ${ac_cv_path_LS+:} false; then :
7841  $as_echo_n "(cached) " >&6
7842else
7843  case $LS in
7844  [\\/]* | ?:[\\/]*)
7845  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7846  ;;
7847  *)
7848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7849for as_dir in $PATH
7850do
7851  IFS=$as_save_IFS
7852  test -z "$as_dir" && as_dir=.
7853    for ac_exec_ext in '' $ac_executable_extensions; do
7854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7855    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7857    break 2
7858  fi
7859done
7860  done
7861IFS=$as_save_IFS
7862
7863  ;;
7864esac
7865fi
7866LS=$ac_cv_path_LS
7867if test -n "$LS"; then
7868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7869$as_echo "$LS" >&6; }
7870else
7871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872$as_echo "no" >&6; }
7873fi
7874
7875
7876  test -n "$LS" && break
7877done
7878
7879    else
7880      # If it succeeded, then it was overridden by the user. We will use it
7881      # for the tool.
7882
7883      # First remove it from the list of overridden variables, so we can test
7884      # for unknown variables in the end.
7885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7886
7887      # Check if the provided tool contains a complete path.
7888      tool_specified="$LS"
7889      tool_basename="${tool_specified##*/}"
7890      if test "x$tool_basename" = "x$tool_specified"; then
7891        # A command without a complete path is provided, search $PATH.
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7893$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7894        # Extract the first word of "$tool_basename", so it can be a program name with args.
7895set dummy $tool_basename; ac_word=$2
7896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7897$as_echo_n "checking for $ac_word... " >&6; }
7898if ${ac_cv_path_LS+:} false; then :
7899  $as_echo_n "(cached) " >&6
7900else
7901  case $LS in
7902  [\\/]* | ?:[\\/]*)
7903  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7904  ;;
7905  *)
7906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907for as_dir in $PATH
7908do
7909  IFS=$as_save_IFS
7910  test -z "$as_dir" && as_dir=.
7911    for ac_exec_ext in '' $ac_executable_extensions; do
7912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7913    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7915    break 2
7916  fi
7917done
7918  done
7919IFS=$as_save_IFS
7920
7921  ;;
7922esac
7923fi
7924LS=$ac_cv_path_LS
7925if test -n "$LS"; then
7926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7927$as_echo "$LS" >&6; }
7928else
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7930$as_echo "no" >&6; }
7931fi
7932
7933
7934        if test "x$LS" = x; then
7935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7936        fi
7937      else
7938        # Otherwise we believe it is a complete path. Use it as it is.
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7940$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7942$as_echo_n "checking for LS... " >&6; }
7943        if test ! -x "$tool_specified"; then
7944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7945$as_echo "not found" >&6; }
7946          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7947        fi
7948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7949$as_echo "$tool_specified" >&6; }
7950      fi
7951    fi
7952  fi
7953
7954
7955
7956  if test "x$LS" = x; then
7957    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7958  fi
7959
7960
7961
7962
7963
7964  # Publish this variable in the help.
7965
7966
7967  if test "x$MKDIR" = x; then
7968    # The variable is not set by user, try to locate tool using the code snippet
7969    for ac_prog in mkdir
7970do
7971  # Extract the first word of "$ac_prog", so it can be a program name with args.
7972set dummy $ac_prog; ac_word=$2
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7974$as_echo_n "checking for $ac_word... " >&6; }
7975if ${ac_cv_path_MKDIR+:} false; then :
7976  $as_echo_n "(cached) " >&6
7977else
7978  case $MKDIR in
7979  [\\/]* | ?:[\\/]*)
7980  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7981  ;;
7982  *)
7983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984for as_dir in $PATH
7985do
7986  IFS=$as_save_IFS
7987  test -z "$as_dir" && as_dir=.
7988    for ac_exec_ext in '' $ac_executable_extensions; do
7989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7990    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7992    break 2
7993  fi
7994done
7995  done
7996IFS=$as_save_IFS
7997
7998  ;;
7999esac
8000fi
8001MKDIR=$ac_cv_path_MKDIR
8002if test -n "$MKDIR"; then
8003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8004$as_echo "$MKDIR" >&6; }
8005else
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
8008fi
8009
8010
8011  test -n "$MKDIR" && break
8012done
8013
8014  else
8015    # The variable is set, but is it from the command line or the environment?
8016
8017    # Try to remove the string !MKDIR! from our list.
8018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8020      # If it failed, the variable was not from the command line. Ignore it,
8021      # but warn the user (except for BASH, which is always set by the calling BASH).
8022      if test "xMKDIR" != xBASH; then
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8024$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8025      fi
8026      # Try to locate tool using the code snippet
8027      for ac_prog in mkdir
8028do
8029  # Extract the first word of "$ac_prog", so it can be a program name with args.
8030set dummy $ac_prog; ac_word=$2
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
8033if ${ac_cv_path_MKDIR+:} false; then :
8034  $as_echo_n "(cached) " >&6
8035else
8036  case $MKDIR in
8037  [\\/]* | ?:[\\/]*)
8038  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8039  ;;
8040  *)
8041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044  IFS=$as_save_IFS
8045  test -z "$as_dir" && as_dir=.
8046    for ac_exec_ext in '' $ac_executable_extensions; do
8047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050    break 2
8051  fi
8052done
8053  done
8054IFS=$as_save_IFS
8055
8056  ;;
8057esac
8058fi
8059MKDIR=$ac_cv_path_MKDIR
8060if test -n "$MKDIR"; then
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8062$as_echo "$MKDIR" >&6; }
8063else
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069  test -n "$MKDIR" && break
8070done
8071
8072    else
8073      # If it succeeded, then it was overridden by the user. We will use it
8074      # for the tool.
8075
8076      # First remove it from the list of overridden variables, so we can test
8077      # for unknown variables in the end.
8078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8079
8080      # Check if the provided tool contains a complete path.
8081      tool_specified="$MKDIR"
8082      tool_basename="${tool_specified##*/}"
8083      if test "x$tool_basename" = "x$tool_specified"; then
8084        # A command without a complete path is provided, search $PATH.
8085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8086$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8087        # Extract the first word of "$tool_basename", so it can be a program name with args.
8088set dummy $tool_basename; ac_word=$2
8089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090$as_echo_n "checking for $ac_word... " >&6; }
8091if ${ac_cv_path_MKDIR+:} false; then :
8092  $as_echo_n "(cached) " >&6
8093else
8094  case $MKDIR in
8095  [\\/]* | ?:[\\/]*)
8096  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8097  ;;
8098  *)
8099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8100for as_dir in $PATH
8101do
8102  IFS=$as_save_IFS
8103  test -z "$as_dir" && as_dir=.
8104    for ac_exec_ext in '' $ac_executable_extensions; do
8105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8106    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8108    break 2
8109  fi
8110done
8111  done
8112IFS=$as_save_IFS
8113
8114  ;;
8115esac
8116fi
8117MKDIR=$ac_cv_path_MKDIR
8118if test -n "$MKDIR"; then
8119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8120$as_echo "$MKDIR" >&6; }
8121else
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8123$as_echo "no" >&6; }
8124fi
8125
8126
8127        if test "x$MKDIR" = x; then
8128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8129        fi
8130      else
8131        # Otherwise we believe it is a complete path. Use it as it is.
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8133$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8135$as_echo_n "checking for MKDIR... " >&6; }
8136        if test ! -x "$tool_specified"; then
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8138$as_echo "not found" >&6; }
8139          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8140        fi
8141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8142$as_echo "$tool_specified" >&6; }
8143      fi
8144    fi
8145  fi
8146
8147
8148
8149  if test "x$MKDIR" = x; then
8150    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8151  fi
8152
8153
8154
8155
8156
8157  # Publish this variable in the help.
8158
8159
8160  if test "x$MKTEMP" = x; then
8161    # The variable is not set by user, try to locate tool using the code snippet
8162    for ac_prog in mktemp
8163do
8164  # Extract the first word of "$ac_prog", so it can be a program name with args.
8165set dummy $ac_prog; ac_word=$2
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167$as_echo_n "checking for $ac_word... " >&6; }
8168if ${ac_cv_path_MKTEMP+:} false; then :
8169  $as_echo_n "(cached) " >&6
8170else
8171  case $MKTEMP in
8172  [\\/]* | ?:[\\/]*)
8173  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8174  ;;
8175  *)
8176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179  IFS=$as_save_IFS
8180  test -z "$as_dir" && as_dir=.
8181    for ac_exec_ext in '' $ac_executable_extensions; do
8182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185    break 2
8186  fi
8187done
8188  done
8189IFS=$as_save_IFS
8190
8191  ;;
8192esac
8193fi
8194MKTEMP=$ac_cv_path_MKTEMP
8195if test -n "$MKTEMP"; then
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8197$as_echo "$MKTEMP" >&6; }
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201fi
8202
8203
8204  test -n "$MKTEMP" && break
8205done
8206
8207  else
8208    # The variable is set, but is it from the command line or the environment?
8209
8210    # Try to remove the string !MKTEMP! from our list.
8211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8213      # If it failed, the variable was not from the command line. Ignore it,
8214      # but warn the user (except for BASH, which is always set by the calling BASH).
8215      if test "xMKTEMP" != xBASH; then
8216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8217$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8218      fi
8219      # Try to locate tool using the code snippet
8220      for ac_prog in mktemp
8221do
8222  # Extract the first word of "$ac_prog", so it can be a program name with args.
8223set dummy $ac_prog; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_MKTEMP+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $MKTEMP in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252MKTEMP=$ac_cv_path_MKTEMP
8253if test -n "$MKTEMP"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8255$as_echo "$MKTEMP" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262  test -n "$MKTEMP" && break
8263done
8264
8265    else
8266      # If it succeeded, then it was overridden by the user. We will use it
8267      # for the tool.
8268
8269      # First remove it from the list of overridden variables, so we can test
8270      # for unknown variables in the end.
8271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8272
8273      # Check if the provided tool contains a complete path.
8274      tool_specified="$MKTEMP"
8275      tool_basename="${tool_specified##*/}"
8276      if test "x$tool_basename" = "x$tool_specified"; then
8277        # A command without a complete path is provided, search $PATH.
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8279$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8280        # Extract the first word of "$tool_basename", so it can be a program name with args.
8281set dummy $tool_basename; ac_word=$2
8282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283$as_echo_n "checking for $ac_word... " >&6; }
8284if ${ac_cv_path_MKTEMP+:} false; then :
8285  $as_echo_n "(cached) " >&6
8286else
8287  case $MKTEMP in
8288  [\\/]* | ?:[\\/]*)
8289  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8290  ;;
8291  *)
8292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295  IFS=$as_save_IFS
8296  test -z "$as_dir" && as_dir=.
8297    for ac_exec_ext in '' $ac_executable_extensions; do
8298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301    break 2
8302  fi
8303done
8304  done
8305IFS=$as_save_IFS
8306
8307  ;;
8308esac
8309fi
8310MKTEMP=$ac_cv_path_MKTEMP
8311if test -n "$MKTEMP"; then
8312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8313$as_echo "$MKTEMP" >&6; }
8314else
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316$as_echo "no" >&6; }
8317fi
8318
8319
8320        if test "x$MKTEMP" = x; then
8321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8322        fi
8323      else
8324        # Otherwise we believe it is a complete path. Use it as it is.
8325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8326$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8328$as_echo_n "checking for MKTEMP... " >&6; }
8329        if test ! -x "$tool_specified"; then
8330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8331$as_echo "not found" >&6; }
8332          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8333        fi
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8335$as_echo "$tool_specified" >&6; }
8336      fi
8337    fi
8338  fi
8339
8340
8341
8342  if test "x$MKTEMP" = x; then
8343    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8344  fi
8345
8346
8347
8348
8349
8350  # Publish this variable in the help.
8351
8352
8353  if test "x$MV" = x; then
8354    # The variable is not set by user, try to locate tool using the code snippet
8355    for ac_prog in mv
8356do
8357  # Extract the first word of "$ac_prog", so it can be a program name with args.
8358set dummy $ac_prog; ac_word=$2
8359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8360$as_echo_n "checking for $ac_word... " >&6; }
8361if ${ac_cv_path_MV+:} false; then :
8362  $as_echo_n "(cached) " >&6
8363else
8364  case $MV in
8365  [\\/]* | ?:[\\/]*)
8366  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8367  ;;
8368  *)
8369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8370for as_dir in $PATH
8371do
8372  IFS=$as_save_IFS
8373  test -z "$as_dir" && as_dir=.
8374    for ac_exec_ext in '' $ac_executable_extensions; do
8375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8376    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8378    break 2
8379  fi
8380done
8381  done
8382IFS=$as_save_IFS
8383
8384  ;;
8385esac
8386fi
8387MV=$ac_cv_path_MV
8388if test -n "$MV"; then
8389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8390$as_echo "$MV" >&6; }
8391else
8392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393$as_echo "no" >&6; }
8394fi
8395
8396
8397  test -n "$MV" && break
8398done
8399
8400  else
8401    # The variable is set, but is it from the command line or the environment?
8402
8403    # Try to remove the string !MV! from our list.
8404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8406      # If it failed, the variable was not from the command line. Ignore it,
8407      # but warn the user (except for BASH, which is always set by the calling BASH).
8408      if test "xMV" != xBASH; then
8409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8410$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8411      fi
8412      # Try to locate tool using the code snippet
8413      for ac_prog in mv
8414do
8415  # Extract the first word of "$ac_prog", so it can be a program name with args.
8416set dummy $ac_prog; ac_word=$2
8417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418$as_echo_n "checking for $ac_word... " >&6; }
8419if ${ac_cv_path_MV+:} false; then :
8420  $as_echo_n "(cached) " >&6
8421else
8422  case $MV in
8423  [\\/]* | ?:[\\/]*)
8424  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8425  ;;
8426  *)
8427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8428for as_dir in $PATH
8429do
8430  IFS=$as_save_IFS
8431  test -z "$as_dir" && as_dir=.
8432    for ac_exec_ext in '' $ac_executable_extensions; do
8433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8434    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8436    break 2
8437  fi
8438done
8439  done
8440IFS=$as_save_IFS
8441
8442  ;;
8443esac
8444fi
8445MV=$ac_cv_path_MV
8446if test -n "$MV"; then
8447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8448$as_echo "$MV" >&6; }
8449else
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
8452fi
8453
8454
8455  test -n "$MV" && break
8456done
8457
8458    else
8459      # If it succeeded, then it was overridden by the user. We will use it
8460      # for the tool.
8461
8462      # First remove it from the list of overridden variables, so we can test
8463      # for unknown variables in the end.
8464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8465
8466      # Check if the provided tool contains a complete path.
8467      tool_specified="$MV"
8468      tool_basename="${tool_specified##*/}"
8469      if test "x$tool_basename" = "x$tool_specified"; then
8470        # A command without a complete path is provided, search $PATH.
8471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8472$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8473        # Extract the first word of "$tool_basename", so it can be a program name with args.
8474set dummy $tool_basename; ac_word=$2
8475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476$as_echo_n "checking for $ac_word... " >&6; }
8477if ${ac_cv_path_MV+:} false; then :
8478  $as_echo_n "(cached) " >&6
8479else
8480  case $MV in
8481  [\\/]* | ?:[\\/]*)
8482  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8483  ;;
8484  *)
8485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486for as_dir in $PATH
8487do
8488  IFS=$as_save_IFS
8489  test -z "$as_dir" && as_dir=.
8490    for ac_exec_ext in '' $ac_executable_extensions; do
8491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494    break 2
8495  fi
8496done
8497  done
8498IFS=$as_save_IFS
8499
8500  ;;
8501esac
8502fi
8503MV=$ac_cv_path_MV
8504if test -n "$MV"; then
8505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8506$as_echo "$MV" >&6; }
8507else
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509$as_echo "no" >&6; }
8510fi
8511
8512
8513        if test "x$MV" = x; then
8514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8515        fi
8516      else
8517        # Otherwise we believe it is a complete path. Use it as it is.
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8519$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8521$as_echo_n "checking for MV... " >&6; }
8522        if test ! -x "$tool_specified"; then
8523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8524$as_echo "not found" >&6; }
8525          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8526        fi
8527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8528$as_echo "$tool_specified" >&6; }
8529      fi
8530    fi
8531  fi
8532
8533
8534
8535  if test "x$MV" = x; then
8536    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8537  fi
8538
8539
8540
8541
8542
8543  # Publish this variable in the help.
8544
8545
8546  if test "x$NAWK" = x; then
8547    # The variable is not set by user, try to locate tool using the code snippet
8548    for ac_prog in nawk gawk awk
8549do
8550  # Extract the first word of "$ac_prog", so it can be a program name with args.
8551set dummy $ac_prog; ac_word=$2
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553$as_echo_n "checking for $ac_word... " >&6; }
8554if ${ac_cv_path_NAWK+:} false; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  case $NAWK in
8558  [\\/]* | ?:[\\/]*)
8559  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8560  ;;
8561  *)
8562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563for as_dir in $PATH
8564do
8565  IFS=$as_save_IFS
8566  test -z "$as_dir" && as_dir=.
8567    for ac_exec_ext in '' $ac_executable_extensions; do
8568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571    break 2
8572  fi
8573done
8574  done
8575IFS=$as_save_IFS
8576
8577  ;;
8578esac
8579fi
8580NAWK=$ac_cv_path_NAWK
8581if test -n "$NAWK"; then
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8583$as_echo "$NAWK" >&6; }
8584else
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586$as_echo "no" >&6; }
8587fi
8588
8589
8590  test -n "$NAWK" && break
8591done
8592
8593  else
8594    # The variable is set, but is it from the command line or the environment?
8595
8596    # Try to remove the string !NAWK! from our list.
8597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8599      # If it failed, the variable was not from the command line. Ignore it,
8600      # but warn the user (except for BASH, which is always set by the calling BASH).
8601      if test "xNAWK" != xBASH; then
8602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8603$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8604      fi
8605      # Try to locate tool using the code snippet
8606      for ac_prog in nawk gawk awk
8607do
8608  # Extract the first word of "$ac_prog", so it can be a program name with args.
8609set dummy $ac_prog; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_NAWK+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $NAWK in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638NAWK=$ac_cv_path_NAWK
8639if test -n "$NAWK"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8641$as_echo "$NAWK" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648  test -n "$NAWK" && break
8649done
8650
8651    else
8652      # If it succeeded, then it was overridden by the user. We will use it
8653      # for the tool.
8654
8655      # First remove it from the list of overridden variables, so we can test
8656      # for unknown variables in the end.
8657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8658
8659      # Check if the provided tool contains a complete path.
8660      tool_specified="$NAWK"
8661      tool_basename="${tool_specified##*/}"
8662      if test "x$tool_basename" = "x$tool_specified"; then
8663        # A command without a complete path is provided, search $PATH.
8664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8665$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8666        # Extract the first word of "$tool_basename", so it can be a program name with args.
8667set dummy $tool_basename; ac_word=$2
8668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8669$as_echo_n "checking for $ac_word... " >&6; }
8670if ${ac_cv_path_NAWK+:} false; then :
8671  $as_echo_n "(cached) " >&6
8672else
8673  case $NAWK in
8674  [\\/]* | ?:[\\/]*)
8675  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8676  ;;
8677  *)
8678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679for as_dir in $PATH
8680do
8681  IFS=$as_save_IFS
8682  test -z "$as_dir" && as_dir=.
8683    for ac_exec_ext in '' $ac_executable_extensions; do
8684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8687    break 2
8688  fi
8689done
8690  done
8691IFS=$as_save_IFS
8692
8693  ;;
8694esac
8695fi
8696NAWK=$ac_cv_path_NAWK
8697if test -n "$NAWK"; then
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8699$as_echo "$NAWK" >&6; }
8700else
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702$as_echo "no" >&6; }
8703fi
8704
8705
8706        if test "x$NAWK" = x; then
8707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8708        fi
8709      else
8710        # Otherwise we believe it is a complete path. Use it as it is.
8711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8712$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8714$as_echo_n "checking for NAWK... " >&6; }
8715        if test ! -x "$tool_specified"; then
8716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8717$as_echo "not found" >&6; }
8718          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8719        fi
8720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8721$as_echo "$tool_specified" >&6; }
8722      fi
8723    fi
8724  fi
8725
8726
8727
8728  if test "x$NAWK" = x; then
8729    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8730  fi
8731
8732
8733
8734
8735
8736  # Publish this variable in the help.
8737
8738
8739  if test "x$PRINTF" = x; then
8740    # The variable is not set by user, try to locate tool using the code snippet
8741    for ac_prog in printf
8742do
8743  # Extract the first word of "$ac_prog", so it can be a program name with args.
8744set dummy $ac_prog; ac_word=$2
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8746$as_echo_n "checking for $ac_word... " >&6; }
8747if ${ac_cv_path_PRINTF+:} false; then :
8748  $as_echo_n "(cached) " >&6
8749else
8750  case $PRINTF in
8751  [\\/]* | ?:[\\/]*)
8752  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8753  ;;
8754  *)
8755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8756for as_dir in $PATH
8757do
8758  IFS=$as_save_IFS
8759  test -z "$as_dir" && as_dir=.
8760    for ac_exec_ext in '' $ac_executable_extensions; do
8761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8762    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8764    break 2
8765  fi
8766done
8767  done
8768IFS=$as_save_IFS
8769
8770  ;;
8771esac
8772fi
8773PRINTF=$ac_cv_path_PRINTF
8774if test -n "$PRINTF"; then
8775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8776$as_echo "$PRINTF" >&6; }
8777else
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779$as_echo "no" >&6; }
8780fi
8781
8782
8783  test -n "$PRINTF" && break
8784done
8785
8786  else
8787    # The variable is set, but is it from the command line or the environment?
8788
8789    # Try to remove the string !PRINTF! from our list.
8790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8792      # If it failed, the variable was not from the command line. Ignore it,
8793      # but warn the user (except for BASH, which is always set by the calling BASH).
8794      if test "xPRINTF" != xBASH; then
8795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8796$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8797      fi
8798      # Try to locate tool using the code snippet
8799      for ac_prog in printf
8800do
8801  # Extract the first word of "$ac_prog", so it can be a program name with args.
8802set dummy $ac_prog; ac_word=$2
8803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8804$as_echo_n "checking for $ac_word... " >&6; }
8805if ${ac_cv_path_PRINTF+:} false; then :
8806  $as_echo_n "(cached) " >&6
8807else
8808  case $PRINTF in
8809  [\\/]* | ?:[\\/]*)
8810  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8811  ;;
8812  *)
8813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814for as_dir in $PATH
8815do
8816  IFS=$as_save_IFS
8817  test -z "$as_dir" && as_dir=.
8818    for ac_exec_ext in '' $ac_executable_extensions; do
8819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8820    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8822    break 2
8823  fi
8824done
8825  done
8826IFS=$as_save_IFS
8827
8828  ;;
8829esac
8830fi
8831PRINTF=$ac_cv_path_PRINTF
8832if test -n "$PRINTF"; then
8833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8834$as_echo "$PRINTF" >&6; }
8835else
8836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
8838fi
8839
8840
8841  test -n "$PRINTF" && break
8842done
8843
8844    else
8845      # If it succeeded, then it was overridden by the user. We will use it
8846      # for the tool.
8847
8848      # First remove it from the list of overridden variables, so we can test
8849      # for unknown variables in the end.
8850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8851
8852      # Check if the provided tool contains a complete path.
8853      tool_specified="$PRINTF"
8854      tool_basename="${tool_specified##*/}"
8855      if test "x$tool_basename" = "x$tool_specified"; then
8856        # A command without a complete path is provided, search $PATH.
8857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8858$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8859        # Extract the first word of "$tool_basename", so it can be a program name with args.
8860set dummy $tool_basename; ac_word=$2
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862$as_echo_n "checking for $ac_word... " >&6; }
8863if ${ac_cv_path_PRINTF+:} false; then :
8864  $as_echo_n "(cached) " >&6
8865else
8866  case $PRINTF in
8867  [\\/]* | ?:[\\/]*)
8868  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8869  ;;
8870  *)
8871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872for as_dir in $PATH
8873do
8874  IFS=$as_save_IFS
8875  test -z "$as_dir" && as_dir=.
8876    for ac_exec_ext in '' $ac_executable_extensions; do
8877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880    break 2
8881  fi
8882done
8883  done
8884IFS=$as_save_IFS
8885
8886  ;;
8887esac
8888fi
8889PRINTF=$ac_cv_path_PRINTF
8890if test -n "$PRINTF"; then
8891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8892$as_echo "$PRINTF" >&6; }
8893else
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895$as_echo "no" >&6; }
8896fi
8897
8898
8899        if test "x$PRINTF" = x; then
8900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8901        fi
8902      else
8903        # Otherwise we believe it is a complete path. Use it as it is.
8904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8905$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8907$as_echo_n "checking for PRINTF... " >&6; }
8908        if test ! -x "$tool_specified"; then
8909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8910$as_echo "not found" >&6; }
8911          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8912        fi
8913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8914$as_echo "$tool_specified" >&6; }
8915      fi
8916    fi
8917  fi
8918
8919
8920
8921  if test "x$PRINTF" = x; then
8922    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8923  fi
8924
8925
8926
8927
8928
8929  # Publish this variable in the help.
8930
8931
8932  if test "x$RM" = x; then
8933    # The variable is not set by user, try to locate tool using the code snippet
8934    for ac_prog in rm
8935do
8936  # Extract the first word of "$ac_prog", so it can be a program name with args.
8937set dummy $ac_prog; ac_word=$2
8938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939$as_echo_n "checking for $ac_word... " >&6; }
8940if ${ac_cv_path_RM+:} false; then :
8941  $as_echo_n "(cached) " >&6
8942else
8943  case $RM in
8944  [\\/]* | ?:[\\/]*)
8945  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8946  ;;
8947  *)
8948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951  IFS=$as_save_IFS
8952  test -z "$as_dir" && as_dir=.
8953    for ac_exec_ext in '' $ac_executable_extensions; do
8954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8955    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957    break 2
8958  fi
8959done
8960  done
8961IFS=$as_save_IFS
8962
8963  ;;
8964esac
8965fi
8966RM=$ac_cv_path_RM
8967if test -n "$RM"; then
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8969$as_echo "$RM" >&6; }
8970else
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976  test -n "$RM" && break
8977done
8978
8979  else
8980    # The variable is set, but is it from the command line or the environment?
8981
8982    # Try to remove the string !RM! from our list.
8983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8985      # If it failed, the variable was not from the command line. Ignore it,
8986      # but warn the user (except for BASH, which is always set by the calling BASH).
8987      if test "xRM" != xBASH; then
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8989$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8990      fi
8991      # Try to locate tool using the code snippet
8992      for ac_prog in rm
8993do
8994  # Extract the first word of "$ac_prog", so it can be a program name with args.
8995set dummy $ac_prog; ac_word=$2
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997$as_echo_n "checking for $ac_word... " >&6; }
8998if ${ac_cv_path_RM+:} false; then :
8999  $as_echo_n "(cached) " >&6
9000else
9001  case $RM in
9002  [\\/]* | ?:[\\/]*)
9003  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9004  ;;
9005  *)
9006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007for as_dir in $PATH
9008do
9009  IFS=$as_save_IFS
9010  test -z "$as_dir" && as_dir=.
9011    for ac_exec_ext in '' $ac_executable_extensions; do
9012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015    break 2
9016  fi
9017done
9018  done
9019IFS=$as_save_IFS
9020
9021  ;;
9022esac
9023fi
9024RM=$ac_cv_path_RM
9025if test -n "$RM"; then
9026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9027$as_echo "$RM" >&6; }
9028else
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030$as_echo "no" >&6; }
9031fi
9032
9033
9034  test -n "$RM" && break
9035done
9036
9037    else
9038      # If it succeeded, then it was overridden by the user. We will use it
9039      # for the tool.
9040
9041      # First remove it from the list of overridden variables, so we can test
9042      # for unknown variables in the end.
9043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9044
9045      # Check if the provided tool contains a complete path.
9046      tool_specified="$RM"
9047      tool_basename="${tool_specified##*/}"
9048      if test "x$tool_basename" = "x$tool_specified"; then
9049        # A command without a complete path is provided, search $PATH.
9050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9051$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9052        # Extract the first word of "$tool_basename", so it can be a program name with args.
9053set dummy $tool_basename; ac_word=$2
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055$as_echo_n "checking for $ac_word... " >&6; }
9056if ${ac_cv_path_RM+:} false; then :
9057  $as_echo_n "(cached) " >&6
9058else
9059  case $RM in
9060  [\\/]* | ?:[\\/]*)
9061  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9062  ;;
9063  *)
9064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065for as_dir in $PATH
9066do
9067  IFS=$as_save_IFS
9068  test -z "$as_dir" && as_dir=.
9069    for ac_exec_ext in '' $ac_executable_extensions; do
9070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9071    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9073    break 2
9074  fi
9075done
9076  done
9077IFS=$as_save_IFS
9078
9079  ;;
9080esac
9081fi
9082RM=$ac_cv_path_RM
9083if test -n "$RM"; then
9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9085$as_echo "$RM" >&6; }
9086else
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088$as_echo "no" >&6; }
9089fi
9090
9091
9092        if test "x$RM" = x; then
9093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9094        fi
9095      else
9096        # Otherwise we believe it is a complete path. Use it as it is.
9097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9098$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9100$as_echo_n "checking for RM... " >&6; }
9101        if test ! -x "$tool_specified"; then
9102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9103$as_echo "not found" >&6; }
9104          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9105        fi
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9107$as_echo "$tool_specified" >&6; }
9108      fi
9109    fi
9110  fi
9111
9112
9113
9114  if test "x$RM" = x; then
9115    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9116  fi
9117
9118
9119
9120
9121
9122  # Publish this variable in the help.
9123
9124
9125  if test "x$SH" = x; then
9126    # The variable is not set by user, try to locate tool using the code snippet
9127    for ac_prog in sh
9128do
9129  # Extract the first word of "$ac_prog", so it can be a program name with args.
9130set dummy $ac_prog; ac_word=$2
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132$as_echo_n "checking for $ac_word... " >&6; }
9133if ${ac_cv_path_SH+:} false; then :
9134  $as_echo_n "(cached) " >&6
9135else
9136  case $SH in
9137  [\\/]* | ?:[\\/]*)
9138  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9139  ;;
9140  *)
9141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142for as_dir in $PATH
9143do
9144  IFS=$as_save_IFS
9145  test -z "$as_dir" && as_dir=.
9146    for ac_exec_ext in '' $ac_executable_extensions; do
9147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150    break 2
9151  fi
9152done
9153  done
9154IFS=$as_save_IFS
9155
9156  ;;
9157esac
9158fi
9159SH=$ac_cv_path_SH
9160if test -n "$SH"; then
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9162$as_echo "$SH" >&6; }
9163else
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
9166fi
9167
9168
9169  test -n "$SH" && break
9170done
9171
9172  else
9173    # The variable is set, but is it from the command line or the environment?
9174
9175    # Try to remove the string !SH! from our list.
9176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9178      # If it failed, the variable was not from the command line. Ignore it,
9179      # but warn the user (except for BASH, which is always set by the calling BASH).
9180      if test "xSH" != xBASH; then
9181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9182$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9183      fi
9184      # Try to locate tool using the code snippet
9185      for ac_prog in sh
9186do
9187  # Extract the first word of "$ac_prog", so it can be a program name with args.
9188set dummy $ac_prog; ac_word=$2
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190$as_echo_n "checking for $ac_word... " >&6; }
9191if ${ac_cv_path_SH+:} false; then :
9192  $as_echo_n "(cached) " >&6
9193else
9194  case $SH in
9195  [\\/]* | ?:[\\/]*)
9196  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9197  ;;
9198  *)
9199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9200for as_dir in $PATH
9201do
9202  IFS=$as_save_IFS
9203  test -z "$as_dir" && as_dir=.
9204    for ac_exec_ext in '' $ac_executable_extensions; do
9205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9206    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9208    break 2
9209  fi
9210done
9211  done
9212IFS=$as_save_IFS
9213
9214  ;;
9215esac
9216fi
9217SH=$ac_cv_path_SH
9218if test -n "$SH"; then
9219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9220$as_echo "$SH" >&6; }
9221else
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223$as_echo "no" >&6; }
9224fi
9225
9226
9227  test -n "$SH" && break
9228done
9229
9230    else
9231      # If it succeeded, then it was overridden by the user. We will use it
9232      # for the tool.
9233
9234      # First remove it from the list of overridden variables, so we can test
9235      # for unknown variables in the end.
9236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9237
9238      # Check if the provided tool contains a complete path.
9239      tool_specified="$SH"
9240      tool_basename="${tool_specified##*/}"
9241      if test "x$tool_basename" = "x$tool_specified"; then
9242        # A command without a complete path is provided, search $PATH.
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9244$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9245        # Extract the first word of "$tool_basename", so it can be a program name with args.
9246set dummy $tool_basename; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_SH+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $SH in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275SH=$ac_cv_path_SH
9276if test -n "$SH"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9278$as_echo "$SH" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285        if test "x$SH" = x; then
9286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9287        fi
9288      else
9289        # Otherwise we believe it is a complete path. Use it as it is.
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9291$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9293$as_echo_n "checking for SH... " >&6; }
9294        if test ! -x "$tool_specified"; then
9295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9296$as_echo "not found" >&6; }
9297          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9298        fi
9299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9300$as_echo "$tool_specified" >&6; }
9301      fi
9302    fi
9303  fi
9304
9305
9306
9307  if test "x$SH" = x; then
9308    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9309  fi
9310
9311
9312
9313
9314
9315  # Publish this variable in the help.
9316
9317
9318  if test "x$SORT" = x; then
9319    # The variable is not set by user, try to locate tool using the code snippet
9320    for ac_prog in sort
9321do
9322  # Extract the first word of "$ac_prog", so it can be a program name with args.
9323set dummy $ac_prog; ac_word=$2
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325$as_echo_n "checking for $ac_word... " >&6; }
9326if ${ac_cv_path_SORT+:} false; then :
9327  $as_echo_n "(cached) " >&6
9328else
9329  case $SORT in
9330  [\\/]* | ?:[\\/]*)
9331  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9332  ;;
9333  *)
9334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337  IFS=$as_save_IFS
9338  test -z "$as_dir" && as_dir=.
9339    for ac_exec_ext in '' $ac_executable_extensions; do
9340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343    break 2
9344  fi
9345done
9346  done
9347IFS=$as_save_IFS
9348
9349  ;;
9350esac
9351fi
9352SORT=$ac_cv_path_SORT
9353if test -n "$SORT"; then
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9355$as_echo "$SORT" >&6; }
9356else
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
9359fi
9360
9361
9362  test -n "$SORT" && break
9363done
9364
9365  else
9366    # The variable is set, but is it from the command line or the environment?
9367
9368    # Try to remove the string !SORT! from our list.
9369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9371      # If it failed, the variable was not from the command line. Ignore it,
9372      # but warn the user (except for BASH, which is always set by the calling BASH).
9373      if test "xSORT" != xBASH; then
9374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9375$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9376      fi
9377      # Try to locate tool using the code snippet
9378      for ac_prog in sort
9379do
9380  # Extract the first word of "$ac_prog", so it can be a program name with args.
9381set dummy $ac_prog; ac_word=$2
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383$as_echo_n "checking for $ac_word... " >&6; }
9384if ${ac_cv_path_SORT+:} false; then :
9385  $as_echo_n "(cached) " >&6
9386else
9387  case $SORT in
9388  [\\/]* | ?:[\\/]*)
9389  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9390  ;;
9391  *)
9392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393for as_dir in $PATH
9394do
9395  IFS=$as_save_IFS
9396  test -z "$as_dir" && as_dir=.
9397    for ac_exec_ext in '' $ac_executable_extensions; do
9398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401    break 2
9402  fi
9403done
9404  done
9405IFS=$as_save_IFS
9406
9407  ;;
9408esac
9409fi
9410SORT=$ac_cv_path_SORT
9411if test -n "$SORT"; then
9412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9413$as_echo "$SORT" >&6; }
9414else
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
9417fi
9418
9419
9420  test -n "$SORT" && break
9421done
9422
9423    else
9424      # If it succeeded, then it was overridden by the user. We will use it
9425      # for the tool.
9426
9427      # First remove it from the list of overridden variables, so we can test
9428      # for unknown variables in the end.
9429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9430
9431      # Check if the provided tool contains a complete path.
9432      tool_specified="$SORT"
9433      tool_basename="${tool_specified##*/}"
9434      if test "x$tool_basename" = "x$tool_specified"; then
9435        # A command without a complete path is provided, search $PATH.
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9437$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9438        # Extract the first word of "$tool_basename", so it can be a program name with args.
9439set dummy $tool_basename; ac_word=$2
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9441$as_echo_n "checking for $ac_word... " >&6; }
9442if ${ac_cv_path_SORT+:} false; then :
9443  $as_echo_n "(cached) " >&6
9444else
9445  case $SORT in
9446  [\\/]* | ?:[\\/]*)
9447  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9448  ;;
9449  *)
9450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451for as_dir in $PATH
9452do
9453  IFS=$as_save_IFS
9454  test -z "$as_dir" && as_dir=.
9455    for ac_exec_ext in '' $ac_executable_extensions; do
9456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9457    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9459    break 2
9460  fi
9461done
9462  done
9463IFS=$as_save_IFS
9464
9465  ;;
9466esac
9467fi
9468SORT=$ac_cv_path_SORT
9469if test -n "$SORT"; then
9470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9471$as_echo "$SORT" >&6; }
9472else
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474$as_echo "no" >&6; }
9475fi
9476
9477
9478        if test "x$SORT" = x; then
9479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9480        fi
9481      else
9482        # Otherwise we believe it is a complete path. Use it as it is.
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9484$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9486$as_echo_n "checking for SORT... " >&6; }
9487        if test ! -x "$tool_specified"; then
9488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9489$as_echo "not found" >&6; }
9490          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9491        fi
9492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9493$as_echo "$tool_specified" >&6; }
9494      fi
9495    fi
9496  fi
9497
9498
9499
9500  if test "x$SORT" = x; then
9501    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9502  fi
9503
9504
9505
9506
9507
9508  # Publish this variable in the help.
9509
9510
9511  if test "x$TAIL" = x; then
9512    # The variable is not set by user, try to locate tool using the code snippet
9513    for ac_prog in tail
9514do
9515  # Extract the first word of "$ac_prog", so it can be a program name with args.
9516set dummy $ac_prog; ac_word=$2
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518$as_echo_n "checking for $ac_word... " >&6; }
9519if ${ac_cv_path_TAIL+:} false; then :
9520  $as_echo_n "(cached) " >&6
9521else
9522  case $TAIL in
9523  [\\/]* | ?:[\\/]*)
9524  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9525  ;;
9526  *)
9527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528for as_dir in $PATH
9529do
9530  IFS=$as_save_IFS
9531  test -z "$as_dir" && as_dir=.
9532    for ac_exec_ext in '' $ac_executable_extensions; do
9533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536    break 2
9537  fi
9538done
9539  done
9540IFS=$as_save_IFS
9541
9542  ;;
9543esac
9544fi
9545TAIL=$ac_cv_path_TAIL
9546if test -n "$TAIL"; then
9547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9548$as_echo "$TAIL" >&6; }
9549else
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
9552fi
9553
9554
9555  test -n "$TAIL" && break
9556done
9557
9558  else
9559    # The variable is set, but is it from the command line or the environment?
9560
9561    # Try to remove the string !TAIL! from our list.
9562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9564      # If it failed, the variable was not from the command line. Ignore it,
9565      # but warn the user (except for BASH, which is always set by the calling BASH).
9566      if test "xTAIL" != xBASH; then
9567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9568$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9569      fi
9570      # Try to locate tool using the code snippet
9571      for ac_prog in tail
9572do
9573  # Extract the first word of "$ac_prog", so it can be a program name with args.
9574set dummy $ac_prog; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_TAIL+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $TAIL in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603TAIL=$ac_cv_path_TAIL
9604if test -n "$TAIL"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9606$as_echo "$TAIL" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613  test -n "$TAIL" && break
9614done
9615
9616    else
9617      # If it succeeded, then it was overridden by the user. We will use it
9618      # for the tool.
9619
9620      # First remove it from the list of overridden variables, so we can test
9621      # for unknown variables in the end.
9622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9623
9624      # Check if the provided tool contains a complete path.
9625      tool_specified="$TAIL"
9626      tool_basename="${tool_specified##*/}"
9627      if test "x$tool_basename" = "x$tool_specified"; then
9628        # A command without a complete path is provided, search $PATH.
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9630$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9631        # Extract the first word of "$tool_basename", so it can be a program name with args.
9632set dummy $tool_basename; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_TAIL+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $TAIL in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661TAIL=$ac_cv_path_TAIL
9662if test -n "$TAIL"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9664$as_echo "$TAIL" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671        if test "x$TAIL" = x; then
9672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673        fi
9674      else
9675        # Otherwise we believe it is a complete path. Use it as it is.
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9677$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9679$as_echo_n "checking for TAIL... " >&6; }
9680        if test ! -x "$tool_specified"; then
9681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682$as_echo "not found" >&6; }
9683          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9684        fi
9685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686$as_echo "$tool_specified" >&6; }
9687      fi
9688    fi
9689  fi
9690
9691
9692
9693  if test "x$TAIL" = x; then
9694    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9695  fi
9696
9697
9698
9699
9700
9701  # Publish this variable in the help.
9702
9703
9704  if test "x$TAR" = x; then
9705    # The variable is not set by user, try to locate tool using the code snippet
9706    for ac_prog in tar
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if ${ac_cv_path_TAR+:} false; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $TAR in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738TAR=$ac_cv_path_TAR
9739if test -n "$TAR"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9741$as_echo "$TAR" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$TAR" && break
9749done
9750
9751  else
9752    # The variable is set, but is it from the command line or the environment?
9753
9754    # Try to remove the string !TAR! from our list.
9755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9757      # If it failed, the variable was not from the command line. Ignore it,
9758      # but warn the user (except for BASH, which is always set by the calling BASH).
9759      if test "xTAR" != xBASH; then
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9761$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9762      fi
9763      # Try to locate tool using the code snippet
9764      for ac_prog in tar
9765do
9766  # Extract the first word of "$ac_prog", so it can be a program name with args.
9767set dummy $ac_prog; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_TAR+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $TAR in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796TAR=$ac_cv_path_TAR
9797if test -n "$TAR"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9799$as_echo "$TAR" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806  test -n "$TAR" && break
9807done
9808
9809    else
9810      # If it succeeded, then it was overridden by the user. We will use it
9811      # for the tool.
9812
9813      # First remove it from the list of overridden variables, so we can test
9814      # for unknown variables in the end.
9815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9816
9817      # Check if the provided tool contains a complete path.
9818      tool_specified="$TAR"
9819      tool_basename="${tool_specified##*/}"
9820      if test "x$tool_basename" = "x$tool_specified"; then
9821        # A command without a complete path is provided, search $PATH.
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9823$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9824        # Extract the first word of "$tool_basename", so it can be a program name with args.
9825set dummy $tool_basename; ac_word=$2
9826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9827$as_echo_n "checking for $ac_word... " >&6; }
9828if ${ac_cv_path_TAR+:} false; then :
9829  $as_echo_n "(cached) " >&6
9830else
9831  case $TAR in
9832  [\\/]* | ?:[\\/]*)
9833  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9834  ;;
9835  *)
9836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9837for as_dir in $PATH
9838do
9839  IFS=$as_save_IFS
9840  test -z "$as_dir" && as_dir=.
9841    for ac_exec_ext in '' $ac_executable_extensions; do
9842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9843    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9845    break 2
9846  fi
9847done
9848  done
9849IFS=$as_save_IFS
9850
9851  ;;
9852esac
9853fi
9854TAR=$ac_cv_path_TAR
9855if test -n "$TAR"; then
9856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9857$as_echo "$TAR" >&6; }
9858else
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9860$as_echo "no" >&6; }
9861fi
9862
9863
9864        if test "x$TAR" = x; then
9865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9866        fi
9867      else
9868        # Otherwise we believe it is a complete path. Use it as it is.
9869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9870$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9872$as_echo_n "checking for TAR... " >&6; }
9873        if test ! -x "$tool_specified"; then
9874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9875$as_echo "not found" >&6; }
9876          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9877        fi
9878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9879$as_echo "$tool_specified" >&6; }
9880      fi
9881    fi
9882  fi
9883
9884
9885
9886  if test "x$TAR" = x; then
9887    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9888  fi
9889
9890
9891
9892
9893
9894  # Publish this variable in the help.
9895
9896
9897  if test "x$TEE" = x; then
9898    # The variable is not set by user, try to locate tool using the code snippet
9899    for ac_prog in tee
9900do
9901  # Extract the first word of "$ac_prog", so it can be a program name with args.
9902set dummy $ac_prog; ac_word=$2
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904$as_echo_n "checking for $ac_word... " >&6; }
9905if ${ac_cv_path_TEE+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  case $TEE in
9909  [\\/]* | ?:[\\/]*)
9910  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9911  ;;
9912  *)
9913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914for as_dir in $PATH
9915do
9916  IFS=$as_save_IFS
9917  test -z "$as_dir" && as_dir=.
9918    for ac_exec_ext in '' $ac_executable_extensions; do
9919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922    break 2
9923  fi
9924done
9925  done
9926IFS=$as_save_IFS
9927
9928  ;;
9929esac
9930fi
9931TEE=$ac_cv_path_TEE
9932if test -n "$TEE"; then
9933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9934$as_echo "$TEE" >&6; }
9935else
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
9938fi
9939
9940
9941  test -n "$TEE" && break
9942done
9943
9944  else
9945    # The variable is set, but is it from the command line or the environment?
9946
9947    # Try to remove the string !TEE! from our list.
9948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9950      # If it failed, the variable was not from the command line. Ignore it,
9951      # but warn the user (except for BASH, which is always set by the calling BASH).
9952      if test "xTEE" != xBASH; then
9953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9954$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9955      fi
9956      # Try to locate tool using the code snippet
9957      for ac_prog in tee
9958do
9959  # Extract the first word of "$ac_prog", so it can be a program name with args.
9960set dummy $ac_prog; ac_word=$2
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9962$as_echo_n "checking for $ac_word... " >&6; }
9963if ${ac_cv_path_TEE+:} false; then :
9964  $as_echo_n "(cached) " >&6
9965else
9966  case $TEE in
9967  [\\/]* | ?:[\\/]*)
9968  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9969  ;;
9970  *)
9971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9972for as_dir in $PATH
9973do
9974  IFS=$as_save_IFS
9975  test -z "$as_dir" && as_dir=.
9976    for ac_exec_ext in '' $ac_executable_extensions; do
9977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9978    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9980    break 2
9981  fi
9982done
9983  done
9984IFS=$as_save_IFS
9985
9986  ;;
9987esac
9988fi
9989TEE=$ac_cv_path_TEE
9990if test -n "$TEE"; then
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9992$as_echo "$TEE" >&6; }
9993else
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
9996fi
9997
9998
9999  test -n "$TEE" && break
10000done
10001
10002    else
10003      # If it succeeded, then it was overridden by the user. We will use it
10004      # for the tool.
10005
10006      # First remove it from the list of overridden variables, so we can test
10007      # for unknown variables in the end.
10008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10009
10010      # Check if the provided tool contains a complete path.
10011      tool_specified="$TEE"
10012      tool_basename="${tool_specified##*/}"
10013      if test "x$tool_basename" = "x$tool_specified"; then
10014        # A command without a complete path is provided, search $PATH.
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10016$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10017        # Extract the first word of "$tool_basename", so it can be a program name with args.
10018set dummy $tool_basename; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if ${ac_cv_path_TEE+:} false; then :
10022  $as_echo_n "(cached) " >&6
10023else
10024  case $TEE in
10025  [\\/]* | ?:[\\/]*)
10026  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10027  ;;
10028  *)
10029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032  IFS=$as_save_IFS
10033  test -z "$as_dir" && as_dir=.
10034    for ac_exec_ext in '' $ac_executable_extensions; do
10035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038    break 2
10039  fi
10040done
10041  done
10042IFS=$as_save_IFS
10043
10044  ;;
10045esac
10046fi
10047TEE=$ac_cv_path_TEE
10048if test -n "$TEE"; then
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10050$as_echo "$TEE" >&6; }
10051else
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057        if test "x$TEE" = x; then
10058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10059        fi
10060      else
10061        # Otherwise we believe it is a complete path. Use it as it is.
10062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10063$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10065$as_echo_n "checking for TEE... " >&6; }
10066        if test ! -x "$tool_specified"; then
10067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10068$as_echo "not found" >&6; }
10069          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10070        fi
10071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10072$as_echo "$tool_specified" >&6; }
10073      fi
10074    fi
10075  fi
10076
10077
10078
10079  if test "x$TEE" = x; then
10080    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10081  fi
10082
10083
10084
10085
10086
10087  # Publish this variable in the help.
10088
10089
10090  if test "x$TOUCH" = x; then
10091    # The variable is not set by user, try to locate tool using the code snippet
10092    for ac_prog in touch
10093do
10094  # Extract the first word of "$ac_prog", so it can be a program name with args.
10095set dummy $ac_prog; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_TOUCH+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $TOUCH in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  ;;
10122esac
10123fi
10124TOUCH=$ac_cv_path_TOUCH
10125if test -n "$TOUCH"; then
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10127$as_echo "$TOUCH" >&6; }
10128else
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134  test -n "$TOUCH" && break
10135done
10136
10137  else
10138    # The variable is set, but is it from the command line or the environment?
10139
10140    # Try to remove the string !TOUCH! from our list.
10141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10143      # If it failed, the variable was not from the command line. Ignore it,
10144      # but warn the user (except for BASH, which is always set by the calling BASH).
10145      if test "xTOUCH" != xBASH; then
10146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10147$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10148      fi
10149      # Try to locate tool using the code snippet
10150      for ac_prog in touch
10151do
10152  # Extract the first word of "$ac_prog", so it can be a program name with args.
10153set dummy $ac_prog; ac_word=$2
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155$as_echo_n "checking for $ac_word... " >&6; }
10156if ${ac_cv_path_TOUCH+:} false; then :
10157  $as_echo_n "(cached) " >&6
10158else
10159  case $TOUCH in
10160  [\\/]* | ?:[\\/]*)
10161  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10162  ;;
10163  *)
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  test -z "$as_dir" && as_dir=.
10169    for ac_exec_ext in '' $ac_executable_extensions; do
10170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10171    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173    break 2
10174  fi
10175done
10176  done
10177IFS=$as_save_IFS
10178
10179  ;;
10180esac
10181fi
10182TOUCH=$ac_cv_path_TOUCH
10183if test -n "$TOUCH"; then
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10185$as_echo "$TOUCH" >&6; }
10186else
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
10189fi
10190
10191
10192  test -n "$TOUCH" && break
10193done
10194
10195    else
10196      # If it succeeded, then it was overridden by the user. We will use it
10197      # for the tool.
10198
10199      # First remove it from the list of overridden variables, so we can test
10200      # for unknown variables in the end.
10201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10202
10203      # Check if the provided tool contains a complete path.
10204      tool_specified="$TOUCH"
10205      tool_basename="${tool_specified##*/}"
10206      if test "x$tool_basename" = "x$tool_specified"; then
10207        # A command without a complete path is provided, search $PATH.
10208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10209$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10210        # Extract the first word of "$tool_basename", so it can be a program name with args.
10211set dummy $tool_basename; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if ${ac_cv_path_TOUCH+:} false; then :
10215  $as_echo_n "(cached) " >&6
10216else
10217  case $TOUCH in
10218  [\\/]* | ?:[\\/]*)
10219  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10220  ;;
10221  *)
10222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  ;;
10238esac
10239fi
10240TOUCH=$ac_cv_path_TOUCH
10241if test -n "$TOUCH"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10243$as_echo "$TOUCH" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250        if test "x$TOUCH" = x; then
10251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10252        fi
10253      else
10254        # Otherwise we believe it is a complete path. Use it as it is.
10255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10256$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10258$as_echo_n "checking for TOUCH... " >&6; }
10259        if test ! -x "$tool_specified"; then
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10261$as_echo "not found" >&6; }
10262          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10263        fi
10264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10265$as_echo "$tool_specified" >&6; }
10266      fi
10267    fi
10268  fi
10269
10270
10271
10272  if test "x$TOUCH" = x; then
10273    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10274  fi
10275
10276
10277
10278
10279
10280  # Publish this variable in the help.
10281
10282
10283  if test "x$TR" = x; then
10284    # The variable is not set by user, try to locate tool using the code snippet
10285    for ac_prog in tr
10286do
10287  # Extract the first word of "$ac_prog", so it can be a program name with args.
10288set dummy $ac_prog; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
10291if ${ac_cv_path_TR+:} false; then :
10292  $as_echo_n "(cached) " >&6
10293else
10294  case $TR in
10295  [\\/]* | ?:[\\/]*)
10296  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10297  ;;
10298  *)
10299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300for as_dir in $PATH
10301do
10302  IFS=$as_save_IFS
10303  test -z "$as_dir" && as_dir=.
10304    for ac_exec_ext in '' $ac_executable_extensions; do
10305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308    break 2
10309  fi
10310done
10311  done
10312IFS=$as_save_IFS
10313
10314  ;;
10315esac
10316fi
10317TR=$ac_cv_path_TR
10318if test -n "$TR"; then
10319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10320$as_echo "$TR" >&6; }
10321else
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
10324fi
10325
10326
10327  test -n "$TR" && break
10328done
10329
10330  else
10331    # The variable is set, but is it from the command line or the environment?
10332
10333    # Try to remove the string !TR! from our list.
10334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10336      # If it failed, the variable was not from the command line. Ignore it,
10337      # but warn the user (except for BASH, which is always set by the calling BASH).
10338      if test "xTR" != xBASH; then
10339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10340$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10341      fi
10342      # Try to locate tool using the code snippet
10343      for ac_prog in tr
10344do
10345  # Extract the first word of "$ac_prog", so it can be a program name with args.
10346set dummy $ac_prog; ac_word=$2
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348$as_echo_n "checking for $ac_word... " >&6; }
10349if ${ac_cv_path_TR+:} false; then :
10350  $as_echo_n "(cached) " >&6
10351else
10352  case $TR in
10353  [\\/]* | ?:[\\/]*)
10354  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10355  ;;
10356  *)
10357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358for as_dir in $PATH
10359do
10360  IFS=$as_save_IFS
10361  test -z "$as_dir" && as_dir=.
10362    for ac_exec_ext in '' $ac_executable_extensions; do
10363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366    break 2
10367  fi
10368done
10369  done
10370IFS=$as_save_IFS
10371
10372  ;;
10373esac
10374fi
10375TR=$ac_cv_path_TR
10376if test -n "$TR"; then
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10378$as_echo "$TR" >&6; }
10379else
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382fi
10383
10384
10385  test -n "$TR" && break
10386done
10387
10388    else
10389      # If it succeeded, then it was overridden by the user. We will use it
10390      # for the tool.
10391
10392      # First remove it from the list of overridden variables, so we can test
10393      # for unknown variables in the end.
10394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10395
10396      # Check if the provided tool contains a complete path.
10397      tool_specified="$TR"
10398      tool_basename="${tool_specified##*/}"
10399      if test "x$tool_basename" = "x$tool_specified"; then
10400        # A command without a complete path is provided, search $PATH.
10401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10402$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10403        # Extract the first word of "$tool_basename", so it can be a program name with args.
10404set dummy $tool_basename; ac_word=$2
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10406$as_echo_n "checking for $ac_word... " >&6; }
10407if ${ac_cv_path_TR+:} false; then :
10408  $as_echo_n "(cached) " >&6
10409else
10410  case $TR in
10411  [\\/]* | ?:[\\/]*)
10412  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10413  ;;
10414  *)
10415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10416for as_dir in $PATH
10417do
10418  IFS=$as_save_IFS
10419  test -z "$as_dir" && as_dir=.
10420    for ac_exec_ext in '' $ac_executable_extensions; do
10421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10422    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10424    break 2
10425  fi
10426done
10427  done
10428IFS=$as_save_IFS
10429
10430  ;;
10431esac
10432fi
10433TR=$ac_cv_path_TR
10434if test -n "$TR"; then
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10436$as_echo "$TR" >&6; }
10437else
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440fi
10441
10442
10443        if test "x$TR" = x; then
10444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10445        fi
10446      else
10447        # Otherwise we believe it is a complete path. Use it as it is.
10448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10449$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10451$as_echo_n "checking for TR... " >&6; }
10452        if test ! -x "$tool_specified"; then
10453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10454$as_echo "not found" >&6; }
10455          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10456        fi
10457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10458$as_echo "$tool_specified" >&6; }
10459      fi
10460    fi
10461  fi
10462
10463
10464
10465  if test "x$TR" = x; then
10466    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10467  fi
10468
10469
10470
10471
10472
10473  # Publish this variable in the help.
10474
10475
10476  if test "x$UNAME" = x; then
10477    # The variable is not set by user, try to locate tool using the code snippet
10478    for ac_prog in uname
10479do
10480  # Extract the first word of "$ac_prog", so it can be a program name with args.
10481set dummy $ac_prog; ac_word=$2
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483$as_echo_n "checking for $ac_word... " >&6; }
10484if ${ac_cv_path_UNAME+:} false; then :
10485  $as_echo_n "(cached) " >&6
10486else
10487  case $UNAME in
10488  [\\/]* | ?:[\\/]*)
10489  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10490  ;;
10491  *)
10492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493for as_dir in $PATH
10494do
10495  IFS=$as_save_IFS
10496  test -z "$as_dir" && as_dir=.
10497    for ac_exec_ext in '' $ac_executable_extensions; do
10498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501    break 2
10502  fi
10503done
10504  done
10505IFS=$as_save_IFS
10506
10507  ;;
10508esac
10509fi
10510UNAME=$ac_cv_path_UNAME
10511if test -n "$UNAME"; then
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10513$as_echo "$UNAME" >&6; }
10514else
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
10517fi
10518
10519
10520  test -n "$UNAME" && break
10521done
10522
10523  else
10524    # The variable is set, but is it from the command line or the environment?
10525
10526    # Try to remove the string !UNAME! from our list.
10527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10529      # If it failed, the variable was not from the command line. Ignore it,
10530      # but warn the user (except for BASH, which is always set by the calling BASH).
10531      if test "xUNAME" != xBASH; then
10532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10533$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10534      fi
10535      # Try to locate tool using the code snippet
10536      for ac_prog in uname
10537do
10538  # Extract the first word of "$ac_prog", so it can be a program name with args.
10539set dummy $ac_prog; ac_word=$2
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10541$as_echo_n "checking for $ac_word... " >&6; }
10542if ${ac_cv_path_UNAME+:} false; then :
10543  $as_echo_n "(cached) " >&6
10544else
10545  case $UNAME in
10546  [\\/]* | ?:[\\/]*)
10547  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10548  ;;
10549  *)
10550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10551for as_dir in $PATH
10552do
10553  IFS=$as_save_IFS
10554  test -z "$as_dir" && as_dir=.
10555    for ac_exec_ext in '' $ac_executable_extensions; do
10556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10557    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10559    break 2
10560  fi
10561done
10562  done
10563IFS=$as_save_IFS
10564
10565  ;;
10566esac
10567fi
10568UNAME=$ac_cv_path_UNAME
10569if test -n "$UNAME"; then
10570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10571$as_echo "$UNAME" >&6; }
10572else
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574$as_echo "no" >&6; }
10575fi
10576
10577
10578  test -n "$UNAME" && break
10579done
10580
10581    else
10582      # If it succeeded, then it was overridden by the user. We will use it
10583      # for the tool.
10584
10585      # First remove it from the list of overridden variables, so we can test
10586      # for unknown variables in the end.
10587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10588
10589      # Check if the provided tool contains a complete path.
10590      tool_specified="$UNAME"
10591      tool_basename="${tool_specified##*/}"
10592      if test "x$tool_basename" = "x$tool_specified"; then
10593        # A command without a complete path is provided, search $PATH.
10594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10595$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10596        # Extract the first word of "$tool_basename", so it can be a program name with args.
10597set dummy $tool_basename; ac_word=$2
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10599$as_echo_n "checking for $ac_word... " >&6; }
10600if ${ac_cv_path_UNAME+:} false; then :
10601  $as_echo_n "(cached) " >&6
10602else
10603  case $UNAME in
10604  [\\/]* | ?:[\\/]*)
10605  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10606  ;;
10607  *)
10608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10609for as_dir in $PATH
10610do
10611  IFS=$as_save_IFS
10612  test -z "$as_dir" && as_dir=.
10613    for ac_exec_ext in '' $ac_executable_extensions; do
10614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10615    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10617    break 2
10618  fi
10619done
10620  done
10621IFS=$as_save_IFS
10622
10623  ;;
10624esac
10625fi
10626UNAME=$ac_cv_path_UNAME
10627if test -n "$UNAME"; then
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10629$as_echo "$UNAME" >&6; }
10630else
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
10633fi
10634
10635
10636        if test "x$UNAME" = x; then
10637          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10638        fi
10639      else
10640        # Otherwise we believe it is a complete path. Use it as it is.
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10642$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10644$as_echo_n "checking for UNAME... " >&6; }
10645        if test ! -x "$tool_specified"; then
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10647$as_echo "not found" >&6; }
10648          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10649        fi
10650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10651$as_echo "$tool_specified" >&6; }
10652      fi
10653    fi
10654  fi
10655
10656
10657
10658  if test "x$UNAME" = x; then
10659    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if test "x$UNIQ" = x; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in uniq
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_UNIQ+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $UNIQ in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703UNIQ=$ac_cv_path_UNIQ
10704if test -n "$UNIQ"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10706$as_echo "$UNIQ" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$UNIQ" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !UNIQ! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xUNIQ" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in uniq
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_UNIQ+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $UNIQ in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761UNIQ=$ac_cv_path_UNIQ
10762if test -n "$UNIQ"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10764$as_echo "$UNIQ" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$UNIQ" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if the provided tool contains a complete path.
10783      tool_specified="$UNIQ"
10784      tool_basename="${tool_specified##*/}"
10785      if test "x$tool_basename" = "x$tool_specified"; then
10786        # A command without a complete path is provided, search $PATH.
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10788$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10789        # Extract the first word of "$tool_basename", so it can be a program name with args.
10790set dummy $tool_basename; ac_word=$2
10791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10792$as_echo_n "checking for $ac_word... " >&6; }
10793if ${ac_cv_path_UNIQ+:} false; then :
10794  $as_echo_n "(cached) " >&6
10795else
10796  case $UNIQ in
10797  [\\/]* | ?:[\\/]*)
10798  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10799  ;;
10800  *)
10801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10802for as_dir in $PATH
10803do
10804  IFS=$as_save_IFS
10805  test -z "$as_dir" && as_dir=.
10806    for ac_exec_ext in '' $ac_executable_extensions; do
10807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10808    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10810    break 2
10811  fi
10812done
10813  done
10814IFS=$as_save_IFS
10815
10816  ;;
10817esac
10818fi
10819UNIQ=$ac_cv_path_UNIQ
10820if test -n "$UNIQ"; then
10821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10822$as_echo "$UNIQ" >&6; }
10823else
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10825$as_echo "no" >&6; }
10826fi
10827
10828
10829        if test "x$UNIQ" = x; then
10830          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10831        fi
10832      else
10833        # Otherwise we believe it is a complete path. Use it as it is.
10834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10835$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10837$as_echo_n "checking for UNIQ... " >&6; }
10838        if test ! -x "$tool_specified"; then
10839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10840$as_echo "not found" >&6; }
10841          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10842        fi
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10844$as_echo "$tool_specified" >&6; }
10845      fi
10846    fi
10847  fi
10848
10849
10850
10851  if test "x$UNIQ" = x; then
10852    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10853  fi
10854
10855
10856
10857
10858
10859  # Publish this variable in the help.
10860
10861
10862  if test "x$WC" = x; then
10863    # The variable is not set by user, try to locate tool using the code snippet
10864    for ac_prog in wc
10865do
10866  # Extract the first word of "$ac_prog", so it can be a program name with args.
10867set dummy $ac_prog; ac_word=$2
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10869$as_echo_n "checking for $ac_word... " >&6; }
10870if ${ac_cv_path_WC+:} false; then :
10871  $as_echo_n "(cached) " >&6
10872else
10873  case $WC in
10874  [\\/]* | ?:[\\/]*)
10875  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10876  ;;
10877  *)
10878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10879for as_dir in $PATH
10880do
10881  IFS=$as_save_IFS
10882  test -z "$as_dir" && as_dir=.
10883    for ac_exec_ext in '' $ac_executable_extensions; do
10884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10885    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10887    break 2
10888  fi
10889done
10890  done
10891IFS=$as_save_IFS
10892
10893  ;;
10894esac
10895fi
10896WC=$ac_cv_path_WC
10897if test -n "$WC"; then
10898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10899$as_echo "$WC" >&6; }
10900else
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
10903fi
10904
10905
10906  test -n "$WC" && break
10907done
10908
10909  else
10910    # The variable is set, but is it from the command line or the environment?
10911
10912    # Try to remove the string !WC! from our list.
10913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10915      # If it failed, the variable was not from the command line. Ignore it,
10916      # but warn the user (except for BASH, which is always set by the calling BASH).
10917      if test "xWC" != xBASH; then
10918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10919$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10920      fi
10921      # Try to locate tool using the code snippet
10922      for ac_prog in wc
10923do
10924  # Extract the first word of "$ac_prog", so it can be a program name with args.
10925set dummy $ac_prog; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if ${ac_cv_path_WC+:} false; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  case $WC in
10932  [\\/]* | ?:[\\/]*)
10933  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10934  ;;
10935  *)
10936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10937for as_dir in $PATH
10938do
10939  IFS=$as_save_IFS
10940  test -z "$as_dir" && as_dir=.
10941    for ac_exec_ext in '' $ac_executable_extensions; do
10942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10943    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10945    break 2
10946  fi
10947done
10948  done
10949IFS=$as_save_IFS
10950
10951  ;;
10952esac
10953fi
10954WC=$ac_cv_path_WC
10955if test -n "$WC"; then
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10957$as_echo "$WC" >&6; }
10958else
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960$as_echo "no" >&6; }
10961fi
10962
10963
10964  test -n "$WC" && break
10965done
10966
10967    else
10968      # If it succeeded, then it was overridden by the user. We will use it
10969      # for the tool.
10970
10971      # First remove it from the list of overridden variables, so we can test
10972      # for unknown variables in the end.
10973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10974
10975      # Check if the provided tool contains a complete path.
10976      tool_specified="$WC"
10977      tool_basename="${tool_specified##*/}"
10978      if test "x$tool_basename" = "x$tool_specified"; then
10979        # A command without a complete path is provided, search $PATH.
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10981$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10982        # Extract the first word of "$tool_basename", so it can be a program name with args.
10983set dummy $tool_basename; ac_word=$2
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10985$as_echo_n "checking for $ac_word... " >&6; }
10986if ${ac_cv_path_WC+:} false; then :
10987  $as_echo_n "(cached) " >&6
10988else
10989  case $WC in
10990  [\\/]* | ?:[\\/]*)
10991  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10992  ;;
10993  *)
10994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10995for as_dir in $PATH
10996do
10997  IFS=$as_save_IFS
10998  test -z "$as_dir" && as_dir=.
10999    for ac_exec_ext in '' $ac_executable_extensions; do
11000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11001    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11003    break 2
11004  fi
11005done
11006  done
11007IFS=$as_save_IFS
11008
11009  ;;
11010esac
11011fi
11012WC=$ac_cv_path_WC
11013if test -n "$WC"; then
11014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11015$as_echo "$WC" >&6; }
11016else
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018$as_echo "no" >&6; }
11019fi
11020
11021
11022        if test "x$WC" = x; then
11023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11024        fi
11025      else
11026        # Otherwise we believe it is a complete path. Use it as it is.
11027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11028$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11030$as_echo_n "checking for WC... " >&6; }
11031        if test ! -x "$tool_specified"; then
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11033$as_echo "not found" >&6; }
11034          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11035        fi
11036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11037$as_echo "$tool_specified" >&6; }
11038      fi
11039    fi
11040  fi
11041
11042
11043
11044  if test "x$WC" = x; then
11045    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11046  fi
11047
11048
11049
11050
11051
11052  # Publish this variable in the help.
11053
11054
11055  if test "x$WHICH" = x; then
11056    # The variable is not set by user, try to locate tool using the code snippet
11057    for ac_prog in which
11058do
11059  # Extract the first word of "$ac_prog", so it can be a program name with args.
11060set dummy $ac_prog; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_WHICH+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $WHICH in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089WHICH=$ac_cv_path_WHICH
11090if test -n "$WHICH"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11092$as_echo "$WHICH" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099  test -n "$WHICH" && break
11100done
11101
11102  else
11103    # The variable is set, but is it from the command line or the environment?
11104
11105    # Try to remove the string !WHICH! from our list.
11106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11108      # If it failed, the variable was not from the command line. Ignore it,
11109      # but warn the user (except for BASH, which is always set by the calling BASH).
11110      if test "xWHICH" != xBASH; then
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11112$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11113      fi
11114      # Try to locate tool using the code snippet
11115      for ac_prog in which
11116do
11117  # Extract the first word of "$ac_prog", so it can be a program name with args.
11118set dummy $ac_prog; ac_word=$2
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11120$as_echo_n "checking for $ac_word... " >&6; }
11121if ${ac_cv_path_WHICH+:} false; then :
11122  $as_echo_n "(cached) " >&6
11123else
11124  case $WHICH in
11125  [\\/]* | ?:[\\/]*)
11126  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11127  ;;
11128  *)
11129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130for as_dir in $PATH
11131do
11132  IFS=$as_save_IFS
11133  test -z "$as_dir" && as_dir=.
11134    for ac_exec_ext in '' $ac_executable_extensions; do
11135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138    break 2
11139  fi
11140done
11141  done
11142IFS=$as_save_IFS
11143
11144  ;;
11145esac
11146fi
11147WHICH=$ac_cv_path_WHICH
11148if test -n "$WHICH"; then
11149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11150$as_echo "$WHICH" >&6; }
11151else
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
11154fi
11155
11156
11157  test -n "$WHICH" && break
11158done
11159
11160    else
11161      # If it succeeded, then it was overridden by the user. We will use it
11162      # for the tool.
11163
11164      # First remove it from the list of overridden variables, so we can test
11165      # for unknown variables in the end.
11166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11167
11168      # Check if the provided tool contains a complete path.
11169      tool_specified="$WHICH"
11170      tool_basename="${tool_specified##*/}"
11171      if test "x$tool_basename" = "x$tool_specified"; then
11172        # A command without a complete path is provided, search $PATH.
11173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11174$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11175        # Extract the first word of "$tool_basename", so it can be a program name with args.
11176set dummy $tool_basename; ac_word=$2
11177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11178$as_echo_n "checking for $ac_word... " >&6; }
11179if ${ac_cv_path_WHICH+:} false; then :
11180  $as_echo_n "(cached) " >&6
11181else
11182  case $WHICH in
11183  [\\/]* | ?:[\\/]*)
11184  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11185  ;;
11186  *)
11187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11188for as_dir in $PATH
11189do
11190  IFS=$as_save_IFS
11191  test -z "$as_dir" && as_dir=.
11192    for ac_exec_ext in '' $ac_executable_extensions; do
11193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11194    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11196    break 2
11197  fi
11198done
11199  done
11200IFS=$as_save_IFS
11201
11202  ;;
11203esac
11204fi
11205WHICH=$ac_cv_path_WHICH
11206if test -n "$WHICH"; then
11207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11208$as_echo "$WHICH" >&6; }
11209else
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
11212fi
11213
11214
11215        if test "x$WHICH" = x; then
11216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11217        fi
11218      else
11219        # Otherwise we believe it is a complete path. Use it as it is.
11220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11221$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11223$as_echo_n "checking for WHICH... " >&6; }
11224        if test ! -x "$tool_specified"; then
11225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11226$as_echo "not found" >&6; }
11227          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11228        fi
11229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11230$as_echo "$tool_specified" >&6; }
11231      fi
11232    fi
11233  fi
11234
11235
11236
11237  if test "x$WHICH" = x; then
11238    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11239  fi
11240
11241
11242
11243
11244
11245  # Publish this variable in the help.
11246
11247
11248  if test "x$XARGS" = x; then
11249    # The variable is not set by user, try to locate tool using the code snippet
11250    for ac_prog in xargs
11251do
11252  # Extract the first word of "$ac_prog", so it can be a program name with args.
11253set dummy $ac_prog; ac_word=$2
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11255$as_echo_n "checking for $ac_word... " >&6; }
11256if ${ac_cv_path_XARGS+:} false; then :
11257  $as_echo_n "(cached) " >&6
11258else
11259  case $XARGS in
11260  [\\/]* | ?:[\\/]*)
11261  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11262  ;;
11263  *)
11264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11265for as_dir in $PATH
11266do
11267  IFS=$as_save_IFS
11268  test -z "$as_dir" && as_dir=.
11269    for ac_exec_ext in '' $ac_executable_extensions; do
11270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11271    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11273    break 2
11274  fi
11275done
11276  done
11277IFS=$as_save_IFS
11278
11279  ;;
11280esac
11281fi
11282XARGS=$ac_cv_path_XARGS
11283if test -n "$XARGS"; then
11284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11285$as_echo "$XARGS" >&6; }
11286else
11287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
11289fi
11290
11291
11292  test -n "$XARGS" && break
11293done
11294
11295  else
11296    # The variable is set, but is it from the command line or the environment?
11297
11298    # Try to remove the string !XARGS! from our list.
11299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11301      # If it failed, the variable was not from the command line. Ignore it,
11302      # but warn the user (except for BASH, which is always set by the calling BASH).
11303      if test "xXARGS" != xBASH; then
11304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11305$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11306      fi
11307      # Try to locate tool using the code snippet
11308      for ac_prog in xargs
11309do
11310  # Extract the first word of "$ac_prog", so it can be a program name with args.
11311set dummy $ac_prog; ac_word=$2
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11313$as_echo_n "checking for $ac_word... " >&6; }
11314if ${ac_cv_path_XARGS+:} false; then :
11315  $as_echo_n "(cached) " >&6
11316else
11317  case $XARGS in
11318  [\\/]* | ?:[\\/]*)
11319  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11320  ;;
11321  *)
11322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11323for as_dir in $PATH
11324do
11325  IFS=$as_save_IFS
11326  test -z "$as_dir" && as_dir=.
11327    for ac_exec_ext in '' $ac_executable_extensions; do
11328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11329    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11331    break 2
11332  fi
11333done
11334  done
11335IFS=$as_save_IFS
11336
11337  ;;
11338esac
11339fi
11340XARGS=$ac_cv_path_XARGS
11341if test -n "$XARGS"; then
11342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11343$as_echo "$XARGS" >&6; }
11344else
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
11347fi
11348
11349
11350  test -n "$XARGS" && break
11351done
11352
11353    else
11354      # If it succeeded, then it was overridden by the user. We will use it
11355      # for the tool.
11356
11357      # First remove it from the list of overridden variables, so we can test
11358      # for unknown variables in the end.
11359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11360
11361      # Check if the provided tool contains a complete path.
11362      tool_specified="$XARGS"
11363      tool_basename="${tool_specified##*/}"
11364      if test "x$tool_basename" = "x$tool_specified"; then
11365        # A command without a complete path is provided, search $PATH.
11366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11367$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11368        # Extract the first word of "$tool_basename", so it can be a program name with args.
11369set dummy $tool_basename; ac_word=$2
11370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371$as_echo_n "checking for $ac_word... " >&6; }
11372if ${ac_cv_path_XARGS+:} false; then :
11373  $as_echo_n "(cached) " >&6
11374else
11375  case $XARGS in
11376  [\\/]* | ?:[\\/]*)
11377  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11378  ;;
11379  *)
11380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381for as_dir in $PATH
11382do
11383  IFS=$as_save_IFS
11384  test -z "$as_dir" && as_dir=.
11385    for ac_exec_ext in '' $ac_executable_extensions; do
11386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389    break 2
11390  fi
11391done
11392  done
11393IFS=$as_save_IFS
11394
11395  ;;
11396esac
11397fi
11398XARGS=$ac_cv_path_XARGS
11399if test -n "$XARGS"; then
11400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11401$as_echo "$XARGS" >&6; }
11402else
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
11405fi
11406
11407
11408        if test "x$XARGS" = x; then
11409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11410        fi
11411      else
11412        # Otherwise we believe it is a complete path. Use it as it is.
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11414$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11416$as_echo_n "checking for XARGS... " >&6; }
11417        if test ! -x "$tool_specified"; then
11418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11419$as_echo "not found" >&6; }
11420          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11421        fi
11422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11423$as_echo "$tool_specified" >&6; }
11424      fi
11425    fi
11426  fi
11427
11428
11429
11430  if test "x$XARGS" = x; then
11431    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11432  fi
11433
11434
11435
11436  # Then required tools that require some special treatment.
11437
11438
11439  # Publish this variable in the help.
11440
11441
11442  if test "x$AWK" = x; then
11443    # The variable is not set by user, try to locate tool using the code snippet
11444    for ac_prog in gawk mawk nawk awk
11445do
11446  # Extract the first word of "$ac_prog", so it can be a program name with args.
11447set dummy $ac_prog; ac_word=$2
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11449$as_echo_n "checking for $ac_word... " >&6; }
11450if ${ac_cv_prog_AWK+:} false; then :
11451  $as_echo_n "(cached) " >&6
11452else
11453  if test -n "$AWK"; then
11454  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11455else
11456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11457for as_dir in $PATH
11458do
11459  IFS=$as_save_IFS
11460  test -z "$as_dir" && as_dir=.
11461    for ac_exec_ext in '' $ac_executable_extensions; do
11462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11463    ac_cv_prog_AWK="$ac_prog"
11464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11465    break 2
11466  fi
11467done
11468  done
11469IFS=$as_save_IFS
11470
11471fi
11472fi
11473AWK=$ac_cv_prog_AWK
11474if test -n "$AWK"; then
11475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11476$as_echo "$AWK" >&6; }
11477else
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480fi
11481
11482
11483  test -n "$AWK" && break
11484done
11485
11486  else
11487    # The variable is set, but is it from the command line or the environment?
11488
11489    # Try to remove the string !AWK! from our list.
11490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11492      # If it failed, the variable was not from the command line. Ignore it,
11493      # but warn the user (except for BASH, which is always set by the calling BASH).
11494      if test "xAWK" != xBASH; then
11495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11496$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11497      fi
11498      # Try to locate tool using the code snippet
11499      for ac_prog in gawk mawk nawk awk
11500do
11501  # Extract the first word of "$ac_prog", so it can be a program name with args.
11502set dummy $ac_prog; ac_word=$2
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11504$as_echo_n "checking for $ac_word... " >&6; }
11505if ${ac_cv_prog_AWK+:} false; then :
11506  $as_echo_n "(cached) " >&6
11507else
11508  if test -n "$AWK"; then
11509  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11510else
11511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512for as_dir in $PATH
11513do
11514  IFS=$as_save_IFS
11515  test -z "$as_dir" && as_dir=.
11516    for ac_exec_ext in '' $ac_executable_extensions; do
11517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518    ac_cv_prog_AWK="$ac_prog"
11519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520    break 2
11521  fi
11522done
11523  done
11524IFS=$as_save_IFS
11525
11526fi
11527fi
11528AWK=$ac_cv_prog_AWK
11529if test -n "$AWK"; then
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11531$as_echo "$AWK" >&6; }
11532else
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
11535fi
11536
11537
11538  test -n "$AWK" && break
11539done
11540
11541    else
11542      # If it succeeded, then it was overridden by the user. We will use it
11543      # for the tool.
11544
11545      # First remove it from the list of overridden variables, so we can test
11546      # for unknown variables in the end.
11547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11548
11549      # Check if the provided tool contains a complete path.
11550      tool_specified="$AWK"
11551      tool_basename="${tool_specified##*/}"
11552      if test "x$tool_basename" = "x$tool_specified"; then
11553        # A command without a complete path is provided, search $PATH.
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11555$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11556        # Extract the first word of "$tool_basename", so it can be a program name with args.
11557set dummy $tool_basename; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_AWK+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $AWK in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586AWK=$ac_cv_path_AWK
11587if test -n "$AWK"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11589$as_echo "$AWK" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596        if test "x$AWK" = x; then
11597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11598        fi
11599      else
11600        # Otherwise we believe it is a complete path. Use it as it is.
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11602$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11604$as_echo_n "checking for AWK... " >&6; }
11605        if test ! -x "$tool_specified"; then
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11607$as_echo "not found" >&6; }
11608          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11609        fi
11610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11611$as_echo "$tool_specified" >&6; }
11612      fi
11613    fi
11614  fi
11615
11616
11617  if test "x$AWK" = x; then
11618    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11619  fi
11620
11621
11622
11623
11624  # Publish this variable in the help.
11625
11626
11627  if test "x$GREP" = x; then
11628    # The variable is not set by user, try to locate tool using the code snippet
11629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11630$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11631if ${ac_cv_path_GREP+:} false; then :
11632  $as_echo_n "(cached) " >&6
11633else
11634  if test -z "$GREP"; then
11635  ac_path_GREP_found=false
11636  # Loop through the user's path and test for each of PROGNAME-LIST
11637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11639do
11640  IFS=$as_save_IFS
11641  test -z "$as_dir" && as_dir=.
11642    for ac_prog in grep ggrep; do
11643    for ac_exec_ext in '' $ac_executable_extensions; do
11644      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11645      as_fn_executable_p "$ac_path_GREP" || continue
11646# Check for GNU ac_path_GREP and select it if it is found.
11647  # Check for GNU $ac_path_GREP
11648case `"$ac_path_GREP" --version 2>&1` in
11649*GNU*)
11650  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11651*)
11652  ac_count=0
11653  $as_echo_n 0123456789 >"conftest.in"
11654  while :
11655  do
11656    cat "conftest.in" "conftest.in" >"conftest.tmp"
11657    mv "conftest.tmp" "conftest.in"
11658    cp "conftest.in" "conftest.nl"
11659    $as_echo 'GREP' >> "conftest.nl"
11660    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11661    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11662    as_fn_arith $ac_count + 1 && ac_count=$as_val
11663    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11664      # Best one so far, save it but keep looking for a better one
11665      ac_cv_path_GREP="$ac_path_GREP"
11666      ac_path_GREP_max=$ac_count
11667    fi
11668    # 10*(2^10) chars as input seems more than enough
11669    test $ac_count -gt 10 && break
11670  done
11671  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11672esac
11673
11674      $ac_path_GREP_found && break 3
11675    done
11676  done
11677  done
11678IFS=$as_save_IFS
11679  if test -z "$ac_cv_path_GREP"; then
11680    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11681  fi
11682else
11683  ac_cv_path_GREP=$GREP
11684fi
11685
11686fi
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11688$as_echo "$ac_cv_path_GREP" >&6; }
11689 GREP="$ac_cv_path_GREP"
11690
11691
11692  else
11693    # The variable is set, but is it from the command line or the environment?
11694
11695    # Try to remove the string !GREP! from our list.
11696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11698      # If it failed, the variable was not from the command line. Ignore it,
11699      # but warn the user (except for BASH, which is always set by the calling BASH).
11700      if test "xGREP" != xBASH; then
11701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11702$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11703      fi
11704      # Try to locate tool using the code snippet
11705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11706$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11707if ${ac_cv_path_GREP+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  if test -z "$GREP"; then
11711  ac_path_GREP_found=false
11712  # Loop through the user's path and test for each of PROGNAME-LIST
11713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11715do
11716  IFS=$as_save_IFS
11717  test -z "$as_dir" && as_dir=.
11718    for ac_prog in grep ggrep; do
11719    for ac_exec_ext in '' $ac_executable_extensions; do
11720      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11721      as_fn_executable_p "$ac_path_GREP" || continue
11722# Check for GNU ac_path_GREP and select it if it is found.
11723  # Check for GNU $ac_path_GREP
11724case `"$ac_path_GREP" --version 2>&1` in
11725*GNU*)
11726  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11727*)
11728  ac_count=0
11729  $as_echo_n 0123456789 >"conftest.in"
11730  while :
11731  do
11732    cat "conftest.in" "conftest.in" >"conftest.tmp"
11733    mv "conftest.tmp" "conftest.in"
11734    cp "conftest.in" "conftest.nl"
11735    $as_echo 'GREP' >> "conftest.nl"
11736    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11737    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11738    as_fn_arith $ac_count + 1 && ac_count=$as_val
11739    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11740      # Best one so far, save it but keep looking for a better one
11741      ac_cv_path_GREP="$ac_path_GREP"
11742      ac_path_GREP_max=$ac_count
11743    fi
11744    # 10*(2^10) chars as input seems more than enough
11745    test $ac_count -gt 10 && break
11746  done
11747  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11748esac
11749
11750      $ac_path_GREP_found && break 3
11751    done
11752  done
11753  done
11754IFS=$as_save_IFS
11755  if test -z "$ac_cv_path_GREP"; then
11756    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11757  fi
11758else
11759  ac_cv_path_GREP=$GREP
11760fi
11761
11762fi
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11764$as_echo "$ac_cv_path_GREP" >&6; }
11765 GREP="$ac_cv_path_GREP"
11766
11767
11768    else
11769      # If it succeeded, then it was overridden by the user. We will use it
11770      # for the tool.
11771
11772      # First remove it from the list of overridden variables, so we can test
11773      # for unknown variables in the end.
11774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11775
11776      # Check if the provided tool contains a complete path.
11777      tool_specified="$GREP"
11778      tool_basename="${tool_specified##*/}"
11779      if test "x$tool_basename" = "x$tool_specified"; then
11780        # A command without a complete path is provided, search $PATH.
11781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11782$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11783        # Extract the first word of "$tool_basename", so it can be a program name with args.
11784set dummy $tool_basename; ac_word=$2
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11786$as_echo_n "checking for $ac_word... " >&6; }
11787if ${ac_cv_path_GREP+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  case $GREP in
11791  [\\/]* | ?:[\\/]*)
11792  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11793  ;;
11794  *)
11795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796for as_dir in $PATH
11797do
11798  IFS=$as_save_IFS
11799  test -z "$as_dir" && as_dir=.
11800    for ac_exec_ext in '' $ac_executable_extensions; do
11801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11802    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11804    break 2
11805  fi
11806done
11807  done
11808IFS=$as_save_IFS
11809
11810  ;;
11811esac
11812fi
11813GREP=$ac_cv_path_GREP
11814if test -n "$GREP"; then
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11816$as_echo "$GREP" >&6; }
11817else
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
11820fi
11821
11822
11823        if test "x$GREP" = x; then
11824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11825        fi
11826      else
11827        # Otherwise we believe it is a complete path. Use it as it is.
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11829$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11831$as_echo_n "checking for GREP... " >&6; }
11832        if test ! -x "$tool_specified"; then
11833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11834$as_echo "not found" >&6; }
11835          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11836        fi
11837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11838$as_echo "$tool_specified" >&6; }
11839      fi
11840    fi
11841  fi
11842
11843
11844  if test "x$GREP" = x; then
11845    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11846  fi
11847
11848
11849
11850
11851  # Publish this variable in the help.
11852
11853
11854  if test "x$EGREP" = x; then
11855    # The variable is not set by user, try to locate tool using the code snippet
11856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11857$as_echo_n "checking for egrep... " >&6; }
11858if ${ac_cv_path_EGREP+:} false; then :
11859  $as_echo_n "(cached) " >&6
11860else
11861  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11862   then ac_cv_path_EGREP="$GREP -E"
11863   else
11864     if test -z "$EGREP"; then
11865  ac_path_EGREP_found=false
11866  # Loop through the user's path and test for each of PROGNAME-LIST
11867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11868for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11869do
11870  IFS=$as_save_IFS
11871  test -z "$as_dir" && as_dir=.
11872    for ac_prog in egrep; do
11873    for ac_exec_ext in '' $ac_executable_extensions; do
11874      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11875      as_fn_executable_p "$ac_path_EGREP" || continue
11876# Check for GNU ac_path_EGREP and select it if it is found.
11877  # Check for GNU $ac_path_EGREP
11878case `"$ac_path_EGREP" --version 2>&1` in
11879*GNU*)
11880  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11881*)
11882  ac_count=0
11883  $as_echo_n 0123456789 >"conftest.in"
11884  while :
11885  do
11886    cat "conftest.in" "conftest.in" >"conftest.tmp"
11887    mv "conftest.tmp" "conftest.in"
11888    cp "conftest.in" "conftest.nl"
11889    $as_echo 'EGREP' >> "conftest.nl"
11890    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11891    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11892    as_fn_arith $ac_count + 1 && ac_count=$as_val
11893    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11894      # Best one so far, save it but keep looking for a better one
11895      ac_cv_path_EGREP="$ac_path_EGREP"
11896      ac_path_EGREP_max=$ac_count
11897    fi
11898    # 10*(2^10) chars as input seems more than enough
11899    test $ac_count -gt 10 && break
11900  done
11901  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11902esac
11903
11904      $ac_path_EGREP_found && break 3
11905    done
11906  done
11907  done
11908IFS=$as_save_IFS
11909  if test -z "$ac_cv_path_EGREP"; then
11910    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11911  fi
11912else
11913  ac_cv_path_EGREP=$EGREP
11914fi
11915
11916   fi
11917fi
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11919$as_echo "$ac_cv_path_EGREP" >&6; }
11920 EGREP="$ac_cv_path_EGREP"
11921
11922
11923  else
11924    # The variable is set, but is it from the command line or the environment?
11925
11926    # Try to remove the string !EGREP! from our list.
11927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11929      # If it failed, the variable was not from the command line. Ignore it,
11930      # but warn the user (except for BASH, which is always set by the calling BASH).
11931      if test "xEGREP" != xBASH; then
11932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11933$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11934      fi
11935      # Try to locate tool using the code snippet
11936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11937$as_echo_n "checking for egrep... " >&6; }
11938if ${ac_cv_path_EGREP+:} false; then :
11939  $as_echo_n "(cached) " >&6
11940else
11941  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11942   then ac_cv_path_EGREP="$GREP -E"
11943   else
11944     if test -z "$EGREP"; then
11945  ac_path_EGREP_found=false
11946  # Loop through the user's path and test for each of PROGNAME-LIST
11947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11948for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11949do
11950  IFS=$as_save_IFS
11951  test -z "$as_dir" && as_dir=.
11952    for ac_prog in egrep; do
11953    for ac_exec_ext in '' $ac_executable_extensions; do
11954      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11955      as_fn_executable_p "$ac_path_EGREP" || continue
11956# Check for GNU ac_path_EGREP and select it if it is found.
11957  # Check for GNU $ac_path_EGREP
11958case `"$ac_path_EGREP" --version 2>&1` in
11959*GNU*)
11960  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11961*)
11962  ac_count=0
11963  $as_echo_n 0123456789 >"conftest.in"
11964  while :
11965  do
11966    cat "conftest.in" "conftest.in" >"conftest.tmp"
11967    mv "conftest.tmp" "conftest.in"
11968    cp "conftest.in" "conftest.nl"
11969    $as_echo 'EGREP' >> "conftest.nl"
11970    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11971    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11972    as_fn_arith $ac_count + 1 && ac_count=$as_val
11973    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11974      # Best one so far, save it but keep looking for a better one
11975      ac_cv_path_EGREP="$ac_path_EGREP"
11976      ac_path_EGREP_max=$ac_count
11977    fi
11978    # 10*(2^10) chars as input seems more than enough
11979    test $ac_count -gt 10 && break
11980  done
11981  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11982esac
11983
11984      $ac_path_EGREP_found && break 3
11985    done
11986  done
11987  done
11988IFS=$as_save_IFS
11989  if test -z "$ac_cv_path_EGREP"; then
11990    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11991  fi
11992else
11993  ac_cv_path_EGREP=$EGREP
11994fi
11995
11996   fi
11997fi
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11999$as_echo "$ac_cv_path_EGREP" >&6; }
12000 EGREP="$ac_cv_path_EGREP"
12001
12002
12003    else
12004      # If it succeeded, then it was overridden by the user. We will use it
12005      # for the tool.
12006
12007      # First remove it from the list of overridden variables, so we can test
12008      # for unknown variables in the end.
12009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12010
12011      # Check if the provided tool contains a complete path.
12012      tool_specified="$EGREP"
12013      tool_basename="${tool_specified##*/}"
12014      if test "x$tool_basename" = "x$tool_specified"; then
12015        # A command without a complete path is provided, search $PATH.
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12017$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12018        # Extract the first word of "$tool_basename", so it can be a program name with args.
12019set dummy $tool_basename; ac_word=$2
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021$as_echo_n "checking for $ac_word... " >&6; }
12022if ${ac_cv_path_EGREP+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  case $EGREP in
12026  [\\/]* | ?:[\\/]*)
12027  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12028  ;;
12029  *)
12030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031for as_dir in $PATH
12032do
12033  IFS=$as_save_IFS
12034  test -z "$as_dir" && as_dir=.
12035    for ac_exec_ext in '' $ac_executable_extensions; do
12036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12037    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039    break 2
12040  fi
12041done
12042  done
12043IFS=$as_save_IFS
12044
12045  ;;
12046esac
12047fi
12048EGREP=$ac_cv_path_EGREP
12049if test -n "$EGREP"; then
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12051$as_echo "$EGREP" >&6; }
12052else
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055fi
12056
12057
12058        if test "x$EGREP" = x; then
12059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12060        fi
12061      else
12062        # Otherwise we believe it is a complete path. Use it as it is.
12063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12064$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12066$as_echo_n "checking for EGREP... " >&6; }
12067        if test ! -x "$tool_specified"; then
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12069$as_echo "not found" >&6; }
12070          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12071        fi
12072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12073$as_echo "$tool_specified" >&6; }
12074      fi
12075    fi
12076  fi
12077
12078
12079  if test "x$EGREP" = x; then
12080    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12081  fi
12082
12083
12084
12085
12086  # Publish this variable in the help.
12087
12088
12089  if test "x$FGREP" = x; then
12090    # The variable is not set by user, try to locate tool using the code snippet
12091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12092$as_echo_n "checking for fgrep... " >&6; }
12093if ${ac_cv_path_FGREP+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12097   then ac_cv_path_FGREP="$GREP -F"
12098   else
12099     if test -z "$FGREP"; then
12100  ac_path_FGREP_found=false
12101  # Loop through the user's path and test for each of PROGNAME-LIST
12102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12103for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12104do
12105  IFS=$as_save_IFS
12106  test -z "$as_dir" && as_dir=.
12107    for ac_prog in fgrep; do
12108    for ac_exec_ext in '' $ac_executable_extensions; do
12109      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12110      as_fn_executable_p "$ac_path_FGREP" || continue
12111# Check for GNU ac_path_FGREP and select it if it is found.
12112  # Check for GNU $ac_path_FGREP
12113case `"$ac_path_FGREP" --version 2>&1` in
12114*GNU*)
12115  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12116*)
12117  ac_count=0
12118  $as_echo_n 0123456789 >"conftest.in"
12119  while :
12120  do
12121    cat "conftest.in" "conftest.in" >"conftest.tmp"
12122    mv "conftest.tmp" "conftest.in"
12123    cp "conftest.in" "conftest.nl"
12124    $as_echo 'FGREP' >> "conftest.nl"
12125    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12126    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12127    as_fn_arith $ac_count + 1 && ac_count=$as_val
12128    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12129      # Best one so far, save it but keep looking for a better one
12130      ac_cv_path_FGREP="$ac_path_FGREP"
12131      ac_path_FGREP_max=$ac_count
12132    fi
12133    # 10*(2^10) chars as input seems more than enough
12134    test $ac_count -gt 10 && break
12135  done
12136  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12137esac
12138
12139      $ac_path_FGREP_found && break 3
12140    done
12141  done
12142  done
12143IFS=$as_save_IFS
12144  if test -z "$ac_cv_path_FGREP"; then
12145    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12146  fi
12147else
12148  ac_cv_path_FGREP=$FGREP
12149fi
12150
12151   fi
12152fi
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12154$as_echo "$ac_cv_path_FGREP" >&6; }
12155 FGREP="$ac_cv_path_FGREP"
12156
12157
12158  else
12159    # The variable is set, but is it from the command line or the environment?
12160
12161    # Try to remove the string !FGREP! from our list.
12162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12164      # If it failed, the variable was not from the command line. Ignore it,
12165      # but warn the user (except for BASH, which is always set by the calling BASH).
12166      if test "xFGREP" != xBASH; then
12167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12168$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12169      fi
12170      # Try to locate tool using the code snippet
12171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12172$as_echo_n "checking for fgrep... " >&6; }
12173if ${ac_cv_path_FGREP+:} false; then :
12174  $as_echo_n "(cached) " >&6
12175else
12176  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12177   then ac_cv_path_FGREP="$GREP -F"
12178   else
12179     if test -z "$FGREP"; then
12180  ac_path_FGREP_found=false
12181  # Loop through the user's path and test for each of PROGNAME-LIST
12182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12183for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12184do
12185  IFS=$as_save_IFS
12186  test -z "$as_dir" && as_dir=.
12187    for ac_prog in fgrep; do
12188    for ac_exec_ext in '' $ac_executable_extensions; do
12189      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12190      as_fn_executable_p "$ac_path_FGREP" || continue
12191# Check for GNU ac_path_FGREP and select it if it is found.
12192  # Check for GNU $ac_path_FGREP
12193case `"$ac_path_FGREP" --version 2>&1` in
12194*GNU*)
12195  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12196*)
12197  ac_count=0
12198  $as_echo_n 0123456789 >"conftest.in"
12199  while :
12200  do
12201    cat "conftest.in" "conftest.in" >"conftest.tmp"
12202    mv "conftest.tmp" "conftest.in"
12203    cp "conftest.in" "conftest.nl"
12204    $as_echo 'FGREP' >> "conftest.nl"
12205    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12206    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12207    as_fn_arith $ac_count + 1 && ac_count=$as_val
12208    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12209      # Best one so far, save it but keep looking for a better one
12210      ac_cv_path_FGREP="$ac_path_FGREP"
12211      ac_path_FGREP_max=$ac_count
12212    fi
12213    # 10*(2^10) chars as input seems more than enough
12214    test $ac_count -gt 10 && break
12215  done
12216  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12217esac
12218
12219      $ac_path_FGREP_found && break 3
12220    done
12221  done
12222  done
12223IFS=$as_save_IFS
12224  if test -z "$ac_cv_path_FGREP"; then
12225    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12226  fi
12227else
12228  ac_cv_path_FGREP=$FGREP
12229fi
12230
12231   fi
12232fi
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12234$as_echo "$ac_cv_path_FGREP" >&6; }
12235 FGREP="$ac_cv_path_FGREP"
12236
12237
12238    else
12239      # If it succeeded, then it was overridden by the user. We will use it
12240      # for the tool.
12241
12242      # First remove it from the list of overridden variables, so we can test
12243      # for unknown variables in the end.
12244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12245
12246      # Check if the provided tool contains a complete path.
12247      tool_specified="$FGREP"
12248      tool_basename="${tool_specified##*/}"
12249      if test "x$tool_basename" = "x$tool_specified"; then
12250        # A command without a complete path is provided, search $PATH.
12251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12252$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12253        # Extract the first word of "$tool_basename", so it can be a program name with args.
12254set dummy $tool_basename; ac_word=$2
12255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12256$as_echo_n "checking for $ac_word... " >&6; }
12257if ${ac_cv_path_FGREP+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260  case $FGREP in
12261  [\\/]* | ?:[\\/]*)
12262  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12263  ;;
12264  *)
12265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12266for as_dir in $PATH
12267do
12268  IFS=$as_save_IFS
12269  test -z "$as_dir" && as_dir=.
12270    for ac_exec_ext in '' $ac_executable_extensions; do
12271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12272    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12274    break 2
12275  fi
12276done
12277  done
12278IFS=$as_save_IFS
12279
12280  ;;
12281esac
12282fi
12283FGREP=$ac_cv_path_FGREP
12284if test -n "$FGREP"; then
12285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12286$as_echo "$FGREP" >&6; }
12287else
12288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12289$as_echo "no" >&6; }
12290fi
12291
12292
12293        if test "x$FGREP" = x; then
12294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12295        fi
12296      else
12297        # Otherwise we believe it is a complete path. Use it as it is.
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12299$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12301$as_echo_n "checking for FGREP... " >&6; }
12302        if test ! -x "$tool_specified"; then
12303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12304$as_echo "not found" >&6; }
12305          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12306        fi
12307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12308$as_echo "$tool_specified" >&6; }
12309      fi
12310    fi
12311  fi
12312
12313
12314  if test "x$FGREP" = x; then
12315    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12316  fi
12317
12318
12319
12320
12321  # Publish this variable in the help.
12322
12323
12324  if test "x$SED" = x; then
12325    # The variable is not set by user, try to locate tool using the code snippet
12326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12327$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12328if ${ac_cv_path_SED+:} false; then :
12329  $as_echo_n "(cached) " >&6
12330else
12331            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12332     for ac_i in 1 2 3 4 5 6 7; do
12333       ac_script="$ac_script$as_nl$ac_script"
12334     done
12335     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12336     { ac_script=; unset ac_script;}
12337     if test -z "$SED"; then
12338  ac_path_SED_found=false
12339  # Loop through the user's path and test for each of PROGNAME-LIST
12340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341for as_dir in $PATH
12342do
12343  IFS=$as_save_IFS
12344  test -z "$as_dir" && as_dir=.
12345    for ac_prog in sed gsed; do
12346    for ac_exec_ext in '' $ac_executable_extensions; do
12347      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12348      as_fn_executable_p "$ac_path_SED" || continue
12349# Check for GNU ac_path_SED and select it if it is found.
12350  # Check for GNU $ac_path_SED
12351case `"$ac_path_SED" --version 2>&1` in
12352*GNU*)
12353  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12354*)
12355  ac_count=0
12356  $as_echo_n 0123456789 >"conftest.in"
12357  while :
12358  do
12359    cat "conftest.in" "conftest.in" >"conftest.tmp"
12360    mv "conftest.tmp" "conftest.in"
12361    cp "conftest.in" "conftest.nl"
12362    $as_echo '' >> "conftest.nl"
12363    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12364    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12365    as_fn_arith $ac_count + 1 && ac_count=$as_val
12366    if test $ac_count -gt ${ac_path_SED_max-0}; then
12367      # Best one so far, save it but keep looking for a better one
12368      ac_cv_path_SED="$ac_path_SED"
12369      ac_path_SED_max=$ac_count
12370    fi
12371    # 10*(2^10) chars as input seems more than enough
12372    test $ac_count -gt 10 && break
12373  done
12374  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12375esac
12376
12377      $ac_path_SED_found && break 3
12378    done
12379  done
12380  done
12381IFS=$as_save_IFS
12382  if test -z "$ac_cv_path_SED"; then
12383    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12384  fi
12385else
12386  ac_cv_path_SED=$SED
12387fi
12388
12389fi
12390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12391$as_echo "$ac_cv_path_SED" >&6; }
12392 SED="$ac_cv_path_SED"
12393  rm -f conftest.sed
12394
12395  else
12396    # The variable is set, but is it from the command line or the environment?
12397
12398    # Try to remove the string !SED! from our list.
12399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12401      # If it failed, the variable was not from the command line. Ignore it,
12402      # but warn the user (except for BASH, which is always set by the calling BASH).
12403      if test "xSED" != xBASH; then
12404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12405$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12406      fi
12407      # Try to locate tool using the code snippet
12408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12409$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12410if ${ac_cv_path_SED+:} false; then :
12411  $as_echo_n "(cached) " >&6
12412else
12413            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12414     for ac_i in 1 2 3 4 5 6 7; do
12415       ac_script="$ac_script$as_nl$ac_script"
12416     done
12417     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12418     { ac_script=; unset ac_script;}
12419     if test -z "$SED"; then
12420  ac_path_SED_found=false
12421  # Loop through the user's path and test for each of PROGNAME-LIST
12422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH
12424do
12425  IFS=$as_save_IFS
12426  test -z "$as_dir" && as_dir=.
12427    for ac_prog in sed gsed; do
12428    for ac_exec_ext in '' $ac_executable_extensions; do
12429      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12430      as_fn_executable_p "$ac_path_SED" || continue
12431# Check for GNU ac_path_SED and select it if it is found.
12432  # Check for GNU $ac_path_SED
12433case `"$ac_path_SED" --version 2>&1` in
12434*GNU*)
12435  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12436*)
12437  ac_count=0
12438  $as_echo_n 0123456789 >"conftest.in"
12439  while :
12440  do
12441    cat "conftest.in" "conftest.in" >"conftest.tmp"
12442    mv "conftest.tmp" "conftest.in"
12443    cp "conftest.in" "conftest.nl"
12444    $as_echo '' >> "conftest.nl"
12445    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12446    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12447    as_fn_arith $ac_count + 1 && ac_count=$as_val
12448    if test $ac_count -gt ${ac_path_SED_max-0}; then
12449      # Best one so far, save it but keep looking for a better one
12450      ac_cv_path_SED="$ac_path_SED"
12451      ac_path_SED_max=$ac_count
12452    fi
12453    # 10*(2^10) chars as input seems more than enough
12454    test $ac_count -gt 10 && break
12455  done
12456  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12457esac
12458
12459      $ac_path_SED_found && break 3
12460    done
12461  done
12462  done
12463IFS=$as_save_IFS
12464  if test -z "$ac_cv_path_SED"; then
12465    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12466  fi
12467else
12468  ac_cv_path_SED=$SED
12469fi
12470
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12473$as_echo "$ac_cv_path_SED" >&6; }
12474 SED="$ac_cv_path_SED"
12475  rm -f conftest.sed
12476
12477    else
12478      # If it succeeded, then it was overridden by the user. We will use it
12479      # for the tool.
12480
12481      # First remove it from the list of overridden variables, so we can test
12482      # for unknown variables in the end.
12483      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12484
12485      # Check if the provided tool contains a complete path.
12486      tool_specified="$SED"
12487      tool_basename="${tool_specified##*/}"
12488      if test "x$tool_basename" = "x$tool_specified"; then
12489        # A command without a complete path is provided, search $PATH.
12490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12491$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12492        # Extract the first word of "$tool_basename", so it can be a program name with args.
12493set dummy $tool_basename; ac_word=$2
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12495$as_echo_n "checking for $ac_word... " >&6; }
12496if ${ac_cv_path_SED+:} false; then :
12497  $as_echo_n "(cached) " >&6
12498else
12499  case $SED in
12500  [\\/]* | ?:[\\/]*)
12501  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12502  ;;
12503  *)
12504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12505for as_dir in $PATH
12506do
12507  IFS=$as_save_IFS
12508  test -z "$as_dir" && as_dir=.
12509    for ac_exec_ext in '' $ac_executable_extensions; do
12510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12511    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12513    break 2
12514  fi
12515done
12516  done
12517IFS=$as_save_IFS
12518
12519  ;;
12520esac
12521fi
12522SED=$ac_cv_path_SED
12523if test -n "$SED"; then
12524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12525$as_echo "$SED" >&6; }
12526else
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528$as_echo "no" >&6; }
12529fi
12530
12531
12532        if test "x$SED" = x; then
12533          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12534        fi
12535      else
12536        # Otherwise we believe it is a complete path. Use it as it is.
12537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12538$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12540$as_echo_n "checking for SED... " >&6; }
12541        if test ! -x "$tool_specified"; then
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12543$as_echo "not found" >&6; }
12544          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12545        fi
12546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12547$as_echo "$tool_specified" >&6; }
12548      fi
12549    fi
12550  fi
12551
12552
12553  if test "x$SED" = x; then
12554    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12555  fi
12556
12557
12558
12559  # Always force rm.
12560  RM="$RM -f"
12561
12562  # pwd behaves differently on various platforms and some don't support the -L flag.
12563  # Always use the bash builtin pwd to get uniform behavior.
12564  THEPWDCMD=pwd
12565
12566  # These are not required on all platforms
12567
12568
12569  # Publish this variable in the help.
12570
12571
12572  if test "x$CYGPATH" = x; then
12573    # The variable is not set by user, try to locate tool using the code snippet
12574    for ac_prog in cygpath
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_CYGPATH+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $CYGPATH in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606CYGPATH=$ac_cv_path_CYGPATH
12607if test -n "$CYGPATH"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12609$as_echo "$CYGPATH" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$CYGPATH" && break
12617done
12618
12619  else
12620    # The variable is set, but is it from the command line or the environment?
12621
12622    # Try to remove the string !CYGPATH! from our list.
12623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12625      # If it failed, the variable was not from the command line. Ignore it,
12626      # but warn the user (except for BASH, which is always set by the calling BASH).
12627      if test "xCYGPATH" != xBASH; then
12628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12629$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12630      fi
12631      # Try to locate tool using the code snippet
12632      for ac_prog in cygpath
12633do
12634  # Extract the first word of "$ac_prog", so it can be a program name with args.
12635set dummy $ac_prog; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_CYGPATH+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $CYGPATH in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664CYGPATH=$ac_cv_path_CYGPATH
12665if test -n "$CYGPATH"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12667$as_echo "$CYGPATH" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674  test -n "$CYGPATH" && break
12675done
12676
12677    else
12678      # If it succeeded, then it was overridden by the user. We will use it
12679      # for the tool.
12680
12681      # First remove it from the list of overridden variables, so we can test
12682      # for unknown variables in the end.
12683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12684
12685      # Check if the provided tool contains a complete path.
12686      tool_specified="$CYGPATH"
12687      tool_basename="${tool_specified##*/}"
12688      if test "x$tool_basename" = "x$tool_specified"; then
12689        # A command without a complete path is provided, search $PATH.
12690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12691$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12692        # Extract the first word of "$tool_basename", so it can be a program name with args.
12693set dummy $tool_basename; ac_word=$2
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12695$as_echo_n "checking for $ac_word... " >&6; }
12696if ${ac_cv_path_CYGPATH+:} false; then :
12697  $as_echo_n "(cached) " >&6
12698else
12699  case $CYGPATH in
12700  [\\/]* | ?:[\\/]*)
12701  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12702  ;;
12703  *)
12704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12705for as_dir in $PATH
12706do
12707  IFS=$as_save_IFS
12708  test -z "$as_dir" && as_dir=.
12709    for ac_exec_ext in '' $ac_executable_extensions; do
12710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12711    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12713    break 2
12714  fi
12715done
12716  done
12717IFS=$as_save_IFS
12718
12719  ;;
12720esac
12721fi
12722CYGPATH=$ac_cv_path_CYGPATH
12723if test -n "$CYGPATH"; then
12724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12725$as_echo "$CYGPATH" >&6; }
12726else
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
12729fi
12730
12731
12732        if test "x$CYGPATH" = x; then
12733          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12734        fi
12735      else
12736        # Otherwise we believe it is a complete path. Use it as it is.
12737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12738$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12740$as_echo_n "checking for CYGPATH... " >&6; }
12741        if test ! -x "$tool_specified"; then
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12743$as_echo "not found" >&6; }
12744          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12745        fi
12746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12747$as_echo "$tool_specified" >&6; }
12748      fi
12749    fi
12750  fi
12751
12752
12753
12754
12755  # Publish this variable in the help.
12756
12757
12758  if test "x$READLINK" = x; then
12759    # The variable is not set by user, try to locate tool using the code snippet
12760    for ac_prog in greadlink readlink
12761do
12762  # Extract the first word of "$ac_prog", so it can be a program name with args.
12763set dummy $ac_prog; ac_word=$2
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12765$as_echo_n "checking for $ac_word... " >&6; }
12766if ${ac_cv_path_READLINK+:} false; then :
12767  $as_echo_n "(cached) " >&6
12768else
12769  case $READLINK in
12770  [\\/]* | ?:[\\/]*)
12771  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12772  ;;
12773  *)
12774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12775for as_dir in $PATH
12776do
12777  IFS=$as_save_IFS
12778  test -z "$as_dir" && as_dir=.
12779    for ac_exec_ext in '' $ac_executable_extensions; do
12780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12781    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12783    break 2
12784  fi
12785done
12786  done
12787IFS=$as_save_IFS
12788
12789  ;;
12790esac
12791fi
12792READLINK=$ac_cv_path_READLINK
12793if test -n "$READLINK"; then
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12795$as_echo "$READLINK" >&6; }
12796else
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12798$as_echo "no" >&6; }
12799fi
12800
12801
12802  test -n "$READLINK" && break
12803done
12804
12805  else
12806    # The variable is set, but is it from the command line or the environment?
12807
12808    # Try to remove the string !READLINK! from our list.
12809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12811      # If it failed, the variable was not from the command line. Ignore it,
12812      # but warn the user (except for BASH, which is always set by the calling BASH).
12813      if test "xREADLINK" != xBASH; then
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12815$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12816      fi
12817      # Try to locate tool using the code snippet
12818      for ac_prog in greadlink readlink
12819do
12820  # Extract the first word of "$ac_prog", so it can be a program name with args.
12821set dummy $ac_prog; ac_word=$2
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12823$as_echo_n "checking for $ac_word... " >&6; }
12824if ${ac_cv_path_READLINK+:} false; then :
12825  $as_echo_n "(cached) " >&6
12826else
12827  case $READLINK in
12828  [\\/]* | ?:[\\/]*)
12829  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12830  ;;
12831  *)
12832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12833for as_dir in $PATH
12834do
12835  IFS=$as_save_IFS
12836  test -z "$as_dir" && as_dir=.
12837    for ac_exec_ext in '' $ac_executable_extensions; do
12838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12839    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12841    break 2
12842  fi
12843done
12844  done
12845IFS=$as_save_IFS
12846
12847  ;;
12848esac
12849fi
12850READLINK=$ac_cv_path_READLINK
12851if test -n "$READLINK"; then
12852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12853$as_echo "$READLINK" >&6; }
12854else
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12856$as_echo "no" >&6; }
12857fi
12858
12859
12860  test -n "$READLINK" && break
12861done
12862
12863    else
12864      # If it succeeded, then it was overridden by the user. We will use it
12865      # for the tool.
12866
12867      # First remove it from the list of overridden variables, so we can test
12868      # for unknown variables in the end.
12869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12870
12871      # Check if the provided tool contains a complete path.
12872      tool_specified="$READLINK"
12873      tool_basename="${tool_specified##*/}"
12874      if test "x$tool_basename" = "x$tool_specified"; then
12875        # A command without a complete path is provided, search $PATH.
12876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12877$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12878        # Extract the first word of "$tool_basename", so it can be a program name with args.
12879set dummy $tool_basename; ac_word=$2
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12881$as_echo_n "checking for $ac_word... " >&6; }
12882if ${ac_cv_path_READLINK+:} false; then :
12883  $as_echo_n "(cached) " >&6
12884else
12885  case $READLINK in
12886  [\\/]* | ?:[\\/]*)
12887  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12888  ;;
12889  *)
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_exec_ext in '' $ac_executable_extensions; do
12896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12897    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12899    break 2
12900  fi
12901done
12902  done
12903IFS=$as_save_IFS
12904
12905  ;;
12906esac
12907fi
12908READLINK=$ac_cv_path_READLINK
12909if test -n "$READLINK"; then
12910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12911$as_echo "$READLINK" >&6; }
12912else
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12914$as_echo "no" >&6; }
12915fi
12916
12917
12918        if test "x$READLINK" = x; then
12919          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12920        fi
12921      else
12922        # Otherwise we believe it is a complete path. Use it as it is.
12923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12924$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12926$as_echo_n "checking for READLINK... " >&6; }
12927        if test ! -x "$tool_specified"; then
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12929$as_echo "not found" >&6; }
12930          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12931        fi
12932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12933$as_echo "$tool_specified" >&6; }
12934      fi
12935    fi
12936  fi
12937
12938
12939
12940
12941  # Publish this variable in the help.
12942
12943
12944  if test "x$DF" = x; then
12945    # The variable is not set by user, try to locate tool using the code snippet
12946    for ac_prog in df
12947do
12948  # Extract the first word of "$ac_prog", so it can be a program name with args.
12949set dummy $ac_prog; ac_word=$2
12950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12951$as_echo_n "checking for $ac_word... " >&6; }
12952if ${ac_cv_path_DF+:} false; then :
12953  $as_echo_n "(cached) " >&6
12954else
12955  case $DF in
12956  [\\/]* | ?:[\\/]*)
12957  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12958  ;;
12959  *)
12960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12961for as_dir in $PATH
12962do
12963  IFS=$as_save_IFS
12964  test -z "$as_dir" && as_dir=.
12965    for ac_exec_ext in '' $ac_executable_extensions; do
12966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12967    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12969    break 2
12970  fi
12971done
12972  done
12973IFS=$as_save_IFS
12974
12975  ;;
12976esac
12977fi
12978DF=$ac_cv_path_DF
12979if test -n "$DF"; then
12980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12981$as_echo "$DF" >&6; }
12982else
12983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12984$as_echo "no" >&6; }
12985fi
12986
12987
12988  test -n "$DF" && break
12989done
12990
12991  else
12992    # The variable is set, but is it from the command line or the environment?
12993
12994    # Try to remove the string !DF! from our list.
12995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12997      # If it failed, the variable was not from the command line. Ignore it,
12998      # but warn the user (except for BASH, which is always set by the calling BASH).
12999      if test "xDF" != xBASH; then
13000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13001$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13002      fi
13003      # Try to locate tool using the code snippet
13004      for ac_prog in df
13005do
13006  # Extract the first word of "$ac_prog", so it can be a program name with args.
13007set dummy $ac_prog; ac_word=$2
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009$as_echo_n "checking for $ac_word... " >&6; }
13010if ${ac_cv_path_DF+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $DF in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13016  ;;
13017  *)
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_exec_ext in '' $ac_executable_extensions; do
13024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027    break 2
13028  fi
13029done
13030  done
13031IFS=$as_save_IFS
13032
13033  ;;
13034esac
13035fi
13036DF=$ac_cv_path_DF
13037if test -n "$DF"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13039$as_echo "$DF" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046  test -n "$DF" && break
13047done
13048
13049    else
13050      # If it succeeded, then it was overridden by the user. We will use it
13051      # for the tool.
13052
13053      # First remove it from the list of overridden variables, so we can test
13054      # for unknown variables in the end.
13055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13056
13057      # Check if the provided tool contains a complete path.
13058      tool_specified="$DF"
13059      tool_basename="${tool_specified##*/}"
13060      if test "x$tool_basename" = "x$tool_specified"; then
13061        # A command without a complete path is provided, search $PATH.
13062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13063$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13064        # Extract the first word of "$tool_basename", so it can be a program name with args.
13065set dummy $tool_basename; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_DF+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $DF in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094DF=$ac_cv_path_DF
13095if test -n "$DF"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13097$as_echo "$DF" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104        if test "x$DF" = x; then
13105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13106        fi
13107      else
13108        # Otherwise we believe it is a complete path. Use it as it is.
13109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13110$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13112$as_echo_n "checking for DF... " >&6; }
13113        if test ! -x "$tool_specified"; then
13114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13115$as_echo "not found" >&6; }
13116          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13117        fi
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13119$as_echo "$tool_specified" >&6; }
13120      fi
13121    fi
13122  fi
13123
13124
13125
13126
13127  # Publish this variable in the help.
13128
13129
13130  if test "x$CPIO" = x; then
13131    # The variable is not set by user, try to locate tool using the code snippet
13132    for ac_prog in cpio bsdcpio
13133do
13134  # Extract the first word of "$ac_prog", so it can be a program name with args.
13135set dummy $ac_prog; ac_word=$2
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if ${ac_cv_path_CPIO+:} false; then :
13139  $as_echo_n "(cached) " >&6
13140else
13141  case $CPIO in
13142  [\\/]* | ?:[\\/]*)
13143  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13144  ;;
13145  *)
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_exec_ext in '' $ac_executable_extensions; do
13152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155    break 2
13156  fi
13157done
13158  done
13159IFS=$as_save_IFS
13160
13161  ;;
13162esac
13163fi
13164CPIO=$ac_cv_path_CPIO
13165if test -n "$CPIO"; then
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13167$as_echo "$CPIO" >&6; }
13168else
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
13171fi
13172
13173
13174  test -n "$CPIO" && break
13175done
13176
13177  else
13178    # The variable is set, but is it from the command line or the environment?
13179
13180    # Try to remove the string !CPIO! from our list.
13181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13183      # If it failed, the variable was not from the command line. Ignore it,
13184      # but warn the user (except for BASH, which is always set by the calling BASH).
13185      if test "xCPIO" != xBASH; then
13186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13187$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13188      fi
13189      # Try to locate tool using the code snippet
13190      for ac_prog in cpio bsdcpio
13191do
13192  # Extract the first word of "$ac_prog", so it can be a program name with args.
13193set dummy $ac_prog; ac_word=$2
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13195$as_echo_n "checking for $ac_word... " >&6; }
13196if ${ac_cv_path_CPIO+:} false; then :
13197  $as_echo_n "(cached) " >&6
13198else
13199  case $CPIO in
13200  [\\/]* | ?:[\\/]*)
13201  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13202  ;;
13203  *)
13204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13205for as_dir in $PATH
13206do
13207  IFS=$as_save_IFS
13208  test -z "$as_dir" && as_dir=.
13209    for ac_exec_ext in '' $ac_executable_extensions; do
13210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13211    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13213    break 2
13214  fi
13215done
13216  done
13217IFS=$as_save_IFS
13218
13219  ;;
13220esac
13221fi
13222CPIO=$ac_cv_path_CPIO
13223if test -n "$CPIO"; then
13224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13225$as_echo "$CPIO" >&6; }
13226else
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228$as_echo "no" >&6; }
13229fi
13230
13231
13232  test -n "$CPIO" && break
13233done
13234
13235    else
13236      # If it succeeded, then it was overridden by the user. We will use it
13237      # for the tool.
13238
13239      # First remove it from the list of overridden variables, so we can test
13240      # for unknown variables in the end.
13241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13242
13243      # Check if the provided tool contains a complete path.
13244      tool_specified="$CPIO"
13245      tool_basename="${tool_specified##*/}"
13246      if test "x$tool_basename" = "x$tool_specified"; then
13247        # A command without a complete path is provided, search $PATH.
13248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13249$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13250        # Extract the first word of "$tool_basename", so it can be a program name with args.
13251set dummy $tool_basename; ac_word=$2
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253$as_echo_n "checking for $ac_word... " >&6; }
13254if ${ac_cv_path_CPIO+:} false; then :
13255  $as_echo_n "(cached) " >&6
13256else
13257  case $CPIO in
13258  [\\/]* | ?:[\\/]*)
13259  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13260  ;;
13261  *)
13262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265  IFS=$as_save_IFS
13266  test -z "$as_dir" && as_dir=.
13267    for ac_exec_ext in '' $ac_executable_extensions; do
13268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271    break 2
13272  fi
13273done
13274  done
13275IFS=$as_save_IFS
13276
13277  ;;
13278esac
13279fi
13280CPIO=$ac_cv_path_CPIO
13281if test -n "$CPIO"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13283$as_echo "$CPIO" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290        if test "x$CPIO" = x; then
13291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13292        fi
13293      else
13294        # Otherwise we believe it is a complete path. Use it as it is.
13295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13296$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13298$as_echo_n "checking for CPIO... " >&6; }
13299        if test ! -x "$tool_specified"; then
13300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13301$as_echo "not found" >&6; }
13302          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13303        fi
13304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13305$as_echo "$tool_specified" >&6; }
13306      fi
13307    fi
13308  fi
13309
13310
13311
13312
13313# Now we can determine OpenJDK build and target platforms. This is required to
13314# have early on.
13315# Make sure we can run config.sub.
13316$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13317  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13318
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13320$as_echo_n "checking build system type... " >&6; }
13321if ${ac_cv_build+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  ac_build_alias=$build_alias
13325test "x$ac_build_alias" = x &&
13326  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13327test "x$ac_build_alias" = x &&
13328  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13329ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13330  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13331
13332fi
13333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13334$as_echo "$ac_cv_build" >&6; }
13335case $ac_cv_build in
13336*-*-*) ;;
13337*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13338esac
13339build=$ac_cv_build
13340ac_save_IFS=$IFS; IFS='-'
13341set x $ac_cv_build
13342shift
13343build_cpu=$1
13344build_vendor=$2
13345shift; shift
13346# Remember, the first character of IFS is used to create $*,
13347# except with old shells:
13348build_os=$*
13349IFS=$ac_save_IFS
13350case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13351
13352
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13354$as_echo_n "checking host system type... " >&6; }
13355if ${ac_cv_host+:} false; then :
13356  $as_echo_n "(cached) " >&6
13357else
13358  if test "x$host_alias" = x; then
13359  ac_cv_host=$ac_cv_build
13360else
13361  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13362    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13363fi
13364
13365fi
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13367$as_echo "$ac_cv_host" >&6; }
13368case $ac_cv_host in
13369*-*-*) ;;
13370*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13371esac
13372host=$ac_cv_host
13373ac_save_IFS=$IFS; IFS='-'
13374set x $ac_cv_host
13375shift
13376host_cpu=$1
13377host_vendor=$2
13378shift; shift
13379# Remember, the first character of IFS is used to create $*,
13380# except with old shells:
13381host_os=$*
13382IFS=$ac_save_IFS
13383case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13384
13385
13386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13387$as_echo_n "checking target system type... " >&6; }
13388if ${ac_cv_target+:} false; then :
13389  $as_echo_n "(cached) " >&6
13390else
13391  if test "x$target_alias" = x; then
13392  ac_cv_target=$ac_cv_host
13393else
13394  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13395    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13396fi
13397
13398fi
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13400$as_echo "$ac_cv_target" >&6; }
13401case $ac_cv_target in
13402*-*-*) ;;
13403*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13404esac
13405target=$ac_cv_target
13406ac_save_IFS=$IFS; IFS='-'
13407set x $ac_cv_target
13408shift
13409target_cpu=$1
13410target_vendor=$2
13411shift; shift
13412# Remember, the first character of IFS is used to create $*,
13413# except with old shells:
13414target_os=$*
13415IFS=$ac_save_IFS
13416case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13417
13418
13419# The aliases save the names the user supplied, while $host etc.
13420# will get canonicalized.
13421test -n "$target_alias" &&
13422  test "$program_prefix$program_suffix$program_transform_name" = \
13423    NONENONEs,x,x, &&
13424  program_prefix=${target_alias}-
13425
13426  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13427  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13428  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13429  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13430  # to use the configure naming style.
13431
13432
13433
13434
13435
13436  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13437  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13438  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13439  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13440  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13441  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13442
13443
13444
13445  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13446
13447  case "$build_os" in
13448    *linux*)
13449      VAR_OS=linux
13450      VAR_OS_TYPE=unix
13451      ;;
13452    *solaris*)
13453      VAR_OS=solaris
13454      VAR_OS_TYPE=unix
13455      ;;
13456    *darwin*)
13457      VAR_OS=macosx
13458      VAR_OS_TYPE=unix
13459      ;;
13460    *bsd*)
13461      VAR_OS=bsd
13462      VAR_OS_TYPE=unix
13463      ;;
13464    *cygwin*)
13465      VAR_OS=windows
13466      VAR_OS_ENV=windows.cygwin
13467      ;;
13468    *mingw*)
13469      VAR_OS=windows
13470      VAR_OS_ENV=windows.msys
13471      ;;
13472    *aix*)
13473      VAR_OS=aix
13474      VAR_OS_TYPE=unix
13475      ;;
13476    *)
13477      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13478      ;;
13479  esac
13480
13481
13482  # First argument is the cpu name from the trip/quad
13483  case "$build_cpu" in
13484    x86_64)
13485      VAR_CPU=x86_64
13486      VAR_CPU_ARCH=x86
13487      VAR_CPU_BITS=64
13488      VAR_CPU_ENDIAN=little
13489      ;;
13490    i?86)
13491      VAR_CPU=x86
13492      VAR_CPU_ARCH=x86
13493      VAR_CPU_BITS=32
13494      VAR_CPU_ENDIAN=little
13495      ;;
13496    arm*)
13497      VAR_CPU=arm
13498      VAR_CPU_ARCH=arm
13499      VAR_CPU_BITS=32
13500      VAR_CPU_ENDIAN=little
13501      ;;
13502    aarch64)
13503      VAR_CPU=aarch64
13504      VAR_CPU_ARCH=aarch64
13505      VAR_CPU_BITS=64
13506      VAR_CPU_ENDIAN=little
13507      ;;
13508    powerpc)
13509      VAR_CPU=ppc
13510      VAR_CPU_ARCH=ppc
13511      VAR_CPU_BITS=32
13512      VAR_CPU_ENDIAN=big
13513      ;;
13514    powerpc64)
13515      VAR_CPU=ppc64
13516      VAR_CPU_ARCH=ppc
13517      VAR_CPU_BITS=64
13518      VAR_CPU_ENDIAN=big
13519      ;;
13520    powerpc64le)
13521      VAR_CPU=ppc64
13522      VAR_CPU_ARCH=ppc
13523      VAR_CPU_BITS=64
13524      VAR_CPU_ENDIAN=little
13525      ;;
13526    s390)
13527      VAR_CPU=s390
13528      VAR_CPU_ARCH=s390
13529      VAR_CPU_BITS=32
13530      VAR_CPU_ENDIAN=big
13531      ;;
13532    s390x)
13533      VAR_CPU=s390x
13534      VAR_CPU_ARCH=s390
13535      VAR_CPU_BITS=64
13536      VAR_CPU_ENDIAN=big
13537      ;;
13538    sparc)
13539      VAR_CPU=sparc
13540      VAR_CPU_ARCH=sparc
13541      VAR_CPU_BITS=32
13542      VAR_CPU_ENDIAN=big
13543      ;;
13544    sparcv9|sparc64)
13545      VAR_CPU=sparcv9
13546      VAR_CPU_ARCH=sparc
13547      VAR_CPU_BITS=64
13548      VAR_CPU_ENDIAN=big
13549      ;;
13550    *)
13551      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13552      ;;
13553  esac
13554
13555  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13556  OPENJDK_BUILD_OS="$VAR_OS"
13557  if test "x$VAR_OS_TYPE" != x; then
13558    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13559  else
13560    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13561  fi
13562  if test "x$VAR_OS_ENV" != x; then
13563    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13564  else
13565    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13566  fi
13567  OPENJDK_BUILD_CPU="$VAR_CPU"
13568  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13569  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13570  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13571
13572
13573
13574
13575
13576
13577
13578
13579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13580$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13582$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13583
13584  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13585
13586  case "$host_os" in
13587    *linux*)
13588      VAR_OS=linux
13589      VAR_OS_TYPE=unix
13590      ;;
13591    *solaris*)
13592      VAR_OS=solaris
13593      VAR_OS_TYPE=unix
13594      ;;
13595    *darwin*)
13596      VAR_OS=macosx
13597      VAR_OS_TYPE=unix
13598      ;;
13599    *bsd*)
13600      VAR_OS=bsd
13601      VAR_OS_TYPE=unix
13602      ;;
13603    *cygwin*)
13604      VAR_OS=windows
13605      VAR_OS_ENV=windows.cygwin
13606      ;;
13607    *mingw*)
13608      VAR_OS=windows
13609      VAR_OS_ENV=windows.msys
13610      ;;
13611    *aix*)
13612      VAR_OS=aix
13613      VAR_OS_TYPE=unix
13614      ;;
13615    *)
13616      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13617      ;;
13618  esac
13619
13620
13621  # First argument is the cpu name from the trip/quad
13622  case "$host_cpu" in
13623    x86_64)
13624      VAR_CPU=x86_64
13625      VAR_CPU_ARCH=x86
13626      VAR_CPU_BITS=64
13627      VAR_CPU_ENDIAN=little
13628      ;;
13629    i?86)
13630      VAR_CPU=x86
13631      VAR_CPU_ARCH=x86
13632      VAR_CPU_BITS=32
13633      VAR_CPU_ENDIAN=little
13634      ;;
13635    arm*)
13636      VAR_CPU=arm
13637      VAR_CPU_ARCH=arm
13638      VAR_CPU_BITS=32
13639      VAR_CPU_ENDIAN=little
13640      ;;
13641    aarch64)
13642      VAR_CPU=aarch64
13643      VAR_CPU_ARCH=aarch64
13644      VAR_CPU_BITS=64
13645      VAR_CPU_ENDIAN=little
13646      ;;
13647    powerpc)
13648      VAR_CPU=ppc
13649      VAR_CPU_ARCH=ppc
13650      VAR_CPU_BITS=32
13651      VAR_CPU_ENDIAN=big
13652      ;;
13653    powerpc64)
13654      VAR_CPU=ppc64
13655      VAR_CPU_ARCH=ppc
13656      VAR_CPU_BITS=64
13657      VAR_CPU_ENDIAN=big
13658      ;;
13659    powerpc64le)
13660      VAR_CPU=ppc64
13661      VAR_CPU_ARCH=ppc
13662      VAR_CPU_BITS=64
13663      VAR_CPU_ENDIAN=little
13664      ;;
13665    s390)
13666      VAR_CPU=s390
13667      VAR_CPU_ARCH=s390
13668      VAR_CPU_BITS=32
13669      VAR_CPU_ENDIAN=big
13670      ;;
13671    s390x)
13672      VAR_CPU=s390x
13673      VAR_CPU_ARCH=s390
13674      VAR_CPU_BITS=64
13675      VAR_CPU_ENDIAN=big
13676      ;;
13677    sparc)
13678      VAR_CPU=sparc
13679      VAR_CPU_ARCH=sparc
13680      VAR_CPU_BITS=32
13681      VAR_CPU_ENDIAN=big
13682      ;;
13683    sparcv9|sparc64)
13684      VAR_CPU=sparcv9
13685      VAR_CPU_ARCH=sparc
13686      VAR_CPU_BITS=64
13687      VAR_CPU_ENDIAN=big
13688      ;;
13689    *)
13690      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13691      ;;
13692  esac
13693
13694  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13695  OPENJDK_TARGET_OS="$VAR_OS"
13696  if test "x$VAR_OS_TYPE" != x; then
13697    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13698  else
13699    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13700  fi
13701  if test "x$VAR_OS_ENV" != x; then
13702    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13703  else
13704    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13705  fi
13706  OPENJDK_TARGET_CPU="$VAR_CPU"
13707  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13708  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13709  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13710
13711
13712
13713
13714
13715
13716
13717
13718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13719$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13721$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13722
13723
13724
13725# Check whether --with-target-bits was given.
13726if test "${with_target_bits+set}" = set; then :
13727  withval=$with_target_bits;
13728fi
13729
13730
13731  # We have three types of compiles:
13732  # native  == normal compilation, target system == build system
13733  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13734  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13735  #
13736  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13737    # We're doing a proper cross-compilation
13738    COMPILE_TYPE="cross"
13739  else
13740    COMPILE_TYPE="native"
13741  fi
13742
13743  if test "x$with_target_bits" != x; then
13744    if test "x$COMPILE_TYPE" = "xcross"; then
13745      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13746    fi
13747
13748    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13749      # A reduced build is requested
13750      COMPILE_TYPE="reduced"
13751      OPENJDK_TARGET_CPU_BITS=32
13752      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13753        OPENJDK_TARGET_CPU=x86
13754      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13755        OPENJDK_TARGET_CPU=sparc
13756      else
13757        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13758      fi
13759    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13760      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
13761    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13762      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13763$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13764    else
13765      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13766    fi
13767  fi
13768
13769
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13771$as_echo_n "checking compilation type... " >&6; }
13772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13773$as_echo "$COMPILE_TYPE" >&6; }
13774
13775
13776  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13777    REQUIRED_OS_NAME=SunOS
13778    REQUIRED_OS_VERSION=5.10
13779  fi
13780  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13781    REQUIRED_OS_NAME=Linux
13782    REQUIRED_OS_VERSION=2.6
13783  fi
13784  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13785    REQUIRED_OS_NAME=Windows
13786    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13787      REQUIRED_OS_VERSION=5.2
13788    else
13789      REQUIRED_OS_VERSION=5.1
13790    fi
13791  fi
13792  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13793    REQUIRED_OS_NAME=Darwin
13794    REQUIRED_OS_VERSION=11.2
13795  fi
13796
13797
13798
13799
13800
13801  # Also store the legacy naming of the cpu.
13802  # Ie i586 and amd64 instead of x86 and x86_64
13803  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13804  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13805    OPENJDK_TARGET_CPU_LEGACY="i586"
13806  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13807    # On all platforms except MacOSX replace x86_64 with amd64.
13808    OPENJDK_TARGET_CPU_LEGACY="amd64"
13809  fi
13810
13811
13812  # And the second legacy naming of the cpu.
13813  # Ie i386 and amd64 instead of x86 and x86_64.
13814  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13815  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13816    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13817  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13818    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13819  fi
13820
13821
13822  # This is the name of the cpu (but using i386 and amd64 instead of
13823  # x86 and x86_64, respectively), preceeded by a /, to be used when
13824  # locating libraries. On macosx, it's empty, though.
13825  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13826  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13827    OPENJDK_TARGET_CPU_LIBDIR=""
13828  fi
13829
13830
13831  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13832  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13833  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13834  OPENJDK_TARGET_CPU_ISADIR=""
13835  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13836    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13837      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13838    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13839      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13840    fi
13841  fi
13842
13843
13844  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13845  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13846  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13847    # On linux only, we replace x86 with i386.
13848    OPENJDK_TARGET_CPU_OSARCH="i386"
13849  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13850    # On all platforms except macosx, we replace x86_64 with amd64.
13851    OPENJDK_TARGET_CPU_OSARCH="amd64"
13852  fi
13853
13854
13855  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13856  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13857    OPENJDK_TARGET_CPU_JLI="i386"
13858  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13859    # On all platforms except macosx, we replace x86_64 with amd64.
13860    OPENJDK_TARGET_CPU_JLI="amd64"
13861  fi
13862  # Now setup the -D flags for building libjli.
13863  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13864  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13865    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13866      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13867    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13868      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13869    fi
13870  fi
13871
13872
13873  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13874      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13875  else
13876      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13877  fi
13878
13879
13880  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13881    A_LP64="LP64:="
13882    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13883    # unpack200.exe
13884    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13885      ADD_LP64="-D_LP64=1"
13886    fi
13887  fi
13888  LP64=$A_LP64
13889
13890
13891  if test "x$COMPILE_TYPE" = "xcross"; then
13892    # FIXME: ... or should this include reduced builds..?
13893    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13894  else
13895    DEFINE_CROSS_COMPILE_ARCH=""
13896  fi
13897
13898
13899  # ZERO_ARCHDEF is used to enable architecture-specific code
13900  case "${OPENJDK_TARGET_CPU}" in
13901    ppc)     ZERO_ARCHDEF=PPC32 ;;
13902    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13903    s390*)   ZERO_ARCHDEF=S390  ;;
13904    sparc*)  ZERO_ARCHDEF=SPARC ;;
13905    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13906    x86)     ZERO_ARCHDEF=IA32  ;;
13907    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13908  esac
13909
13910
13911
13912
13913# Continue setting up basic stuff. Most remaining code require fundamental tools.
13914
13915  # Save the current directory this script was started from
13916  CURDIR="$PWD"
13917
13918  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13919    PATH_SEP=";"
13920
13921  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13922  if test $SRC_ROOT_LENGTH -gt 100; then
13923    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13924  fi
13925
13926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13928$as_echo_n "checking cygwin release... " >&6; }
13929    CYGWIN_VERSION=`$UNAME -r`
13930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13931$as_echo "$CYGWIN_VERSION" >&6; }
13932    WINDOWS_ENV_VENDOR='cygwin'
13933    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13934
13935    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13936    if test "x$CYGWIN_VERSION_OLD" != x; then
13937      { $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
13938$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;}
13939      as_fn_error $? "Cannot continue" "$LINENO" 5
13940    fi
13941    if test "x$CYGPATH" = x; then
13942      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13943    fi
13944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13945$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13946    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13947    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13948    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13949    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13951$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13952    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13953    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13954    if test "x$test_cygdrive_prefix" = x; then
13955      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13956    fi
13957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13959$as_echo_n "checking msys release... " >&6; }
13960    MSYS_VERSION=`$UNAME -r`
13961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13962$as_echo "$MSYS_VERSION" >&6; }
13963
13964    WINDOWS_ENV_VENDOR='msys'
13965    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13966
13967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13968$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13969    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13970    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13971
13972  windows_path="$MSYS_ROOT_PATH"
13973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13974    unix_path=`$CYGPATH -u "$windows_path"`
13975    MSYS_ROOT_PATH="$unix_path"
13976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13978    MSYS_ROOT_PATH="$unix_path"
13979  fi
13980
13981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13982$as_echo "$MSYS_ROOT_PATH" >&6; }
13983    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13984  else
13985    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13986  fi
13987
13988  # Test if windows or unix (cygwin/msys) find is first in path.
13989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13990$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13991  FIND_BINARY_OUTPUT=`find --version 2>&1`
13992  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13994$as_echo "unix style" >&6; }
13995  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13997$as_echo "Windows" >&6; }
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13999$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14000    { $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
14001$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14002    as_fn_error $? "Cannot continue" "$LINENO" 5
14003  else
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14005$as_echo "unknown" >&6; }
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14007$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14008  fi
14009
14010  else
14011    PATH_SEP=":"
14012  fi
14013
14014
14015  # We get the top-level directory from the supporting wrappers.
14016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14017$as_echo_n "checking for top-level directory... " >&6; }
14018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14019$as_echo "$TOPDIR" >&6; }
14020
14021
14022  # Save the original version of TOPDIR for string comparisons
14023  ORIGINAL_TOPDIR="$TOPDIR"
14024
14025
14026  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14027
14028  # Only process if variable expands to non-empty
14029
14030  if test "x$CURDIR" != x; then
14031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14032
14033  # Input might be given as Windows format, start by converting to
14034  # unix format.
14035  path="$CURDIR"
14036  new_path=`$CYGPATH -u "$path"`
14037
14038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14041  # "foo.exe" is OK but "foo" is an error.
14042  #
14043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14044  # It is also a way to make sure we got the proper file name for the real test later on.
14045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14046  if test "x$test_shortpath" = x; then
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14048$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14049    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14050  fi
14051
14052  # Call helper function which possibly converts this using DOS-style short mode.
14053  # If so, the updated path is stored in $new_path.
14054
14055  input_path="$new_path"
14056  # Check if we need to convert this using DOS-style short mode. If the path
14057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14058  # take no chances and rewrite it.
14059  # Note: m4 eats our [], so we need to use [ and ] instead.
14060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14061  if test "x$has_forbidden_chars" != x; then
14062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14066      # Going to short mode and back again did indeed matter. Since short mode is
14067      # case insensitive, let's make it lowercase to improve readability.
14068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14069      # Now convert it back to Unix-style (cygpath)
14070      input_path=`$CYGPATH -u "$shortmode_path"`
14071      new_path="$input_path"
14072    fi
14073  fi
14074
14075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14076  if test "x$test_cygdrive_prefix" = x; then
14077    # As a simple fix, exclude /usr/bin since it's not a real path.
14078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14080      # a path prefixed by /cygdrive for fixpath to work.
14081      new_path="$CYGWIN_ROOT_PATH$input_path"
14082    fi
14083  fi
14084
14085
14086  if test "x$path" != "x$new_path"; then
14087    CURDIR="$new_path"
14088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14089$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14090  fi
14091
14092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14093
14094  path="$CURDIR"
14095  has_colon=`$ECHO $path | $GREP ^.:`
14096  new_path="$path"
14097  if test "x$has_colon" = x; then
14098    # Not in mixed or Windows style, start by that.
14099    new_path=`cmd //c echo $path`
14100  fi
14101
14102
14103  input_path="$new_path"
14104  # Check if we need to convert this using DOS-style short mode. If the path
14105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14106  # take no chances and rewrite it.
14107  # Note: m4 eats our [], so we need to use [ and ] instead.
14108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14109  if test "x$has_forbidden_chars" != x; then
14110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14112  fi
14113
14114
14115  windows_path="$new_path"
14116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14117    unix_path=`$CYGPATH -u "$windows_path"`
14118    new_path="$unix_path"
14119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14121    new_path="$unix_path"
14122  fi
14123
14124  if test "x$path" != "x$new_path"; then
14125    CURDIR="$new_path"
14126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14127$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14128  fi
14129
14130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14132
14133    else
14134      # We're on a unix platform. Hooray! :)
14135      path="$CURDIR"
14136      has_space=`$ECHO "$path" | $GREP " "`
14137      if test "x$has_space" != x; then
14138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14139$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14141      fi
14142
14143      # Use eval to expand a potential ~
14144      eval path="$path"
14145      if test ! -f "$path" && test ! -d "$path"; then
14146        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14147      fi
14148
14149      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14150    fi
14151  fi
14152
14153
14154  # Only process if variable expands to non-empty
14155
14156  if test "x$TOPDIR" != x; then
14157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14158
14159  # Input might be given as Windows format, start by converting to
14160  # unix format.
14161  path="$TOPDIR"
14162  new_path=`$CYGPATH -u "$path"`
14163
14164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14167  # "foo.exe" is OK but "foo" is an error.
14168  #
14169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14170  # It is also a way to make sure we got the proper file name for the real test later on.
14171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14172  if test "x$test_shortpath" = x; then
14173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14174$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14175    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14176  fi
14177
14178  # Call helper function which possibly converts this using DOS-style short mode.
14179  # If so, the updated path is stored in $new_path.
14180
14181  input_path="$new_path"
14182  # Check if we need to convert this using DOS-style short mode. If the path
14183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14184  # take no chances and rewrite it.
14185  # Note: m4 eats our [], so we need to use [ and ] instead.
14186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14187  if test "x$has_forbidden_chars" != x; then
14188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14192      # Going to short mode and back again did indeed matter. Since short mode is
14193      # case insensitive, let's make it lowercase to improve readability.
14194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14195      # Now convert it back to Unix-style (cygpath)
14196      input_path=`$CYGPATH -u "$shortmode_path"`
14197      new_path="$input_path"
14198    fi
14199  fi
14200
14201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14202  if test "x$test_cygdrive_prefix" = x; then
14203    # As a simple fix, exclude /usr/bin since it's not a real path.
14204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14206      # a path prefixed by /cygdrive for fixpath to work.
14207      new_path="$CYGWIN_ROOT_PATH$input_path"
14208    fi
14209  fi
14210
14211
14212  if test "x$path" != "x$new_path"; then
14213    TOPDIR="$new_path"
14214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14215$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14216  fi
14217
14218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14219
14220  path="$TOPDIR"
14221  has_colon=`$ECHO $path | $GREP ^.:`
14222  new_path="$path"
14223  if test "x$has_colon" = x; then
14224    # Not in mixed or Windows style, start by that.
14225    new_path=`cmd //c echo $path`
14226  fi
14227
14228
14229  input_path="$new_path"
14230  # Check if we need to convert this using DOS-style short mode. If the path
14231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14232  # take no chances and rewrite it.
14233  # Note: m4 eats our [], so we need to use [ and ] instead.
14234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14235  if test "x$has_forbidden_chars" != x; then
14236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14238  fi
14239
14240
14241  windows_path="$new_path"
14242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14243    unix_path=`$CYGPATH -u "$windows_path"`
14244    new_path="$unix_path"
14245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14247    new_path="$unix_path"
14248  fi
14249
14250  if test "x$path" != "x$new_path"; then
14251    TOPDIR="$new_path"
14252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14253$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14254  fi
14255
14256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14258
14259    else
14260      # We're on a unix platform. Hooray! :)
14261      path="$TOPDIR"
14262      has_space=`$ECHO "$path" | $GREP " "`
14263      if test "x$has_space" != x; then
14264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14265$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14267      fi
14268
14269      # Use eval to expand a potential ~
14270      eval path="$path"
14271      if test ! -f "$path" && test ! -d "$path"; then
14272        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14273      fi
14274
14275      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14276    fi
14277  fi
14278
14279  # SRC_ROOT is a traditional alias for TOPDIR.
14280  SRC_ROOT=$TOPDIR
14281
14282  # Calculate a canonical version of TOPDIR for string comparisons
14283  CANONICAL_TOPDIR=$TOPDIR
14284
14285  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14286    # Follow a chain of symbolic links. Use readlink
14287    # where it exists, else fall back to horribly
14288    # complicated shell code.
14289    if test "x$READLINK_TESTED" != yes; then
14290      # On MacOSX there is a readlink tool with a different
14291      # purpose than the GNU readlink tool. Check the found readlink.
14292      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14293      if test "x$ISGNU" = x; then
14294        # A readlink that we do not know how to use.
14295        # Are there other non-GNU readlinks out there?
14296        READLINK_TESTED=yes
14297        READLINK=
14298      fi
14299    fi
14300
14301    if test "x$READLINK" != x; then
14302      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14303    else
14304      # Save the current directory for restoring afterwards
14305      STARTDIR=$PWD
14306      COUNTER=0
14307      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14308      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14309      cd $sym_link_dir
14310      # Use -P flag to resolve symlinks in directories.
14311      cd `$THEPWDCMD -P`
14312      sym_link_dir=`$THEPWDCMD -P`
14313      # Resolve file symlinks
14314      while test $COUNTER -lt 20; do
14315        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14316        if test "x$ISLINK" == x; then
14317          # This is not a symbolic link! We are done!
14318          break
14319        fi
14320        # Again resolve directory symlinks since the target of the just found
14321        # link could be in a different directory
14322        cd `$DIRNAME $ISLINK`
14323        sym_link_dir=`$THEPWDCMD -P`
14324        sym_link_file=`$BASENAME $ISLINK`
14325        let COUNTER=COUNTER+1
14326      done
14327      cd $STARTDIR
14328      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14329    fi
14330  fi
14331
14332
14333
14334  # Locate the directory of this script.
14335  AUTOCONF_DIR=$TOPDIR/common/autoconf
14336
14337
14338# Check if it's a pure open build or if custom sources are to be used.
14339
14340  # Check whether --enable-openjdk-only was given.
14341if test "${enable_openjdk_only+set}" = set; then :
14342  enableval=$enable_openjdk_only;
14343else
14344  enable_openjdk_only="no"
14345fi
14346
14347
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14349$as_echo_n "checking for presence of closed sources... " >&6; }
14350  if test -d "$SRC_ROOT/jdk/src/closed"; then
14351    CLOSED_SOURCE_PRESENT=yes
14352  else
14353    CLOSED_SOURCE_PRESENT=no
14354  fi
14355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14356$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14357
14358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14359$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14360  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14362$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14363
14364  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14365    OPENJDK=true
14366    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14367      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14368$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14369    fi
14370  else
14371    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14372      OPENJDK=true
14373    else
14374      OPENJDK=false
14375    fi
14376  fi
14377
14378  if test "x$OPENJDK" = "xtrue"; then
14379    SET_OPENJDK="OPENJDK=true"
14380  fi
14381
14382
14383
14384  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14385  # the IncludeCustomExtension macro.
14386
14387
14388# Check whether --with-custom-make-dir was given.
14389if test "${with_custom_make_dir+set}" = set; then :
14390  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14391$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14392fi
14393
14394
14395
14396
14397# These are needed to be able to create a configuration name (and thus the output directory)
14398
14399  ###############################################################################
14400  #
14401  # Check which variant of the JDK that we want to build.
14402  # Currently we have:
14403  #    normal:   standard edition
14404  # but the custom make system may add other variants
14405  #
14406  # Effectively the JDK variant gives a name to a specific set of
14407  # modules to compile into the JDK. In the future, these modules
14408  # might even be Jigsaw modules.
14409  #
14410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14411$as_echo_n "checking which variant of the JDK to build... " >&6; }
14412
14413# Check whether --with-jdk-variant was given.
14414if test "${with_jdk_variant+set}" = set; then :
14415  withval=$with_jdk_variant;
14416fi
14417
14418
14419  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14420    JDK_VARIANT="normal"
14421  else
14422    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14423  fi
14424
14425
14426
14427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14428$as_echo "$JDK_VARIANT" >&6; }
14429
14430
14431###############################################################################
14432#
14433# Check which interpreter of the JVM we want to build.
14434# Currently we have:
14435#    template: Template interpreter (the default)
14436#    cpp     : C++ interpreter
14437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14438$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14439
14440# Check whether --with-jvm-interpreter was given.
14441if test "${with_jvm_interpreter+set}" = set; then :
14442  withval=$with_jvm_interpreter;
14443fi
14444
14445
14446if test "x$with_jvm_interpreter" = x; then
14447     with_jvm_interpreter="template"
14448fi
14449
14450JVM_INTERPRETER="$with_jvm_interpreter"
14451
14452if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14453   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14454fi
14455
14456
14457
14458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14459$as_echo "$with_jvm_interpreter" >&6; }
14460
14461
14462
14463  ###############################################################################
14464  #
14465  # Check which variants of the JVM that we want to build.
14466  # Currently we have:
14467  #    server: normal interpreter and a tiered C1/C2 compiler
14468  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14469  #    minimal1: reduced form of client with optional VM services and features stripped out
14470  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14471  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14472  #    zero: no machine code interpreter, no compiler
14473  #    zeroshark: zero interpreter and shark/llvm compiler backend
14474#    core: interpreter only, no compiler (only works on some platforms)
14475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14476$as_echo_n "checking which variants of the JVM to build... " >&6; }
14477
14478# Check whether --with-jvm-variants was given.
14479if test "${with_jvm_variants+set}" = set; then :
14480  withval=$with_jvm_variants;
14481fi
14482
14483
14484  if test "x$with_jvm_variants" = x; then
14485    with_jvm_variants="server"
14486  fi
14487
14488  JVM_VARIANTS=",$with_jvm_variants,"
14489  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,//'`
14490
14491  if test "x$TEST_VARIANTS" != "x,"; then
14492     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14493  fi
14494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14495$as_echo "$with_jvm_variants" >&6; }
14496
14497  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14498  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14499  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14500  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14501  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14502  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14503  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14504
14505  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14506    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14507      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14508    fi
14509  fi
14510  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14511    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14512      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14513    fi
14514  fi
14515  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14516    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14517      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14518    fi
14519  fi
14520
14521  # Replace the commas with AND for use in the build directory name.
14522  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14523  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/'`
14524  if test "x$COUNT_VARIANTS" != "x,1"; then
14525    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14526  else
14527    BUILDING_MULTIPLE_JVM_VARIANTS=no
14528  fi
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539  INCLUDE_SA=true
14540  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14541    INCLUDE_SA=false
14542  fi
14543  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14544    INCLUDE_SA=false
14545  fi
14546  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14547    INCLUDE_SA=false
14548  fi
14549  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14550    INCLUDE_SA=false
14551  fi
14552
14553
14554  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14555    MACOSX_UNIVERSAL="true"
14556  fi
14557
14558
14559
14560
14561  ###############################################################################
14562  #
14563  # Set the debug level
14564  #    release: no debug information, all optimizations, no asserts.
14565  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14566  #    fastdebug: debug information (-g), all optimizations, all asserts
14567  #    slowdebug: debug information (-g), no optimizations, all asserts
14568  #
14569  DEBUG_LEVEL="release"
14570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14571$as_echo_n "checking which debug level to use... " >&6; }
14572  # Check whether --enable-debug was given.
14573if test "${enable_debug+set}" = set; then :
14574  enableval=$enable_debug;
14575        ENABLE_DEBUG="${enableval}"
14576        DEBUG_LEVEL="fastdebug"
14577
14578else
14579  ENABLE_DEBUG="no"
14580fi
14581
14582
14583
14584# Check whether --with-debug-level was given.
14585if test "${with_debug_level+set}" = set; then :
14586  withval=$with_debug_level;
14587        DEBUG_LEVEL="${withval}"
14588        if test "x$ENABLE_DEBUG" = xyes; then
14589          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14590        fi
14591
14592fi
14593
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14595$as_echo "$DEBUG_LEVEL" >&6; }
14596
14597  if test "x$DEBUG_LEVEL" != xrelease && \
14598      test "x$DEBUG_LEVEL" != xoptimized && \
14599      test "x$DEBUG_LEVEL" != xfastdebug && \
14600      test "x$DEBUG_LEVEL" != xslowdebug; then
14601    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14602  fi
14603
14604
14605  ###############################################################################
14606  #
14607  # Setup legacy vars/targets and new vars to deal with different debug levels.
14608  #
14609
14610  case $DEBUG_LEVEL in
14611    release )
14612      VARIANT="OPT"
14613      FASTDEBUG="false"
14614      DEBUG_CLASSFILES="false"
14615      BUILD_VARIANT_RELEASE=""
14616      HOTSPOT_DEBUG_LEVEL="product"
14617      HOTSPOT_EXPORT="product"
14618      ;;
14619    fastdebug )
14620      VARIANT="DBG"
14621      FASTDEBUG="true"
14622      DEBUG_CLASSFILES="true"
14623      BUILD_VARIANT_RELEASE="-fastdebug"
14624      HOTSPOT_DEBUG_LEVEL="fastdebug"
14625      HOTSPOT_EXPORT="fastdebug"
14626      ;;
14627    slowdebug )
14628      VARIANT="DBG"
14629      FASTDEBUG="false"
14630      DEBUG_CLASSFILES="true"
14631      BUILD_VARIANT_RELEASE="-debug"
14632      HOTSPOT_DEBUG_LEVEL="debug"
14633      HOTSPOT_EXPORT="debug"
14634      ;;
14635    optimized )
14636      VARIANT="OPT"
14637      FASTDEBUG="false"
14638      DEBUG_CLASSFILES="false"
14639      BUILD_VARIANT_RELEASE="-optimized"
14640      HOTSPOT_DEBUG_LEVEL="optimized"
14641      HOTSPOT_EXPORT="optimized"
14642      ;;
14643  esac
14644
14645  # The debug level 'optimized' is a little special because it is currently only
14646  # applicable to the HotSpot build where it means to build a completely
14647  # optimized version of the VM without any debugging code (like for the
14648  # 'release' debug level which is called 'product' in the HotSpot build) but
14649  # with the exception that it can contain additional code which is otherwise
14650  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14651  # test new and/or experimental features which are not intended for customer
14652  # shipment. Because these new features need to be tested and benchmarked in
14653  # real world scenarios, we want to build the containing JDK at the 'release'
14654  # debug level.
14655  if test "x$DEBUG_LEVEL" = xoptimized; then
14656    DEBUG_LEVEL="release"
14657  fi
14658
14659  #####
14660  # Generate the legacy makefile targets for hotspot.
14661  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14662  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14663  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14664  # But until then ...
14665  HOTSPOT_TARGET=""
14666
14667  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14668    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14669  fi
14670
14671  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14672    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14673  fi
14674
14675  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14676    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14677  fi
14678
14679  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14680    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14681  fi
14682
14683  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14684    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14685  fi
14686
14687  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14688    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14689  fi
14690
14691  if test "x$JVM_VARIANT_CORE" = xtrue; then
14692    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14693  fi
14694
14695  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14696
14697  # On Macosx universal binaries are produced, but they only contain
14698  # 64 bit intel. This invalidates control of which jvms are built
14699  # from configure, but only server is valid anyway. Fix this
14700  # when hotspot makefiles are rewritten.
14701  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14702    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14703  fi
14704
14705  #####
14706
14707
14708
14709
14710
14711
14712
14713
14714# With basic setup done, call the custom early hook.
14715
14716
14717# Check if we have devkits, extra paths or sysroot set.
14718
14719
14720# Check whether --with-devkit was given.
14721if test "${with_devkit+set}" = set; then :
14722  withval=$with_devkit;
14723
14724  # Only process if variable expands to non-empty
14725
14726  if test "x$with_devkit" != x; then
14727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14728
14729  # Input might be given as Windows format, start by converting to
14730  # unix format.
14731  path="$with_devkit"
14732  new_path=`$CYGPATH -u "$path"`
14733
14734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14737  # "foo.exe" is OK but "foo" is an error.
14738  #
14739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14740  # It is also a way to make sure we got the proper file name for the real test later on.
14741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14742  if test "x$test_shortpath" = x; then
14743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14744$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14745    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14746  fi
14747
14748  # Call helper function which possibly converts this using DOS-style short mode.
14749  # If so, the updated path is stored in $new_path.
14750
14751  input_path="$new_path"
14752  # Check if we need to convert this using DOS-style short mode. If the path
14753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14754  # take no chances and rewrite it.
14755  # Note: m4 eats our [], so we need to use [ and ] instead.
14756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14757  if test "x$has_forbidden_chars" != x; then
14758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14762      # Going to short mode and back again did indeed matter. Since short mode is
14763      # case insensitive, let's make it lowercase to improve readability.
14764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14765      # Now convert it back to Unix-style (cygpath)
14766      input_path=`$CYGPATH -u "$shortmode_path"`
14767      new_path="$input_path"
14768    fi
14769  fi
14770
14771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14772  if test "x$test_cygdrive_prefix" = x; then
14773    # As a simple fix, exclude /usr/bin since it's not a real path.
14774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14776      # a path prefixed by /cygdrive for fixpath to work.
14777      new_path="$CYGWIN_ROOT_PATH$input_path"
14778    fi
14779  fi
14780
14781
14782  if test "x$path" != "x$new_path"; then
14783    with_devkit="$new_path"
14784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14785$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14786  fi
14787
14788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14789
14790  path="$with_devkit"
14791  has_colon=`$ECHO $path | $GREP ^.:`
14792  new_path="$path"
14793  if test "x$has_colon" = x; then
14794    # Not in mixed or Windows style, start by that.
14795    new_path=`cmd //c echo $path`
14796  fi
14797
14798
14799  input_path="$new_path"
14800  # Check if we need to convert this using DOS-style short mode. If the path
14801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14802  # take no chances and rewrite it.
14803  # Note: m4 eats our [], so we need to use [ and ] instead.
14804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14805  if test "x$has_forbidden_chars" != x; then
14806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14808  fi
14809
14810
14811  windows_path="$new_path"
14812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14813    unix_path=`$CYGPATH -u "$windows_path"`
14814    new_path="$unix_path"
14815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14817    new_path="$unix_path"
14818  fi
14819
14820  if test "x$path" != "x$new_path"; then
14821    with_devkit="$new_path"
14822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14823$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14824  fi
14825
14826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14828
14829    else
14830      # We're on a unix platform. Hooray! :)
14831      path="$with_devkit"
14832      has_space=`$ECHO "$path" | $GREP " "`
14833      if test "x$has_space" != x; then
14834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14835$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14837      fi
14838
14839      # Use eval to expand a potential ~
14840      eval path="$path"
14841      if test ! -f "$path" && test ! -d "$path"; then
14842        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14843      fi
14844
14845      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14846    fi
14847  fi
14848
14849        DEVKIT_ROOT="$with_devkit"
14850        # Check for a meta data info file in the root of the devkit
14851        if test -f "$DEVKIT_ROOT/devkit.info"; then
14852          . $DEVKIT_ROOT/devkit.info
14853          # This potentially sets the following:
14854          # A descriptive name of the devkit
14855
14856  if test "x$DEVKIT_NAME" = x; then
14857    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14858  fi
14859
14860          # Corresponds to --with-extra-path
14861
14862  if test "x$DEVKIT_EXTRA_PATH" = x; then
14863    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14864  fi
14865
14866          # Corresponds to --with-toolchain-path
14867
14868  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14869    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14870  fi
14871
14872          # Corresponds to --with-sysroot
14873
14874  if test "x$DEVKIT_SYSROOT" = x; then
14875    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14876  fi
14877
14878
14879          # Identifies the Visual Studio version in the devkit
14880
14881  if test "x$DEVKIT_VS_VERSION" = x; then
14882    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14883  fi
14884
14885          # The Visual Studio include environment variable
14886
14887  if test "x$DEVKIT_VS_INCLUDE" = x; then
14888    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14889  fi
14890
14891          # The Visual Studio lib environment variable
14892
14893  if test "x$DEVKIT_VS_LIB" = x; then
14894    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14895  fi
14896
14897          # Corresponds to --with-msvcr-dll
14898
14899  if test "x$DEVKIT_MSVCR_DLL" = x; then
14900    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14901  fi
14902
14903          # Corresponds to --with-msvcp-dll
14904
14905  if test "x$DEVKIT_MSVCP_DLL" = x; then
14906    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14907  fi
14908
14909        fi
14910
14911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14912$as_echo_n "checking for devkit... " >&6; }
14913        if test "x$DEVKIT_NAME" != x; then
14914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14915$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14916        else
14917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14918$as_echo "$DEVKIT_ROOT" >&6; }
14919        fi
14920
14921
14922  if test "x$DEVKIT_EXTRA_PATH" != x; then
14923    if test "x$EXTRA_PATH" = x; then
14924      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14925    else
14926      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14927    fi
14928  fi
14929
14930
14931        # Fallback default of just /bin if DEVKIT_PATH is not defined
14932        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14933          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14934        fi
14935
14936  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14937    if test "x$TOOLCHAIN_PATH" = x; then
14938      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14939    else
14940      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14941    fi
14942  fi
14943
14944
14945        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14946        # places for backwards compatiblity.
14947        if test "x$DEVKIT_SYSROOT" != x; then
14948          SYSROOT="$DEVKIT_SYSROOT"
14949        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14950          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14951        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14952          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14953        fi
14954
14955
14956fi
14957
14958
14959  # You can force the sysroot if the sysroot encoded into the compiler tools
14960  # is not correct.
14961
14962# Check whether --with-sys-root was given.
14963if test "${with_sys_root+set}" = set; then :
14964  withval=$with_sys_root; SYSROOT=$with_sys_root
14965
14966fi
14967
14968
14969
14970# Check whether --with-sysroot was given.
14971if test "${with_sysroot+set}" = set; then :
14972  withval=$with_sysroot; SYSROOT=$with_sysroot
14973
14974fi
14975
14976
14977
14978# Check whether --with-tools-dir was given.
14979if test "${with_tools_dir+set}" = set; then :
14980  withval=$with_tools_dir;
14981  if test "x$with_tools_dir" != x; then
14982    if test "x$TOOLCHAIN_PATH" = x; then
14983      TOOLCHAIN_PATH="$with_tools_dir"
14984    else
14985      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14986    fi
14987  fi
14988
14989
14990fi
14991
14992
14993
14994# Check whether --with-toolchain-path was given.
14995if test "${with_toolchain_path+set}" = set; then :
14996  withval=$with_toolchain_path;
14997  if test "x$with_toolchain_path" != x; then
14998    if test "x$TOOLCHAIN_PATH" = x; then
14999      TOOLCHAIN_PATH="$with_toolchain_path"
15000    else
15001      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15002    fi
15003  fi
15004
15005
15006fi
15007
15008
15009
15010# Check whether --with-extra-path was given.
15011if test "${with_extra_path+set}" = set; then :
15012  withval=$with_extra_path;
15013  if test "x$with_extra_path" != x; then
15014    if test "x$EXTRA_PATH" = x; then
15015      EXTRA_PATH="$with_extra_path"
15016    else
15017      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15018    fi
15019  fi
15020
15021
15022fi
15023
15024
15025  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15026    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15027    # If not, detect if Xcode is installed by running xcodebuild -version
15028    # if no Xcode installed, xcodebuild exits with 1
15029    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15030    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15031      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15032      # fall back on the stub binary in /usr/bin/xcodebuild
15033      # Extract the first word of "xcodebuild", so it can be a program name with args.
15034set dummy xcodebuild; ac_word=$2
15035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15036$as_echo_n "checking for $ac_word... " >&6; }
15037if ${ac_cv_path_XCODEBUILD+:} false; then :
15038  $as_echo_n "(cached) " >&6
15039else
15040  case $XCODEBUILD in
15041  [\\/]* | ?:[\\/]*)
15042  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15043  ;;
15044  *)
15045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15046for as_dir in $TOOLCHAIN_PATH
15047do
15048  IFS=$as_save_IFS
15049  test -z "$as_dir" && as_dir=.
15050    for ac_exec_ext in '' $ac_executable_extensions; do
15051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15052    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15054    break 2
15055  fi
15056done
15057  done
15058IFS=$as_save_IFS
15059
15060  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15061  ;;
15062esac
15063fi
15064XCODEBUILD=$ac_cv_path_XCODEBUILD
15065if test -n "$XCODEBUILD"; then
15066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15067$as_echo "$XCODEBUILD" >&6; }
15068else
15069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15070$as_echo "no" >&6; }
15071fi
15072
15073
15074    else
15075      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15076      # when only the command line tools are installed there are no SDKs, so headers
15077      # are copied into the system frameworks
15078      XCODEBUILD=
15079
15080    fi
15081
15082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15083$as_echo_n "checking for sdk name... " >&6; }
15084
15085# Check whether --with-sdk-name was given.
15086if test "${with_sdk_name+set}" = set; then :
15087  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15088
15089fi
15090
15091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15092$as_echo "$SDKNAME" >&6; }
15093
15094    # if toolchain path is specified then don't rely on system headers, they may not compile
15095    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15096    test -z "$TOOLCHAIN_PATH" && \
15097      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15098
15099    if test -z "$SYSROOT"; then
15100      if test -n "$XCODEBUILD"; then
15101        # if we don't have system headers, use default SDK name (last resort)
15102        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15103          SDKNAME=${SDKNAME:-macosx}
15104        fi
15105
15106        if test -n "$SDKNAME"; then
15107          # Call xcodebuild to determine SYSROOT
15108          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15109        fi
15110      else
15111        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15112          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15113        fi
15114      fi
15115    else
15116      # warn user if --with-sdk-name was also set
15117      if test -n "$with_sdk_name"; then
15118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15119$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15120      fi
15121    fi
15122
15123    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15124      # If no system framework headers, then SYSROOT must be set, or we won't build
15125      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15126    fi
15127
15128    # Perform a basic sanity test
15129    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15130      if test -z "$SYSROOT"; then
15131        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15132      else
15133        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15134      fi
15135    fi
15136
15137    # set SDKROOT too, Xcode tools will pick it up
15138    SDKROOT=$SYSROOT
15139
15140  fi
15141
15142  # Prepend the extra path to the global path
15143
15144  if test "x$EXTRA_PATH" != x; then
15145    if test "x$PATH" = x; then
15146      PATH="$EXTRA_PATH"
15147    else
15148      PATH="$EXTRA_PATH:$PATH"
15149    fi
15150  fi
15151
15152
15153  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15154    # Add extra search paths on solaris for utilities like ar and as etc...
15155    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15156  fi
15157
15158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15159$as_echo_n "checking for sysroot... " >&6; }
15160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15161$as_echo "$SYSROOT" >&6; }
15162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15163$as_echo_n "checking for toolchain path... " >&6; }
15164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15165$as_echo "$TOOLCHAIN_PATH" >&6; }
15166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15167$as_echo_n "checking for extra path... " >&6; }
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15169$as_echo "$EXTRA_PATH" >&6; }
15170
15171
15172# To properly create a configuration name, we need to have the OpenJDK target
15173# and options (variants and debug level) parsed.
15174
15175
15176
15177# Check whether --with-conf-name was given.
15178if test "${with_conf_name+set}" = set; then :
15179  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15180fi
15181
15182
15183  # Test from where we are running configure, in or outside of src root.
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15185$as_echo_n "checking where to store configuration... " >&6; }
15186  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15187      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15188      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15189    # We are running configure from the src root.
15190    # Create a default ./build/target-variant-debuglevel output root.
15191    if test "x${CONF_NAME}" = x; then
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15193$as_echo "in default location" >&6; }
15194      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15195    else
15196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15197$as_echo "in build directory with custom name" >&6; }
15198    fi
15199    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15200    $MKDIR -p "$OUTPUT_ROOT"
15201    if test ! -d "$OUTPUT_ROOT"; then
15202      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15203    fi
15204  else
15205    # We are running configure from outside of the src dir.
15206    # Then use the current directory as output dir!
15207    # If configuration is situated in normal build directory, just use the build
15208    # directory name as configuration name, otherwise use the complete path.
15209    if test "x${CONF_NAME}" = x; then
15210      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15211    fi
15212    OUTPUT_ROOT="$CURDIR"
15213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15214$as_echo "in current directory" >&6; }
15215
15216    # WARNING: This might be a bad thing to do. You need to be sure you want to
15217    # have a configuration in this directory. Do some sanity checks!
15218
15219    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15220      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15221      # other files
15222      files_present=`$LS $OUTPUT_ROOT`
15223      # Configure has already touched config.log and confdefs.h in the current dir when this check
15224      # is performed.
15225      filtered_files=`$ECHO "$files_present" \
15226          | $SED -e 's/config.log//g' \
15227              -e 's/configure.log//g' \
15228              -e 's/confdefs.h//g' \
15229              -e 's/ //g' \
15230          | $TR -d '\n'`
15231      if test "x$filtered_files" != x; then
15232        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15233$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15234        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15235$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15236        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15237$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15238        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15239$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15240        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15241$as_echo "$as_me: seriously mess up just about everything." >&6;}
15242        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15243$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15244        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15245$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15246        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15247      fi
15248    fi
15249  fi
15250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15251$as_echo_n "checking what configuration name to use... " >&6; }
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15253$as_echo "$CONF_NAME" >&6; }
15254
15255
15256  # Only process if variable expands to non-empty
15257
15258  if test "x$OUTPUT_ROOT" != x; then
15259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15260
15261  # Input might be given as Windows format, start by converting to
15262  # unix format.
15263  path="$OUTPUT_ROOT"
15264  new_path=`$CYGPATH -u "$path"`
15265
15266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15269  # "foo.exe" is OK but "foo" is an error.
15270  #
15271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15272  # It is also a way to make sure we got the proper file name for the real test later on.
15273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15274  if test "x$test_shortpath" = x; then
15275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15276$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15277    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15278  fi
15279
15280  # Call helper function which possibly converts this using DOS-style short mode.
15281  # If so, the updated path is stored in $new_path.
15282
15283  input_path="$new_path"
15284  # Check if we need to convert this using DOS-style short mode. If the path
15285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15286  # take no chances and rewrite it.
15287  # Note: m4 eats our [], so we need to use [ and ] instead.
15288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15289  if test "x$has_forbidden_chars" != x; then
15290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15294      # Going to short mode and back again did indeed matter. Since short mode is
15295      # case insensitive, let's make it lowercase to improve readability.
15296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15297      # Now convert it back to Unix-style (cygpath)
15298      input_path=`$CYGPATH -u "$shortmode_path"`
15299      new_path="$input_path"
15300    fi
15301  fi
15302
15303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15304  if test "x$test_cygdrive_prefix" = x; then
15305    # As a simple fix, exclude /usr/bin since it's not a real path.
15306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15308      # a path prefixed by /cygdrive for fixpath to work.
15309      new_path="$CYGWIN_ROOT_PATH$input_path"
15310    fi
15311  fi
15312
15313
15314  if test "x$path" != "x$new_path"; then
15315    OUTPUT_ROOT="$new_path"
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15317$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15318  fi
15319
15320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15321
15322  path="$OUTPUT_ROOT"
15323  has_colon=`$ECHO $path | $GREP ^.:`
15324  new_path="$path"
15325  if test "x$has_colon" = x; then
15326    # Not in mixed or Windows style, start by that.
15327    new_path=`cmd //c echo $path`
15328  fi
15329
15330
15331  input_path="$new_path"
15332  # Check if we need to convert this using DOS-style short mode. If the path
15333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15334  # take no chances and rewrite it.
15335  # Note: m4 eats our [], so we need to use [ and ] instead.
15336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15337  if test "x$has_forbidden_chars" != x; then
15338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15340  fi
15341
15342
15343  windows_path="$new_path"
15344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15345    unix_path=`$CYGPATH -u "$windows_path"`
15346    new_path="$unix_path"
15347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15349    new_path="$unix_path"
15350  fi
15351
15352  if test "x$path" != "x$new_path"; then
15353    OUTPUT_ROOT="$new_path"
15354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15355$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15356  fi
15357
15358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15360
15361    else
15362      # We're on a unix platform. Hooray! :)
15363      path="$OUTPUT_ROOT"
15364      has_space=`$ECHO "$path" | $GREP " "`
15365      if test "x$has_space" != x; then
15366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15367$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15369      fi
15370
15371      # Use eval to expand a potential ~
15372      eval path="$path"
15373      if test ! -f "$path" && test ! -d "$path"; then
15374        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15375      fi
15376
15377      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15378    fi
15379  fi
15380
15381
15382  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15383  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15384
15385  SPEC=$OUTPUT_ROOT/spec.gmk
15386
15387  CONF_NAME=$CONF_NAME
15388
15389  OUTPUT_ROOT=$OUTPUT_ROOT
15390
15391
15392
15393  # The spec.gmk file contains all variables for the make system.
15394  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15395
15396  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15397  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15398
15399  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15400  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15401
15402  # The compare.sh is used to compare the build output to other builds.
15403  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15404
15405  # The generated Makefile knows where the spec.gmk is and where the source is.
15406  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15407  # which will look for generated configurations
15408  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15409
15410
15411
15412# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15413
15414  for ac_prog in apt-get yum port pkgutil pkgadd
15415do
15416  # Extract the first word of "$ac_prog", so it can be a program name with args.
15417set dummy $ac_prog; ac_word=$2
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15419$as_echo_n "checking for $ac_word... " >&6; }
15420if ${ac_cv_prog_PKGHANDLER+:} false; then :
15421  $as_echo_n "(cached) " >&6
15422else
15423  if test -n "$PKGHANDLER"; then
15424  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15425else
15426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15427for as_dir in $PATH
15428do
15429  IFS=$as_save_IFS
15430  test -z "$as_dir" && as_dir=.
15431    for ac_exec_ext in '' $ac_executable_extensions; do
15432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15433    ac_cv_prog_PKGHANDLER="$ac_prog"
15434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15435    break 2
15436  fi
15437done
15438  done
15439IFS=$as_save_IFS
15440
15441fi
15442fi
15443PKGHANDLER=$ac_cv_prog_PKGHANDLER
15444if test -n "$PKGHANDLER"; then
15445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15446$as_echo "$PKGHANDLER" >&6; }
15447else
15448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15449$as_echo "no" >&6; }
15450fi
15451
15452
15453  test -n "$PKGHANDLER" && break
15454done
15455
15456
15457
15458# Setup tools that requires more complex handling, or that is not needed by the configure script.
15459
15460
15461  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15462  if test "x$MAKE" != x; then
15463    # User has supplied a make, test it.
15464    if test ! -f "$MAKE"; then
15465      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15466    fi
15467
15468  MAKE_CANDIDATE=""$MAKE""
15469  DESCRIPTION="user supplied MAKE=$MAKE"
15470
15471  # On Cygwin, we require a newer version of make than on other platforms
15472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15473    MAKE_VERSION_EXPR="-e 4\."
15474    MAKE_REQUIRED_VERSION="4.0"
15475   else
15476    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15477    MAKE_REQUIRED_VERSION="3.81"
15478  fi
15479
15480  if test "x$MAKE_CANDIDATE" != x; then
15481    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15482$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15483    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15484    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15485    if test "x$IS_GNU_MAKE" = x; then
15486      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15487$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15488    else
15489      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15490      if test "x$IS_MODERN_MAKE" = x; then
15491        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15492$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15493      else
15494        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15495          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15496            MAKE_EXPECTED_ENV='cygwin'
15497          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15498            MAKE_EXPECTED_ENV='msys'
15499          else
15500            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15501          fi
15502          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15503          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15504        else
15505          # Not relevant for non-Windows
15506          IS_MAKE_CORRECT_ENV=true
15507        fi
15508        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15509          { $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
15510$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;}
15511        else
15512          FOUND_MAKE=$MAKE_CANDIDATE
15513
15514  # Only process if variable expands to non-empty
15515
15516  if test "x$FOUND_MAKE" != x; then
15517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15518
15519  # First separate the path from the arguments. This will split at the first
15520  # space.
15521  complete="$FOUND_MAKE"
15522  path="${complete%% *}"
15523  tmp="$complete EOL"
15524  arguments="${tmp#* }"
15525
15526  # Input might be given as Windows format, start by converting to
15527  # unix format.
15528  new_path=`$CYGPATH -u "$path"`
15529
15530  # Now try to locate executable using which
15531  new_path=`$WHICH "$new_path" 2> /dev/null`
15532  # bat and cmd files are not always considered executable in cygwin causing which
15533  # to not find them
15534  if test "x$new_path" = x \
15535      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15536      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15537    new_path=`$CYGPATH -u "$path"`
15538  fi
15539  if test "x$new_path" = x; then
15540    # Oops. Which didn't find the executable.
15541    # The splitting of arguments from the executable at a space might have been incorrect,
15542    # since paths with space are more likely in Windows. Give it another try with the whole
15543    # argument.
15544    path="$complete"
15545    arguments="EOL"
15546    new_path=`$CYGPATH -u "$path"`
15547    new_path=`$WHICH "$new_path" 2> /dev/null`
15548    # bat and cmd files are not always considered executable in cygwin causing which
15549    # to not find them
15550    if test "x$new_path" = x \
15551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15553      new_path=`$CYGPATH -u "$path"`
15554    fi
15555    if test "x$new_path" = x; then
15556      # It's still not found. Now this is an unrecoverable error.
15557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15558$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15559      has_space=`$ECHO "$complete" | $GREP " "`
15560      if test "x$has_space" != x; then
15561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15563      fi
15564      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15565    fi
15566  fi
15567
15568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15571  # "foo.exe" is OK but "foo" is an error.
15572  #
15573  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15574  # It is also a way to make sure we got the proper file name for the real test later on.
15575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15576  if test "x$test_shortpath" = x; then
15577    # Short path failed, file does not exist as specified.
15578    # Try adding .exe or .cmd
15579    if test -f "${new_path}.exe"; then
15580      input_to_shortpath="${new_path}.exe"
15581    elif test -f "${new_path}.cmd"; then
15582      input_to_shortpath="${new_path}.cmd"
15583    else
15584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15585$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15586      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15587$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15588      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15589    fi
15590  else
15591    input_to_shortpath="$new_path"
15592  fi
15593
15594  # Call helper function which possibly converts this using DOS-style short mode.
15595  # If so, the updated path is stored in $new_path.
15596  new_path="$input_to_shortpath"
15597
15598  input_path="$input_to_shortpath"
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-style (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 $input_to_shortpath | $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  # remove trailing .exe if any
15629  new_path="${new_path/%.exe/}"
15630
15631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15632
15633  # First separate the path from the arguments. This will split at the first
15634  # space.
15635  complete="$FOUND_MAKE"
15636  path="${complete%% *}"
15637  tmp="$complete EOL"
15638  arguments="${tmp#* }"
15639
15640  # Input might be given as Windows format, start by converting to
15641  # unix format.
15642  new_path="$path"
15643
15644  windows_path="$new_path"
15645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15646    unix_path=`$CYGPATH -u "$windows_path"`
15647    new_path="$unix_path"
15648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15650    new_path="$unix_path"
15651  fi
15652
15653
15654  # Now try to locate executable using which
15655  new_path=`$WHICH "$new_path" 2> /dev/null`
15656
15657  if test "x$new_path" = x; then
15658    # Oops. Which didn't find the executable.
15659    # The splitting of arguments from the executable at a space might have been incorrect,
15660    # since paths with space are more likely in Windows. Give it another try with the whole
15661    # argument.
15662    path="$complete"
15663    arguments="EOL"
15664    new_path="$path"
15665
15666  windows_path="$new_path"
15667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15668    unix_path=`$CYGPATH -u "$windows_path"`
15669    new_path="$unix_path"
15670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15672    new_path="$unix_path"
15673  fi
15674
15675
15676    new_path=`$WHICH "$new_path" 2> /dev/null`
15677    # bat and cmd files are not always considered executable in MSYS causing which
15678    # to not find them
15679    if test "x$new_path" = x \
15680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15682      new_path="$path"
15683
15684  windows_path="$new_path"
15685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15686    unix_path=`$CYGPATH -u "$windows_path"`
15687    new_path="$unix_path"
15688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15690    new_path="$unix_path"
15691  fi
15692
15693    fi
15694
15695    if test "x$new_path" = x; then
15696      # It's still not found. Now this is an unrecoverable error.
15697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15699      has_space=`$ECHO "$complete" | $GREP " "`
15700      if test "x$has_space" != x; then
15701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15703      fi
15704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15705    fi
15706  fi
15707
15708  # Now new_path has a complete unix path to the binary
15709  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15710    # Keep paths in /bin as-is, but remove trailing .exe if any
15711    new_path="${new_path/%.exe/}"
15712    # Do not save /bin paths to all_fixpath_prefixes!
15713  else
15714    # Not in mixed or Windows style, start by that.
15715    new_path=`cmd //c echo $new_path`
15716
15717  input_path="$new_path"
15718  # Check if we need to convert this using DOS-style short mode. If the path
15719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15720  # take no chances and rewrite it.
15721  # Note: m4 eats our [], so we need to use [ and ] instead.
15722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15723  if test "x$has_forbidden_chars" != x; then
15724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15726  fi
15727
15728    # Output is in $new_path
15729
15730  windows_path="$new_path"
15731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15732    unix_path=`$CYGPATH -u "$windows_path"`
15733    new_path="$unix_path"
15734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15736    new_path="$unix_path"
15737  fi
15738
15739    # remove trailing .exe if any
15740    new_path="${new_path/%.exe/}"
15741
15742    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15743    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15744  fi
15745
15746    else
15747      # We're on a unix platform. Hooray! :)
15748      # First separate the path from the arguments. This will split at the first
15749      # space.
15750      complete="$FOUND_MAKE"
15751      path="${complete%% *}"
15752      tmp="$complete EOL"
15753      arguments="${tmp#* }"
15754
15755      # Cannot rely on the command "which" here since it doesn't always work.
15756      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15757      if test -z "$is_absolute_path"; then
15758        # Path to executable is not absolute. Find it.
15759        IFS_save="$IFS"
15760        IFS=:
15761        for p in $PATH; do
15762          if test -f "$p/$path" && test -x "$p/$path"; then
15763            new_path="$p/$path"
15764            break
15765          fi
15766        done
15767        IFS="$IFS_save"
15768      else
15769        # This is an absolute path, we can use it without further modifications.
15770        new_path="$path"
15771      fi
15772
15773      if test "x$new_path" = x; then
15774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15776        has_space=`$ECHO "$complete" | $GREP " "`
15777        if test "x$has_space" != x; then
15778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15780        fi
15781        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15782      fi
15783    fi
15784
15785    # Now join together the path and the arguments once again
15786    if test "x$arguments" != xEOL; then
15787      new_complete="$new_path ${arguments% *}"
15788    else
15789      new_complete="$new_path"
15790    fi
15791
15792    if test "x$complete" != "x$new_complete"; then
15793      FOUND_MAKE="$new_complete"
15794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15795$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15796    fi
15797  fi
15798
15799        fi
15800      fi
15801    fi
15802  fi
15803
15804    if test "x$FOUND_MAKE" = x; then
15805      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15806    fi
15807  else
15808    # Try our hardest to locate a correct version of GNU make
15809    for ac_prog in gmake
15810do
15811  # Extract the first word of "$ac_prog", so it can be a program name with args.
15812set dummy $ac_prog; ac_word=$2
15813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15814$as_echo_n "checking for $ac_word... " >&6; }
15815if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15816  $as_echo_n "(cached) " >&6
15817else
15818  case $CHECK_GMAKE in
15819  [\\/]* | ?:[\\/]*)
15820  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15821  ;;
15822  *)
15823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15824for as_dir in $PATH
15825do
15826  IFS=$as_save_IFS
15827  test -z "$as_dir" && as_dir=.
15828    for ac_exec_ext in '' $ac_executable_extensions; do
15829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15830    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15832    break 2
15833  fi
15834done
15835  done
15836IFS=$as_save_IFS
15837
15838  ;;
15839esac
15840fi
15841CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15842if test -n "$CHECK_GMAKE"; then
15843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15844$as_echo "$CHECK_GMAKE" >&6; }
15845else
15846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15847$as_echo "no" >&6; }
15848fi
15849
15850
15851  test -n "$CHECK_GMAKE" && break
15852done
15853
15854
15855  MAKE_CANDIDATE=""$CHECK_GMAKE""
15856  DESCRIPTION="gmake in PATH"
15857
15858  # On Cygwin, we require a newer version of make than on other platforms
15859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15860    MAKE_VERSION_EXPR="-e 4\."
15861    MAKE_REQUIRED_VERSION="4.0"
15862   else
15863    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15864    MAKE_REQUIRED_VERSION="3.81"
15865  fi
15866
15867  if test "x$MAKE_CANDIDATE" != x; then
15868    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15869$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15870    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15871    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15872    if test "x$IS_GNU_MAKE" = x; then
15873      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15874$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15875    else
15876      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15877      if test "x$IS_MODERN_MAKE" = x; then
15878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15879$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15880      else
15881        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15882          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15883            MAKE_EXPECTED_ENV='cygwin'
15884          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15885            MAKE_EXPECTED_ENV='msys'
15886          else
15887            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15888          fi
15889          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15890          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15891        else
15892          # Not relevant for non-Windows
15893          IS_MAKE_CORRECT_ENV=true
15894        fi
15895        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15896          { $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
15897$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;}
15898        else
15899          FOUND_MAKE=$MAKE_CANDIDATE
15900
15901  # Only process if variable expands to non-empty
15902
15903  if test "x$FOUND_MAKE" != x; then
15904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15905
15906  # First separate the path from the arguments. This will split at the first
15907  # space.
15908  complete="$FOUND_MAKE"
15909  path="${complete%% *}"
15910  tmp="$complete EOL"
15911  arguments="${tmp#* }"
15912
15913  # Input might be given as Windows format, start by converting to
15914  # unix format.
15915  new_path=`$CYGPATH -u "$path"`
15916
15917  # Now try to locate executable using which
15918  new_path=`$WHICH "$new_path" 2> /dev/null`
15919  # bat and cmd files are not always considered executable in cygwin causing which
15920  # to not find them
15921  if test "x$new_path" = x \
15922      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15923      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15924    new_path=`$CYGPATH -u "$path"`
15925  fi
15926  if test "x$new_path" = x; then
15927    # Oops. Which didn't find the executable.
15928    # The splitting of arguments from the executable at a space might have been incorrect,
15929    # since paths with space are more likely in Windows. Give it another try with the whole
15930    # argument.
15931    path="$complete"
15932    arguments="EOL"
15933    new_path=`$CYGPATH -u "$path"`
15934    new_path=`$WHICH "$new_path" 2> /dev/null`
15935    # bat and cmd files are not always considered executable in cygwin causing which
15936    # to not find them
15937    if test "x$new_path" = x \
15938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15940      new_path=`$CYGPATH -u "$path"`
15941    fi
15942    if test "x$new_path" = x; then
15943      # It's still not found. Now this is an unrecoverable error.
15944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15945$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15946      has_space=`$ECHO "$complete" | $GREP " "`
15947      if test "x$has_space" != x; then
15948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15950      fi
15951      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15952    fi
15953  fi
15954
15955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15958  # "foo.exe" is OK but "foo" is an error.
15959  #
15960  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15961  # It is also a way to make sure we got the proper file name for the real test later on.
15962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15963  if test "x$test_shortpath" = x; then
15964    # Short path failed, file does not exist as specified.
15965    # Try adding .exe or .cmd
15966    if test -f "${new_path}.exe"; then
15967      input_to_shortpath="${new_path}.exe"
15968    elif test -f "${new_path}.cmd"; then
15969      input_to_shortpath="${new_path}.cmd"
15970    else
15971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15972$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15973      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15974$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15975      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15976    fi
15977  else
15978    input_to_shortpath="$new_path"
15979  fi
15980
15981  # Call helper function which possibly converts this using DOS-style short mode.
15982  # If so, the updated path is stored in $new_path.
15983  new_path="$input_to_shortpath"
15984
15985  input_path="$input_to_shortpath"
15986  # Check if we need to convert this using DOS-style short mode. If the path
15987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15988  # take no chances and rewrite it.
15989  # Note: m4 eats our [], so we need to use [ and ] instead.
15990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15991  if test "x$has_forbidden_chars" != x; then
15992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15996      # Going to short mode and back again did indeed matter. Since short mode is
15997      # case insensitive, let's make it lowercase to improve readability.
15998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15999      # Now convert it back to Unix-style (cygpath)
16000      input_path=`$CYGPATH -u "$shortmode_path"`
16001      new_path="$input_path"
16002    fi
16003  fi
16004
16005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16006  if test "x$test_cygdrive_prefix" = x; then
16007    # As a simple fix, exclude /usr/bin since it's not a real path.
16008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16010      # a path prefixed by /cygdrive for fixpath to work.
16011      new_path="$CYGWIN_ROOT_PATH$input_path"
16012    fi
16013  fi
16014
16015  # remove trailing .exe if any
16016  new_path="${new_path/%.exe/}"
16017
16018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16019
16020  # First separate the path from the arguments. This will split at the first
16021  # space.
16022  complete="$FOUND_MAKE"
16023  path="${complete%% *}"
16024  tmp="$complete EOL"
16025  arguments="${tmp#* }"
16026
16027  # Input might be given as Windows format, start by converting to
16028  # unix format.
16029  new_path="$path"
16030
16031  windows_path="$new_path"
16032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16033    unix_path=`$CYGPATH -u "$windows_path"`
16034    new_path="$unix_path"
16035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16037    new_path="$unix_path"
16038  fi
16039
16040
16041  # Now try to locate executable using which
16042  new_path=`$WHICH "$new_path" 2> /dev/null`
16043
16044  if test "x$new_path" = x; then
16045    # Oops. Which didn't find the executable.
16046    # The splitting of arguments from the executable at a space might have been incorrect,
16047    # since paths with space are more likely in Windows. Give it another try with the whole
16048    # argument.
16049    path="$complete"
16050    arguments="EOL"
16051    new_path="$path"
16052
16053  windows_path="$new_path"
16054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16055    unix_path=`$CYGPATH -u "$windows_path"`
16056    new_path="$unix_path"
16057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16059    new_path="$unix_path"
16060  fi
16061
16062
16063    new_path=`$WHICH "$new_path" 2> /dev/null`
16064    # bat and cmd files are not always considered executable in MSYS causing which
16065    # to not find them
16066    if test "x$new_path" = x \
16067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16069      new_path="$path"
16070
16071  windows_path="$new_path"
16072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16073    unix_path=`$CYGPATH -u "$windows_path"`
16074    new_path="$unix_path"
16075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16077    new_path="$unix_path"
16078  fi
16079
16080    fi
16081
16082    if test "x$new_path" = x; then
16083      # It's still not found. Now this is an unrecoverable error.
16084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16086      has_space=`$ECHO "$complete" | $GREP " "`
16087      if test "x$has_space" != x; then
16088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16090      fi
16091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16092    fi
16093  fi
16094
16095  # Now new_path has a complete unix path to the binary
16096  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16097    # Keep paths in /bin as-is, but remove trailing .exe if any
16098    new_path="${new_path/%.exe/}"
16099    # Do not save /bin paths to all_fixpath_prefixes!
16100  else
16101    # Not in mixed or Windows style, start by that.
16102    new_path=`cmd //c echo $new_path`
16103
16104  input_path="$new_path"
16105  # Check if we need to convert this using DOS-style short mode. If the path
16106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16107  # take no chances and rewrite it.
16108  # Note: m4 eats our [], so we need to use [ and ] instead.
16109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16110  if test "x$has_forbidden_chars" != x; then
16111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16113  fi
16114
16115    # Output is in $new_path
16116
16117  windows_path="$new_path"
16118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16119    unix_path=`$CYGPATH -u "$windows_path"`
16120    new_path="$unix_path"
16121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16123    new_path="$unix_path"
16124  fi
16125
16126    # remove trailing .exe if any
16127    new_path="${new_path/%.exe/}"
16128
16129    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16130    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16131  fi
16132
16133    else
16134      # We're on a unix platform. Hooray! :)
16135      # First separate the path from the arguments. This will split at the first
16136      # space.
16137      complete="$FOUND_MAKE"
16138      path="${complete%% *}"
16139      tmp="$complete EOL"
16140      arguments="${tmp#* }"
16141
16142      # Cannot rely on the command "which" here since it doesn't always work.
16143      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16144      if test -z "$is_absolute_path"; then
16145        # Path to executable is not absolute. Find it.
16146        IFS_save="$IFS"
16147        IFS=:
16148        for p in $PATH; do
16149          if test -f "$p/$path" && test -x "$p/$path"; then
16150            new_path="$p/$path"
16151            break
16152          fi
16153        done
16154        IFS="$IFS_save"
16155      else
16156        # This is an absolute path, we can use it without further modifications.
16157        new_path="$path"
16158      fi
16159
16160      if test "x$new_path" = x; then
16161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16163        has_space=`$ECHO "$complete" | $GREP " "`
16164        if test "x$has_space" != x; then
16165          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16166$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16167        fi
16168        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16169      fi
16170    fi
16171
16172    # Now join together the path and the arguments once again
16173    if test "x$arguments" != xEOL; then
16174      new_complete="$new_path ${arguments% *}"
16175    else
16176      new_complete="$new_path"
16177    fi
16178
16179    if test "x$complete" != "x$new_complete"; then
16180      FOUND_MAKE="$new_complete"
16181      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16182$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16183    fi
16184  fi
16185
16186        fi
16187      fi
16188    fi
16189  fi
16190
16191
16192    if test "x$FOUND_MAKE" = x; then
16193      for ac_prog in make
16194do
16195  # Extract the first word of "$ac_prog", so it can be a program name with args.
16196set dummy $ac_prog; ac_word=$2
16197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16198$as_echo_n "checking for $ac_word... " >&6; }
16199if ${ac_cv_path_CHECK_MAKE+:} false; then :
16200  $as_echo_n "(cached) " >&6
16201else
16202  case $CHECK_MAKE in
16203  [\\/]* | ?:[\\/]*)
16204  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16205  ;;
16206  *)
16207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16208for as_dir in $PATH
16209do
16210  IFS=$as_save_IFS
16211  test -z "$as_dir" && as_dir=.
16212    for ac_exec_ext in '' $ac_executable_extensions; do
16213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16214    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16216    break 2
16217  fi
16218done
16219  done
16220IFS=$as_save_IFS
16221
16222  ;;
16223esac
16224fi
16225CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16226if test -n "$CHECK_MAKE"; then
16227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16228$as_echo "$CHECK_MAKE" >&6; }
16229else
16230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16231$as_echo "no" >&6; }
16232fi
16233
16234
16235  test -n "$CHECK_MAKE" && break
16236done
16237
16238
16239  MAKE_CANDIDATE=""$CHECK_MAKE""
16240  DESCRIPTION="make in PATH"
16241
16242  # On Cygwin, we require a newer version of make than on other platforms
16243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16244    MAKE_VERSION_EXPR="-e 4\."
16245    MAKE_REQUIRED_VERSION="4.0"
16246   else
16247    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16248    MAKE_REQUIRED_VERSION="3.81"
16249  fi
16250
16251  if test "x$MAKE_CANDIDATE" != x; then
16252    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16253$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16254    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16255    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16256    if test "x$IS_GNU_MAKE" = x; then
16257      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16258$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16259    else
16260      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16261      if test "x$IS_MODERN_MAKE" = x; then
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16263$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16264      else
16265        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16266          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16267            MAKE_EXPECTED_ENV='cygwin'
16268          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16269            MAKE_EXPECTED_ENV='msys'
16270          else
16271            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16272          fi
16273          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16274          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16275        else
16276          # Not relevant for non-Windows
16277          IS_MAKE_CORRECT_ENV=true
16278        fi
16279        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16280          { $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
16281$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;}
16282        else
16283          FOUND_MAKE=$MAKE_CANDIDATE
16284
16285  # Only process if variable expands to non-empty
16286
16287  if test "x$FOUND_MAKE" != x; then
16288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289
16290  # First separate the path from the arguments. This will split at the first
16291  # space.
16292  complete="$FOUND_MAKE"
16293  path="${complete%% *}"
16294  tmp="$complete EOL"
16295  arguments="${tmp#* }"
16296
16297  # Input might be given as Windows format, start by converting to
16298  # unix format.
16299  new_path=`$CYGPATH -u "$path"`
16300
16301  # Now try to locate executable using which
16302  new_path=`$WHICH "$new_path" 2> /dev/null`
16303  # bat and cmd files are not always considered executable in cygwin causing which
16304  # to not find them
16305  if test "x$new_path" = x \
16306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16308    new_path=`$CYGPATH -u "$path"`
16309  fi
16310  if test "x$new_path" = x; then
16311    # Oops. Which didn't find the executable.
16312    # The splitting of arguments from the executable at a space might have been incorrect,
16313    # since paths with space are more likely in Windows. Give it another try with the whole
16314    # argument.
16315    path="$complete"
16316    arguments="EOL"
16317    new_path=`$CYGPATH -u "$path"`
16318    new_path=`$WHICH "$new_path" 2> /dev/null`
16319    # bat and cmd files are not always considered executable in cygwin causing which
16320    # to not find them
16321    if test "x$new_path" = x \
16322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16324      new_path=`$CYGPATH -u "$path"`
16325    fi
16326    if test "x$new_path" = x; then
16327      # It's still not found. Now this is an unrecoverable error.
16328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16329$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16330      has_space=`$ECHO "$complete" | $GREP " "`
16331      if test "x$has_space" != x; then
16332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16334      fi
16335      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16336    fi
16337  fi
16338
16339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16342  # "foo.exe" is OK but "foo" is an error.
16343  #
16344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16345  # It is also a way to make sure we got the proper file name for the real test later on.
16346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16347  if test "x$test_shortpath" = x; then
16348    # Short path failed, file does not exist as specified.
16349    # Try adding .exe or .cmd
16350    if test -f "${new_path}.exe"; then
16351      input_to_shortpath="${new_path}.exe"
16352    elif test -f "${new_path}.cmd"; then
16353      input_to_shortpath="${new_path}.cmd"
16354    else
16355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16359      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16360    fi
16361  else
16362    input_to_shortpath="$new_path"
16363  fi
16364
16365  # Call helper function which possibly converts this using DOS-style short mode.
16366  # If so, the updated path is stored in $new_path.
16367  new_path="$input_to_shortpath"
16368
16369  input_path="$input_to_shortpath"
16370  # Check if we need to convert this using DOS-style short mode. If the path
16371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16372  # take no chances and rewrite it.
16373  # Note: m4 eats our [], so we need to use [ and ] instead.
16374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16375  if test "x$has_forbidden_chars" != x; then
16376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16380      # Going to short mode and back again did indeed matter. Since short mode is
16381      # case insensitive, let's make it lowercase to improve readability.
16382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16383      # Now convert it back to Unix-style (cygpath)
16384      input_path=`$CYGPATH -u "$shortmode_path"`
16385      new_path="$input_path"
16386    fi
16387  fi
16388
16389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16390  if test "x$test_cygdrive_prefix" = x; then
16391    # As a simple fix, exclude /usr/bin since it's not a real path.
16392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16394      # a path prefixed by /cygdrive for fixpath to work.
16395      new_path="$CYGWIN_ROOT_PATH$input_path"
16396    fi
16397  fi
16398
16399  # remove trailing .exe if any
16400  new_path="${new_path/%.exe/}"
16401
16402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16403
16404  # First separate the path from the arguments. This will split at the first
16405  # space.
16406  complete="$FOUND_MAKE"
16407  path="${complete%% *}"
16408  tmp="$complete EOL"
16409  arguments="${tmp#* }"
16410
16411  # Input might be given as Windows format, start by converting to
16412  # unix format.
16413  new_path="$path"
16414
16415  windows_path="$new_path"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    new_path="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    new_path="$unix_path"
16422  fi
16423
16424
16425  # Now try to locate executable using which
16426  new_path=`$WHICH "$new_path" 2> /dev/null`
16427
16428  if test "x$new_path" = x; then
16429    # Oops. Which didn't find the executable.
16430    # The splitting of arguments from the executable at a space might have been incorrect,
16431    # since paths with space are more likely in Windows. Give it another try with the whole
16432    # argument.
16433    path="$complete"
16434    arguments="EOL"
16435    new_path="$path"
16436
16437  windows_path="$new_path"
16438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16439    unix_path=`$CYGPATH -u "$windows_path"`
16440    new_path="$unix_path"
16441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16443    new_path="$unix_path"
16444  fi
16445
16446
16447    new_path=`$WHICH "$new_path" 2> /dev/null`
16448    # bat and cmd files are not always considered executable in MSYS causing which
16449    # to not find them
16450    if test "x$new_path" = x \
16451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16453      new_path="$path"
16454
16455  windows_path="$new_path"
16456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16457    unix_path=`$CYGPATH -u "$windows_path"`
16458    new_path="$unix_path"
16459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16461    new_path="$unix_path"
16462  fi
16463
16464    fi
16465
16466    if test "x$new_path" = x; then
16467      # It's still not found. Now this is an unrecoverable error.
16468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16470      has_space=`$ECHO "$complete" | $GREP " "`
16471      if test "x$has_space" != x; then
16472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16474      fi
16475      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16476    fi
16477  fi
16478
16479  # Now new_path has a complete unix path to the binary
16480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16481    # Keep paths in /bin as-is, but remove trailing .exe if any
16482    new_path="${new_path/%.exe/}"
16483    # Do not save /bin paths to all_fixpath_prefixes!
16484  else
16485    # Not in mixed or Windows style, start by that.
16486    new_path=`cmd //c echo $new_path`
16487
16488  input_path="$new_path"
16489  # Check if we need to convert this using DOS-style short mode. If the path
16490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16491  # take no chances and rewrite it.
16492  # Note: m4 eats our [], so we need to use [ and ] instead.
16493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16494  if test "x$has_forbidden_chars" != x; then
16495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16497  fi
16498
16499    # Output is in $new_path
16500
16501  windows_path="$new_path"
16502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16503    unix_path=`$CYGPATH -u "$windows_path"`
16504    new_path="$unix_path"
16505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16507    new_path="$unix_path"
16508  fi
16509
16510    # remove trailing .exe if any
16511    new_path="${new_path/%.exe/}"
16512
16513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16515  fi
16516
16517    else
16518      # We're on a unix platform. Hooray! :)
16519      # First separate the path from the arguments. This will split at the first
16520      # space.
16521      complete="$FOUND_MAKE"
16522      path="${complete%% *}"
16523      tmp="$complete EOL"
16524      arguments="${tmp#* }"
16525
16526      # Cannot rely on the command "which" here since it doesn't always work.
16527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16528      if test -z "$is_absolute_path"; then
16529        # Path to executable is not absolute. Find it.
16530        IFS_save="$IFS"
16531        IFS=:
16532        for p in $PATH; do
16533          if test -f "$p/$path" && test -x "$p/$path"; then
16534            new_path="$p/$path"
16535            break
16536          fi
16537        done
16538        IFS="$IFS_save"
16539      else
16540        # This is an absolute path, we can use it without further modifications.
16541        new_path="$path"
16542      fi
16543
16544      if test "x$new_path" = x; then
16545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16547        has_space=`$ECHO "$complete" | $GREP " "`
16548        if test "x$has_space" != x; then
16549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16551        fi
16552        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16553      fi
16554    fi
16555
16556    # Now join together the path and the arguments once again
16557    if test "x$arguments" != xEOL; then
16558      new_complete="$new_path ${arguments% *}"
16559    else
16560      new_complete="$new_path"
16561    fi
16562
16563    if test "x$complete" != "x$new_complete"; then
16564      FOUND_MAKE="$new_complete"
16565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16566$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16567    fi
16568  fi
16569
16570        fi
16571      fi
16572    fi
16573  fi
16574
16575    fi
16576
16577    if test "x$FOUND_MAKE" = x; then
16578      if test "x$TOOLCHAIN_PATH" != x; then
16579        # We have a toolchain path, check that as well before giving up.
16580        OLD_PATH=$PATH
16581        PATH=$TOOLCHAIN_PATH:$PATH
16582        for ac_prog in gmake
16583do
16584  # Extract the first word of "$ac_prog", so it can be a program name with args.
16585set dummy $ac_prog; ac_word=$2
16586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16587$as_echo_n "checking for $ac_word... " >&6; }
16588if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16589  $as_echo_n "(cached) " >&6
16590else
16591  case $CHECK_TOOLSDIR_GMAKE in
16592  [\\/]* | ?:[\\/]*)
16593  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16594  ;;
16595  *)
16596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16597for as_dir in $PATH
16598do
16599  IFS=$as_save_IFS
16600  test -z "$as_dir" && as_dir=.
16601    for ac_exec_ext in '' $ac_executable_extensions; do
16602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16603    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16605    break 2
16606  fi
16607done
16608  done
16609IFS=$as_save_IFS
16610
16611  ;;
16612esac
16613fi
16614CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16615if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16617$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16618else
16619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16620$as_echo "no" >&6; }
16621fi
16622
16623
16624  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16625done
16626
16627
16628  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16629  DESCRIPTION="gmake in tools-dir"
16630
16631  # On Cygwin, we require a newer version of make than on other platforms
16632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16633    MAKE_VERSION_EXPR="-e 4\."
16634    MAKE_REQUIRED_VERSION="4.0"
16635   else
16636    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16637    MAKE_REQUIRED_VERSION="3.81"
16638  fi
16639
16640  if test "x$MAKE_CANDIDATE" != x; then
16641    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16642$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16643    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16644    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16645    if test "x$IS_GNU_MAKE" = x; then
16646      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16647$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16648    else
16649      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16650      if test "x$IS_MODERN_MAKE" = x; then
16651        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16652$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16653      else
16654        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16655          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16656            MAKE_EXPECTED_ENV='cygwin'
16657          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16658            MAKE_EXPECTED_ENV='msys'
16659          else
16660            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16661          fi
16662          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16663          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16664        else
16665          # Not relevant for non-Windows
16666          IS_MAKE_CORRECT_ENV=true
16667        fi
16668        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16669          { $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
16670$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;}
16671        else
16672          FOUND_MAKE=$MAKE_CANDIDATE
16673
16674  # Only process if variable expands to non-empty
16675
16676  if test "x$FOUND_MAKE" != x; then
16677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16678
16679  # First separate the path from the arguments. This will split at the first
16680  # space.
16681  complete="$FOUND_MAKE"
16682  path="${complete%% *}"
16683  tmp="$complete EOL"
16684  arguments="${tmp#* }"
16685
16686  # Input might be given as Windows format, start by converting to
16687  # unix format.
16688  new_path=`$CYGPATH -u "$path"`
16689
16690  # Now try to locate executable using which
16691  new_path=`$WHICH "$new_path" 2> /dev/null`
16692  # bat and cmd files are not always considered executable in cygwin causing which
16693  # to not find them
16694  if test "x$new_path" = x \
16695      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16696      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16697    new_path=`$CYGPATH -u "$path"`
16698  fi
16699  if test "x$new_path" = x; then
16700    # Oops. Which didn't find the executable.
16701    # The splitting of arguments from the executable at a space might have been incorrect,
16702    # since paths with space are more likely in Windows. Give it another try with the whole
16703    # argument.
16704    path="$complete"
16705    arguments="EOL"
16706    new_path=`$CYGPATH -u "$path"`
16707    new_path=`$WHICH "$new_path" 2> /dev/null`
16708    # bat and cmd files are not always considered executable in cygwin causing which
16709    # to not find them
16710    if test "x$new_path" = x \
16711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16713      new_path=`$CYGPATH -u "$path"`
16714    fi
16715    if test "x$new_path" = x; then
16716      # It's still not found. Now this is an unrecoverable error.
16717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16718$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16719      has_space=`$ECHO "$complete" | $GREP " "`
16720      if test "x$has_space" != x; then
16721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16723      fi
16724      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16725    fi
16726  fi
16727
16728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16731  # "foo.exe" is OK but "foo" is an error.
16732  #
16733  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16734  # It is also a way to make sure we got the proper file name for the real test later on.
16735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16736  if test "x$test_shortpath" = x; then
16737    # Short path failed, file does not exist as specified.
16738    # Try adding .exe or .cmd
16739    if test -f "${new_path}.exe"; then
16740      input_to_shortpath="${new_path}.exe"
16741    elif test -f "${new_path}.cmd"; then
16742      input_to_shortpath="${new_path}.cmd"
16743    else
16744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16745$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16748      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16749    fi
16750  else
16751    input_to_shortpath="$new_path"
16752  fi
16753
16754  # Call helper function which possibly converts this using DOS-style short mode.
16755  # If so, the updated path is stored in $new_path.
16756  new_path="$input_to_shortpath"
16757
16758  input_path="$input_to_shortpath"
16759  # Check if we need to convert this using DOS-style short mode. If the path
16760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16761  # take no chances and rewrite it.
16762  # Note: m4 eats our [], so we need to use [ and ] instead.
16763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16764  if test "x$has_forbidden_chars" != x; then
16765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16769      # Going to short mode and back again did indeed matter. Since short mode is
16770      # case insensitive, let's make it lowercase to improve readability.
16771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16772      # Now convert it back to Unix-style (cygpath)
16773      input_path=`$CYGPATH -u "$shortmode_path"`
16774      new_path="$input_path"
16775    fi
16776  fi
16777
16778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16779  if test "x$test_cygdrive_prefix" = x; then
16780    # As a simple fix, exclude /usr/bin since it's not a real path.
16781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16783      # a path prefixed by /cygdrive for fixpath to work.
16784      new_path="$CYGWIN_ROOT_PATH$input_path"
16785    fi
16786  fi
16787
16788  # remove trailing .exe if any
16789  new_path="${new_path/%.exe/}"
16790
16791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16792
16793  # First separate the path from the arguments. This will split at the first
16794  # space.
16795  complete="$FOUND_MAKE"
16796  path="${complete%% *}"
16797  tmp="$complete EOL"
16798  arguments="${tmp#* }"
16799
16800  # Input might be given as Windows format, start by converting to
16801  # unix format.
16802  new_path="$path"
16803
16804  windows_path="$new_path"
16805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16806    unix_path=`$CYGPATH -u "$windows_path"`
16807    new_path="$unix_path"
16808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16810    new_path="$unix_path"
16811  fi
16812
16813
16814  # Now try to locate executable using which
16815  new_path=`$WHICH "$new_path" 2> /dev/null`
16816
16817  if test "x$new_path" = x; then
16818    # Oops. Which didn't find the executable.
16819    # The splitting of arguments from the executable at a space might have been incorrect,
16820    # since paths with space are more likely in Windows. Give it another try with the whole
16821    # argument.
16822    path="$complete"
16823    arguments="EOL"
16824    new_path="$path"
16825
16826  windows_path="$new_path"
16827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16828    unix_path=`$CYGPATH -u "$windows_path"`
16829    new_path="$unix_path"
16830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16832    new_path="$unix_path"
16833  fi
16834
16835
16836    new_path=`$WHICH "$new_path" 2> /dev/null`
16837    # bat and cmd files are not always considered executable in MSYS causing which
16838    # to not find them
16839    if test "x$new_path" = x \
16840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16842      new_path="$path"
16843
16844  windows_path="$new_path"
16845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846    unix_path=`$CYGPATH -u "$windows_path"`
16847    new_path="$unix_path"
16848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16850    new_path="$unix_path"
16851  fi
16852
16853    fi
16854
16855    if test "x$new_path" = x; then
16856      # It's still not found. Now this is an unrecoverable error.
16857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16858$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16859      has_space=`$ECHO "$complete" | $GREP " "`
16860      if test "x$has_space" != x; then
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16863      fi
16864      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16865    fi
16866  fi
16867
16868  # Now new_path has a complete unix path to the binary
16869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16870    # Keep paths in /bin as-is, but remove trailing .exe if any
16871    new_path="${new_path/%.exe/}"
16872    # Do not save /bin paths to all_fixpath_prefixes!
16873  else
16874    # Not in mixed or Windows style, start by that.
16875    new_path=`cmd //c echo $new_path`
16876
16877  input_path="$new_path"
16878  # Check if we need to convert this using DOS-style short mode. If the path
16879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16880  # take no chances and rewrite it.
16881  # Note: m4 eats our [], so we need to use [ and ] instead.
16882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16883  if test "x$has_forbidden_chars" != x; then
16884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16886  fi
16887
16888    # Output is in $new_path
16889
16890  windows_path="$new_path"
16891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16892    unix_path=`$CYGPATH -u "$windows_path"`
16893    new_path="$unix_path"
16894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16896    new_path="$unix_path"
16897  fi
16898
16899    # remove trailing .exe if any
16900    new_path="${new_path/%.exe/}"
16901
16902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16904  fi
16905
16906    else
16907      # We're on a unix platform. Hooray! :)
16908      # First separate the path from the arguments. This will split at the first
16909      # space.
16910      complete="$FOUND_MAKE"
16911      path="${complete%% *}"
16912      tmp="$complete EOL"
16913      arguments="${tmp#* }"
16914
16915      # Cannot rely on the command "which" here since it doesn't always work.
16916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16917      if test -z "$is_absolute_path"; then
16918        # Path to executable is not absolute. Find it.
16919        IFS_save="$IFS"
16920        IFS=:
16921        for p in $PATH; do
16922          if test -f "$p/$path" && test -x "$p/$path"; then
16923            new_path="$p/$path"
16924            break
16925          fi
16926        done
16927        IFS="$IFS_save"
16928      else
16929        # This is an absolute path, we can use it without further modifications.
16930        new_path="$path"
16931      fi
16932
16933      if test "x$new_path" = x; then
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16936        has_space=`$ECHO "$complete" | $GREP " "`
16937        if test "x$has_space" != x; then
16938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16940        fi
16941        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16942      fi
16943    fi
16944
16945    # Now join together the path and the arguments once again
16946    if test "x$arguments" != xEOL; then
16947      new_complete="$new_path ${arguments% *}"
16948    else
16949      new_complete="$new_path"
16950    fi
16951
16952    if test "x$complete" != "x$new_complete"; then
16953      FOUND_MAKE="$new_complete"
16954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16955$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16956    fi
16957  fi
16958
16959        fi
16960      fi
16961    fi
16962  fi
16963
16964        if test "x$FOUND_MAKE" = x; then
16965          for ac_prog in make
16966do
16967  # Extract the first word of "$ac_prog", so it can be a program name with args.
16968set dummy $ac_prog; ac_word=$2
16969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16970$as_echo_n "checking for $ac_word... " >&6; }
16971if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16972  $as_echo_n "(cached) " >&6
16973else
16974  case $CHECK_TOOLSDIR_MAKE in
16975  [\\/]* | ?:[\\/]*)
16976  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16977  ;;
16978  *)
16979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16980for as_dir in $PATH
16981do
16982  IFS=$as_save_IFS
16983  test -z "$as_dir" && as_dir=.
16984    for ac_exec_ext in '' $ac_executable_extensions; do
16985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16986    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16988    break 2
16989  fi
16990done
16991  done
16992IFS=$as_save_IFS
16993
16994  ;;
16995esac
16996fi
16997CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16998if test -n "$CHECK_TOOLSDIR_MAKE"; then
16999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17000$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17001else
17002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17003$as_echo "no" >&6; }
17004fi
17005
17006
17007  test -n "$CHECK_TOOLSDIR_MAKE" && break
17008done
17009
17010
17011  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17012  DESCRIPTION="make in tools-dir"
17013
17014  # On Cygwin, we require a newer version of make than on other platforms
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016    MAKE_VERSION_EXPR="-e 4\."
17017    MAKE_REQUIRED_VERSION="4.0"
17018   else
17019    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17020    MAKE_REQUIRED_VERSION="3.81"
17021  fi
17022
17023  if test "x$MAKE_CANDIDATE" != x; then
17024    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17025$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17026    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17027    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17028    if test "x$IS_GNU_MAKE" = x; then
17029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17030$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17031    else
17032      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17033      if test "x$IS_MODERN_MAKE" = x; then
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17035$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17036      else
17037        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17038          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17039            MAKE_EXPECTED_ENV='cygwin'
17040          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17041            MAKE_EXPECTED_ENV='msys'
17042          else
17043            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17044          fi
17045          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17046          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17047        else
17048          # Not relevant for non-Windows
17049          IS_MAKE_CORRECT_ENV=true
17050        fi
17051        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17052          { $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
17053$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;}
17054        else
17055          FOUND_MAKE=$MAKE_CANDIDATE
17056
17057  # Only process if variable expands to non-empty
17058
17059  if test "x$FOUND_MAKE" != x; then
17060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17061
17062  # First separate the path from the arguments. This will split at the first
17063  # space.
17064  complete="$FOUND_MAKE"
17065  path="${complete%% *}"
17066  tmp="$complete EOL"
17067  arguments="${tmp#* }"
17068
17069  # Input might be given as Windows format, start by converting to
17070  # unix format.
17071  new_path=`$CYGPATH -u "$path"`
17072
17073  # Now try to locate executable using which
17074  new_path=`$WHICH "$new_path" 2> /dev/null`
17075  # bat and cmd files are not always considered executable in cygwin causing which
17076  # to not find them
17077  if test "x$new_path" = x \
17078      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17079      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17080    new_path=`$CYGPATH -u "$path"`
17081  fi
17082  if test "x$new_path" = x; then
17083    # Oops. Which didn't find the executable.
17084    # The splitting of arguments from the executable at a space might have been incorrect,
17085    # since paths with space are more likely in Windows. Give it another try with the whole
17086    # argument.
17087    path="$complete"
17088    arguments="EOL"
17089    new_path=`$CYGPATH -u "$path"`
17090    new_path=`$WHICH "$new_path" 2> /dev/null`
17091    # bat and cmd files are not always considered executable in cygwin causing which
17092    # to not find them
17093    if test "x$new_path" = x \
17094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17096      new_path=`$CYGPATH -u "$path"`
17097    fi
17098    if test "x$new_path" = x; then
17099      # It's still not found. Now this is an unrecoverable error.
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17102      has_space=`$ECHO "$complete" | $GREP " "`
17103      if test "x$has_space" != x; then
17104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17106      fi
17107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17108    fi
17109  fi
17110
17111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17114  # "foo.exe" is OK but "foo" is an error.
17115  #
17116  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17117  # It is also a way to make sure we got the proper file name for the real test later on.
17118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17119  if test "x$test_shortpath" = x; then
17120    # Short path failed, file does not exist as specified.
17121    # Try adding .exe or .cmd
17122    if test -f "${new_path}.exe"; then
17123      input_to_shortpath="${new_path}.exe"
17124    elif test -f "${new_path}.cmd"; then
17125      input_to_shortpath="${new_path}.cmd"
17126    else
17127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17129      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17130$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17131      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17132    fi
17133  else
17134    input_to_shortpath="$new_path"
17135  fi
17136
17137  # Call helper function which possibly converts this using DOS-style short mode.
17138  # If so, the updated path is stored in $new_path.
17139  new_path="$input_to_shortpath"
17140
17141  input_path="$input_to_shortpath"
17142  # Check if we need to convert this using DOS-style short mode. If the path
17143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17144  # take no chances and rewrite it.
17145  # Note: m4 eats our [], so we need to use [ and ] instead.
17146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17147  if test "x$has_forbidden_chars" != x; then
17148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17152      # Going to short mode and back again did indeed matter. Since short mode is
17153      # case insensitive, let's make it lowercase to improve readability.
17154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17155      # Now convert it back to Unix-style (cygpath)
17156      input_path=`$CYGPATH -u "$shortmode_path"`
17157      new_path="$input_path"
17158    fi
17159  fi
17160
17161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17162  if test "x$test_cygdrive_prefix" = x; then
17163    # As a simple fix, exclude /usr/bin since it's not a real path.
17164    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17166      # a path prefixed by /cygdrive for fixpath to work.
17167      new_path="$CYGWIN_ROOT_PATH$input_path"
17168    fi
17169  fi
17170
17171  # remove trailing .exe if any
17172  new_path="${new_path/%.exe/}"
17173
17174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17175
17176  # First separate the path from the arguments. This will split at the first
17177  # space.
17178  complete="$FOUND_MAKE"
17179  path="${complete%% *}"
17180  tmp="$complete EOL"
17181  arguments="${tmp#* }"
17182
17183  # Input might be given as Windows format, start by converting to
17184  # unix format.
17185  new_path="$path"
17186
17187  windows_path="$new_path"
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    unix_path=`$CYGPATH -u "$windows_path"`
17190    new_path="$unix_path"
17191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17193    new_path="$unix_path"
17194  fi
17195
17196
17197  # Now try to locate executable using which
17198  new_path=`$WHICH "$new_path" 2> /dev/null`
17199
17200  if test "x$new_path" = x; then
17201    # Oops. Which didn't find the executable.
17202    # The splitting of arguments from the executable at a space might have been incorrect,
17203    # since paths with space are more likely in Windows. Give it another try with the whole
17204    # argument.
17205    path="$complete"
17206    arguments="EOL"
17207    new_path="$path"
17208
17209  windows_path="$new_path"
17210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17211    unix_path=`$CYGPATH -u "$windows_path"`
17212    new_path="$unix_path"
17213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17215    new_path="$unix_path"
17216  fi
17217
17218
17219    new_path=`$WHICH "$new_path" 2> /dev/null`
17220    # bat and cmd files are not always considered executable in MSYS causing which
17221    # to not find them
17222    if test "x$new_path" = x \
17223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17225      new_path="$path"
17226
17227  windows_path="$new_path"
17228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229    unix_path=`$CYGPATH -u "$windows_path"`
17230    new_path="$unix_path"
17231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17233    new_path="$unix_path"
17234  fi
17235
17236    fi
17237
17238    if test "x$new_path" = x; then
17239      # It's still not found. Now this is an unrecoverable error.
17240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17241$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17242      has_space=`$ECHO "$complete" | $GREP " "`
17243      if test "x$has_space" != x; then
17244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17246      fi
17247      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17248    fi
17249  fi
17250
17251  # Now new_path has a complete unix path to the binary
17252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17253    # Keep paths in /bin as-is, but remove trailing .exe if any
17254    new_path="${new_path/%.exe/}"
17255    # Do not save /bin paths to all_fixpath_prefixes!
17256  else
17257    # Not in mixed or Windows style, start by that.
17258    new_path=`cmd //c echo $new_path`
17259
17260  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17269  fi
17270
17271    # Output is in $new_path
17272
17273  windows_path="$new_path"
17274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17275    unix_path=`$CYGPATH -u "$windows_path"`
17276    new_path="$unix_path"
17277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17279    new_path="$unix_path"
17280  fi
17281
17282    # remove trailing .exe if any
17283    new_path="${new_path/%.exe/}"
17284
17285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17287  fi
17288
17289    else
17290      # We're on a unix platform. Hooray! :)
17291      # First separate the path from the arguments. This will split at the first
17292      # space.
17293      complete="$FOUND_MAKE"
17294      path="${complete%% *}"
17295      tmp="$complete EOL"
17296      arguments="${tmp#* }"
17297
17298      # Cannot rely on the command "which" here since it doesn't always work.
17299      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17300      if test -z "$is_absolute_path"; then
17301        # Path to executable is not absolute. Find it.
17302        IFS_save="$IFS"
17303        IFS=:
17304        for p in $PATH; do
17305          if test -f "$p/$path" && test -x "$p/$path"; then
17306            new_path="$p/$path"
17307            break
17308          fi
17309        done
17310        IFS="$IFS_save"
17311      else
17312        # This is an absolute path, we can use it without further modifications.
17313        new_path="$path"
17314      fi
17315
17316      if test "x$new_path" = x; then
17317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17319        has_space=`$ECHO "$complete" | $GREP " "`
17320        if test "x$has_space" != x; then
17321          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17323        fi
17324        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17325      fi
17326    fi
17327
17328    # Now join together the path and the arguments once again
17329    if test "x$arguments" != xEOL; then
17330      new_complete="$new_path ${arguments% *}"
17331    else
17332      new_complete="$new_path"
17333    fi
17334
17335    if test "x$complete" != "x$new_complete"; then
17336      FOUND_MAKE="$new_complete"
17337      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17338$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17339    fi
17340  fi
17341
17342        fi
17343      fi
17344    fi
17345  fi
17346
17347        fi
17348        PATH=$OLD_PATH
17349      fi
17350    fi
17351
17352    if test "x$FOUND_MAKE" = x; then
17353      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17354    fi
17355  fi
17356
17357  MAKE=$FOUND_MAKE
17358
17359  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17360$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17361
17362
17363  # Check if make supports the output sync option and if so, setup using it.
17364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17365$as_echo_n "checking if make --output-sync is supported... " >&6; }
17366  if $MAKE --version -O > /dev/null 2>&1; then
17367    OUTPUT_SYNC_SUPPORTED=true
17368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17369$as_echo "yes" >&6; }
17370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17371$as_echo_n "checking for output-sync value... " >&6; }
17372
17373# Check whether --with-output-sync was given.
17374if test "${with_output_sync+set}" = set; then :
17375  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17376fi
17377
17378    if test "x$OUTPUT_SYNC" = "x"; then
17379      OUTPUT_SYNC=none
17380    fi
17381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17382$as_echo "$OUTPUT_SYNC" >&6; }
17383    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17384      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17385    fi
17386  else
17387    OUTPUT_SYNC_SUPPORTED=false
17388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17389$as_echo "no" >&6; }
17390  fi
17391
17392
17393
17394
17395
17396
17397  # Test if find supports -delete
17398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17399$as_echo_n "checking if find supports -delete... " >&6; }
17400  FIND_DELETE="-delete"
17401
17402  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17403
17404  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17405
17406  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17407  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17408    # No, it does not.
17409    rm $DELETEDIR/TestIfFindSupportsDelete
17410    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17411      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17412      FIND_DELETE="-print | xargs rm"
17413    else
17414      FIND_DELETE="-exec rm \{\} \+"
17415    fi
17416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17417$as_echo "no" >&6; }
17418  else
17419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17420$as_echo "yes" >&6; }
17421  fi
17422  rmdir $DELETEDIR
17423
17424
17425
17426  # These tools might not be installed by default,
17427  # need hint on how to install them.
17428
17429
17430
17431  # Publish this variable in the help.
17432
17433
17434  if test "x$UNZIP" = x; then
17435    # The variable is not set by user, try to locate tool using the code snippet
17436    for ac_prog in unzip
17437do
17438  # Extract the first word of "$ac_prog", so it can be a program name with args.
17439set dummy $ac_prog; ac_word=$2
17440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17441$as_echo_n "checking for $ac_word... " >&6; }
17442if ${ac_cv_path_UNZIP+:} false; then :
17443  $as_echo_n "(cached) " >&6
17444else
17445  case $UNZIP in
17446  [\\/]* | ?:[\\/]*)
17447  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17448  ;;
17449  *)
17450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17451for as_dir in $PATH
17452do
17453  IFS=$as_save_IFS
17454  test -z "$as_dir" && as_dir=.
17455    for ac_exec_ext in '' $ac_executable_extensions; do
17456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17457    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17459    break 2
17460  fi
17461done
17462  done
17463IFS=$as_save_IFS
17464
17465  ;;
17466esac
17467fi
17468UNZIP=$ac_cv_path_UNZIP
17469if test -n "$UNZIP"; then
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17471$as_echo "$UNZIP" >&6; }
17472else
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17474$as_echo "no" >&6; }
17475fi
17476
17477
17478  test -n "$UNZIP" && break
17479done
17480
17481  else
17482    # The variable is set, but is it from the command line or the environment?
17483
17484    # Try to remove the string !UNZIP! from our list.
17485    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17486    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17487      # If it failed, the variable was not from the command line. Ignore it,
17488      # but warn the user (except for BASH, which is always set by the calling BASH).
17489      if test "xUNZIP" != xBASH; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17491$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17492      fi
17493      # Try to locate tool using the code snippet
17494      for ac_prog in unzip
17495do
17496  # Extract the first word of "$ac_prog", so it can be a program name with args.
17497set dummy $ac_prog; ac_word=$2
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17499$as_echo_n "checking for $ac_word... " >&6; }
17500if ${ac_cv_path_UNZIP+:} false; then :
17501  $as_echo_n "(cached) " >&6
17502else
17503  case $UNZIP in
17504  [\\/]* | ?:[\\/]*)
17505  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17506  ;;
17507  *)
17508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17509for as_dir in $PATH
17510do
17511  IFS=$as_save_IFS
17512  test -z "$as_dir" && as_dir=.
17513    for ac_exec_ext in '' $ac_executable_extensions; do
17514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17515    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17517    break 2
17518  fi
17519done
17520  done
17521IFS=$as_save_IFS
17522
17523  ;;
17524esac
17525fi
17526UNZIP=$ac_cv_path_UNZIP
17527if test -n "$UNZIP"; then
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17529$as_echo "$UNZIP" >&6; }
17530else
17531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17532$as_echo "no" >&6; }
17533fi
17534
17535
17536  test -n "$UNZIP" && break
17537done
17538
17539    else
17540      # If it succeeded, then it was overridden by the user. We will use it
17541      # for the tool.
17542
17543      # First remove it from the list of overridden variables, so we can test
17544      # for unknown variables in the end.
17545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17546
17547      # Check if the provided tool contains a complete path.
17548      tool_specified="$UNZIP"
17549      tool_basename="${tool_specified##*/}"
17550      if test "x$tool_basename" = "x$tool_specified"; then
17551        # A command without a complete path is provided, search $PATH.
17552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17553$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17554        # Extract the first word of "$tool_basename", so it can be a program name with args.
17555set dummy $tool_basename; ac_word=$2
17556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17557$as_echo_n "checking for $ac_word... " >&6; }
17558if ${ac_cv_path_UNZIP+:} false; then :
17559  $as_echo_n "(cached) " >&6
17560else
17561  case $UNZIP in
17562  [\\/]* | ?:[\\/]*)
17563  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17564  ;;
17565  *)
17566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17567for as_dir in $PATH
17568do
17569  IFS=$as_save_IFS
17570  test -z "$as_dir" && as_dir=.
17571    for ac_exec_ext in '' $ac_executable_extensions; do
17572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17573    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17575    break 2
17576  fi
17577done
17578  done
17579IFS=$as_save_IFS
17580
17581  ;;
17582esac
17583fi
17584UNZIP=$ac_cv_path_UNZIP
17585if test -n "$UNZIP"; then
17586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17587$as_echo "$UNZIP" >&6; }
17588else
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17590$as_echo "no" >&6; }
17591fi
17592
17593
17594        if test "x$UNZIP" = x; then
17595          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17596        fi
17597      else
17598        # Otherwise we believe it is a complete path. Use it as it is.
17599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17600$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17602$as_echo_n "checking for UNZIP... " >&6; }
17603        if test ! -x "$tool_specified"; then
17604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17605$as_echo "not found" >&6; }
17606          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17607        fi
17608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17609$as_echo "$tool_specified" >&6; }
17610      fi
17611    fi
17612  fi
17613
17614
17615
17616  if test "x$UNZIP" = x; then
17617    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17618  fi
17619
17620
17621
17622
17623
17624  # Publish this variable in the help.
17625
17626
17627  if test "x$ZIP" = x; then
17628    # The variable is not set by user, try to locate tool using the code snippet
17629    for ac_prog in zip
17630do
17631  # Extract the first word of "$ac_prog", so it can be a program name with args.
17632set dummy $ac_prog; ac_word=$2
17633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17634$as_echo_n "checking for $ac_word... " >&6; }
17635if ${ac_cv_path_ZIP+:} false; then :
17636  $as_echo_n "(cached) " >&6
17637else
17638  case $ZIP in
17639  [\\/]* | ?:[\\/]*)
17640  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17641  ;;
17642  *)
17643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17644for as_dir in $PATH
17645do
17646  IFS=$as_save_IFS
17647  test -z "$as_dir" && as_dir=.
17648    for ac_exec_ext in '' $ac_executable_extensions; do
17649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17650    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17652    break 2
17653  fi
17654done
17655  done
17656IFS=$as_save_IFS
17657
17658  ;;
17659esac
17660fi
17661ZIP=$ac_cv_path_ZIP
17662if test -n "$ZIP"; then
17663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17664$as_echo "$ZIP" >&6; }
17665else
17666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17667$as_echo "no" >&6; }
17668fi
17669
17670
17671  test -n "$ZIP" && break
17672done
17673
17674  else
17675    # The variable is set, but is it from the command line or the environment?
17676
17677    # Try to remove the string !ZIP! from our list.
17678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17680      # If it failed, the variable was not from the command line. Ignore it,
17681      # but warn the user (except for BASH, which is always set by the calling BASH).
17682      if test "xZIP" != xBASH; then
17683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17684$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17685      fi
17686      # Try to locate tool using the code snippet
17687      for ac_prog in zip
17688do
17689  # Extract the first word of "$ac_prog", so it can be a program name with args.
17690set dummy $ac_prog; ac_word=$2
17691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17692$as_echo_n "checking for $ac_word... " >&6; }
17693if ${ac_cv_path_ZIP+:} false; then :
17694  $as_echo_n "(cached) " >&6
17695else
17696  case $ZIP in
17697  [\\/]* | ?:[\\/]*)
17698  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17699  ;;
17700  *)
17701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17702for as_dir in $PATH
17703do
17704  IFS=$as_save_IFS
17705  test -z "$as_dir" && as_dir=.
17706    for ac_exec_ext in '' $ac_executable_extensions; do
17707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17708    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17710    break 2
17711  fi
17712done
17713  done
17714IFS=$as_save_IFS
17715
17716  ;;
17717esac
17718fi
17719ZIP=$ac_cv_path_ZIP
17720if test -n "$ZIP"; then
17721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17722$as_echo "$ZIP" >&6; }
17723else
17724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17725$as_echo "no" >&6; }
17726fi
17727
17728
17729  test -n "$ZIP" && break
17730done
17731
17732    else
17733      # If it succeeded, then it was overridden by the user. We will use it
17734      # for the tool.
17735
17736      # First remove it from the list of overridden variables, so we can test
17737      # for unknown variables in the end.
17738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17739
17740      # Check if the provided tool contains a complete path.
17741      tool_specified="$ZIP"
17742      tool_basename="${tool_specified##*/}"
17743      if test "x$tool_basename" = "x$tool_specified"; then
17744        # A command without a complete path is provided, search $PATH.
17745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17746$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17747        # Extract the first word of "$tool_basename", so it can be a program name with args.
17748set dummy $tool_basename; ac_word=$2
17749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17750$as_echo_n "checking for $ac_word... " >&6; }
17751if ${ac_cv_path_ZIP+:} false; then :
17752  $as_echo_n "(cached) " >&6
17753else
17754  case $ZIP in
17755  [\\/]* | ?:[\\/]*)
17756  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17757  ;;
17758  *)
17759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17760for as_dir in $PATH
17761do
17762  IFS=$as_save_IFS
17763  test -z "$as_dir" && as_dir=.
17764    for ac_exec_ext in '' $ac_executable_extensions; do
17765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17766    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17768    break 2
17769  fi
17770done
17771  done
17772IFS=$as_save_IFS
17773
17774  ;;
17775esac
17776fi
17777ZIP=$ac_cv_path_ZIP
17778if test -n "$ZIP"; then
17779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17780$as_echo "$ZIP" >&6; }
17781else
17782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17783$as_echo "no" >&6; }
17784fi
17785
17786
17787        if test "x$ZIP" = x; then
17788          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17789        fi
17790      else
17791        # Otherwise we believe it is a complete path. Use it as it is.
17792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17793$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17795$as_echo_n "checking for ZIP... " >&6; }
17796        if test ! -x "$tool_specified"; then
17797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17798$as_echo "not found" >&6; }
17799          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17800        fi
17801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17802$as_echo "$tool_specified" >&6; }
17803      fi
17804    fi
17805  fi
17806
17807
17808
17809  if test "x$ZIP" = x; then
17810    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17811  fi
17812
17813
17814
17815  # Non-required basic tools
17816
17817
17818
17819  # Publish this variable in the help.
17820
17821
17822  if test "x$LDD" = x; then
17823    # The variable is not set by user, try to locate tool using the code snippet
17824    for ac_prog in ldd
17825do
17826  # Extract the first word of "$ac_prog", so it can be a program name with args.
17827set dummy $ac_prog; ac_word=$2
17828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17829$as_echo_n "checking for $ac_word... " >&6; }
17830if ${ac_cv_path_LDD+:} false; then :
17831  $as_echo_n "(cached) " >&6
17832else
17833  case $LDD in
17834  [\\/]* | ?:[\\/]*)
17835  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17836  ;;
17837  *)
17838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17839for as_dir in $PATH
17840do
17841  IFS=$as_save_IFS
17842  test -z "$as_dir" && as_dir=.
17843    for ac_exec_ext in '' $ac_executable_extensions; do
17844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17845    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17847    break 2
17848  fi
17849done
17850  done
17851IFS=$as_save_IFS
17852
17853  ;;
17854esac
17855fi
17856LDD=$ac_cv_path_LDD
17857if test -n "$LDD"; then
17858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17859$as_echo "$LDD" >&6; }
17860else
17861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17862$as_echo "no" >&6; }
17863fi
17864
17865
17866  test -n "$LDD" && break
17867done
17868
17869  else
17870    # The variable is set, but is it from the command line or the environment?
17871
17872    # Try to remove the string !LDD! from our list.
17873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17875      # If it failed, the variable was not from the command line. Ignore it,
17876      # but warn the user (except for BASH, which is always set by the calling BASH).
17877      if test "xLDD" != xBASH; then
17878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17879$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17880      fi
17881      # Try to locate tool using the code snippet
17882      for ac_prog in ldd
17883do
17884  # Extract the first word of "$ac_prog", so it can be a program name with args.
17885set dummy $ac_prog; ac_word=$2
17886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17887$as_echo_n "checking for $ac_word... " >&6; }
17888if ${ac_cv_path_LDD+:} false; then :
17889  $as_echo_n "(cached) " >&6
17890else
17891  case $LDD in
17892  [\\/]* | ?:[\\/]*)
17893  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17894  ;;
17895  *)
17896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17897for as_dir in $PATH
17898do
17899  IFS=$as_save_IFS
17900  test -z "$as_dir" && as_dir=.
17901    for ac_exec_ext in '' $ac_executable_extensions; do
17902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17903    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17905    break 2
17906  fi
17907done
17908  done
17909IFS=$as_save_IFS
17910
17911  ;;
17912esac
17913fi
17914LDD=$ac_cv_path_LDD
17915if test -n "$LDD"; then
17916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17917$as_echo "$LDD" >&6; }
17918else
17919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17920$as_echo "no" >&6; }
17921fi
17922
17923
17924  test -n "$LDD" && break
17925done
17926
17927    else
17928      # If it succeeded, then it was overridden by the user. We will use it
17929      # for the tool.
17930
17931      # First remove it from the list of overridden variables, so we can test
17932      # for unknown variables in the end.
17933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17934
17935      # Check if the provided tool contains a complete path.
17936      tool_specified="$LDD"
17937      tool_basename="${tool_specified##*/}"
17938      if test "x$tool_basename" = "x$tool_specified"; then
17939        # A command without a complete path is provided, search $PATH.
17940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17941$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17942        # Extract the first word of "$tool_basename", so it can be a program name with args.
17943set dummy $tool_basename; ac_word=$2
17944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17945$as_echo_n "checking for $ac_word... " >&6; }
17946if ${ac_cv_path_LDD+:} false; then :
17947  $as_echo_n "(cached) " >&6
17948else
17949  case $LDD in
17950  [\\/]* | ?:[\\/]*)
17951  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17952  ;;
17953  *)
17954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17955for as_dir in $PATH
17956do
17957  IFS=$as_save_IFS
17958  test -z "$as_dir" && as_dir=.
17959    for ac_exec_ext in '' $ac_executable_extensions; do
17960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17961    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17963    break 2
17964  fi
17965done
17966  done
17967IFS=$as_save_IFS
17968
17969  ;;
17970esac
17971fi
17972LDD=$ac_cv_path_LDD
17973if test -n "$LDD"; then
17974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17975$as_echo "$LDD" >&6; }
17976else
17977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17978$as_echo "no" >&6; }
17979fi
17980
17981
17982        if test "x$LDD" = x; then
17983          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17984        fi
17985      else
17986        # Otherwise we believe it is a complete path. Use it as it is.
17987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17988$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17990$as_echo_n "checking for LDD... " >&6; }
17991        if test ! -x "$tool_specified"; then
17992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17993$as_echo "not found" >&6; }
17994          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17995        fi
17996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17997$as_echo "$tool_specified" >&6; }
17998      fi
17999    fi
18000  fi
18001
18002
18003  if test "x$LDD" = "x"; then
18004    # List shared lib dependencies is used for
18005    # debug output and checking for forbidden dependencies.
18006    # We can build without it.
18007    LDD="true"
18008  fi
18009
18010
18011  # Publish this variable in the help.
18012
18013
18014  if test "x$OTOOL" = x; then
18015    # The variable is not set by user, try to locate tool using the code snippet
18016    for ac_prog in otool
18017do
18018  # Extract the first word of "$ac_prog", so it can be a program name with args.
18019set dummy $ac_prog; ac_word=$2
18020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18021$as_echo_n "checking for $ac_word... " >&6; }
18022if ${ac_cv_path_OTOOL+:} false; then :
18023  $as_echo_n "(cached) " >&6
18024else
18025  case $OTOOL in
18026  [\\/]* | ?:[\\/]*)
18027  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18028  ;;
18029  *)
18030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18031for as_dir in $PATH
18032do
18033  IFS=$as_save_IFS
18034  test -z "$as_dir" && as_dir=.
18035    for ac_exec_ext in '' $ac_executable_extensions; do
18036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18037    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18039    break 2
18040  fi
18041done
18042  done
18043IFS=$as_save_IFS
18044
18045  ;;
18046esac
18047fi
18048OTOOL=$ac_cv_path_OTOOL
18049if test -n "$OTOOL"; then
18050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18051$as_echo "$OTOOL" >&6; }
18052else
18053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18054$as_echo "no" >&6; }
18055fi
18056
18057
18058  test -n "$OTOOL" && break
18059done
18060
18061  else
18062    # The variable is set, but is it from the command line or the environment?
18063
18064    # Try to remove the string !OTOOL! from our list.
18065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18067      # If it failed, the variable was not from the command line. Ignore it,
18068      # but warn the user (except for BASH, which is always set by the calling BASH).
18069      if test "xOTOOL" != xBASH; then
18070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18071$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18072      fi
18073      # Try to locate tool using the code snippet
18074      for ac_prog in otool
18075do
18076  # Extract the first word of "$ac_prog", so it can be a program name with args.
18077set dummy $ac_prog; ac_word=$2
18078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18079$as_echo_n "checking for $ac_word... " >&6; }
18080if ${ac_cv_path_OTOOL+:} false; then :
18081  $as_echo_n "(cached) " >&6
18082else
18083  case $OTOOL in
18084  [\\/]* | ?:[\\/]*)
18085  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18086  ;;
18087  *)
18088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18089for as_dir in $PATH
18090do
18091  IFS=$as_save_IFS
18092  test -z "$as_dir" && as_dir=.
18093    for ac_exec_ext in '' $ac_executable_extensions; do
18094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18095    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18097    break 2
18098  fi
18099done
18100  done
18101IFS=$as_save_IFS
18102
18103  ;;
18104esac
18105fi
18106OTOOL=$ac_cv_path_OTOOL
18107if test -n "$OTOOL"; then
18108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18109$as_echo "$OTOOL" >&6; }
18110else
18111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18112$as_echo "no" >&6; }
18113fi
18114
18115
18116  test -n "$OTOOL" && break
18117done
18118
18119    else
18120      # If it succeeded, then it was overridden by the user. We will use it
18121      # for the tool.
18122
18123      # First remove it from the list of overridden variables, so we can test
18124      # for unknown variables in the end.
18125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18126
18127      # Check if the provided tool contains a complete path.
18128      tool_specified="$OTOOL"
18129      tool_basename="${tool_specified##*/}"
18130      if test "x$tool_basename" = "x$tool_specified"; then
18131        # A command without a complete path is provided, search $PATH.
18132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18133$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18134        # Extract the first word of "$tool_basename", so it can be a program name with args.
18135set dummy $tool_basename; ac_word=$2
18136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18137$as_echo_n "checking for $ac_word... " >&6; }
18138if ${ac_cv_path_OTOOL+:} false; then :
18139  $as_echo_n "(cached) " >&6
18140else
18141  case $OTOOL in
18142  [\\/]* | ?:[\\/]*)
18143  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18144  ;;
18145  *)
18146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18147for as_dir in $PATH
18148do
18149  IFS=$as_save_IFS
18150  test -z "$as_dir" && as_dir=.
18151    for ac_exec_ext in '' $ac_executable_extensions; do
18152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18153    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18155    break 2
18156  fi
18157done
18158  done
18159IFS=$as_save_IFS
18160
18161  ;;
18162esac
18163fi
18164OTOOL=$ac_cv_path_OTOOL
18165if test -n "$OTOOL"; then
18166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18167$as_echo "$OTOOL" >&6; }
18168else
18169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18170$as_echo "no" >&6; }
18171fi
18172
18173
18174        if test "x$OTOOL" = x; then
18175          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18176        fi
18177      else
18178        # Otherwise we believe it is a complete path. Use it as it is.
18179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18180$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18182$as_echo_n "checking for OTOOL... " >&6; }
18183        if test ! -x "$tool_specified"; then
18184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18185$as_echo "not found" >&6; }
18186          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18187        fi
18188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18189$as_echo "$tool_specified" >&6; }
18190      fi
18191    fi
18192  fi
18193
18194
18195  if test "x$OTOOL" = "x"; then
18196    OTOOL="true"
18197  fi
18198
18199
18200  # Publish this variable in the help.
18201
18202
18203  if test "x$READELF" = x; then
18204    # The variable is not set by user, try to locate tool using the code snippet
18205    for ac_prog in greadelf readelf
18206do
18207  # Extract the first word of "$ac_prog", so it can be a program name with args.
18208set dummy $ac_prog; ac_word=$2
18209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18210$as_echo_n "checking for $ac_word... " >&6; }
18211if ${ac_cv_path_READELF+:} false; then :
18212  $as_echo_n "(cached) " >&6
18213else
18214  case $READELF in
18215  [\\/]* | ?:[\\/]*)
18216  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18217  ;;
18218  *)
18219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18220for as_dir in $PATH
18221do
18222  IFS=$as_save_IFS
18223  test -z "$as_dir" && as_dir=.
18224    for ac_exec_ext in '' $ac_executable_extensions; do
18225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18226    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18228    break 2
18229  fi
18230done
18231  done
18232IFS=$as_save_IFS
18233
18234  ;;
18235esac
18236fi
18237READELF=$ac_cv_path_READELF
18238if test -n "$READELF"; then
18239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18240$as_echo "$READELF" >&6; }
18241else
18242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18243$as_echo "no" >&6; }
18244fi
18245
18246
18247  test -n "$READELF" && break
18248done
18249
18250  else
18251    # The variable is set, but is it from the command line or the environment?
18252
18253    # Try to remove the string !READELF! from our list.
18254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18256      # If it failed, the variable was not from the command line. Ignore it,
18257      # but warn the user (except for BASH, which is always set by the calling BASH).
18258      if test "xREADELF" != xBASH; then
18259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18260$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18261      fi
18262      # Try to locate tool using the code snippet
18263      for ac_prog in greadelf readelf
18264do
18265  # Extract the first word of "$ac_prog", so it can be a program name with args.
18266set dummy $ac_prog; ac_word=$2
18267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18268$as_echo_n "checking for $ac_word... " >&6; }
18269if ${ac_cv_path_READELF+:} false; then :
18270  $as_echo_n "(cached) " >&6
18271else
18272  case $READELF in
18273  [\\/]* | ?:[\\/]*)
18274  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18275  ;;
18276  *)
18277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18278for as_dir in $PATH
18279do
18280  IFS=$as_save_IFS
18281  test -z "$as_dir" && as_dir=.
18282    for ac_exec_ext in '' $ac_executable_extensions; do
18283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18284    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18286    break 2
18287  fi
18288done
18289  done
18290IFS=$as_save_IFS
18291
18292  ;;
18293esac
18294fi
18295READELF=$ac_cv_path_READELF
18296if test -n "$READELF"; then
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18298$as_echo "$READELF" >&6; }
18299else
18300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18301$as_echo "no" >&6; }
18302fi
18303
18304
18305  test -n "$READELF" && break
18306done
18307
18308    else
18309      # If it succeeded, then it was overridden by the user. We will use it
18310      # for the tool.
18311
18312      # First remove it from the list of overridden variables, so we can test
18313      # for unknown variables in the end.
18314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18315
18316      # Check if the provided tool contains a complete path.
18317      tool_specified="$READELF"
18318      tool_basename="${tool_specified##*/}"
18319      if test "x$tool_basename" = "x$tool_specified"; then
18320        # A command without a complete path is provided, search $PATH.
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18322$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18323        # Extract the first word of "$tool_basename", so it can be a program name with args.
18324set dummy $tool_basename; ac_word=$2
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18326$as_echo_n "checking for $ac_word... " >&6; }
18327if ${ac_cv_path_READELF+:} false; then :
18328  $as_echo_n "(cached) " >&6
18329else
18330  case $READELF in
18331  [\\/]* | ?:[\\/]*)
18332  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18333  ;;
18334  *)
18335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18336for as_dir in $PATH
18337do
18338  IFS=$as_save_IFS
18339  test -z "$as_dir" && as_dir=.
18340    for ac_exec_ext in '' $ac_executable_extensions; do
18341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18344    break 2
18345  fi
18346done
18347  done
18348IFS=$as_save_IFS
18349
18350  ;;
18351esac
18352fi
18353READELF=$ac_cv_path_READELF
18354if test -n "$READELF"; then
18355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18356$as_echo "$READELF" >&6; }
18357else
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359$as_echo "no" >&6; }
18360fi
18361
18362
18363        if test "x$READELF" = x; then
18364          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18365        fi
18366      else
18367        # Otherwise we believe it is a complete path. Use it as it is.
18368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18369$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18371$as_echo_n "checking for READELF... " >&6; }
18372        if test ! -x "$tool_specified"; then
18373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18374$as_echo "not found" >&6; }
18375          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18376        fi
18377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18378$as_echo "$tool_specified" >&6; }
18379      fi
18380    fi
18381  fi
18382
18383
18384
18385
18386  # Publish this variable in the help.
18387
18388
18389  if test "x$HG" = x; then
18390    # The variable is not set by user, try to locate tool using the code snippet
18391    for ac_prog in hg
18392do
18393  # Extract the first word of "$ac_prog", so it can be a program name with args.
18394set dummy $ac_prog; ac_word=$2
18395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18396$as_echo_n "checking for $ac_word... " >&6; }
18397if ${ac_cv_path_HG+:} false; then :
18398  $as_echo_n "(cached) " >&6
18399else
18400  case $HG in
18401  [\\/]* | ?:[\\/]*)
18402  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18403  ;;
18404  *)
18405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18406for as_dir in $PATH
18407do
18408  IFS=$as_save_IFS
18409  test -z "$as_dir" && as_dir=.
18410    for ac_exec_ext in '' $ac_executable_extensions; do
18411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18412    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18414    break 2
18415  fi
18416done
18417  done
18418IFS=$as_save_IFS
18419
18420  ;;
18421esac
18422fi
18423HG=$ac_cv_path_HG
18424if test -n "$HG"; then
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18426$as_echo "$HG" >&6; }
18427else
18428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18429$as_echo "no" >&6; }
18430fi
18431
18432
18433  test -n "$HG" && break
18434done
18435
18436  else
18437    # The variable is set, but is it from the command line or the environment?
18438
18439    # Try to remove the string !HG! from our list.
18440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18442      # If it failed, the variable was not from the command line. Ignore it,
18443      # but warn the user (except for BASH, which is always set by the calling BASH).
18444      if test "xHG" != xBASH; then
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18446$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18447      fi
18448      # Try to locate tool using the code snippet
18449      for ac_prog in hg
18450do
18451  # Extract the first word of "$ac_prog", so it can be a program name with args.
18452set dummy $ac_prog; ac_word=$2
18453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18454$as_echo_n "checking for $ac_word... " >&6; }
18455if ${ac_cv_path_HG+:} false; then :
18456  $as_echo_n "(cached) " >&6
18457else
18458  case $HG in
18459  [\\/]* | ?:[\\/]*)
18460  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18461  ;;
18462  *)
18463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18464for as_dir in $PATH
18465do
18466  IFS=$as_save_IFS
18467  test -z "$as_dir" && as_dir=.
18468    for ac_exec_ext in '' $ac_executable_extensions; do
18469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18470    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18472    break 2
18473  fi
18474done
18475  done
18476IFS=$as_save_IFS
18477
18478  ;;
18479esac
18480fi
18481HG=$ac_cv_path_HG
18482if test -n "$HG"; then
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18484$as_echo "$HG" >&6; }
18485else
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18487$as_echo "no" >&6; }
18488fi
18489
18490
18491  test -n "$HG" && break
18492done
18493
18494    else
18495      # If it succeeded, then it was overridden by the user. We will use it
18496      # for the tool.
18497
18498      # First remove it from the list of overridden variables, so we can test
18499      # for unknown variables in the end.
18500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18501
18502      # Check if the provided tool contains a complete path.
18503      tool_specified="$HG"
18504      tool_basename="${tool_specified##*/}"
18505      if test "x$tool_basename" = "x$tool_specified"; then
18506        # A command without a complete path is provided, search $PATH.
18507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18508$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18509        # Extract the first word of "$tool_basename", so it can be a program name with args.
18510set dummy $tool_basename; ac_word=$2
18511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18512$as_echo_n "checking for $ac_word... " >&6; }
18513if ${ac_cv_path_HG+:} false; then :
18514  $as_echo_n "(cached) " >&6
18515else
18516  case $HG in
18517  [\\/]* | ?:[\\/]*)
18518  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18519  ;;
18520  *)
18521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18522for as_dir in $PATH
18523do
18524  IFS=$as_save_IFS
18525  test -z "$as_dir" && as_dir=.
18526    for ac_exec_ext in '' $ac_executable_extensions; do
18527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18528    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18530    break 2
18531  fi
18532done
18533  done
18534IFS=$as_save_IFS
18535
18536  ;;
18537esac
18538fi
18539HG=$ac_cv_path_HG
18540if test -n "$HG"; then
18541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18542$as_echo "$HG" >&6; }
18543else
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18545$as_echo "no" >&6; }
18546fi
18547
18548
18549        if test "x$HG" = x; then
18550          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18551        fi
18552      else
18553        # Otherwise we believe it is a complete path. Use it as it is.
18554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18555$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18557$as_echo_n "checking for HG... " >&6; }
18558        if test ! -x "$tool_specified"; then
18559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18560$as_echo "not found" >&6; }
18561          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18562        fi
18563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18564$as_echo "$tool_specified" >&6; }
18565      fi
18566    fi
18567  fi
18568
18569
18570
18571
18572  # Publish this variable in the help.
18573
18574
18575  if test "x$STAT" = x; then
18576    # The variable is not set by user, try to locate tool using the code snippet
18577    for ac_prog in stat
18578do
18579  # Extract the first word of "$ac_prog", so it can be a program name with args.
18580set dummy $ac_prog; ac_word=$2
18581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18582$as_echo_n "checking for $ac_word... " >&6; }
18583if ${ac_cv_path_STAT+:} false; then :
18584  $as_echo_n "(cached) " >&6
18585else
18586  case $STAT in
18587  [\\/]* | ?:[\\/]*)
18588  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18589  ;;
18590  *)
18591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18592for as_dir in $PATH
18593do
18594  IFS=$as_save_IFS
18595  test -z "$as_dir" && as_dir=.
18596    for ac_exec_ext in '' $ac_executable_extensions; do
18597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18598    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18600    break 2
18601  fi
18602done
18603  done
18604IFS=$as_save_IFS
18605
18606  ;;
18607esac
18608fi
18609STAT=$ac_cv_path_STAT
18610if test -n "$STAT"; then
18611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18612$as_echo "$STAT" >&6; }
18613else
18614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18615$as_echo "no" >&6; }
18616fi
18617
18618
18619  test -n "$STAT" && break
18620done
18621
18622  else
18623    # The variable is set, but is it from the command line or the environment?
18624
18625    # Try to remove the string !STAT! from our list.
18626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18628      # If it failed, the variable was not from the command line. Ignore it,
18629      # but warn the user (except for BASH, which is always set by the calling BASH).
18630      if test "xSTAT" != xBASH; then
18631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18632$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18633      fi
18634      # Try to locate tool using the code snippet
18635      for ac_prog in stat
18636do
18637  # Extract the first word of "$ac_prog", so it can be a program name with args.
18638set dummy $ac_prog; ac_word=$2
18639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18640$as_echo_n "checking for $ac_word... " >&6; }
18641if ${ac_cv_path_STAT+:} false; then :
18642  $as_echo_n "(cached) " >&6
18643else
18644  case $STAT in
18645  [\\/]* | ?:[\\/]*)
18646  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18647  ;;
18648  *)
18649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18650for as_dir in $PATH
18651do
18652  IFS=$as_save_IFS
18653  test -z "$as_dir" && as_dir=.
18654    for ac_exec_ext in '' $ac_executable_extensions; do
18655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18656    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18658    break 2
18659  fi
18660done
18661  done
18662IFS=$as_save_IFS
18663
18664  ;;
18665esac
18666fi
18667STAT=$ac_cv_path_STAT
18668if test -n "$STAT"; then
18669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18670$as_echo "$STAT" >&6; }
18671else
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18673$as_echo "no" >&6; }
18674fi
18675
18676
18677  test -n "$STAT" && break
18678done
18679
18680    else
18681      # If it succeeded, then it was overridden by the user. We will use it
18682      # for the tool.
18683
18684      # First remove it from the list of overridden variables, so we can test
18685      # for unknown variables in the end.
18686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18687
18688      # Check if the provided tool contains a complete path.
18689      tool_specified="$STAT"
18690      tool_basename="${tool_specified##*/}"
18691      if test "x$tool_basename" = "x$tool_specified"; then
18692        # A command without a complete path is provided, search $PATH.
18693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18694$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18695        # Extract the first word of "$tool_basename", so it can be a program name with args.
18696set dummy $tool_basename; ac_word=$2
18697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18698$as_echo_n "checking for $ac_word... " >&6; }
18699if ${ac_cv_path_STAT+:} false; then :
18700  $as_echo_n "(cached) " >&6
18701else
18702  case $STAT in
18703  [\\/]* | ?:[\\/]*)
18704  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18705  ;;
18706  *)
18707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18708for as_dir in $PATH
18709do
18710  IFS=$as_save_IFS
18711  test -z "$as_dir" && as_dir=.
18712    for ac_exec_ext in '' $ac_executable_extensions; do
18713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18714    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18716    break 2
18717  fi
18718done
18719  done
18720IFS=$as_save_IFS
18721
18722  ;;
18723esac
18724fi
18725STAT=$ac_cv_path_STAT
18726if test -n "$STAT"; then
18727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18728$as_echo "$STAT" >&6; }
18729else
18730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18731$as_echo "no" >&6; }
18732fi
18733
18734
18735        if test "x$STAT" = x; then
18736          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18737        fi
18738      else
18739        # Otherwise we believe it is a complete path. Use it as it is.
18740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18741$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18743$as_echo_n "checking for STAT... " >&6; }
18744        if test ! -x "$tool_specified"; then
18745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18746$as_echo "not found" >&6; }
18747          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18748        fi
18749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18750$as_echo "$tool_specified" >&6; }
18751      fi
18752    fi
18753  fi
18754
18755
18756
18757
18758  # Publish this variable in the help.
18759
18760
18761  if test "x$TIME" = x; then
18762    # The variable is not set by user, try to locate tool using the code snippet
18763    for ac_prog in time
18764do
18765  # Extract the first word of "$ac_prog", so it can be a program name with args.
18766set dummy $ac_prog; ac_word=$2
18767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18768$as_echo_n "checking for $ac_word... " >&6; }
18769if ${ac_cv_path_TIME+:} false; then :
18770  $as_echo_n "(cached) " >&6
18771else
18772  case $TIME in
18773  [\\/]* | ?:[\\/]*)
18774  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18775  ;;
18776  *)
18777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18778for as_dir in $PATH
18779do
18780  IFS=$as_save_IFS
18781  test -z "$as_dir" && as_dir=.
18782    for ac_exec_ext in '' $ac_executable_extensions; do
18783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18784    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18786    break 2
18787  fi
18788done
18789  done
18790IFS=$as_save_IFS
18791
18792  ;;
18793esac
18794fi
18795TIME=$ac_cv_path_TIME
18796if test -n "$TIME"; then
18797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18798$as_echo "$TIME" >&6; }
18799else
18800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18801$as_echo "no" >&6; }
18802fi
18803
18804
18805  test -n "$TIME" && break
18806done
18807
18808  else
18809    # The variable is set, but is it from the command line or the environment?
18810
18811    # Try to remove the string !TIME! from our list.
18812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18814      # If it failed, the variable was not from the command line. Ignore it,
18815      # but warn the user (except for BASH, which is always set by the calling BASH).
18816      if test "xTIME" != xBASH; then
18817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18818$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18819      fi
18820      # Try to locate tool using the code snippet
18821      for ac_prog in time
18822do
18823  # Extract the first word of "$ac_prog", so it can be a program name with args.
18824set dummy $ac_prog; ac_word=$2
18825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18826$as_echo_n "checking for $ac_word... " >&6; }
18827if ${ac_cv_path_TIME+:} false; then :
18828  $as_echo_n "(cached) " >&6
18829else
18830  case $TIME in
18831  [\\/]* | ?:[\\/]*)
18832  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18833  ;;
18834  *)
18835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18836for as_dir in $PATH
18837do
18838  IFS=$as_save_IFS
18839  test -z "$as_dir" && as_dir=.
18840    for ac_exec_ext in '' $ac_executable_extensions; do
18841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18842    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18844    break 2
18845  fi
18846done
18847  done
18848IFS=$as_save_IFS
18849
18850  ;;
18851esac
18852fi
18853TIME=$ac_cv_path_TIME
18854if test -n "$TIME"; then
18855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18856$as_echo "$TIME" >&6; }
18857else
18858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18859$as_echo "no" >&6; }
18860fi
18861
18862
18863  test -n "$TIME" && break
18864done
18865
18866    else
18867      # If it succeeded, then it was overridden by the user. We will use it
18868      # for the tool.
18869
18870      # First remove it from the list of overridden variables, so we can test
18871      # for unknown variables in the end.
18872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18873
18874      # Check if the provided tool contains a complete path.
18875      tool_specified="$TIME"
18876      tool_basename="${tool_specified##*/}"
18877      if test "x$tool_basename" = "x$tool_specified"; then
18878        # A command without a complete path is provided, search $PATH.
18879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18880$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18881        # Extract the first word of "$tool_basename", so it can be a program name with args.
18882set dummy $tool_basename; ac_word=$2
18883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18884$as_echo_n "checking for $ac_word... " >&6; }
18885if ${ac_cv_path_TIME+:} false; then :
18886  $as_echo_n "(cached) " >&6
18887else
18888  case $TIME in
18889  [\\/]* | ?:[\\/]*)
18890  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18891  ;;
18892  *)
18893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18894for as_dir in $PATH
18895do
18896  IFS=$as_save_IFS
18897  test -z "$as_dir" && as_dir=.
18898    for ac_exec_ext in '' $ac_executable_extensions; do
18899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18900    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18902    break 2
18903  fi
18904done
18905  done
18906IFS=$as_save_IFS
18907
18908  ;;
18909esac
18910fi
18911TIME=$ac_cv_path_TIME
18912if test -n "$TIME"; then
18913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18914$as_echo "$TIME" >&6; }
18915else
18916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18917$as_echo "no" >&6; }
18918fi
18919
18920
18921        if test "x$TIME" = x; then
18922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18923        fi
18924      else
18925        # Otherwise we believe it is a complete path. Use it as it is.
18926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18927$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18929$as_echo_n "checking for TIME... " >&6; }
18930        if test ! -x "$tool_specified"; then
18931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18932$as_echo "not found" >&6; }
18933          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18934        fi
18935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18936$as_echo "$tool_specified" >&6; }
18937      fi
18938    fi
18939  fi
18940
18941
18942  # Check if it's GNU time
18943  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18944  if test "x$IS_GNU_TIME" != x; then
18945    IS_GNU_TIME=yes
18946  else
18947    IS_GNU_TIME=no
18948  fi
18949
18950
18951  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18952
18953
18954
18955  # Publish this variable in the help.
18956
18957
18958  if test "x$DSYMUTIL" = x; then
18959    # The variable is not set by user, try to locate tool using the code snippet
18960    for ac_prog in dsymutil
18961do
18962  # Extract the first word of "$ac_prog", so it can be a program name with args.
18963set dummy $ac_prog; ac_word=$2
18964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18965$as_echo_n "checking for $ac_word... " >&6; }
18966if ${ac_cv_path_DSYMUTIL+:} false; then :
18967  $as_echo_n "(cached) " >&6
18968else
18969  case $DSYMUTIL in
18970  [\\/]* | ?:[\\/]*)
18971  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18972  ;;
18973  *)
18974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18975for as_dir in $PATH
18976do
18977  IFS=$as_save_IFS
18978  test -z "$as_dir" && as_dir=.
18979    for ac_exec_ext in '' $ac_executable_extensions; do
18980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18981    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18983    break 2
18984  fi
18985done
18986  done
18987IFS=$as_save_IFS
18988
18989  ;;
18990esac
18991fi
18992DSYMUTIL=$ac_cv_path_DSYMUTIL
18993if test -n "$DSYMUTIL"; then
18994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18995$as_echo "$DSYMUTIL" >&6; }
18996else
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18998$as_echo "no" >&6; }
18999fi
19000
19001
19002  test -n "$DSYMUTIL" && break
19003done
19004
19005  else
19006    # The variable is set, but is it from the command line or the environment?
19007
19008    # Try to remove the string !DSYMUTIL! from our list.
19009    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19010    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19011      # If it failed, the variable was not from the command line. Ignore it,
19012      # but warn the user (except for BASH, which is always set by the calling BASH).
19013      if test "xDSYMUTIL" != xBASH; then
19014        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19015$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19016      fi
19017      # Try to locate tool using the code snippet
19018      for ac_prog in dsymutil
19019do
19020  # Extract the first word of "$ac_prog", so it can be a program name with args.
19021set dummy $ac_prog; ac_word=$2
19022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19023$as_echo_n "checking for $ac_word... " >&6; }
19024if ${ac_cv_path_DSYMUTIL+:} false; then :
19025  $as_echo_n "(cached) " >&6
19026else
19027  case $DSYMUTIL in
19028  [\\/]* | ?:[\\/]*)
19029  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19030  ;;
19031  *)
19032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19033for as_dir in $PATH
19034do
19035  IFS=$as_save_IFS
19036  test -z "$as_dir" && as_dir=.
19037    for ac_exec_ext in '' $ac_executable_extensions; do
19038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19039    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19041    break 2
19042  fi
19043done
19044  done
19045IFS=$as_save_IFS
19046
19047  ;;
19048esac
19049fi
19050DSYMUTIL=$ac_cv_path_DSYMUTIL
19051if test -n "$DSYMUTIL"; then
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19053$as_echo "$DSYMUTIL" >&6; }
19054else
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19056$as_echo "no" >&6; }
19057fi
19058
19059
19060  test -n "$DSYMUTIL" && break
19061done
19062
19063    else
19064      # If it succeeded, then it was overridden by the user. We will use it
19065      # for the tool.
19066
19067      # First remove it from the list of overridden variables, so we can test
19068      # for unknown variables in the end.
19069      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19070
19071      # Check if the provided tool contains a complete path.
19072      tool_specified="$DSYMUTIL"
19073      tool_basename="${tool_specified##*/}"
19074      if test "x$tool_basename" = "x$tool_specified"; then
19075        # A command without a complete path is provided, search $PATH.
19076        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19077$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19078        # Extract the first word of "$tool_basename", so it can be a program name with args.
19079set dummy $tool_basename; ac_word=$2
19080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19081$as_echo_n "checking for $ac_word... " >&6; }
19082if ${ac_cv_path_DSYMUTIL+:} false; then :
19083  $as_echo_n "(cached) " >&6
19084else
19085  case $DSYMUTIL in
19086  [\\/]* | ?:[\\/]*)
19087  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19088  ;;
19089  *)
19090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19091for as_dir in $PATH
19092do
19093  IFS=$as_save_IFS
19094  test -z "$as_dir" && as_dir=.
19095    for ac_exec_ext in '' $ac_executable_extensions; do
19096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19097    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19099    break 2
19100  fi
19101done
19102  done
19103IFS=$as_save_IFS
19104
19105  ;;
19106esac
19107fi
19108DSYMUTIL=$ac_cv_path_DSYMUTIL
19109if test -n "$DSYMUTIL"; then
19110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19111$as_echo "$DSYMUTIL" >&6; }
19112else
19113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19114$as_echo "no" >&6; }
19115fi
19116
19117
19118        if test "x$DSYMUTIL" = x; then
19119          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19120        fi
19121      else
19122        # Otherwise we believe it is a complete path. Use it as it is.
19123        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19124$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19126$as_echo_n "checking for DSYMUTIL... " >&6; }
19127        if test ! -x "$tool_specified"; then
19128          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19129$as_echo "not found" >&6; }
19130          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19131        fi
19132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19133$as_echo "$tool_specified" >&6; }
19134      fi
19135    fi
19136  fi
19137
19138
19139
19140  if test "x$DSYMUTIL" = x; then
19141    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19142  fi
19143
19144
19145
19146
19147
19148  # Publish this variable in the help.
19149
19150
19151  if test "x$XATTR" = x; then
19152    # The variable is not set by user, try to locate tool using the code snippet
19153    for ac_prog in xattr
19154do
19155  # Extract the first word of "$ac_prog", so it can be a program name with args.
19156set dummy $ac_prog; ac_word=$2
19157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19158$as_echo_n "checking for $ac_word... " >&6; }
19159if ${ac_cv_path_XATTR+:} false; then :
19160  $as_echo_n "(cached) " >&6
19161else
19162  case $XATTR in
19163  [\\/]* | ?:[\\/]*)
19164  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19165  ;;
19166  *)
19167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19168for as_dir in $PATH
19169do
19170  IFS=$as_save_IFS
19171  test -z "$as_dir" && as_dir=.
19172    for ac_exec_ext in '' $ac_executable_extensions; do
19173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19174    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19176    break 2
19177  fi
19178done
19179  done
19180IFS=$as_save_IFS
19181
19182  ;;
19183esac
19184fi
19185XATTR=$ac_cv_path_XATTR
19186if test -n "$XATTR"; then
19187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19188$as_echo "$XATTR" >&6; }
19189else
19190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19191$as_echo "no" >&6; }
19192fi
19193
19194
19195  test -n "$XATTR" && break
19196done
19197
19198  else
19199    # The variable is set, but is it from the command line or the environment?
19200
19201    # Try to remove the string !XATTR! from our list.
19202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19204      # If it failed, the variable was not from the command line. Ignore it,
19205      # but warn the user (except for BASH, which is always set by the calling BASH).
19206      if test "xXATTR" != xBASH; then
19207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19208$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19209      fi
19210      # Try to locate tool using the code snippet
19211      for ac_prog in xattr
19212do
19213  # Extract the first word of "$ac_prog", so it can be a program name with args.
19214set dummy $ac_prog; ac_word=$2
19215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19216$as_echo_n "checking for $ac_word... " >&6; }
19217if ${ac_cv_path_XATTR+:} false; then :
19218  $as_echo_n "(cached) " >&6
19219else
19220  case $XATTR in
19221  [\\/]* | ?:[\\/]*)
19222  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19223  ;;
19224  *)
19225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19226for as_dir in $PATH
19227do
19228  IFS=$as_save_IFS
19229  test -z "$as_dir" && as_dir=.
19230    for ac_exec_ext in '' $ac_executable_extensions; do
19231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19232    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19234    break 2
19235  fi
19236done
19237  done
19238IFS=$as_save_IFS
19239
19240  ;;
19241esac
19242fi
19243XATTR=$ac_cv_path_XATTR
19244if test -n "$XATTR"; then
19245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19246$as_echo "$XATTR" >&6; }
19247else
19248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19249$as_echo "no" >&6; }
19250fi
19251
19252
19253  test -n "$XATTR" && break
19254done
19255
19256    else
19257      # If it succeeded, then it was overridden by the user. We will use it
19258      # for the tool.
19259
19260      # First remove it from the list of overridden variables, so we can test
19261      # for unknown variables in the end.
19262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19263
19264      # Check if the provided tool contains a complete path.
19265      tool_specified="$XATTR"
19266      tool_basename="${tool_specified##*/}"
19267      if test "x$tool_basename" = "x$tool_specified"; then
19268        # A command without a complete path is provided, search $PATH.
19269        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19270$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19271        # Extract the first word of "$tool_basename", so it can be a program name with args.
19272set dummy $tool_basename; ac_word=$2
19273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19274$as_echo_n "checking for $ac_word... " >&6; }
19275if ${ac_cv_path_XATTR+:} false; then :
19276  $as_echo_n "(cached) " >&6
19277else
19278  case $XATTR in
19279  [\\/]* | ?:[\\/]*)
19280  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19281  ;;
19282  *)
19283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19284for as_dir in $PATH
19285do
19286  IFS=$as_save_IFS
19287  test -z "$as_dir" && as_dir=.
19288    for ac_exec_ext in '' $ac_executable_extensions; do
19289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19290    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19292    break 2
19293  fi
19294done
19295  done
19296IFS=$as_save_IFS
19297
19298  ;;
19299esac
19300fi
19301XATTR=$ac_cv_path_XATTR
19302if test -n "$XATTR"; then
19303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19304$as_echo "$XATTR" >&6; }
19305else
19306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19307$as_echo "no" >&6; }
19308fi
19309
19310
19311        if test "x$XATTR" = x; then
19312          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19313        fi
19314      else
19315        # Otherwise we believe it is a complete path. Use it as it is.
19316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19317$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19319$as_echo_n "checking for XATTR... " >&6; }
19320        if test ! -x "$tool_specified"; then
19321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19322$as_echo "not found" >&6; }
19323          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19324        fi
19325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19326$as_echo "$tool_specified" >&6; }
19327      fi
19328    fi
19329  fi
19330
19331
19332
19333  if test "x$XATTR" = x; then
19334    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19335  fi
19336
19337
19338
19339
19340  # Publish this variable in the help.
19341
19342
19343  if test "x$CODESIGN" = x; then
19344    # The variable is not set by user, try to locate tool using the code snippet
19345    for ac_prog in codesign
19346do
19347  # Extract the first word of "$ac_prog", so it can be a program name with args.
19348set dummy $ac_prog; ac_word=$2
19349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19350$as_echo_n "checking for $ac_word... " >&6; }
19351if ${ac_cv_path_CODESIGN+:} false; then :
19352  $as_echo_n "(cached) " >&6
19353else
19354  case $CODESIGN in
19355  [\\/]* | ?:[\\/]*)
19356  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19357  ;;
19358  *)
19359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19360for as_dir in $PATH
19361do
19362  IFS=$as_save_IFS
19363  test -z "$as_dir" && as_dir=.
19364    for ac_exec_ext in '' $ac_executable_extensions; do
19365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19366    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19368    break 2
19369  fi
19370done
19371  done
19372IFS=$as_save_IFS
19373
19374  ;;
19375esac
19376fi
19377CODESIGN=$ac_cv_path_CODESIGN
19378if test -n "$CODESIGN"; then
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19380$as_echo "$CODESIGN" >&6; }
19381else
19382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19383$as_echo "no" >&6; }
19384fi
19385
19386
19387  test -n "$CODESIGN" && break
19388done
19389
19390  else
19391    # The variable is set, but is it from the command line or the environment?
19392
19393    # Try to remove the string !CODESIGN! from our list.
19394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19396      # If it failed, the variable was not from the command line. Ignore it,
19397      # but warn the user (except for BASH, which is always set by the calling BASH).
19398      if test "xCODESIGN" != xBASH; then
19399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19400$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19401      fi
19402      # Try to locate tool using the code snippet
19403      for ac_prog in codesign
19404do
19405  # Extract the first word of "$ac_prog", so it can be a program name with args.
19406set dummy $ac_prog; ac_word=$2
19407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19408$as_echo_n "checking for $ac_word... " >&6; }
19409if ${ac_cv_path_CODESIGN+:} false; then :
19410  $as_echo_n "(cached) " >&6
19411else
19412  case $CODESIGN in
19413  [\\/]* | ?:[\\/]*)
19414  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19415  ;;
19416  *)
19417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19418for as_dir in $PATH
19419do
19420  IFS=$as_save_IFS
19421  test -z "$as_dir" && as_dir=.
19422    for ac_exec_ext in '' $ac_executable_extensions; do
19423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19424    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19426    break 2
19427  fi
19428done
19429  done
19430IFS=$as_save_IFS
19431
19432  ;;
19433esac
19434fi
19435CODESIGN=$ac_cv_path_CODESIGN
19436if test -n "$CODESIGN"; then
19437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19438$as_echo "$CODESIGN" >&6; }
19439else
19440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19441$as_echo "no" >&6; }
19442fi
19443
19444
19445  test -n "$CODESIGN" && break
19446done
19447
19448    else
19449      # If it succeeded, then it was overridden by the user. We will use it
19450      # for the tool.
19451
19452      # First remove it from the list of overridden variables, so we can test
19453      # for unknown variables in the end.
19454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19455
19456      # Check if the provided tool contains a complete path.
19457      tool_specified="$CODESIGN"
19458      tool_basename="${tool_specified##*/}"
19459      if test "x$tool_basename" = "x$tool_specified"; then
19460        # A command without a complete path is provided, search $PATH.
19461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19462$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19463        # Extract the first word of "$tool_basename", so it can be a program name with args.
19464set dummy $tool_basename; ac_word=$2
19465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19466$as_echo_n "checking for $ac_word... " >&6; }
19467if ${ac_cv_path_CODESIGN+:} false; then :
19468  $as_echo_n "(cached) " >&6
19469else
19470  case $CODESIGN in
19471  [\\/]* | ?:[\\/]*)
19472  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19473  ;;
19474  *)
19475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19476for as_dir in $PATH
19477do
19478  IFS=$as_save_IFS
19479  test -z "$as_dir" && as_dir=.
19480    for ac_exec_ext in '' $ac_executable_extensions; do
19481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19482    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19484    break 2
19485  fi
19486done
19487  done
19488IFS=$as_save_IFS
19489
19490  ;;
19491esac
19492fi
19493CODESIGN=$ac_cv_path_CODESIGN
19494if test -n "$CODESIGN"; then
19495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19496$as_echo "$CODESIGN" >&6; }
19497else
19498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19499$as_echo "no" >&6; }
19500fi
19501
19502
19503        if test "x$CODESIGN" = x; then
19504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19505        fi
19506      else
19507        # Otherwise we believe it is a complete path. Use it as it is.
19508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19509$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19511$as_echo_n "checking for CODESIGN... " >&6; }
19512        if test ! -x "$tool_specified"; then
19513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19514$as_echo "not found" >&6; }
19515          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19516        fi
19517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19518$as_echo "$tool_specified" >&6; }
19519      fi
19520    fi
19521  fi
19522
19523
19524    if test "x$CODESIGN" != "x"; then
19525      # Verify that the openjdk_codesign certificate is present
19526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19527$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19528      rm -f codesign-testfile
19529      touch codesign-testfile
19530      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19531      rm -f codesign-testfile
19532      if test "x$CODESIGN" = x; then
19533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19534$as_echo "no" >&6; }
19535      else
19536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19537$as_echo "yes" >&6; }
19538      fi
19539    fi
19540
19541
19542
19543  # Publish this variable in the help.
19544
19545
19546  if test "x$SETFILE" = x; then
19547    # The variable is not set by user, try to locate tool using the code snippet
19548    for ac_prog in SetFile
19549do
19550  # Extract the first word of "$ac_prog", so it can be a program name with args.
19551set dummy $ac_prog; ac_word=$2
19552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19553$as_echo_n "checking for $ac_word... " >&6; }
19554if ${ac_cv_path_SETFILE+:} false; then :
19555  $as_echo_n "(cached) " >&6
19556else
19557  case $SETFILE in
19558  [\\/]* | ?:[\\/]*)
19559  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19560  ;;
19561  *)
19562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19563for as_dir in $PATH
19564do
19565  IFS=$as_save_IFS
19566  test -z "$as_dir" && as_dir=.
19567    for ac_exec_ext in '' $ac_executable_extensions; do
19568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19569    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19571    break 2
19572  fi
19573done
19574  done
19575IFS=$as_save_IFS
19576
19577  ;;
19578esac
19579fi
19580SETFILE=$ac_cv_path_SETFILE
19581if test -n "$SETFILE"; then
19582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19583$as_echo "$SETFILE" >&6; }
19584else
19585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19586$as_echo "no" >&6; }
19587fi
19588
19589
19590  test -n "$SETFILE" && break
19591done
19592
19593  else
19594    # The variable is set, but is it from the command line or the environment?
19595
19596    # Try to remove the string !SETFILE! from our list.
19597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19599      # If it failed, the variable was not from the command line. Ignore it,
19600      # but warn the user (except for BASH, which is always set by the calling BASH).
19601      if test "xSETFILE" != xBASH; then
19602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19603$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19604      fi
19605      # Try to locate tool using the code snippet
19606      for ac_prog in SetFile
19607do
19608  # Extract the first word of "$ac_prog", so it can be a program name with args.
19609set dummy $ac_prog; ac_word=$2
19610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19611$as_echo_n "checking for $ac_word... " >&6; }
19612if ${ac_cv_path_SETFILE+:} false; then :
19613  $as_echo_n "(cached) " >&6
19614else
19615  case $SETFILE in
19616  [\\/]* | ?:[\\/]*)
19617  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19618  ;;
19619  *)
19620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19621for as_dir in $PATH
19622do
19623  IFS=$as_save_IFS
19624  test -z "$as_dir" && as_dir=.
19625    for ac_exec_ext in '' $ac_executable_extensions; do
19626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19627    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19629    break 2
19630  fi
19631done
19632  done
19633IFS=$as_save_IFS
19634
19635  ;;
19636esac
19637fi
19638SETFILE=$ac_cv_path_SETFILE
19639if test -n "$SETFILE"; then
19640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19641$as_echo "$SETFILE" >&6; }
19642else
19643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19644$as_echo "no" >&6; }
19645fi
19646
19647
19648  test -n "$SETFILE" && break
19649done
19650
19651    else
19652      # If it succeeded, then it was overridden by the user. We will use it
19653      # for the tool.
19654
19655      # First remove it from the list of overridden variables, so we can test
19656      # for unknown variables in the end.
19657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19658
19659      # Check if the provided tool contains a complete path.
19660      tool_specified="$SETFILE"
19661      tool_basename="${tool_specified##*/}"
19662      if test "x$tool_basename" = "x$tool_specified"; then
19663        # A command without a complete path is provided, search $PATH.
19664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19665$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19666        # Extract the first word of "$tool_basename", so it can be a program name with args.
19667set dummy $tool_basename; ac_word=$2
19668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19669$as_echo_n "checking for $ac_word... " >&6; }
19670if ${ac_cv_path_SETFILE+:} false; then :
19671  $as_echo_n "(cached) " >&6
19672else
19673  case $SETFILE in
19674  [\\/]* | ?:[\\/]*)
19675  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19676  ;;
19677  *)
19678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19679for as_dir in $PATH
19680do
19681  IFS=$as_save_IFS
19682  test -z "$as_dir" && as_dir=.
19683    for ac_exec_ext in '' $ac_executable_extensions; do
19684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19685    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19687    break 2
19688  fi
19689done
19690  done
19691IFS=$as_save_IFS
19692
19693  ;;
19694esac
19695fi
19696SETFILE=$ac_cv_path_SETFILE
19697if test -n "$SETFILE"; then
19698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19699$as_echo "$SETFILE" >&6; }
19700else
19701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19702$as_echo "no" >&6; }
19703fi
19704
19705
19706        if test "x$SETFILE" = x; then
19707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19708        fi
19709      else
19710        # Otherwise we believe it is a complete path. Use it as it is.
19711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19712$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19714$as_echo_n "checking for SETFILE... " >&6; }
19715        if test ! -x "$tool_specified"; then
19716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19717$as_echo "not found" >&6; }
19718          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19719        fi
19720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19721$as_echo "$tool_specified" >&6; }
19722      fi
19723    fi
19724  fi
19725
19726
19727
19728  if test "x$SETFILE" = x; then
19729    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19730  fi
19731
19732
19733  fi
19734
19735
19736  # Test if bash supports pipefail.
19737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19738$as_echo_n "checking if bash supports pipefail... " >&6; }
19739  if ${BASH} -c 'set -o pipefail'; then
19740    BASH_ARGS="$BASH_ARGS -o pipefail"
19741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19742$as_echo "yes" >&6; }
19743  else
19744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19745$as_echo "no" >&6; }
19746  fi
19747
19748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19749$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19750  if ${BASH} -e -c 'true'; then
19751    BASH_ARGS="$BASH_ARGS -e"
19752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19753$as_echo "yes" >&6; }
19754  else
19755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756$as_echo "no" >&6; }
19757  fi
19758
19759
19760
19761
19762# Check if pkg-config is available.
19763
19764
19765if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19766	if test -n "$ac_tool_prefix"; then
19767  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19768set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19770$as_echo_n "checking for $ac_word... " >&6; }
19771if ${ac_cv_path_PKG_CONFIG+:} false; then :
19772  $as_echo_n "(cached) " >&6
19773else
19774  case $PKG_CONFIG in
19775  [\\/]* | ?:[\\/]*)
19776  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19777  ;;
19778  *)
19779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19780for as_dir in $PATH
19781do
19782  IFS=$as_save_IFS
19783  test -z "$as_dir" && as_dir=.
19784    for ac_exec_ext in '' $ac_executable_extensions; do
19785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19786    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19788    break 2
19789  fi
19790done
19791  done
19792IFS=$as_save_IFS
19793
19794  ;;
19795esac
19796fi
19797PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19798if test -n "$PKG_CONFIG"; then
19799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19800$as_echo "$PKG_CONFIG" >&6; }
19801else
19802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19803$as_echo "no" >&6; }
19804fi
19805
19806
19807fi
19808if test -z "$ac_cv_path_PKG_CONFIG"; then
19809  ac_pt_PKG_CONFIG=$PKG_CONFIG
19810  # Extract the first word of "pkg-config", so it can be a program name with args.
19811set dummy pkg-config; ac_word=$2
19812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19813$as_echo_n "checking for $ac_word... " >&6; }
19814if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19815  $as_echo_n "(cached) " >&6
19816else
19817  case $ac_pt_PKG_CONFIG in
19818  [\\/]* | ?:[\\/]*)
19819  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19820  ;;
19821  *)
19822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19823for as_dir in $PATH
19824do
19825  IFS=$as_save_IFS
19826  test -z "$as_dir" && as_dir=.
19827    for ac_exec_ext in '' $ac_executable_extensions; do
19828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19829    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19831    break 2
19832  fi
19833done
19834  done
19835IFS=$as_save_IFS
19836
19837  ;;
19838esac
19839fi
19840ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19841if test -n "$ac_pt_PKG_CONFIG"; then
19842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19843$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19844else
19845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19846$as_echo "no" >&6; }
19847fi
19848
19849  if test "x$ac_pt_PKG_CONFIG" = x; then
19850    PKG_CONFIG=""
19851  else
19852    case $cross_compiling:$ac_tool_warned in
19853yes:)
19854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19856ac_tool_warned=yes ;;
19857esac
19858    PKG_CONFIG=$ac_pt_PKG_CONFIG
19859  fi
19860else
19861  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19862fi
19863
19864fi
19865if test -n "$PKG_CONFIG"; then
19866	_pkg_min_version=0.9.0
19867	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19868$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19869	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19870		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19871$as_echo "yes" >&6; }
19872	else
19873		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19874$as_echo "no" >&6; }
19875		PKG_CONFIG=""
19876	fi
19877
19878fi
19879
19880# After basic tools have been setup, we can check build os specific details.
19881
19882  ###############################################################################
19883
19884  # Note that this is the build platform OS version!
19885
19886  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19887  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19888  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19889  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19890
19891
19892
19893
19894
19895# Setup builddeps, for automatic downloading of tools we need.
19896# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19897# boot-jdk setup, but we need to have basic tools setup first.
19898
19899
19900# Check whether --with-builddeps-conf was given.
19901if test "${with_builddeps_conf+set}" = set; then :
19902  withval=$with_builddeps_conf;
19903fi
19904
19905
19906
19907# Check whether --with-builddeps-server was given.
19908if test "${with_builddeps_server+set}" = set; then :
19909  withval=$with_builddeps_server;
19910fi
19911
19912
19913
19914# Check whether --with-builddeps-dir was given.
19915if test "${with_builddeps_dir+set}" = set; then :
19916  withval=$with_builddeps_dir;
19917else
19918  with_builddeps_dir=/localhome/builddeps
19919fi
19920
19921
19922
19923# Check whether --with-builddeps-group was given.
19924if test "${with_builddeps_group+set}" = set; then :
19925  withval=$with_builddeps_group;
19926fi
19927
19928
19929
19930
19931  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19932    if test "x$with_builddeps_conf" != x; then
19933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19934$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19935      builddepsfile=$with_builddeps_conf
19936      if test -s $builddepsfile; then
19937        . $builddepsfile
19938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19939$as_echo "loaded!" >&6; }
19940      else
19941        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19942      fi
19943    else
19944      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19945$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19946      builddepsfile=`mktemp`
19947      touch $builddepsfile
19948      # Put all found confs into a single file.
19949      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19950      # Source the file to acquire the variables
19951      if test -s $builddepsfile; then
19952        . $builddepsfile
19953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19954$as_echo "found at least one!" >&6; }
19955      else
19956        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19957      fi
19958    fi
19959    # Create build and target names that use _ instead of "-" and ".".
19960    # This is necessary to use them in variable names.
19961    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19962    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19963    # Extract rewrite information for build and target
19964    eval rewritten_build=\${REWRITE_${build_var}}
19965    if test "x$rewritten_build" = x; then
19966      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19967      echo Build stays the same $rewritten_build
19968    else
19969      echo Rewriting build for builddeps into $rewritten_build
19970    fi
19971    eval rewritten_target=\${REWRITE_${target_var}}
19972    if test "x$rewritten_target" = x; then
19973      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19974      echo Target stays the same $rewritten_target
19975    else
19976      echo Rewriting target for builddeps into $rewritten_target
19977    fi
19978    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19979    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19980  fi
19981  for ac_prog in 7z unzip
19982do
19983  # Extract the first word of "$ac_prog", so it can be a program name with args.
19984set dummy $ac_prog; ac_word=$2
19985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19986$as_echo_n "checking for $ac_word... " >&6; }
19987if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19988  $as_echo_n "(cached) " >&6
19989else
19990  if test -n "$BDEPS_UNZIP"; then
19991  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19992else
19993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19994for as_dir in $PATH
19995do
19996  IFS=$as_save_IFS
19997  test -z "$as_dir" && as_dir=.
19998    for ac_exec_ext in '' $ac_executable_extensions; do
19999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20000    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20002    break 2
20003  fi
20004done
20005  done
20006IFS=$as_save_IFS
20007
20008fi
20009fi
20010BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20011if test -n "$BDEPS_UNZIP"; then
20012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20013$as_echo "$BDEPS_UNZIP" >&6; }
20014else
20015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20016$as_echo "no" >&6; }
20017fi
20018
20019
20020  test -n "$BDEPS_UNZIP" && break
20021done
20022
20023  if test "x$BDEPS_UNZIP" = x7z; then
20024    BDEPS_UNZIP="7z x"
20025  fi
20026
20027  for ac_prog in wget lftp ftp
20028do
20029  # Extract the first word of "$ac_prog", so it can be a program name with args.
20030set dummy $ac_prog; ac_word=$2
20031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20032$as_echo_n "checking for $ac_word... " >&6; }
20033if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20034  $as_echo_n "(cached) " >&6
20035else
20036  if test -n "$BDEPS_FTP"; then
20037  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20038else
20039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20040for as_dir in $PATH
20041do
20042  IFS=$as_save_IFS
20043  test -z "$as_dir" && as_dir=.
20044    for ac_exec_ext in '' $ac_executable_extensions; do
20045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20046    ac_cv_prog_BDEPS_FTP="$ac_prog"
20047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20048    break 2
20049  fi
20050done
20051  done
20052IFS=$as_save_IFS
20053
20054fi
20055fi
20056BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20057if test -n "$BDEPS_FTP"; then
20058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20059$as_echo "$BDEPS_FTP" >&6; }
20060else
20061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20062$as_echo "no" >&6; }
20063fi
20064
20065
20066  test -n "$BDEPS_FTP" && break
20067done
20068
20069
20070
20071###############################################################################
20072#
20073# Determine OpenJDK variants, options and version numbers.
20074#
20075###############################################################################
20076
20077# We need build & target for this.
20078
20079
20080  ###############################################################################
20081  #
20082  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20083  # We always build headless support.
20084  #
20085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20086$as_echo_n "checking headful support... " >&6; }
20087  # Check whether --enable-headful was given.
20088if test "${enable_headful+set}" = set; then :
20089  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20090else
20091  SUPPORT_HEADFUL=yes
20092fi
20093
20094
20095  SUPPORT_HEADLESS=yes
20096  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20097
20098  if test "x$SUPPORT_HEADFUL" = xyes; then
20099    # We are building both headful and headless.
20100    headful_msg="include support for both headful and headless"
20101  fi
20102
20103  if test "x$SUPPORT_HEADFUL" = xno; then
20104    # Thus we are building headless only.
20105    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20106    headful_msg="headless only"
20107  fi
20108
20109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20110$as_echo "$headful_msg" >&6; }
20111
20112
20113
20114
20115
20116  # Control wether Hotspot runs Queens test after build.
20117  # Check whether --enable-hotspot-test-in-build was given.
20118if test "${enable_hotspot_test_in_build+set}" = set; then :
20119  enableval=$enable_hotspot_test_in_build;
20120else
20121  enable_hotspot_test_in_build=no
20122fi
20123
20124  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20125    TEST_IN_BUILD=true
20126  else
20127    TEST_IN_BUILD=false
20128  fi
20129
20130
20131  ###############################################################################
20132  #
20133  # Choose cacerts source file
20134  #
20135
20136# Check whether --with-cacerts-file was given.
20137if test "${with_cacerts_file+set}" = set; then :
20138  withval=$with_cacerts_file;
20139fi
20140
20141  if test "x$with_cacerts_file" != x; then
20142    CACERTS_FILE=$with_cacerts_file
20143  fi
20144
20145
20146  ###############################################################################
20147  #
20148  # Enable or disable unlimited crypto
20149  #
20150  # Check whether --enable-unlimited-crypto was given.
20151if test "${enable_unlimited_crypto+set}" = set; then :
20152  enableval=$enable_unlimited_crypto;
20153else
20154  enable_unlimited_crypto=no
20155fi
20156
20157  if test "x$enable_unlimited_crypto" = "xyes"; then
20158    UNLIMITED_CRYPTO=true
20159  else
20160    UNLIMITED_CRYPTO=false
20161  fi
20162
20163
20164  ###############################################################################
20165  #
20166  # Compress jars
20167  #
20168  COMPRESS_JARS=false
20169
20170
20171
20172  # Setup default copyright year. Mostly overridden when building close to a new year.
20173
20174# Check whether --with-copyright-year was given.
20175if test "${with_copyright_year+set}" = set; then :
20176  withval=$with_copyright_year;
20177fi
20178
20179  if test "x$with_copyright_year" = xyes; then
20180    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20181  elif test "x$with_copyright_year" != x; then
20182    COPYRIGHT_YEAR="$with_copyright_year"
20183  else
20184    COPYRIGHT_YEAR=`date +'%Y'`
20185  fi
20186
20187
20188
20189  # Warn user that old version arguments are deprecated.
20190
20191
20192# Check whether --with-milestone was given.
20193if test "${with_milestone+set}" = set; then :
20194  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20195$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20196fi
20197
20198
20199
20200
20201# Check whether --with-update-version was given.
20202if test "${with_update_version+set}" = set; then :
20203  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20204$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20205fi
20206
20207
20208
20209
20210# Check whether --with-user-release-suffix was given.
20211if test "${with_user_release_suffix+set}" = set; then :
20212  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20213$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20214fi
20215
20216
20217
20218
20219# Check whether --with-build-number was given.
20220if test "${with_build_number+set}" = set; then :
20221  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20222$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20223fi
20224
20225
20226
20227  # Source the version numbers file
20228  . $AUTOCONF_DIR/version-numbers
20229
20230  # Some non-version number information is set in that file
20231
20232
20233
20234
20235
20236
20237
20238
20239  # Override version from arguments
20240
20241  # If --with-version-string is set, process it first. It is possible to
20242  # override parts with more specific flags, since these are processed later.
20243
20244# Check whether --with-version-string was given.
20245if test "${with_version_string+set}" = set; then :
20246  withval=$with_version_string;
20247fi
20248
20249  if test "x$with_version_string" = xyes; then
20250    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20251  elif test "x$with_version_string" != x; then
20252    # Additional [] needed to keep m4 from mangling shell constructs.
20253    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?(_([a-zA-Z]+))?)?$ ]] ; then
20254      VERSION_MAJOR=${BASH_REMATCH[1]}
20255      VERSION_MINOR=${BASH_REMATCH[3]}
20256      VERSION_SECURITY=${BASH_REMATCH[5]}
20257      VERSION_PATCH=${BASH_REMATCH[7]}
20258      VERSION_PRE=${BASH_REMATCH[9]}
20259      version_plus_separator=${BASH_REMATCH[11]}
20260      VERSION_BUILD=${BASH_REMATCH[12]}
20261      VERSION_OPT_BASE=${BASH_REMATCH[14]}
20262      VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[16]}
20263      # Unspecified numerical fields are interpreted as 0.
20264      if test "x$VERSION_MINOR" = x; then
20265        VERSION_MINOR=0
20266      fi
20267      if test "x$VERSION_SECURITY" = x; then
20268        VERSION_SECURITY=0
20269      fi
20270      if test "x$VERSION_PATCH" = x; then
20271        VERSION_PATCH=0
20272      fi
20273      if test "x$version_plus_separator" != x \
20274          && test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then
20275        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20276      fi
20277      # Stop the version part process from setting default values.
20278      # We still allow them to explicitely override though.
20279      NO_DEFAULT_VERSION_PARTS=true
20280    else
20281      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20282    fi
20283  fi
20284
20285
20286# Check whether --with-version-pre was given.
20287if test "${with_version_pre+set}" = set; then :
20288  withval=$with_version_pre; with_version_pre_present=true
20289else
20290  with_version_pre_present=false
20291fi
20292
20293
20294  if test "x$with_version_pre_present" = xtrue; then
20295    if test "x$with_version_pre" = xyes; then
20296      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
20297    elif test "x$with_version_pre" = xno; then
20298      # Interpret --without-* as empty string instead of the literal "no"
20299      VERSION_PRE=
20300    else
20301      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20302       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
20303      if test "x$VERSION_PRE" != "x$with_version_pre"; then
20304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
20305$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
20306      fi
20307    fi
20308  else
20309    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20310      # Default is to use "internal" as pre
20311      VERSION_PRE="internal"
20312    fi
20313  fi
20314
20315
20316# Check whether --with-version-opt-base was given.
20317if test "${with_version_opt_base+set}" = set; then :
20318  withval=$with_version_opt_base; with_version_opt_base_present=true
20319else
20320  with_version_opt_base_present=false
20321fi
20322
20323
20324  if test "x$with_version_opt_base_present" = xtrue; then
20325    if test "x$with_version_opt_base" = xyes; then
20326      as_fn_error $? "--with-version-opt-base must have a value" "$LINENO" 5
20327    elif test "x$with_version_opt_base" = xno; then
20328      # Interpret --without-* as empty string instead of the literal "no"
20329      VERSION_OPT_BASE=
20330    else
20331      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4.
20332       VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'`
20333      if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then
20334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&5
20335$as_echo "$as_me: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&2;}
20336      fi
20337    fi
20338  else
20339    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20340      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20341      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20342      # Outer [ ] to quote m4.
20343       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20344       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20345      VERSION_OPT_BASE="$timestamp.$username.$basedirname"
20346    fi
20347  fi
20348
20349
20350# Check whether --with-version-opt-debuglevel was given.
20351if test "${with_version_opt_debuglevel+set}" = set; then :
20352  withval=$with_version_opt_debuglevel; with_version_opt_debuglevel_present=true
20353else
20354  with_version_opt_debuglevel_present=false
20355fi
20356
20357
20358  if test "x$with_version_opt_debuglevel_present" = xtrue; then
20359    if test "x$with_version_opt_debuglevel" = xyes; then
20360      as_fn_error $? "--with-version-opt-debuglevel must have a value" "$LINENO" 5
20361    elif test "x$with_version_opt_debuglevel" = xno; then
20362      # Interpret --without-* as empty string instead of the literal "no"
20363      VERSION_OPT_DEBUGLEVEL=
20364    else
20365      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4.
20366       VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'`
20367      if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then
20368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&5
20369$as_echo "$as_me: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&2;}
20370      fi
20371    fi
20372  else
20373    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20374      # Default is to use the debug level name, except for release which is empty.
20375      if test "x$DEBUG_LEVEL" != "xrelease"; then
20376        VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL"
20377      else
20378        VERSION_OPT_DEBUGLEVEL=""
20379      fi
20380    fi
20381  fi
20382
20383# Check whether --with-version-build was given.
20384if test "${with_version_build+set}" = set; then :
20385  withval=$with_version_build; with_version_build_present=true
20386else
20387  with_version_build_present=false
20388fi
20389
20390
20391  if test "x$with_version_build_present" = xtrue; then
20392    if test "x$with_version_build" = xyes; then
20393      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20394    elif test "x$with_version_build" = xno; then
20395      # Interpret --without-* as empty string instead of the literal "no"
20396      VERSION_BUILD=
20397    elif test "x$with_version_build" = x; then
20398      VERSION_BUILD=
20399    else
20400
20401  # Additional [] needed to keep m4 from mangling shell constructs.
20402  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20403    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20404  fi
20405  # Extract the version number without leading zeros.
20406  cleaned_value=${BASH_REMATCH[1]}
20407  if test "x$cleaned_value" = x; then
20408    # Special case for zero
20409    cleaned_value=${BASH_REMATCH[2]}
20410  fi
20411
20412  if test $cleaned_value -gt 255; then
20413    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20414  fi
20415  if test "x$cleaned_value" != "x$with_version_build"; then
20416    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20417$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20418  fi
20419  VERSION_BUILD=$cleaned_value
20420
20421    fi
20422  else
20423    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20424      # Default is to not have a build number.
20425      VERSION_BUILD=""
20426      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20427      VERSION_BUILD=0
20428    fi
20429  fi
20430
20431
20432# Check whether --with-version-major was given.
20433if test "${with_version_major+set}" = set; then :
20434  withval=$with_version_major; with_version_major_present=true
20435else
20436  with_version_major_present=false
20437fi
20438
20439
20440  if test "x$with_version_major_present" = xtrue; then
20441    if test "x$with_version_major" = xyes; then
20442      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20443    else
20444
20445  # Additional [] needed to keep m4 from mangling shell constructs.
20446  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20447    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20448  fi
20449  # Extract the version number without leading zeros.
20450  cleaned_value=${BASH_REMATCH[1]}
20451  if test "x$cleaned_value" = x; then
20452    # Special case for zero
20453    cleaned_value=${BASH_REMATCH[2]}
20454  fi
20455
20456  if test $cleaned_value -gt 255; then
20457    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20458  fi
20459  if test "x$cleaned_value" != "x$with_version_major"; then
20460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20461$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20462  fi
20463  VERSION_MAJOR=$cleaned_value
20464
20465    fi
20466  else
20467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20468      # Default is to get value from version-numbers
20469      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20470    fi
20471  fi
20472
20473
20474# Check whether --with-version-minor was given.
20475if test "${with_version_minor+set}" = set; then :
20476  withval=$with_version_minor; with_version_minor_present=true
20477else
20478  with_version_minor_present=false
20479fi
20480
20481
20482  if test "x$with_version_minor_present" = xtrue; then
20483    if test "x$with_version_minor" = xyes; then
20484      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20485    elif test "x$with_version_minor" = xno; then
20486      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20487      VERSION_MINOR=0
20488    elif test "x$with_version_minor" = x; then
20489      VERSION_MINOR=0
20490    else
20491
20492  # Additional [] needed to keep m4 from mangling shell constructs.
20493  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20494    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20495  fi
20496  # Extract the version number without leading zeros.
20497  cleaned_value=${BASH_REMATCH[1]}
20498  if test "x$cleaned_value" = x; then
20499    # Special case for zero
20500    cleaned_value=${BASH_REMATCH[2]}
20501  fi
20502
20503  if test $cleaned_value -gt 255; then
20504    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20505  fi
20506  if test "x$cleaned_value" != "x$with_version_minor"; then
20507    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20508$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20509  fi
20510  VERSION_MINOR=$cleaned_value
20511
20512    fi
20513  else
20514    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20515      # Default is 0, if unspecified
20516      VERSION_MINOR=0
20517    fi
20518  fi
20519
20520
20521# Check whether --with-version-security was given.
20522if test "${with_version_security+set}" = set; then :
20523  withval=$with_version_security; with_version_security_present=true
20524else
20525  with_version_security_present=false
20526fi
20527
20528
20529  if test "x$with_version_security_present" = xtrue; then
20530    if test "x$with_version_security" = xyes; then
20531      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20532    elif test "x$with_version_security" = xno; then
20533      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20534      VERSION_SECURITY=0
20535    elif test "x$with_version_security" = x; then
20536      VERSION_SECURITY=0
20537    else
20538
20539  # Additional [] needed to keep m4 from mangling shell constructs.
20540  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20541    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20542  fi
20543  # Extract the version number without leading zeros.
20544  cleaned_value=${BASH_REMATCH[1]}
20545  if test "x$cleaned_value" = x; then
20546    # Special case for zero
20547    cleaned_value=${BASH_REMATCH[2]}
20548  fi
20549
20550  if test $cleaned_value -gt 255; then
20551    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20552  fi
20553  if test "x$cleaned_value" != "x$with_version_security"; then
20554    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20555$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20556  fi
20557  VERSION_SECURITY=$cleaned_value
20558
20559    fi
20560  else
20561    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20562      # Default is 0, if unspecified
20563      VERSION_SECURITY=0
20564    fi
20565  fi
20566
20567
20568# Check whether --with-version-patch was given.
20569if test "${with_version_patch+set}" = set; then :
20570  withval=$with_version_patch; with_version_patch_present=true
20571else
20572  with_version_patch_present=false
20573fi
20574
20575
20576  if test "x$with_version_patch_present" = xtrue; then
20577    if test "x$with_version_patch" = xyes; then
20578      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20579    elif test "x$with_version_patch" = xno; then
20580      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20581      VERSION_PATCH=0
20582    elif test "x$with_version_patch" = x; then
20583      VERSION_PATCH=0
20584    else
20585
20586  # Additional [] needed to keep m4 from mangling shell constructs.
20587  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20588    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20589  fi
20590  # Extract the version number without leading zeros.
20591  cleaned_value=${BASH_REMATCH[1]}
20592  if test "x$cleaned_value" = x; then
20593    # Special case for zero
20594    cleaned_value=${BASH_REMATCH[2]}
20595  fi
20596
20597  if test $cleaned_value -gt 255; then
20598    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20599  fi
20600  if test "x$cleaned_value" != "x$with_version_patch"; then
20601    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20602$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20603  fi
20604  VERSION_PATCH=$cleaned_value
20605
20606    fi
20607  else
20608    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20609      # Default is 0, if unspecified
20610      VERSION_PATCH=0
20611    fi
20612  fi
20613
20614  # Calculate derived version properties
20615
20616  # Set opt to "opt-base" if debug level is empty (i.e. release), or
20617  # "opt-base_debug-level" otherwise.
20618  VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL}
20619
20620  # Set VERSION_IS_GA based on if VERSION_PRE has a value
20621  if test "x$VERSION_PRE" = x; then
20622    VERSION_IS_GA=true
20623  else
20624    VERSION_IS_GA=false
20625  fi
20626
20627  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20628  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20629
20630  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20631  # Strip trailing zeroes from stripped_version_number
20632  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20633  VERSION_NUMBER=$stripped_version_number
20634
20635  # The complete version string, with additional build information
20636  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20637    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20638  else
20639    # If either build or opt is set, we need a + separator
20640    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20641  fi
20642
20643  # The short version string, just VERSION_NUMBER and PRE, if present.
20644  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20645
20646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20647$as_echo_n "checking for version string... " >&6; }
20648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20649$as_echo "$VERSION_STRING" >&6; }
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665###############################################################################
20666#
20667# Setup BootJDK, used to bootstrap the build.
20668#
20669###############################################################################
20670
20671
20672  BOOT_JDK_FOUND=no
20673
20674# Check whether --with-boot-jdk was given.
20675if test "${with_boot_jdk+set}" = set; then :
20676  withval=$with_boot_jdk;
20677fi
20678
20679
20680  # We look for the Boot JDK through various means, going from more certain to
20681  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20682  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20683  # must check if this is indeed valid; otherwise we'll continue looking.
20684
20685  # Test: Is bootjdk explicitely set by command line arguments?
20686
20687  if test "x$BOOT_JDK_FOUND" = xno; then
20688    # Now execute the test
20689
20690  if test "x$with_boot_jdk" != x; then
20691    BOOT_JDK=$with_boot_jdk
20692    BOOT_JDK_FOUND=maybe
20693    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20694$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20695  fi
20696
20697
20698    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20699    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20700      # Do we have a bin/java?
20701      if test ! -x "$BOOT_JDK/bin/java"; then
20702        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20704        BOOT_JDK_FOUND=no
20705      else
20706        # Do we have a bin/javac?
20707        if test ! -x "$BOOT_JDK/bin/javac"; then
20708          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20710          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20711$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20712          BOOT_JDK_FOUND=no
20713        else
20714          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20715          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20716
20717          # Extra M4 quote needed to protect [] in grep expression.
20718          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
20719          if test "x$FOUND_CORRECT_VERSION" = x; then
20720            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20722            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20723$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20724            BOOT_JDK_FOUND=no
20725          else
20726            # We're done! :-)
20727            BOOT_JDK_FOUND=yes
20728
20729  # Only process if variable expands to non-empty
20730
20731  if test "x$BOOT_JDK" != x; then
20732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20733
20734  # Input might be given as Windows format, start by converting to
20735  # unix format.
20736  path="$BOOT_JDK"
20737  new_path=`$CYGPATH -u "$path"`
20738
20739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20742  # "foo.exe" is OK but "foo" is an error.
20743  #
20744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20745  # It is also a way to make sure we got the proper file name for the real test later on.
20746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20747  if test "x$test_shortpath" = x; then
20748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20750    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20751  fi
20752
20753  # Call helper function which possibly converts this using DOS-style short mode.
20754  # If so, the updated path is stored in $new_path.
20755
20756  input_path="$new_path"
20757  # Check if we need to convert this using DOS-style short mode. If the path
20758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20759  # take no chances and rewrite it.
20760  # Note: m4 eats our [], so we need to use [ and ] instead.
20761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20762  if test "x$has_forbidden_chars" != x; then
20763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20767      # Going to short mode and back again did indeed matter. Since short mode is
20768      # case insensitive, let's make it lowercase to improve readability.
20769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20770      # Now convert it back to Unix-style (cygpath)
20771      input_path=`$CYGPATH -u "$shortmode_path"`
20772      new_path="$input_path"
20773    fi
20774  fi
20775
20776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20777  if test "x$test_cygdrive_prefix" = x; then
20778    # As a simple fix, exclude /usr/bin since it's not a real path.
20779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20781      # a path prefixed by /cygdrive for fixpath to work.
20782      new_path="$CYGWIN_ROOT_PATH$input_path"
20783    fi
20784  fi
20785
20786
20787  if test "x$path" != "x$new_path"; then
20788    BOOT_JDK="$new_path"
20789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20790$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20791  fi
20792
20793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20794
20795  path="$BOOT_JDK"
20796  has_colon=`$ECHO $path | $GREP ^.:`
20797  new_path="$path"
20798  if test "x$has_colon" = x; then
20799    # Not in mixed or Windows style, start by that.
20800    new_path=`cmd //c echo $path`
20801  fi
20802
20803
20804  input_path="$new_path"
20805  # Check if we need to convert this using DOS-style short mode. If the path
20806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20807  # take no chances and rewrite it.
20808  # Note: m4 eats our [], so we need to use [ and ] instead.
20809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20810  if test "x$has_forbidden_chars" != x; then
20811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20813  fi
20814
20815
20816  windows_path="$new_path"
20817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20818    unix_path=`$CYGPATH -u "$windows_path"`
20819    new_path="$unix_path"
20820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20822    new_path="$unix_path"
20823  fi
20824
20825  if test "x$path" != "x$new_path"; then
20826    BOOT_JDK="$new_path"
20827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20829  fi
20830
20831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20833
20834    else
20835      # We're on a unix platform. Hooray! :)
20836      path="$BOOT_JDK"
20837      has_space=`$ECHO "$path" | $GREP " "`
20838      if test "x$has_space" != x; then
20839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20842      fi
20843
20844      # Use eval to expand a potential ~
20845      eval path="$path"
20846      if test ! -f "$path" && test ! -d "$path"; then
20847        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20848      fi
20849
20850      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20851    fi
20852  fi
20853
20854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20855$as_echo_n "checking for Boot JDK... " >&6; }
20856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20857$as_echo "$BOOT_JDK" >&6; }
20858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20859$as_echo_n "checking Boot JDK version... " >&6; }
20860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20862$as_echo "$BOOT_JDK_VERSION" >&6; }
20863          fi # end check jdk version
20864        fi # end check javac
20865      fi # end check java
20866    fi # end check boot jdk found
20867  fi
20868
20869  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20870    # Having specified an argument which is incorrect will produce an instant failure;
20871    # we should not go on looking
20872    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20873  fi
20874
20875  # Test: Is bootjdk available from builddeps?
20876
20877  if test "x$BOOT_JDK_FOUND" = xno; then
20878    # Now execute the test
20879
20880
20881
20882  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20883    # Source the builddeps file again, to make sure it uses the latest variables!
20884    . $builddepsfile
20885    # Look for a target and build machine specific resource!
20886    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20887    if test "x$resource" = x; then
20888      # Ok, lets instead look for a target specific resource
20889      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20890    fi
20891    if test "x$resource" = x; then
20892      # Ok, lets instead look for a build specific resource
20893      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20894    fi
20895    if test "x$resource" = x; then
20896      # Ok, lets instead look for a generic resource
20897      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20898      resource=${builddep_bootjdk}
20899    fi
20900    if test "x$resource" != x; then
20901      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20902$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20903      # If the resource in the builddeps.conf file is an existing directory,
20904      # for example /java/linux/cups
20905      if test -d ${resource}; then
20906        depdir=${resource}
20907      else
20908
20909  # bootjdk is for example mymodule
20910  # $resource is for example libs/general/libmymod_1_2_3.zip
20911  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20912  # $with_builddeps_dir is for example /localhome/builddeps
20913  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20914  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20915  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20916  filename=`basename $resource`
20917  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20918  filebase=${filename%%.*}
20919  extension=${filename#*.}
20920  installdir=$with_builddeps_dir/$filebase
20921  if test ! -f $installdir/$filename.unpacked; then
20922    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20923$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20924    if test ! -d $installdir; then
20925      mkdir -p $installdir
20926    fi
20927    if test ! -d $installdir; then
20928      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20929    fi
20930    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20931    touch $tmpfile
20932    if test ! -f $tmpfile; then
20933      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20934    fi
20935
20936  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20937  # $tmpfile is the local file name for the downloaded file.
20938  VALID_TOOL=no
20939  if test "x$BDEPS_FTP" = xwget; then
20940    VALID_TOOL=yes
20941    wget -O $tmpfile $with_builddeps_server/$resource
20942  fi
20943  if test "x$BDEPS_FTP" = xlftp; then
20944    VALID_TOOL=yes
20945    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20946  fi
20947  if test "x$BDEPS_FTP" = xftp; then
20948    VALID_TOOL=yes
20949    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20950    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20951    FTPUSERPWD=${FTPSERVER%%@*}
20952    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20953      FTPUSER=${userpwd%%:*}
20954      FTPPWD=${userpwd#*@}
20955      FTPSERVER=${FTPSERVER#*@}
20956    else
20957      FTPUSER=ftp
20958      FTPPWD=ftp
20959    fi
20960    # the "pass" command does not work on some
20961    # ftp clients (read ftp.exe) but if it works,
20962    # passive mode is better!
20963    ( \
20964        echo "user $FTPUSER $FTPPWD"        ; \
20965        echo "pass"                         ; \
20966        echo "bin"                          ; \
20967        echo "get $FTPPATH $tmpfile"              ; \
20968    ) | ftp -in $FTPSERVER
20969  fi
20970  if test "x$VALID_TOOL" != xyes; then
20971    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20972  fi
20973
20974    mv $tmpfile $installdir/$filename
20975    if test ! -s $installdir/$filename; then
20976      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20977    fi
20978    case "$extension" in
20979      zip)  echo "Unzipping $installdir/$filename..."
20980        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20981        ;;
20982      tar.gz) echo "Untaring $installdir/$filename..."
20983        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20984        ;;
20985      tgz) echo "Untaring $installdir/$filename..."
20986        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20987        ;;
20988      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20989        ;;
20990    esac
20991  fi
20992  if test -f $installdir/$filename.unpacked; then
20993    depdir=$installdir
20994  fi
20995
20996      fi
20997      # Source the builddeps file again, because in the previous command, the depdir
20998      # was updated to point at the current build dependency install directory.
20999      . $builddepsfile
21000      # Now extract variables from the builddeps.conf files.
21001      theroot=${builddep_bootjdk_ROOT}
21002      thecflags=${builddep_bootjdk_CFLAGS}
21003      thelibs=${builddep_bootjdk_LIBS}
21004      if test "x$depdir" = x; then
21005        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21006      fi
21007      BOOT_JDK=$depdir
21008      if test "x$theroot" != x; then
21009        BOOT_JDK="$theroot"
21010      fi
21011      if test "x$thecflags" != x; then
21012        BOOT_JDK_CFLAGS="$thecflags"
21013      fi
21014      if test "x$thelibs" != x; then
21015        BOOT_JDK_LIBS="$thelibs"
21016      fi
21017      BOOT_JDK_FOUND=maybe
21018      else BOOT_JDK_FOUND=no
21019
21020    fi
21021    else BOOT_JDK_FOUND=no
21022
21023  fi
21024
21025
21026
21027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21029      # Do we have a bin/java?
21030      if test ! -x "$BOOT_JDK/bin/java"; then
21031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21033        BOOT_JDK_FOUND=no
21034      else
21035        # Do we have a bin/javac?
21036        if test ! -x "$BOOT_JDK/bin/javac"; then
21037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21041          BOOT_JDK_FOUND=no
21042        else
21043          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21044          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21045
21046          # Extra M4 quote needed to protect [] in grep expression.
21047          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21048          if test "x$FOUND_CORRECT_VERSION" = x; then
21049            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21051            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21052$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21053            BOOT_JDK_FOUND=no
21054          else
21055            # We're done! :-)
21056            BOOT_JDK_FOUND=yes
21057
21058  # Only process if variable expands to non-empty
21059
21060  if test "x$BOOT_JDK" != x; then
21061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21062
21063  # Input might be given as Windows format, start by converting to
21064  # unix format.
21065  path="$BOOT_JDK"
21066  new_path=`$CYGPATH -u "$path"`
21067
21068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21071  # "foo.exe" is OK but "foo" is an error.
21072  #
21073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21074  # It is also a way to make sure we got the proper file name for the real test later on.
21075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21076  if test "x$test_shortpath" = x; then
21077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21079    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21080  fi
21081
21082  # Call helper function which possibly converts this using DOS-style short mode.
21083  # If so, the updated path is stored in $new_path.
21084
21085  input_path="$new_path"
21086  # Check if we need to convert this using DOS-style short mode. If the path
21087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21088  # take no chances and rewrite it.
21089  # Note: m4 eats our [], so we need to use [ and ] instead.
21090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21091  if test "x$has_forbidden_chars" != x; then
21092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21096      # Going to short mode and back again did indeed matter. Since short mode is
21097      # case insensitive, let's make it lowercase to improve readability.
21098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21099      # Now convert it back to Unix-style (cygpath)
21100      input_path=`$CYGPATH -u "$shortmode_path"`
21101      new_path="$input_path"
21102    fi
21103  fi
21104
21105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21106  if test "x$test_cygdrive_prefix" = x; then
21107    # As a simple fix, exclude /usr/bin since it's not a real path.
21108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21110      # a path prefixed by /cygdrive for fixpath to work.
21111      new_path="$CYGWIN_ROOT_PATH$input_path"
21112    fi
21113  fi
21114
21115
21116  if test "x$path" != "x$new_path"; then
21117    BOOT_JDK="$new_path"
21118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21120  fi
21121
21122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21123
21124  path="$BOOT_JDK"
21125  has_colon=`$ECHO $path | $GREP ^.:`
21126  new_path="$path"
21127  if test "x$has_colon" = x; then
21128    # Not in mixed or Windows style, start by that.
21129    new_path=`cmd //c echo $path`
21130  fi
21131
21132
21133  input_path="$new_path"
21134  # Check if we need to convert this using DOS-style short mode. If the path
21135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21136  # take no chances and rewrite it.
21137  # Note: m4 eats our [], so we need to use [ and ] instead.
21138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21139  if test "x$has_forbidden_chars" != x; then
21140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21142  fi
21143
21144
21145  windows_path="$new_path"
21146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21147    unix_path=`$CYGPATH -u "$windows_path"`
21148    new_path="$unix_path"
21149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21151    new_path="$unix_path"
21152  fi
21153
21154  if test "x$path" != "x$new_path"; then
21155    BOOT_JDK="$new_path"
21156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21158  fi
21159
21160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21162
21163    else
21164      # We're on a unix platform. Hooray! :)
21165      path="$BOOT_JDK"
21166      has_space=`$ECHO "$path" | $GREP " "`
21167      if test "x$has_space" != x; then
21168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21171      fi
21172
21173      # Use eval to expand a potential ~
21174      eval path="$path"
21175      if test ! -f "$path" && test ! -d "$path"; then
21176        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21177      fi
21178
21179      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21180    fi
21181  fi
21182
21183            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21184$as_echo_n "checking for Boot JDK... " >&6; }
21185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21186$as_echo "$BOOT_JDK" >&6; }
21187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21188$as_echo_n "checking Boot JDK version... " >&6; }
21189            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21190            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21191$as_echo "$BOOT_JDK_VERSION" >&6; }
21192          fi # end check jdk version
21193        fi # end check javac
21194      fi # end check java
21195    fi # end check boot jdk found
21196  fi
21197
21198
21199  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21200
21201  if test "x$BOOT_JDK_FOUND" = xno; then
21202    # Now execute the test
21203
21204  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21205    # First check at user selected default
21206
21207  if test "x$BOOT_JDK_FOUND" = xno; then
21208    # Now execute the test
21209
21210  if test -x /usr/libexec/java_home; then
21211    BOOT_JDK=`/usr/libexec/java_home `
21212    BOOT_JDK_FOUND=maybe
21213    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21214$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21215  fi
21216
21217
21218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21220      # Do we have a bin/java?
21221      if test ! -x "$BOOT_JDK/bin/java"; then
21222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21224        BOOT_JDK_FOUND=no
21225      else
21226        # Do we have a bin/javac?
21227        if test ! -x "$BOOT_JDK/bin/javac"; then
21228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21232          BOOT_JDK_FOUND=no
21233        else
21234          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21235          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21236
21237          # Extra M4 quote needed to protect [] in grep expression.
21238          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21239          if test "x$FOUND_CORRECT_VERSION" = x; then
21240            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21242            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21243$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21244            BOOT_JDK_FOUND=no
21245          else
21246            # We're done! :-)
21247            BOOT_JDK_FOUND=yes
21248
21249  # Only process if variable expands to non-empty
21250
21251  if test "x$BOOT_JDK" != x; then
21252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21253
21254  # Input might be given as Windows format, start by converting to
21255  # unix format.
21256  path="$BOOT_JDK"
21257  new_path=`$CYGPATH -u "$path"`
21258
21259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21262  # "foo.exe" is OK but "foo" is an error.
21263  #
21264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21265  # It is also a way to make sure we got the proper file name for the real test later on.
21266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21267  if test "x$test_shortpath" = x; then
21268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21271  fi
21272
21273  # Call helper function which possibly converts this using DOS-style short mode.
21274  # If so, the updated path is stored in $new_path.
21275
21276  input_path="$new_path"
21277  # Check if we need to convert this using DOS-style short mode. If the path
21278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21279  # take no chances and rewrite it.
21280  # Note: m4 eats our [], so we need to use [ and ] instead.
21281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21282  if test "x$has_forbidden_chars" != x; then
21283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21287      # Going to short mode and back again did indeed matter. Since short mode is
21288      # case insensitive, let's make it lowercase to improve readability.
21289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21290      # Now convert it back to Unix-style (cygpath)
21291      input_path=`$CYGPATH -u "$shortmode_path"`
21292      new_path="$input_path"
21293    fi
21294  fi
21295
21296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21297  if test "x$test_cygdrive_prefix" = x; then
21298    # As a simple fix, exclude /usr/bin since it's not a real path.
21299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21301      # a path prefixed by /cygdrive for fixpath to work.
21302      new_path="$CYGWIN_ROOT_PATH$input_path"
21303    fi
21304  fi
21305
21306
21307  if test "x$path" != "x$new_path"; then
21308    BOOT_JDK="$new_path"
21309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21311  fi
21312
21313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21314
21315  path="$BOOT_JDK"
21316  has_colon=`$ECHO $path | $GREP ^.:`
21317  new_path="$path"
21318  if test "x$has_colon" = x; then
21319    # Not in mixed or Windows style, start by that.
21320    new_path=`cmd //c echo $path`
21321  fi
21322
21323
21324  input_path="$new_path"
21325  # Check if we need to convert this using DOS-style short mode. If the path
21326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21327  # take no chances and rewrite it.
21328  # Note: m4 eats our [], so we need to use [ and ] instead.
21329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21330  if test "x$has_forbidden_chars" != x; then
21331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21333  fi
21334
21335
21336  windows_path="$new_path"
21337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21338    unix_path=`$CYGPATH -u "$windows_path"`
21339    new_path="$unix_path"
21340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21342    new_path="$unix_path"
21343  fi
21344
21345  if test "x$path" != "x$new_path"; then
21346    BOOT_JDK="$new_path"
21347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21349  fi
21350
21351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21353
21354    else
21355      # We're on a unix platform. Hooray! :)
21356      path="$BOOT_JDK"
21357      has_space=`$ECHO "$path" | $GREP " "`
21358      if test "x$has_space" != x; then
21359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21362      fi
21363
21364      # Use eval to expand a potential ~
21365      eval path="$path"
21366      if test ! -f "$path" && test ! -d "$path"; then
21367        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21368      fi
21369
21370      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21371    fi
21372  fi
21373
21374            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21375$as_echo_n "checking for Boot JDK... " >&6; }
21376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21377$as_echo "$BOOT_JDK" >&6; }
21378            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21379$as_echo_n "checking Boot JDK version... " >&6; }
21380            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21382$as_echo "$BOOT_JDK_VERSION" >&6; }
21383          fi # end check jdk version
21384        fi # end check javac
21385      fi # end check java
21386    fi # end check boot jdk found
21387  fi
21388
21389    # If that did not work out (e.g. too old), try explicit versions instead
21390
21391  if test "x$BOOT_JDK_FOUND" = xno; then
21392    # Now execute the test
21393
21394  if test -x /usr/libexec/java_home; then
21395    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21396    BOOT_JDK_FOUND=maybe
21397    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21398$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21399  fi
21400
21401
21402    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21403    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21404      # Do we have a bin/java?
21405      if test ! -x "$BOOT_JDK/bin/java"; then
21406        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21408        BOOT_JDK_FOUND=no
21409      else
21410        # Do we have a bin/javac?
21411        if test ! -x "$BOOT_JDK/bin/javac"; then
21412          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21414          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21415$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21416          BOOT_JDK_FOUND=no
21417        else
21418          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21419          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21420
21421          # Extra M4 quote needed to protect [] in grep expression.
21422          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21423          if test "x$FOUND_CORRECT_VERSION" = x; then
21424            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21426            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21427$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21428            BOOT_JDK_FOUND=no
21429          else
21430            # We're done! :-)
21431            BOOT_JDK_FOUND=yes
21432
21433  # Only process if variable expands to non-empty
21434
21435  if test "x$BOOT_JDK" != x; then
21436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21437
21438  # Input might be given as Windows format, start by converting to
21439  # unix format.
21440  path="$BOOT_JDK"
21441  new_path=`$CYGPATH -u "$path"`
21442
21443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21446  # "foo.exe" is OK but "foo" is an error.
21447  #
21448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21449  # It is also a way to make sure we got the proper file name for the real test later on.
21450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21451  if test "x$test_shortpath" = x; then
21452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21454    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21455  fi
21456
21457  # Call helper function which possibly converts this using DOS-style short mode.
21458  # If so, the updated path is stored in $new_path.
21459
21460  input_path="$new_path"
21461  # Check if we need to convert this using DOS-style short mode. If the path
21462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21463  # take no chances and rewrite it.
21464  # Note: m4 eats our [], so we need to use [ and ] instead.
21465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21466  if test "x$has_forbidden_chars" != x; then
21467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21471      # Going to short mode and back again did indeed matter. Since short mode is
21472      # case insensitive, let's make it lowercase to improve readability.
21473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21474      # Now convert it back to Unix-style (cygpath)
21475      input_path=`$CYGPATH -u "$shortmode_path"`
21476      new_path="$input_path"
21477    fi
21478  fi
21479
21480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21481  if test "x$test_cygdrive_prefix" = x; then
21482    # As a simple fix, exclude /usr/bin since it's not a real path.
21483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21485      # a path prefixed by /cygdrive for fixpath to work.
21486      new_path="$CYGWIN_ROOT_PATH$input_path"
21487    fi
21488  fi
21489
21490
21491  if test "x$path" != "x$new_path"; then
21492    BOOT_JDK="$new_path"
21493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21495  fi
21496
21497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21498
21499  path="$BOOT_JDK"
21500  has_colon=`$ECHO $path | $GREP ^.:`
21501  new_path="$path"
21502  if test "x$has_colon" = x; then
21503    # Not in mixed or Windows style, start by that.
21504    new_path=`cmd //c echo $path`
21505  fi
21506
21507
21508  input_path="$new_path"
21509  # Check if we need to convert this using DOS-style short mode. If the path
21510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21511  # take no chances and rewrite it.
21512  # Note: m4 eats our [], so we need to use [ and ] instead.
21513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21514  if test "x$has_forbidden_chars" != x; then
21515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21517  fi
21518
21519
21520  windows_path="$new_path"
21521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21522    unix_path=`$CYGPATH -u "$windows_path"`
21523    new_path="$unix_path"
21524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21526    new_path="$unix_path"
21527  fi
21528
21529  if test "x$path" != "x$new_path"; then
21530    BOOT_JDK="$new_path"
21531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21533  fi
21534
21535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21537
21538    else
21539      # We're on a unix platform. Hooray! :)
21540      path="$BOOT_JDK"
21541      has_space=`$ECHO "$path" | $GREP " "`
21542      if test "x$has_space" != x; then
21543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21546      fi
21547
21548      # Use eval to expand a potential ~
21549      eval path="$path"
21550      if test ! -f "$path" && test ! -d "$path"; then
21551        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21552      fi
21553
21554      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21555    fi
21556  fi
21557
21558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21559$as_echo_n "checking for Boot JDK... " >&6; }
21560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21561$as_echo "$BOOT_JDK" >&6; }
21562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21563$as_echo_n "checking Boot JDK version... " >&6; }
21564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21566$as_echo "$BOOT_JDK_VERSION" >&6; }
21567          fi # end check jdk version
21568        fi # end check javac
21569      fi # end check java
21570    fi # end check boot jdk found
21571  fi
21572
21573
21574  if test "x$BOOT_JDK_FOUND" = xno; then
21575    # Now execute the test
21576
21577  if test -x /usr/libexec/java_home; then
21578    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21579    BOOT_JDK_FOUND=maybe
21580    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21581$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21582  fi
21583
21584
21585    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21586    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21587      # Do we have a bin/java?
21588      if test ! -x "$BOOT_JDK/bin/java"; then
21589        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21591        BOOT_JDK_FOUND=no
21592      else
21593        # Do we have a bin/javac?
21594        if test ! -x "$BOOT_JDK/bin/javac"; then
21595          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21597          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21598$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21599          BOOT_JDK_FOUND=no
21600        else
21601          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21602          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21603
21604          # Extra M4 quote needed to protect [] in grep expression.
21605          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21606          if test "x$FOUND_CORRECT_VERSION" = x; then
21607            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21609            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21610$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21611            BOOT_JDK_FOUND=no
21612          else
21613            # We're done! :-)
21614            BOOT_JDK_FOUND=yes
21615
21616  # Only process if variable expands to non-empty
21617
21618  if test "x$BOOT_JDK" != x; then
21619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21620
21621  # Input might be given as Windows format, start by converting to
21622  # unix format.
21623  path="$BOOT_JDK"
21624  new_path=`$CYGPATH -u "$path"`
21625
21626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21629  # "foo.exe" is OK but "foo" is an error.
21630  #
21631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21632  # It is also a way to make sure we got the proper file name for the real test later on.
21633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21634  if test "x$test_shortpath" = x; then
21635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21637    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21638  fi
21639
21640  # Call helper function which possibly converts this using DOS-style short mode.
21641  # If so, the updated path is stored in $new_path.
21642
21643  input_path="$new_path"
21644  # Check if we need to convert this using DOS-style short mode. If the path
21645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21646  # take no chances and rewrite it.
21647  # Note: m4 eats our [], so we need to use [ and ] instead.
21648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21649  if test "x$has_forbidden_chars" != x; then
21650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21654      # Going to short mode and back again did indeed matter. Since short mode is
21655      # case insensitive, let's make it lowercase to improve readability.
21656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21657      # Now convert it back to Unix-style (cygpath)
21658      input_path=`$CYGPATH -u "$shortmode_path"`
21659      new_path="$input_path"
21660    fi
21661  fi
21662
21663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21664  if test "x$test_cygdrive_prefix" = x; then
21665    # As a simple fix, exclude /usr/bin since it's not a real path.
21666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21668      # a path prefixed by /cygdrive for fixpath to work.
21669      new_path="$CYGWIN_ROOT_PATH$input_path"
21670    fi
21671  fi
21672
21673
21674  if test "x$path" != "x$new_path"; then
21675    BOOT_JDK="$new_path"
21676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21678  fi
21679
21680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21681
21682  path="$BOOT_JDK"
21683  has_colon=`$ECHO $path | $GREP ^.:`
21684  new_path="$path"
21685  if test "x$has_colon" = x; then
21686    # Not in mixed or Windows style, start by that.
21687    new_path=`cmd //c echo $path`
21688  fi
21689
21690
21691  input_path="$new_path"
21692  # Check if we need to convert this using DOS-style short mode. If the path
21693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21694  # take no chances and rewrite it.
21695  # Note: m4 eats our [], so we need to use [ and ] instead.
21696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21697  if test "x$has_forbidden_chars" != x; then
21698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21700  fi
21701
21702
21703  windows_path="$new_path"
21704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21705    unix_path=`$CYGPATH -u "$windows_path"`
21706    new_path="$unix_path"
21707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21709    new_path="$unix_path"
21710  fi
21711
21712  if test "x$path" != "x$new_path"; then
21713    BOOT_JDK="$new_path"
21714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21716  fi
21717
21718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21720
21721    else
21722      # We're on a unix platform. Hooray! :)
21723      path="$BOOT_JDK"
21724      has_space=`$ECHO "$path" | $GREP " "`
21725      if test "x$has_space" != x; then
21726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21729      fi
21730
21731      # Use eval to expand a potential ~
21732      eval path="$path"
21733      if test ! -f "$path" && test ! -d "$path"; then
21734        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21735      fi
21736
21737      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21738    fi
21739  fi
21740
21741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21742$as_echo_n "checking for Boot JDK... " >&6; }
21743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21744$as_echo "$BOOT_JDK" >&6; }
21745            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21746$as_echo_n "checking Boot JDK version... " >&6; }
21747            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21749$as_echo "$BOOT_JDK_VERSION" >&6; }
21750          fi # end check jdk version
21751        fi # end check javac
21752      fi # end check java
21753    fi # end check boot jdk found
21754  fi
21755
21756
21757  if test "x$BOOT_JDK_FOUND" = xno; then
21758    # Now execute the test
21759
21760  if test -x /usr/libexec/java_home; then
21761    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21762    BOOT_JDK_FOUND=maybe
21763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21764$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21765  fi
21766
21767
21768    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21769    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21770      # Do we have a bin/java?
21771      if test ! -x "$BOOT_JDK/bin/java"; then
21772        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21774        BOOT_JDK_FOUND=no
21775      else
21776        # Do we have a bin/javac?
21777        if test ! -x "$BOOT_JDK/bin/javac"; then
21778          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21780          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21781$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21782          BOOT_JDK_FOUND=no
21783        else
21784          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21785          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21786
21787          # Extra M4 quote needed to protect [] in grep expression.
21788          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21789          if test "x$FOUND_CORRECT_VERSION" = x; then
21790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21792            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21793$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21794            BOOT_JDK_FOUND=no
21795          else
21796            # We're done! :-)
21797            BOOT_JDK_FOUND=yes
21798
21799  # Only process if variable expands to non-empty
21800
21801  if test "x$BOOT_JDK" != x; then
21802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21803
21804  # Input might be given as Windows format, start by converting to
21805  # unix format.
21806  path="$BOOT_JDK"
21807  new_path=`$CYGPATH -u "$path"`
21808
21809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21812  # "foo.exe" is OK but "foo" is an error.
21813  #
21814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21815  # It is also a way to make sure we got the proper file name for the real test later on.
21816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21817  if test "x$test_shortpath" = x; then
21818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21821  fi
21822
21823  # Call helper function which possibly converts this using DOS-style short mode.
21824  # If so, the updated path is stored in $new_path.
21825
21826  input_path="$new_path"
21827  # Check if we need to convert this using DOS-style short mode. If the path
21828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21829  # take no chances and rewrite it.
21830  # Note: m4 eats our [], so we need to use [ and ] instead.
21831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21832  if test "x$has_forbidden_chars" != x; then
21833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21837      # Going to short mode and back again did indeed matter. Since short mode is
21838      # case insensitive, let's make it lowercase to improve readability.
21839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21840      # Now convert it back to Unix-style (cygpath)
21841      input_path=`$CYGPATH -u "$shortmode_path"`
21842      new_path="$input_path"
21843    fi
21844  fi
21845
21846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21847  if test "x$test_cygdrive_prefix" = x; then
21848    # As a simple fix, exclude /usr/bin since it's not a real path.
21849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21851      # a path prefixed by /cygdrive for fixpath to work.
21852      new_path="$CYGWIN_ROOT_PATH$input_path"
21853    fi
21854  fi
21855
21856
21857  if test "x$path" != "x$new_path"; then
21858    BOOT_JDK="$new_path"
21859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21861  fi
21862
21863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21864
21865  path="$BOOT_JDK"
21866  has_colon=`$ECHO $path | $GREP ^.:`
21867  new_path="$path"
21868  if test "x$has_colon" = x; then
21869    # Not in mixed or Windows style, start by that.
21870    new_path=`cmd //c echo $path`
21871  fi
21872
21873
21874  input_path="$new_path"
21875  # Check if we need to convert this using DOS-style short mode. If the path
21876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21877  # take no chances and rewrite it.
21878  # Note: m4 eats our [], so we need to use [ and ] instead.
21879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21880  if test "x$has_forbidden_chars" != x; then
21881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21883  fi
21884
21885
21886  windows_path="$new_path"
21887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21888    unix_path=`$CYGPATH -u "$windows_path"`
21889    new_path="$unix_path"
21890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21892    new_path="$unix_path"
21893  fi
21894
21895  if test "x$path" != "x$new_path"; then
21896    BOOT_JDK="$new_path"
21897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21899  fi
21900
21901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21903
21904    else
21905      # We're on a unix platform. Hooray! :)
21906      path="$BOOT_JDK"
21907      has_space=`$ECHO "$path" | $GREP " "`
21908      if test "x$has_space" != x; then
21909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21912      fi
21913
21914      # Use eval to expand a potential ~
21915      eval path="$path"
21916      if test ! -f "$path" && test ! -d "$path"; then
21917        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21918      fi
21919
21920      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21921    fi
21922  fi
21923
21924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21925$as_echo_n "checking for Boot JDK... " >&6; }
21926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21927$as_echo "$BOOT_JDK" >&6; }
21928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21929$as_echo_n "checking Boot JDK version... " >&6; }
21930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21932$as_echo "$BOOT_JDK_VERSION" >&6; }
21933          fi # end check jdk version
21934        fi # end check javac
21935      fi # end check java
21936    fi # end check boot jdk found
21937  fi
21938
21939  fi
21940
21941
21942    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21943    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21944      # Do we have a bin/java?
21945      if test ! -x "$BOOT_JDK/bin/java"; then
21946        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21948        BOOT_JDK_FOUND=no
21949      else
21950        # Do we have a bin/javac?
21951        if test ! -x "$BOOT_JDK/bin/javac"; then
21952          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21954          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21955$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21956          BOOT_JDK_FOUND=no
21957        else
21958          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21959          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21960
21961          # Extra M4 quote needed to protect [] in grep expression.
21962          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
21963          if test "x$FOUND_CORRECT_VERSION" = x; then
21964            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21966            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21967$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21968            BOOT_JDK_FOUND=no
21969          else
21970            # We're done! :-)
21971            BOOT_JDK_FOUND=yes
21972
21973  # Only process if variable expands to non-empty
21974
21975  if test "x$BOOT_JDK" != x; then
21976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21977
21978  # Input might be given as Windows format, start by converting to
21979  # unix format.
21980  path="$BOOT_JDK"
21981  new_path=`$CYGPATH -u "$path"`
21982
21983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21986  # "foo.exe" is OK but "foo" is an error.
21987  #
21988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21989  # It is also a way to make sure we got the proper file name for the real test later on.
21990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21991  if test "x$test_shortpath" = x; then
21992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21993$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21994    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21995  fi
21996
21997  # Call helper function which possibly converts this using DOS-style short mode.
21998  # If so, the updated path is stored in $new_path.
21999
22000  input_path="$new_path"
22001  # Check if we need to convert this using DOS-style short mode. If the path
22002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22003  # take no chances and rewrite it.
22004  # Note: m4 eats our [], so we need to use [ and ] instead.
22005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22006  if test "x$has_forbidden_chars" != x; then
22007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22011      # Going to short mode and back again did indeed matter. Since short mode is
22012      # case insensitive, let's make it lowercase to improve readability.
22013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22014      # Now convert it back to Unix-style (cygpath)
22015      input_path=`$CYGPATH -u "$shortmode_path"`
22016      new_path="$input_path"
22017    fi
22018  fi
22019
22020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22021  if test "x$test_cygdrive_prefix" = x; then
22022    # As a simple fix, exclude /usr/bin since it's not a real path.
22023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22025      # a path prefixed by /cygdrive for fixpath to work.
22026      new_path="$CYGWIN_ROOT_PATH$input_path"
22027    fi
22028  fi
22029
22030
22031  if test "x$path" != "x$new_path"; then
22032    BOOT_JDK="$new_path"
22033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22035  fi
22036
22037    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22038
22039  path="$BOOT_JDK"
22040  has_colon=`$ECHO $path | $GREP ^.:`
22041  new_path="$path"
22042  if test "x$has_colon" = x; then
22043    # Not in mixed or Windows style, start by that.
22044    new_path=`cmd //c echo $path`
22045  fi
22046
22047
22048  input_path="$new_path"
22049  # Check if we need to convert this using DOS-style short mode. If the path
22050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22051  # take no chances and rewrite it.
22052  # Note: m4 eats our [], so we need to use [ and ] instead.
22053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22054  if test "x$has_forbidden_chars" != x; then
22055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22057  fi
22058
22059
22060  windows_path="$new_path"
22061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22062    unix_path=`$CYGPATH -u "$windows_path"`
22063    new_path="$unix_path"
22064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22066    new_path="$unix_path"
22067  fi
22068
22069  if test "x$path" != "x$new_path"; then
22070    BOOT_JDK="$new_path"
22071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22073  fi
22074
22075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22077
22078    else
22079      # We're on a unix platform. Hooray! :)
22080      path="$BOOT_JDK"
22081      has_space=`$ECHO "$path" | $GREP " "`
22082      if test "x$has_space" != x; then
22083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22085        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22086      fi
22087
22088      # Use eval to expand a potential ~
22089      eval path="$path"
22090      if test ! -f "$path" && test ! -d "$path"; then
22091        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22092      fi
22093
22094      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22095    fi
22096  fi
22097
22098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22099$as_echo_n "checking for Boot JDK... " >&6; }
22100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22101$as_echo "$BOOT_JDK" >&6; }
22102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22103$as_echo_n "checking Boot JDK version... " >&6; }
22104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22106$as_echo "$BOOT_JDK_VERSION" >&6; }
22107          fi # end check jdk version
22108        fi # end check javac
22109      fi # end check java
22110    fi # end check boot jdk found
22111  fi
22112
22113
22114  # Test: Is $JAVA_HOME set?
22115
22116  if test "x$BOOT_JDK_FOUND" = xno; then
22117    # Now execute the test
22118
22119  if test "x$JAVA_HOME" != x; then
22120    JAVA_HOME_PROCESSED="$JAVA_HOME"
22121
22122  # Only process if variable expands to non-empty
22123
22124  if test "x$JAVA_HOME_PROCESSED" != x; then
22125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22126
22127  # Input might be given as Windows format, start by converting to
22128  # unix format.
22129  path="$JAVA_HOME_PROCESSED"
22130  new_path=`$CYGPATH -u "$path"`
22131
22132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22135  # "foo.exe" is OK but "foo" is an error.
22136  #
22137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22138  # It is also a way to make sure we got the proper file name for the real test later on.
22139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22140  if test "x$test_shortpath" = x; then
22141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22142$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22143    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22144  fi
22145
22146  # Call helper function which possibly converts this using DOS-style short mode.
22147  # If so, the updated path is stored in $new_path.
22148
22149  input_path="$new_path"
22150  # Check if we need to convert this using DOS-style short mode. If the path
22151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22152  # take no chances and rewrite it.
22153  # Note: m4 eats our [], so we need to use [ and ] instead.
22154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22155  if test "x$has_forbidden_chars" != x; then
22156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22160      # Going to short mode and back again did indeed matter. Since short mode is
22161      # case insensitive, let's make it lowercase to improve readability.
22162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22163      # Now convert it back to Unix-style (cygpath)
22164      input_path=`$CYGPATH -u "$shortmode_path"`
22165      new_path="$input_path"
22166    fi
22167  fi
22168
22169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22170  if test "x$test_cygdrive_prefix" = x; then
22171    # As a simple fix, exclude /usr/bin since it's not a real path.
22172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22174      # a path prefixed by /cygdrive for fixpath to work.
22175      new_path="$CYGWIN_ROOT_PATH$input_path"
22176    fi
22177  fi
22178
22179
22180  if test "x$path" != "x$new_path"; then
22181    JAVA_HOME_PROCESSED="$new_path"
22182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22183$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22184  fi
22185
22186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22187
22188  path="$JAVA_HOME_PROCESSED"
22189  has_colon=`$ECHO $path | $GREP ^.:`
22190  new_path="$path"
22191  if test "x$has_colon" = x; then
22192    # Not in mixed or Windows style, start by that.
22193    new_path=`cmd //c echo $path`
22194  fi
22195
22196
22197  input_path="$new_path"
22198  # Check if we need to convert this using DOS-style short mode. If the path
22199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22200  # take no chances and rewrite it.
22201  # Note: m4 eats our [], so we need to use [ and ] instead.
22202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22203  if test "x$has_forbidden_chars" != x; then
22204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22206  fi
22207
22208
22209  windows_path="$new_path"
22210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22211    unix_path=`$CYGPATH -u "$windows_path"`
22212    new_path="$unix_path"
22213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22215    new_path="$unix_path"
22216  fi
22217
22218  if test "x$path" != "x$new_path"; then
22219    JAVA_HOME_PROCESSED="$new_path"
22220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22221$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22222  fi
22223
22224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22226
22227    else
22228      # We're on a unix platform. Hooray! :)
22229      path="$JAVA_HOME_PROCESSED"
22230      has_space=`$ECHO "$path" | $GREP " "`
22231      if test "x$has_space" != x; then
22232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22233$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22235      fi
22236
22237      # Use eval to expand a potential ~
22238      eval path="$path"
22239      if test ! -f "$path" && test ! -d "$path"; then
22240        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22241      fi
22242
22243      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22244    fi
22245  fi
22246
22247    if test ! -d "$JAVA_HOME_PROCESSED"; then
22248      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22249$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22250    else
22251      # Aha, the user has set a JAVA_HOME
22252      # let us use that as the Boot JDK.
22253      BOOT_JDK="$JAVA_HOME_PROCESSED"
22254      BOOT_JDK_FOUND=maybe
22255      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22256$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22257    fi
22258  fi
22259
22260
22261    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22262    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22263      # Do we have a bin/java?
22264      if test ! -x "$BOOT_JDK/bin/java"; then
22265        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22267        BOOT_JDK_FOUND=no
22268      else
22269        # Do we have a bin/javac?
22270        if test ! -x "$BOOT_JDK/bin/javac"; then
22271          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22273          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22274$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22275          BOOT_JDK_FOUND=no
22276        else
22277          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22278          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22279
22280          # Extra M4 quote needed to protect [] in grep expression.
22281          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22282          if test "x$FOUND_CORRECT_VERSION" = x; then
22283            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22285            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22286$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22287            BOOT_JDK_FOUND=no
22288          else
22289            # We're done! :-)
22290            BOOT_JDK_FOUND=yes
22291
22292  # Only process if variable expands to non-empty
22293
22294  if test "x$BOOT_JDK" != x; then
22295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22296
22297  # Input might be given as Windows format, start by converting to
22298  # unix format.
22299  path="$BOOT_JDK"
22300  new_path=`$CYGPATH -u "$path"`
22301
22302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22305  # "foo.exe" is OK but "foo" is an error.
22306  #
22307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22308  # It is also a way to make sure we got the proper file name for the real test later on.
22309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22310  if test "x$test_shortpath" = x; then
22311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22313    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22314  fi
22315
22316  # Call helper function which possibly converts this using DOS-style short mode.
22317  # If so, the updated path is stored in $new_path.
22318
22319  input_path="$new_path"
22320  # Check if we need to convert this using DOS-style short mode. If the path
22321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22322  # take no chances and rewrite it.
22323  # Note: m4 eats our [], so we need to use [ and ] instead.
22324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22325  if test "x$has_forbidden_chars" != x; then
22326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22330      # Going to short mode and back again did indeed matter. Since short mode is
22331      # case insensitive, let's make it lowercase to improve readability.
22332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22333      # Now convert it back to Unix-style (cygpath)
22334      input_path=`$CYGPATH -u "$shortmode_path"`
22335      new_path="$input_path"
22336    fi
22337  fi
22338
22339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22340  if test "x$test_cygdrive_prefix" = x; then
22341    # As a simple fix, exclude /usr/bin since it's not a real path.
22342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22344      # a path prefixed by /cygdrive for fixpath to work.
22345      new_path="$CYGWIN_ROOT_PATH$input_path"
22346    fi
22347  fi
22348
22349
22350  if test "x$path" != "x$new_path"; then
22351    BOOT_JDK="$new_path"
22352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22354  fi
22355
22356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22357
22358  path="$BOOT_JDK"
22359  has_colon=`$ECHO $path | $GREP ^.:`
22360  new_path="$path"
22361  if test "x$has_colon" = x; then
22362    # Not in mixed or Windows style, start by that.
22363    new_path=`cmd //c echo $path`
22364  fi
22365
22366
22367  input_path="$new_path"
22368  # Check if we need to convert this using DOS-style short mode. If the path
22369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22370  # take no chances and rewrite it.
22371  # Note: m4 eats our [], so we need to use [ and ] instead.
22372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22373  if test "x$has_forbidden_chars" != x; then
22374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22376  fi
22377
22378
22379  windows_path="$new_path"
22380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22381    unix_path=`$CYGPATH -u "$windows_path"`
22382    new_path="$unix_path"
22383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22385    new_path="$unix_path"
22386  fi
22387
22388  if test "x$path" != "x$new_path"; then
22389    BOOT_JDK="$new_path"
22390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22391$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22392  fi
22393
22394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22396
22397    else
22398      # We're on a unix platform. Hooray! :)
22399      path="$BOOT_JDK"
22400      has_space=`$ECHO "$path" | $GREP " "`
22401      if test "x$has_space" != x; then
22402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22404        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22405      fi
22406
22407      # Use eval to expand a potential ~
22408      eval path="$path"
22409      if test ! -f "$path" && test ! -d "$path"; then
22410        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22411      fi
22412
22413      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22414    fi
22415  fi
22416
22417            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22418$as_echo_n "checking for Boot JDK... " >&6; }
22419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22420$as_echo "$BOOT_JDK" >&6; }
22421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22422$as_echo_n "checking Boot JDK version... " >&6; }
22423            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22425$as_echo "$BOOT_JDK_VERSION" >&6; }
22426          fi # end check jdk version
22427        fi # end check javac
22428      fi # end check java
22429    fi # end check boot jdk found
22430  fi
22431
22432
22433  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22434
22435  if test "x$BOOT_JDK_FOUND" = xno; then
22436    # Now execute the test
22437
22438  # Extract the first word of "javac", so it can be a program name with args.
22439set dummy javac; ac_word=$2
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22441$as_echo_n "checking for $ac_word... " >&6; }
22442if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22443  $as_echo_n "(cached) " >&6
22444else
22445  case $JAVAC_CHECK in
22446  [\\/]* | ?:[\\/]*)
22447  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22448  ;;
22449  *)
22450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22451for as_dir in $PATH
22452do
22453  IFS=$as_save_IFS
22454  test -z "$as_dir" && as_dir=.
22455    for ac_exec_ext in '' $ac_executable_extensions; do
22456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22457    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22459    break 2
22460  fi
22461done
22462  done
22463IFS=$as_save_IFS
22464
22465  ;;
22466esac
22467fi
22468JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22469if test -n "$JAVAC_CHECK"; then
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22471$as_echo "$JAVAC_CHECK" >&6; }
22472else
22473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22474$as_echo "no" >&6; }
22475fi
22476
22477
22478  # Extract the first word of "java", so it can be a program name with args.
22479set dummy java; ac_word=$2
22480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22481$as_echo_n "checking for $ac_word... " >&6; }
22482if ${ac_cv_path_JAVA_CHECK+:} false; then :
22483  $as_echo_n "(cached) " >&6
22484else
22485  case $JAVA_CHECK in
22486  [\\/]* | ?:[\\/]*)
22487  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22488  ;;
22489  *)
22490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22491for as_dir in $PATH
22492do
22493  IFS=$as_save_IFS
22494  test -z "$as_dir" && as_dir=.
22495    for ac_exec_ext in '' $ac_executable_extensions; do
22496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22497    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22499    break 2
22500  fi
22501done
22502  done
22503IFS=$as_save_IFS
22504
22505  ;;
22506esac
22507fi
22508JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22509if test -n "$JAVA_CHECK"; then
22510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22511$as_echo "$JAVA_CHECK" >&6; }
22512else
22513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22514$as_echo "no" >&6; }
22515fi
22516
22517
22518  BINARY="$JAVAC_CHECK"
22519  if test "x$JAVAC_CHECK" = x; then
22520    BINARY="$JAVA_CHECK"
22521  fi
22522  if test "x$BINARY" != x; then
22523    # So there is a java(c) binary, it might be part of a JDK.
22524    # Lets find the JDK/JRE directory by following symbolic links.
22525    # Linux/GNU systems often have links from /usr/bin/java to
22526    # /etc/alternatives/java to the real JDK binary.
22527
22528  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22529    # Follow a chain of symbolic links. Use readlink
22530    # where it exists, else fall back to horribly
22531    # complicated shell code.
22532    if test "x$READLINK_TESTED" != yes; then
22533      # On MacOSX there is a readlink tool with a different
22534      # purpose than the GNU readlink tool. Check the found readlink.
22535      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22536      if test "x$ISGNU" = x; then
22537        # A readlink that we do not know how to use.
22538        # Are there other non-GNU readlinks out there?
22539        READLINK_TESTED=yes
22540        READLINK=
22541      fi
22542    fi
22543
22544    if test "x$READLINK" != x; then
22545      BINARY=`$READLINK -f $BINARY`
22546    else
22547      # Save the current directory for restoring afterwards
22548      STARTDIR=$PWD
22549      COUNTER=0
22550      sym_link_dir=`$DIRNAME $BINARY`
22551      sym_link_file=`$BASENAME $BINARY`
22552      cd $sym_link_dir
22553      # Use -P flag to resolve symlinks in directories.
22554      cd `$THEPWDCMD -P`
22555      sym_link_dir=`$THEPWDCMD -P`
22556      # Resolve file symlinks
22557      while test $COUNTER -lt 20; do
22558        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22559        if test "x$ISLINK" == x; then
22560          # This is not a symbolic link! We are done!
22561          break
22562        fi
22563        # Again resolve directory symlinks since the target of the just found
22564        # link could be in a different directory
22565        cd `$DIRNAME $ISLINK`
22566        sym_link_dir=`$THEPWDCMD -P`
22567        sym_link_file=`$BASENAME $ISLINK`
22568        let COUNTER=COUNTER+1
22569      done
22570      cd $STARTDIR
22571      BINARY=$sym_link_dir/$sym_link_file
22572    fi
22573  fi
22574
22575    BOOT_JDK=`dirname "$BINARY"`
22576    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22577    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22578      # Looks like we found ourselves an JDK
22579      BOOT_JDK_FOUND=maybe
22580      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22581$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22582    fi
22583  fi
22584
22585
22586    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22587    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22588      # Do we have a bin/java?
22589      if test ! -x "$BOOT_JDK/bin/java"; then
22590        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22592        BOOT_JDK_FOUND=no
22593      else
22594        # Do we have a bin/javac?
22595        if test ! -x "$BOOT_JDK/bin/javac"; then
22596          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22598          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22599$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22600          BOOT_JDK_FOUND=no
22601        else
22602          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22603          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22604
22605          # Extra M4 quote needed to protect [] in grep expression.
22606          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22607          if test "x$FOUND_CORRECT_VERSION" = x; then
22608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22610            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22611$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22612            BOOT_JDK_FOUND=no
22613          else
22614            # We're done! :-)
22615            BOOT_JDK_FOUND=yes
22616
22617  # Only process if variable expands to non-empty
22618
22619  if test "x$BOOT_JDK" != x; then
22620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22621
22622  # Input might be given as Windows format, start by converting to
22623  # unix format.
22624  path="$BOOT_JDK"
22625  new_path=`$CYGPATH -u "$path"`
22626
22627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22630  # "foo.exe" is OK but "foo" is an error.
22631  #
22632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22633  # It is also a way to make sure we got the proper file name for the real test later on.
22634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22635  if test "x$test_shortpath" = x; then
22636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22639  fi
22640
22641  # Call helper function which possibly converts this using DOS-style short mode.
22642  # If so, the updated path is stored in $new_path.
22643
22644  input_path="$new_path"
22645  # Check if we need to convert this using DOS-style short mode. If the path
22646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22647  # take no chances and rewrite it.
22648  # Note: m4 eats our [], so we need to use [ and ] instead.
22649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22650  if test "x$has_forbidden_chars" != x; then
22651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22655      # Going to short mode and back again did indeed matter. Since short mode is
22656      # case insensitive, let's make it lowercase to improve readability.
22657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22658      # Now convert it back to Unix-style (cygpath)
22659      input_path=`$CYGPATH -u "$shortmode_path"`
22660      new_path="$input_path"
22661    fi
22662  fi
22663
22664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22665  if test "x$test_cygdrive_prefix" = x; then
22666    # As a simple fix, exclude /usr/bin since it's not a real path.
22667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22669      # a path prefixed by /cygdrive for fixpath to work.
22670      new_path="$CYGWIN_ROOT_PATH$input_path"
22671    fi
22672  fi
22673
22674
22675  if test "x$path" != "x$new_path"; then
22676    BOOT_JDK="$new_path"
22677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22679  fi
22680
22681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22682
22683  path="$BOOT_JDK"
22684  has_colon=`$ECHO $path | $GREP ^.:`
22685  new_path="$path"
22686  if test "x$has_colon" = x; then
22687    # Not in mixed or Windows style, start by that.
22688    new_path=`cmd //c echo $path`
22689  fi
22690
22691
22692  input_path="$new_path"
22693  # Check if we need to convert this using DOS-style short mode. If the path
22694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22695  # take no chances and rewrite it.
22696  # Note: m4 eats our [], so we need to use [ and ] instead.
22697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22698  if test "x$has_forbidden_chars" != x; then
22699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22701  fi
22702
22703
22704  windows_path="$new_path"
22705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22706    unix_path=`$CYGPATH -u "$windows_path"`
22707    new_path="$unix_path"
22708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22710    new_path="$unix_path"
22711  fi
22712
22713  if test "x$path" != "x$new_path"; then
22714    BOOT_JDK="$new_path"
22715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22717  fi
22718
22719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22721
22722    else
22723      # We're on a unix platform. Hooray! :)
22724      path="$BOOT_JDK"
22725      has_space=`$ECHO "$path" | $GREP " "`
22726      if test "x$has_space" != x; then
22727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22730      fi
22731
22732      # Use eval to expand a potential ~
22733      eval path="$path"
22734      if test ! -f "$path" && test ! -d "$path"; then
22735        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22736      fi
22737
22738      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22739    fi
22740  fi
22741
22742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22743$as_echo_n "checking for Boot JDK... " >&6; }
22744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22745$as_echo "$BOOT_JDK" >&6; }
22746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22747$as_echo_n "checking Boot JDK version... " >&6; }
22748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22750$as_echo "$BOOT_JDK_VERSION" >&6; }
22751          fi # end check jdk version
22752        fi # end check javac
22753      fi # end check java
22754    fi # end check boot jdk found
22755  fi
22756
22757
22758  # Test: Is there a JDK installed in default, well-known locations?
22759
22760  if test "x$BOOT_JDK_FOUND" = xno; then
22761    # Now execute the test
22762
22763  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22764
22765  if test "x$BOOT_JDK_FOUND" = xno; then
22766    # Now execute the test
22767
22768  if test "x$ProgramW6432" != x; then
22769    VIRTUAL_DIR="$ProgramW6432/Java"
22770
22771  windows_path="$VIRTUAL_DIR"
22772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22773    unix_path=`$CYGPATH -u "$windows_path"`
22774    VIRTUAL_DIR="$unix_path"
22775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22777    VIRTUAL_DIR="$unix_path"
22778  fi
22779
22780
22781  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22782  BOOT_JDK_SUFFIX=""
22783  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22784  if test "x$ALL_JDKS_FOUND" != x; then
22785    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22786
22787  if test "x$BOOT_JDK_FOUND" = xno; then
22788    # Now execute the test
22789
22790        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22791        if test -d "$BOOT_JDK"; then
22792          BOOT_JDK_FOUND=maybe
22793          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22794$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22795        fi
22796
22797
22798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22800      # Do we have a bin/java?
22801      if test ! -x "$BOOT_JDK/bin/java"; then
22802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22804        BOOT_JDK_FOUND=no
22805      else
22806        # Do we have a bin/javac?
22807        if test ! -x "$BOOT_JDK/bin/javac"; then
22808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22812          BOOT_JDK_FOUND=no
22813        else
22814          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22815          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22816
22817          # Extra M4 quote needed to protect [] in grep expression.
22818          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22819          if test "x$FOUND_CORRECT_VERSION" = x; then
22820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22822            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22823$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22824            BOOT_JDK_FOUND=no
22825          else
22826            # We're done! :-)
22827            BOOT_JDK_FOUND=yes
22828
22829  # Only process if variable expands to non-empty
22830
22831  if test "x$BOOT_JDK" != x; then
22832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22833
22834  # Input might be given as Windows format, start by converting to
22835  # unix format.
22836  path="$BOOT_JDK"
22837  new_path=`$CYGPATH -u "$path"`
22838
22839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22842  # "foo.exe" is OK but "foo" is an error.
22843  #
22844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22845  # It is also a way to make sure we got the proper file name for the real test later on.
22846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22847  if test "x$test_shortpath" = x; then
22848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22851  fi
22852
22853  # Call helper function which possibly converts this using DOS-style short mode.
22854  # If so, the updated path is stored in $new_path.
22855
22856  input_path="$new_path"
22857  # Check if we need to convert this using DOS-style short mode. If the path
22858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22859  # take no chances and rewrite it.
22860  # Note: m4 eats our [], so we need to use [ and ] instead.
22861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22862  if test "x$has_forbidden_chars" != x; then
22863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22867      # Going to short mode and back again did indeed matter. Since short mode is
22868      # case insensitive, let's make it lowercase to improve readability.
22869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22870      # Now convert it back to Unix-style (cygpath)
22871      input_path=`$CYGPATH -u "$shortmode_path"`
22872      new_path="$input_path"
22873    fi
22874  fi
22875
22876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22877  if test "x$test_cygdrive_prefix" = x; then
22878    # As a simple fix, exclude /usr/bin since it's not a real path.
22879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22881      # a path prefixed by /cygdrive for fixpath to work.
22882      new_path="$CYGWIN_ROOT_PATH$input_path"
22883    fi
22884  fi
22885
22886
22887  if test "x$path" != "x$new_path"; then
22888    BOOT_JDK="$new_path"
22889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22891  fi
22892
22893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22894
22895  path="$BOOT_JDK"
22896  has_colon=`$ECHO $path | $GREP ^.:`
22897  new_path="$path"
22898  if test "x$has_colon" = x; then
22899    # Not in mixed or Windows style, start by that.
22900    new_path=`cmd //c echo $path`
22901  fi
22902
22903
22904  input_path="$new_path"
22905  # Check if we need to convert this using DOS-style short mode. If the path
22906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22907  # take no chances and rewrite it.
22908  # Note: m4 eats our [], so we need to use [ and ] instead.
22909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22910  if test "x$has_forbidden_chars" != x; then
22911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22913  fi
22914
22915
22916  windows_path="$new_path"
22917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22918    unix_path=`$CYGPATH -u "$windows_path"`
22919    new_path="$unix_path"
22920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22922    new_path="$unix_path"
22923  fi
22924
22925  if test "x$path" != "x$new_path"; then
22926    BOOT_JDK="$new_path"
22927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22929  fi
22930
22931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22933
22934    else
22935      # We're on a unix platform. Hooray! :)
22936      path="$BOOT_JDK"
22937      has_space=`$ECHO "$path" | $GREP " "`
22938      if test "x$has_space" != x; then
22939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22942      fi
22943
22944      # Use eval to expand a potential ~
22945      eval path="$path"
22946      if test ! -f "$path" && test ! -d "$path"; then
22947        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22948      fi
22949
22950      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22951    fi
22952  fi
22953
22954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22955$as_echo_n "checking for Boot JDK... " >&6; }
22956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22957$as_echo "$BOOT_JDK" >&6; }
22958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22959$as_echo_n "checking Boot JDK version... " >&6; }
22960            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22962$as_echo "$BOOT_JDK_VERSION" >&6; }
22963          fi # end check jdk version
22964        fi # end check javac
22965      fi # end check java
22966    fi # end check boot jdk found
22967  fi
22968
22969    done
22970  fi
22971
22972  fi
22973
22974
22975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22977      # Do we have a bin/java?
22978      if test ! -x "$BOOT_JDK/bin/java"; then
22979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22981        BOOT_JDK_FOUND=no
22982      else
22983        # Do we have a bin/javac?
22984        if test ! -x "$BOOT_JDK/bin/javac"; then
22985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22989          BOOT_JDK_FOUND=no
22990        else
22991          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22992          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22993
22994          # Extra M4 quote needed to protect [] in grep expression.
22995          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
22996          if test "x$FOUND_CORRECT_VERSION" = x; then
22997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22999            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23000$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23001            BOOT_JDK_FOUND=no
23002          else
23003            # We're done! :-)
23004            BOOT_JDK_FOUND=yes
23005
23006  # Only process if variable expands to non-empty
23007
23008  if test "x$BOOT_JDK" != x; then
23009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23010
23011  # Input might be given as Windows format, start by converting to
23012  # unix format.
23013  path="$BOOT_JDK"
23014  new_path=`$CYGPATH -u "$path"`
23015
23016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23019  # "foo.exe" is OK but "foo" is an error.
23020  #
23021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23022  # It is also a way to make sure we got the proper file name for the real test later on.
23023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23024  if test "x$test_shortpath" = x; then
23025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23027    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23028  fi
23029
23030  # Call helper function which possibly converts this using DOS-style short mode.
23031  # If so, the updated path is stored in $new_path.
23032
23033  input_path="$new_path"
23034  # Check if we need to convert this using DOS-style short mode. If the path
23035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23036  # take no chances and rewrite it.
23037  # Note: m4 eats our [], so we need to use [ and ] instead.
23038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23039  if test "x$has_forbidden_chars" != x; then
23040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23044      # Going to short mode and back again did indeed matter. Since short mode is
23045      # case insensitive, let's make it lowercase to improve readability.
23046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23047      # Now convert it back to Unix-style (cygpath)
23048      input_path=`$CYGPATH -u "$shortmode_path"`
23049      new_path="$input_path"
23050    fi
23051  fi
23052
23053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23054  if test "x$test_cygdrive_prefix" = x; then
23055    # As a simple fix, exclude /usr/bin since it's not a real path.
23056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23058      # a path prefixed by /cygdrive for fixpath to work.
23059      new_path="$CYGWIN_ROOT_PATH$input_path"
23060    fi
23061  fi
23062
23063
23064  if test "x$path" != "x$new_path"; then
23065    BOOT_JDK="$new_path"
23066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23068  fi
23069
23070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23071
23072  path="$BOOT_JDK"
23073  has_colon=`$ECHO $path | $GREP ^.:`
23074  new_path="$path"
23075  if test "x$has_colon" = x; then
23076    # Not in mixed or Windows style, start by that.
23077    new_path=`cmd //c echo $path`
23078  fi
23079
23080
23081  input_path="$new_path"
23082  # Check if we need to convert this using DOS-style short mode. If the path
23083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23084  # take no chances and rewrite it.
23085  # Note: m4 eats our [], so we need to use [ and ] instead.
23086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23087  if test "x$has_forbidden_chars" != x; then
23088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23090  fi
23091
23092
23093  windows_path="$new_path"
23094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23095    unix_path=`$CYGPATH -u "$windows_path"`
23096    new_path="$unix_path"
23097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23099    new_path="$unix_path"
23100  fi
23101
23102  if test "x$path" != "x$new_path"; then
23103    BOOT_JDK="$new_path"
23104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23106  fi
23107
23108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23110
23111    else
23112      # We're on a unix platform. Hooray! :)
23113      path="$BOOT_JDK"
23114      has_space=`$ECHO "$path" | $GREP " "`
23115      if test "x$has_space" != x; then
23116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23119      fi
23120
23121      # Use eval to expand a potential ~
23122      eval path="$path"
23123      if test ! -f "$path" && test ! -d "$path"; then
23124        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23125      fi
23126
23127      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23128    fi
23129  fi
23130
23131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23132$as_echo_n "checking for Boot JDK... " >&6; }
23133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23134$as_echo "$BOOT_JDK" >&6; }
23135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23136$as_echo_n "checking Boot JDK version... " >&6; }
23137            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23139$as_echo "$BOOT_JDK_VERSION" >&6; }
23140          fi # end check jdk version
23141        fi # end check javac
23142      fi # end check java
23143    fi # end check boot jdk found
23144  fi
23145
23146
23147  if test "x$BOOT_JDK_FOUND" = xno; then
23148    # Now execute the test
23149
23150  if test "x$PROGRAMW6432" != x; then
23151    VIRTUAL_DIR="$PROGRAMW6432/Java"
23152
23153  windows_path="$VIRTUAL_DIR"
23154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23155    unix_path=`$CYGPATH -u "$windows_path"`
23156    VIRTUAL_DIR="$unix_path"
23157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23159    VIRTUAL_DIR="$unix_path"
23160  fi
23161
23162
23163  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23164  BOOT_JDK_SUFFIX=""
23165  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23166  if test "x$ALL_JDKS_FOUND" != x; then
23167    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23168
23169  if test "x$BOOT_JDK_FOUND" = xno; then
23170    # Now execute the test
23171
23172        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23173        if test -d "$BOOT_JDK"; then
23174          BOOT_JDK_FOUND=maybe
23175          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23176$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23177        fi
23178
23179
23180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23182      # Do we have a bin/java?
23183      if test ! -x "$BOOT_JDK/bin/java"; then
23184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23186        BOOT_JDK_FOUND=no
23187      else
23188        # Do we have a bin/javac?
23189        if test ! -x "$BOOT_JDK/bin/javac"; then
23190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23194          BOOT_JDK_FOUND=no
23195        else
23196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23198
23199          # Extra M4 quote needed to protect [] in grep expression.
23200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23201          if test "x$FOUND_CORRECT_VERSION" = x; then
23202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23206            BOOT_JDK_FOUND=no
23207          else
23208            # We're done! :-)
23209            BOOT_JDK_FOUND=yes
23210
23211  # Only process if variable expands to non-empty
23212
23213  if test "x$BOOT_JDK" != x; then
23214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23215
23216  # Input might be given as Windows format, start by converting to
23217  # unix format.
23218  path="$BOOT_JDK"
23219  new_path=`$CYGPATH -u "$path"`
23220
23221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23224  # "foo.exe" is OK but "foo" is an error.
23225  #
23226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23227  # It is also a way to make sure we got the proper file name for the real test later on.
23228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23229  if test "x$test_shortpath" = x; then
23230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23233  fi
23234
23235  # Call helper function which possibly converts this using DOS-style short mode.
23236  # If so, the updated path is stored in $new_path.
23237
23238  input_path="$new_path"
23239  # Check if we need to convert this using DOS-style short mode. If the path
23240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23241  # take no chances and rewrite it.
23242  # Note: m4 eats our [], so we need to use [ and ] instead.
23243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23244  if test "x$has_forbidden_chars" != x; then
23245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23249      # Going to short mode and back again did indeed matter. Since short mode is
23250      # case insensitive, let's make it lowercase to improve readability.
23251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23252      # Now convert it back to Unix-style (cygpath)
23253      input_path=`$CYGPATH -u "$shortmode_path"`
23254      new_path="$input_path"
23255    fi
23256  fi
23257
23258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23259  if test "x$test_cygdrive_prefix" = x; then
23260    # As a simple fix, exclude /usr/bin since it's not a real path.
23261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23263      # a path prefixed by /cygdrive for fixpath to work.
23264      new_path="$CYGWIN_ROOT_PATH$input_path"
23265    fi
23266  fi
23267
23268
23269  if test "x$path" != "x$new_path"; then
23270    BOOT_JDK="$new_path"
23271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23273  fi
23274
23275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23276
23277  path="$BOOT_JDK"
23278  has_colon=`$ECHO $path | $GREP ^.:`
23279  new_path="$path"
23280  if test "x$has_colon" = x; then
23281    # Not in mixed or Windows style, start by that.
23282    new_path=`cmd //c echo $path`
23283  fi
23284
23285
23286  input_path="$new_path"
23287  # Check if we need to convert this using DOS-style short mode. If the path
23288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23289  # take no chances and rewrite it.
23290  # Note: m4 eats our [], so we need to use [ and ] instead.
23291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23292  if test "x$has_forbidden_chars" != x; then
23293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23295  fi
23296
23297
23298  windows_path="$new_path"
23299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23300    unix_path=`$CYGPATH -u "$windows_path"`
23301    new_path="$unix_path"
23302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23304    new_path="$unix_path"
23305  fi
23306
23307  if test "x$path" != "x$new_path"; then
23308    BOOT_JDK="$new_path"
23309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23311  fi
23312
23313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23315
23316    else
23317      # We're on a unix platform. Hooray! :)
23318      path="$BOOT_JDK"
23319      has_space=`$ECHO "$path" | $GREP " "`
23320      if test "x$has_space" != x; then
23321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23324      fi
23325
23326      # Use eval to expand a potential ~
23327      eval path="$path"
23328      if test ! -f "$path" && test ! -d "$path"; then
23329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23330      fi
23331
23332      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23333    fi
23334  fi
23335
23336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23337$as_echo_n "checking for Boot JDK... " >&6; }
23338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23339$as_echo "$BOOT_JDK" >&6; }
23340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23341$as_echo_n "checking Boot JDK version... " >&6; }
23342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23344$as_echo "$BOOT_JDK_VERSION" >&6; }
23345          fi # end check jdk version
23346        fi # end check javac
23347      fi # end check java
23348    fi # end check boot jdk found
23349  fi
23350
23351    done
23352  fi
23353
23354  fi
23355
23356
23357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23359      # Do we have a bin/java?
23360      if test ! -x "$BOOT_JDK/bin/java"; then
23361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23363        BOOT_JDK_FOUND=no
23364      else
23365        # Do we have a bin/javac?
23366        if test ! -x "$BOOT_JDK/bin/javac"; then
23367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23371          BOOT_JDK_FOUND=no
23372        else
23373          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23374          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23375
23376          # Extra M4 quote needed to protect [] in grep expression.
23377          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23378          if test "x$FOUND_CORRECT_VERSION" = x; then
23379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23381            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23382$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23383            BOOT_JDK_FOUND=no
23384          else
23385            # We're done! :-)
23386            BOOT_JDK_FOUND=yes
23387
23388  # Only process if variable expands to non-empty
23389
23390  if test "x$BOOT_JDK" != x; then
23391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23392
23393  # Input might be given as Windows format, start by converting to
23394  # unix format.
23395  path="$BOOT_JDK"
23396  new_path=`$CYGPATH -u "$path"`
23397
23398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23401  # "foo.exe" is OK but "foo" is an error.
23402  #
23403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23404  # It is also a way to make sure we got the proper file name for the real test later on.
23405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23406  if test "x$test_shortpath" = x; then
23407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23410  fi
23411
23412  # Call helper function which possibly converts this using DOS-style short mode.
23413  # If so, the updated path is stored in $new_path.
23414
23415  input_path="$new_path"
23416  # Check if we need to convert this using DOS-style short mode. If the path
23417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23418  # take no chances and rewrite it.
23419  # Note: m4 eats our [], so we need to use [ and ] instead.
23420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23421  if test "x$has_forbidden_chars" != x; then
23422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23426      # Going to short mode and back again did indeed matter. Since short mode is
23427      # case insensitive, let's make it lowercase to improve readability.
23428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23429      # Now convert it back to Unix-style (cygpath)
23430      input_path=`$CYGPATH -u "$shortmode_path"`
23431      new_path="$input_path"
23432    fi
23433  fi
23434
23435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23436  if test "x$test_cygdrive_prefix" = x; then
23437    # As a simple fix, exclude /usr/bin since it's not a real path.
23438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23440      # a path prefixed by /cygdrive for fixpath to work.
23441      new_path="$CYGWIN_ROOT_PATH$input_path"
23442    fi
23443  fi
23444
23445
23446  if test "x$path" != "x$new_path"; then
23447    BOOT_JDK="$new_path"
23448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23450  fi
23451
23452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23453
23454  path="$BOOT_JDK"
23455  has_colon=`$ECHO $path | $GREP ^.:`
23456  new_path="$path"
23457  if test "x$has_colon" = x; then
23458    # Not in mixed or Windows style, start by that.
23459    new_path=`cmd //c echo $path`
23460  fi
23461
23462
23463  input_path="$new_path"
23464  # Check if we need to convert this using DOS-style short mode. If the path
23465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23466  # take no chances and rewrite it.
23467  # Note: m4 eats our [], so we need to use [ and ] instead.
23468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23469  if test "x$has_forbidden_chars" != x; then
23470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23472  fi
23473
23474
23475  windows_path="$new_path"
23476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23477    unix_path=`$CYGPATH -u "$windows_path"`
23478    new_path="$unix_path"
23479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23481    new_path="$unix_path"
23482  fi
23483
23484  if test "x$path" != "x$new_path"; then
23485    BOOT_JDK="$new_path"
23486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23488  fi
23489
23490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23492
23493    else
23494      # We're on a unix platform. Hooray! :)
23495      path="$BOOT_JDK"
23496      has_space=`$ECHO "$path" | $GREP " "`
23497      if test "x$has_space" != x; then
23498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23501      fi
23502
23503      # Use eval to expand a potential ~
23504      eval path="$path"
23505      if test ! -f "$path" && test ! -d "$path"; then
23506        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23507      fi
23508
23509      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23510    fi
23511  fi
23512
23513            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23514$as_echo_n "checking for Boot JDK... " >&6; }
23515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23516$as_echo "$BOOT_JDK" >&6; }
23517            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23518$as_echo_n "checking Boot JDK version... " >&6; }
23519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23521$as_echo "$BOOT_JDK_VERSION" >&6; }
23522          fi # end check jdk version
23523        fi # end check javac
23524      fi # end check java
23525    fi # end check boot jdk found
23526  fi
23527
23528
23529  if test "x$BOOT_JDK_FOUND" = xno; then
23530    # Now execute the test
23531
23532  if test "x$PROGRAMFILES" != x; then
23533    VIRTUAL_DIR="$PROGRAMFILES/Java"
23534
23535  windows_path="$VIRTUAL_DIR"
23536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23537    unix_path=`$CYGPATH -u "$windows_path"`
23538    VIRTUAL_DIR="$unix_path"
23539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23541    VIRTUAL_DIR="$unix_path"
23542  fi
23543
23544
23545  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23546  BOOT_JDK_SUFFIX=""
23547  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23548  if test "x$ALL_JDKS_FOUND" != x; then
23549    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23550
23551  if test "x$BOOT_JDK_FOUND" = xno; then
23552    # Now execute the test
23553
23554        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23555        if test -d "$BOOT_JDK"; then
23556          BOOT_JDK_FOUND=maybe
23557          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23558$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23559        fi
23560
23561
23562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23564      # Do we have a bin/java?
23565      if test ! -x "$BOOT_JDK/bin/java"; then
23566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23568        BOOT_JDK_FOUND=no
23569      else
23570        # Do we have a bin/javac?
23571        if test ! -x "$BOOT_JDK/bin/javac"; then
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23576          BOOT_JDK_FOUND=no
23577        else
23578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23580
23581          # Extra M4 quote needed to protect [] in grep expression.
23582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23583          if test "x$FOUND_CORRECT_VERSION" = x; then
23584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23588            BOOT_JDK_FOUND=no
23589          else
23590            # We're done! :-)
23591            BOOT_JDK_FOUND=yes
23592
23593  # Only process if variable expands to non-empty
23594
23595  if test "x$BOOT_JDK" != x; then
23596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23597
23598  # Input might be given as Windows format, start by converting to
23599  # unix format.
23600  path="$BOOT_JDK"
23601  new_path=`$CYGPATH -u "$path"`
23602
23603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23606  # "foo.exe" is OK but "foo" is an error.
23607  #
23608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23609  # It is also a way to make sure we got the proper file name for the real test later on.
23610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23611  if test "x$test_shortpath" = x; then
23612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23615  fi
23616
23617  # Call helper function which possibly converts this using DOS-style short mode.
23618  # If so, the updated path is stored in $new_path.
23619
23620  input_path="$new_path"
23621  # Check if we need to convert this using DOS-style short mode. If the path
23622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23623  # take no chances and rewrite it.
23624  # Note: m4 eats our [], so we need to use [ and ] instead.
23625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23626  if test "x$has_forbidden_chars" != x; then
23627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23631      # Going to short mode and back again did indeed matter. Since short mode is
23632      # case insensitive, let's make it lowercase to improve readability.
23633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23634      # Now convert it back to Unix-style (cygpath)
23635      input_path=`$CYGPATH -u "$shortmode_path"`
23636      new_path="$input_path"
23637    fi
23638  fi
23639
23640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23641  if test "x$test_cygdrive_prefix" = x; then
23642    # As a simple fix, exclude /usr/bin since it's not a real path.
23643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23645      # a path prefixed by /cygdrive for fixpath to work.
23646      new_path="$CYGWIN_ROOT_PATH$input_path"
23647    fi
23648  fi
23649
23650
23651  if test "x$path" != "x$new_path"; then
23652    BOOT_JDK="$new_path"
23653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23655  fi
23656
23657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23658
23659  path="$BOOT_JDK"
23660  has_colon=`$ECHO $path | $GREP ^.:`
23661  new_path="$path"
23662  if test "x$has_colon" = x; then
23663    # Not in mixed or Windows style, start by that.
23664    new_path=`cmd //c echo $path`
23665  fi
23666
23667
23668  input_path="$new_path"
23669  # Check if we need to convert this using DOS-style short mode. If the path
23670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23671  # take no chances and rewrite it.
23672  # Note: m4 eats our [], so we need to use [ and ] instead.
23673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23674  if test "x$has_forbidden_chars" != x; then
23675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23677  fi
23678
23679
23680  windows_path="$new_path"
23681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23682    unix_path=`$CYGPATH -u "$windows_path"`
23683    new_path="$unix_path"
23684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23686    new_path="$unix_path"
23687  fi
23688
23689  if test "x$path" != "x$new_path"; then
23690    BOOT_JDK="$new_path"
23691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23693  fi
23694
23695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23697
23698    else
23699      # We're on a unix platform. Hooray! :)
23700      path="$BOOT_JDK"
23701      has_space=`$ECHO "$path" | $GREP " "`
23702      if test "x$has_space" != x; then
23703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23706      fi
23707
23708      # Use eval to expand a potential ~
23709      eval path="$path"
23710      if test ! -f "$path" && test ! -d "$path"; then
23711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23712      fi
23713
23714      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23715    fi
23716  fi
23717
23718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23719$as_echo_n "checking for Boot JDK... " >&6; }
23720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23721$as_echo "$BOOT_JDK" >&6; }
23722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23723$as_echo_n "checking Boot JDK version... " >&6; }
23724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23726$as_echo "$BOOT_JDK_VERSION" >&6; }
23727          fi # end check jdk version
23728        fi # end check javac
23729      fi # end check java
23730    fi # end check boot jdk found
23731  fi
23732
23733    done
23734  fi
23735
23736  fi
23737
23738
23739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23741      # Do we have a bin/java?
23742      if test ! -x "$BOOT_JDK/bin/java"; then
23743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23745        BOOT_JDK_FOUND=no
23746      else
23747        # Do we have a bin/javac?
23748        if test ! -x "$BOOT_JDK/bin/javac"; then
23749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23753          BOOT_JDK_FOUND=no
23754        else
23755          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23756          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23757
23758          # Extra M4 quote needed to protect [] in grep expression.
23759          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23760          if test "x$FOUND_CORRECT_VERSION" = x; then
23761            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23763            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23764$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23765            BOOT_JDK_FOUND=no
23766          else
23767            # We're done! :-)
23768            BOOT_JDK_FOUND=yes
23769
23770  # Only process if variable expands to non-empty
23771
23772  if test "x$BOOT_JDK" != x; then
23773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23774
23775  # Input might be given as Windows format, start by converting to
23776  # unix format.
23777  path="$BOOT_JDK"
23778  new_path=`$CYGPATH -u "$path"`
23779
23780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23783  # "foo.exe" is OK but "foo" is an error.
23784  #
23785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23786  # It is also a way to make sure we got the proper file name for the real test later on.
23787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23788  if test "x$test_shortpath" = x; then
23789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23792  fi
23793
23794  # Call helper function which possibly converts this using DOS-style short mode.
23795  # If so, the updated path is stored in $new_path.
23796
23797  input_path="$new_path"
23798  # Check if we need to convert this using DOS-style short mode. If the path
23799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23800  # take no chances and rewrite it.
23801  # Note: m4 eats our [], so we need to use [ and ] instead.
23802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23803  if test "x$has_forbidden_chars" != x; then
23804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23808      # Going to short mode and back again did indeed matter. Since short mode is
23809      # case insensitive, let's make it lowercase to improve readability.
23810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23811      # Now convert it back to Unix-style (cygpath)
23812      input_path=`$CYGPATH -u "$shortmode_path"`
23813      new_path="$input_path"
23814    fi
23815  fi
23816
23817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23818  if test "x$test_cygdrive_prefix" = x; then
23819    # As a simple fix, exclude /usr/bin since it's not a real path.
23820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23822      # a path prefixed by /cygdrive for fixpath to work.
23823      new_path="$CYGWIN_ROOT_PATH$input_path"
23824    fi
23825  fi
23826
23827
23828  if test "x$path" != "x$new_path"; then
23829    BOOT_JDK="$new_path"
23830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23832  fi
23833
23834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23835
23836  path="$BOOT_JDK"
23837  has_colon=`$ECHO $path | $GREP ^.:`
23838  new_path="$path"
23839  if test "x$has_colon" = x; then
23840    # Not in mixed or Windows style, start by that.
23841    new_path=`cmd //c echo $path`
23842  fi
23843
23844
23845  input_path="$new_path"
23846  # Check if we need to convert this using DOS-style short mode. If the path
23847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23848  # take no chances and rewrite it.
23849  # Note: m4 eats our [], so we need to use [ and ] instead.
23850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23851  if test "x$has_forbidden_chars" != x; then
23852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23854  fi
23855
23856
23857  windows_path="$new_path"
23858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23859    unix_path=`$CYGPATH -u "$windows_path"`
23860    new_path="$unix_path"
23861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23863    new_path="$unix_path"
23864  fi
23865
23866  if test "x$path" != "x$new_path"; then
23867    BOOT_JDK="$new_path"
23868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23870  fi
23871
23872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23874
23875    else
23876      # We're on a unix platform. Hooray! :)
23877      path="$BOOT_JDK"
23878      has_space=`$ECHO "$path" | $GREP " "`
23879      if test "x$has_space" != x; then
23880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23883      fi
23884
23885      # Use eval to expand a potential ~
23886      eval path="$path"
23887      if test ! -f "$path" && test ! -d "$path"; then
23888        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23889      fi
23890
23891      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23892    fi
23893  fi
23894
23895            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23896$as_echo_n "checking for Boot JDK... " >&6; }
23897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23898$as_echo "$BOOT_JDK" >&6; }
23899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23900$as_echo_n "checking Boot JDK version... " >&6; }
23901            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23903$as_echo "$BOOT_JDK_VERSION" >&6; }
23904          fi # end check jdk version
23905        fi # end check javac
23906      fi # end check java
23907    fi # end check boot jdk found
23908  fi
23909
23910
23911  if test "x$BOOT_JDK_FOUND" = xno; then
23912    # Now execute the test
23913
23914  if test "x$ProgramFiles" != x; then
23915    VIRTUAL_DIR="$ProgramFiles/Java"
23916
23917  windows_path="$VIRTUAL_DIR"
23918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23919    unix_path=`$CYGPATH -u "$windows_path"`
23920    VIRTUAL_DIR="$unix_path"
23921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23923    VIRTUAL_DIR="$unix_path"
23924  fi
23925
23926
23927  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23928  BOOT_JDK_SUFFIX=""
23929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23930  if test "x$ALL_JDKS_FOUND" != x; then
23931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23932
23933  if test "x$BOOT_JDK_FOUND" = xno; then
23934    # Now execute the test
23935
23936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23937        if test -d "$BOOT_JDK"; then
23938          BOOT_JDK_FOUND=maybe
23939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23941        fi
23942
23943
23944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23946      # Do we have a bin/java?
23947      if test ! -x "$BOOT_JDK/bin/java"; then
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23950        BOOT_JDK_FOUND=no
23951      else
23952        # Do we have a bin/javac?
23953        if test ! -x "$BOOT_JDK/bin/javac"; then
23954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23958          BOOT_JDK_FOUND=no
23959        else
23960          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23961          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23962
23963          # Extra M4 quote needed to protect [] in grep expression.
23964          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23965          if test "x$FOUND_CORRECT_VERSION" = x; then
23966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23968            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23969$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23970            BOOT_JDK_FOUND=no
23971          else
23972            # We're done! :-)
23973            BOOT_JDK_FOUND=yes
23974
23975  # Only process if variable expands to non-empty
23976
23977  if test "x$BOOT_JDK" != x; then
23978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23979
23980  # Input might be given as Windows format, start by converting to
23981  # unix format.
23982  path="$BOOT_JDK"
23983  new_path=`$CYGPATH -u "$path"`
23984
23985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23988  # "foo.exe" is OK but "foo" is an error.
23989  #
23990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23991  # It is also a way to make sure we got the proper file name for the real test later on.
23992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23993  if test "x$test_shortpath" = x; then
23994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23997  fi
23998
23999  # Call helper function which possibly converts this using DOS-style short mode.
24000  # If so, the updated path is stored in $new_path.
24001
24002  input_path="$new_path"
24003  # Check if we need to convert this using DOS-style short mode. If the path
24004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24005  # take no chances and rewrite it.
24006  # Note: m4 eats our [], so we need to use [ and ] instead.
24007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24008  if test "x$has_forbidden_chars" != x; then
24009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24013      # Going to short mode and back again did indeed matter. Since short mode is
24014      # case insensitive, let's make it lowercase to improve readability.
24015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24016      # Now convert it back to Unix-style (cygpath)
24017      input_path=`$CYGPATH -u "$shortmode_path"`
24018      new_path="$input_path"
24019    fi
24020  fi
24021
24022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24023  if test "x$test_cygdrive_prefix" = x; then
24024    # As a simple fix, exclude /usr/bin since it's not a real path.
24025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24027      # a path prefixed by /cygdrive for fixpath to work.
24028      new_path="$CYGWIN_ROOT_PATH$input_path"
24029    fi
24030  fi
24031
24032
24033  if test "x$path" != "x$new_path"; then
24034    BOOT_JDK="$new_path"
24035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24037  fi
24038
24039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24040
24041  path="$BOOT_JDK"
24042  has_colon=`$ECHO $path | $GREP ^.:`
24043  new_path="$path"
24044  if test "x$has_colon" = x; then
24045    # Not in mixed or Windows style, start by that.
24046    new_path=`cmd //c echo $path`
24047  fi
24048
24049
24050  input_path="$new_path"
24051  # Check if we need to convert this using DOS-style short mode. If the path
24052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24053  # take no chances and rewrite it.
24054  # Note: m4 eats our [], so we need to use [ and ] instead.
24055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24056  if test "x$has_forbidden_chars" != x; then
24057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24059  fi
24060
24061
24062  windows_path="$new_path"
24063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24064    unix_path=`$CYGPATH -u "$windows_path"`
24065    new_path="$unix_path"
24066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24068    new_path="$unix_path"
24069  fi
24070
24071  if test "x$path" != "x$new_path"; then
24072    BOOT_JDK="$new_path"
24073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24075  fi
24076
24077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24079
24080    else
24081      # We're on a unix platform. Hooray! :)
24082      path="$BOOT_JDK"
24083      has_space=`$ECHO "$path" | $GREP " "`
24084      if test "x$has_space" != x; then
24085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24088      fi
24089
24090      # Use eval to expand a potential ~
24091      eval path="$path"
24092      if test ! -f "$path" && test ! -d "$path"; then
24093        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24094      fi
24095
24096      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24097    fi
24098  fi
24099
24100            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24101$as_echo_n "checking for Boot JDK... " >&6; }
24102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24103$as_echo "$BOOT_JDK" >&6; }
24104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24105$as_echo_n "checking Boot JDK version... " >&6; }
24106            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24108$as_echo "$BOOT_JDK_VERSION" >&6; }
24109          fi # end check jdk version
24110        fi # end check javac
24111      fi # end check java
24112    fi # end check boot jdk found
24113  fi
24114
24115    done
24116  fi
24117
24118  fi
24119
24120
24121    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24122    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24123      # Do we have a bin/java?
24124      if test ! -x "$BOOT_JDK/bin/java"; then
24125        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24127        BOOT_JDK_FOUND=no
24128      else
24129        # Do we have a bin/javac?
24130        if test ! -x "$BOOT_JDK/bin/javac"; then
24131          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24133          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24134$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24135          BOOT_JDK_FOUND=no
24136        else
24137          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24138          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24139
24140          # Extra M4 quote needed to protect [] in grep expression.
24141          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24142          if test "x$FOUND_CORRECT_VERSION" = x; then
24143            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24145            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24146$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24147            BOOT_JDK_FOUND=no
24148          else
24149            # We're done! :-)
24150            BOOT_JDK_FOUND=yes
24151
24152  # Only process if variable expands to non-empty
24153
24154  if test "x$BOOT_JDK" != x; then
24155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24156
24157  # Input might be given as Windows format, start by converting to
24158  # unix format.
24159  path="$BOOT_JDK"
24160  new_path=`$CYGPATH -u "$path"`
24161
24162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24165  # "foo.exe" is OK but "foo" is an error.
24166  #
24167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24168  # It is also a way to make sure we got the proper file name for the real test later on.
24169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24170  if test "x$test_shortpath" = x; then
24171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24174  fi
24175
24176  # Call helper function which possibly converts this using DOS-style short mode.
24177  # If so, the updated path is stored in $new_path.
24178
24179  input_path="$new_path"
24180  # Check if we need to convert this using DOS-style short mode. If the path
24181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24182  # take no chances and rewrite it.
24183  # Note: m4 eats our [], so we need to use [ and ] instead.
24184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24185  if test "x$has_forbidden_chars" != x; then
24186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24190      # Going to short mode and back again did indeed matter. Since short mode is
24191      # case insensitive, let's make it lowercase to improve readability.
24192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24193      # Now convert it back to Unix-style (cygpath)
24194      input_path=`$CYGPATH -u "$shortmode_path"`
24195      new_path="$input_path"
24196    fi
24197  fi
24198
24199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24200  if test "x$test_cygdrive_prefix" = x; then
24201    # As a simple fix, exclude /usr/bin since it's not a real path.
24202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24204      # a path prefixed by /cygdrive for fixpath to work.
24205      new_path="$CYGWIN_ROOT_PATH$input_path"
24206    fi
24207  fi
24208
24209
24210  if test "x$path" != "x$new_path"; then
24211    BOOT_JDK="$new_path"
24212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24214  fi
24215
24216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24217
24218  path="$BOOT_JDK"
24219  has_colon=`$ECHO $path | $GREP ^.:`
24220  new_path="$path"
24221  if test "x$has_colon" = x; then
24222    # Not in mixed or Windows style, start by that.
24223    new_path=`cmd //c echo $path`
24224  fi
24225
24226
24227  input_path="$new_path"
24228  # Check if we need to convert this using DOS-style short mode. If the path
24229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24230  # take no chances and rewrite it.
24231  # Note: m4 eats our [], so we need to use [ and ] instead.
24232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24233  if test "x$has_forbidden_chars" != x; then
24234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24236  fi
24237
24238
24239  windows_path="$new_path"
24240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24241    unix_path=`$CYGPATH -u "$windows_path"`
24242    new_path="$unix_path"
24243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24245    new_path="$unix_path"
24246  fi
24247
24248  if test "x$path" != "x$new_path"; then
24249    BOOT_JDK="$new_path"
24250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24252  fi
24253
24254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24256
24257    else
24258      # We're on a unix platform. Hooray! :)
24259      path="$BOOT_JDK"
24260      has_space=`$ECHO "$path" | $GREP " "`
24261      if test "x$has_space" != x; then
24262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24265      fi
24266
24267      # Use eval to expand a potential ~
24268      eval path="$path"
24269      if test ! -f "$path" && test ! -d "$path"; then
24270        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24271      fi
24272
24273      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24274    fi
24275  fi
24276
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24278$as_echo_n "checking for Boot JDK... " >&6; }
24279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24280$as_echo "$BOOT_JDK" >&6; }
24281            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24282$as_echo_n "checking Boot JDK version... " >&6; }
24283            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24285$as_echo "$BOOT_JDK_VERSION" >&6; }
24286          fi # end check jdk version
24287        fi # end check javac
24288      fi # end check java
24289    fi # end check boot jdk found
24290  fi
24291
24292
24293  if test "x$BOOT_JDK_FOUND" = xno; then
24294    # Now execute the test
24295
24296  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24297  BOOT_JDK_SUFFIX=""
24298  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24299  if test "x$ALL_JDKS_FOUND" != x; then
24300    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24301
24302  if test "x$BOOT_JDK_FOUND" = xno; then
24303    # Now execute the test
24304
24305        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24306        if test -d "$BOOT_JDK"; then
24307          BOOT_JDK_FOUND=maybe
24308          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24309$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24310        fi
24311
24312
24313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24315      # Do we have a bin/java?
24316      if test ! -x "$BOOT_JDK/bin/java"; then
24317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24319        BOOT_JDK_FOUND=no
24320      else
24321        # Do we have a bin/javac?
24322        if test ! -x "$BOOT_JDK/bin/javac"; then
24323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24327          BOOT_JDK_FOUND=no
24328        else
24329          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24330          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24331
24332          # Extra M4 quote needed to protect [] in grep expression.
24333          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24334          if test "x$FOUND_CORRECT_VERSION" = x; then
24335            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24337            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24338$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24339            BOOT_JDK_FOUND=no
24340          else
24341            # We're done! :-)
24342            BOOT_JDK_FOUND=yes
24343
24344  # Only process if variable expands to non-empty
24345
24346  if test "x$BOOT_JDK" != x; then
24347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24348
24349  # Input might be given as Windows format, start by converting to
24350  # unix format.
24351  path="$BOOT_JDK"
24352  new_path=`$CYGPATH -u "$path"`
24353
24354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24357  # "foo.exe" is OK but "foo" is an error.
24358  #
24359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24360  # It is also a way to make sure we got the proper file name for the real test later on.
24361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24362  if test "x$test_shortpath" = x; then
24363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24366  fi
24367
24368  # Call helper function which possibly converts this using DOS-style short mode.
24369  # If so, the updated path is stored in $new_path.
24370
24371  input_path="$new_path"
24372  # Check if we need to convert this using DOS-style short mode. If the path
24373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24374  # take no chances and rewrite it.
24375  # Note: m4 eats our [], so we need to use [ and ] instead.
24376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24377  if test "x$has_forbidden_chars" != x; then
24378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24382      # Going to short mode and back again did indeed matter. Since short mode is
24383      # case insensitive, let's make it lowercase to improve readability.
24384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24385      # Now convert it back to Unix-style (cygpath)
24386      input_path=`$CYGPATH -u "$shortmode_path"`
24387      new_path="$input_path"
24388    fi
24389  fi
24390
24391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24392  if test "x$test_cygdrive_prefix" = x; then
24393    # As a simple fix, exclude /usr/bin since it's not a real path.
24394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24396      # a path prefixed by /cygdrive for fixpath to work.
24397      new_path="$CYGWIN_ROOT_PATH$input_path"
24398    fi
24399  fi
24400
24401
24402  if test "x$path" != "x$new_path"; then
24403    BOOT_JDK="$new_path"
24404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24406  fi
24407
24408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24409
24410  path="$BOOT_JDK"
24411  has_colon=`$ECHO $path | $GREP ^.:`
24412  new_path="$path"
24413  if test "x$has_colon" = x; then
24414    # Not in mixed or Windows style, start by that.
24415    new_path=`cmd //c echo $path`
24416  fi
24417
24418
24419  input_path="$new_path"
24420  # Check if we need to convert this using DOS-style short mode. If the path
24421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24422  # take no chances and rewrite it.
24423  # Note: m4 eats our [], so we need to use [ and ] instead.
24424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24425  if test "x$has_forbidden_chars" != x; then
24426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24428  fi
24429
24430
24431  windows_path="$new_path"
24432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24433    unix_path=`$CYGPATH -u "$windows_path"`
24434    new_path="$unix_path"
24435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24437    new_path="$unix_path"
24438  fi
24439
24440  if test "x$path" != "x$new_path"; then
24441    BOOT_JDK="$new_path"
24442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24444  fi
24445
24446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24448
24449    else
24450      # We're on a unix platform. Hooray! :)
24451      path="$BOOT_JDK"
24452      has_space=`$ECHO "$path" | $GREP " "`
24453      if test "x$has_space" != x; then
24454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24457      fi
24458
24459      # Use eval to expand a potential ~
24460      eval path="$path"
24461      if test ! -f "$path" && test ! -d "$path"; then
24462        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24463      fi
24464
24465      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24466    fi
24467  fi
24468
24469            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24470$as_echo_n "checking for Boot JDK... " >&6; }
24471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24472$as_echo "$BOOT_JDK" >&6; }
24473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24474$as_echo_n "checking Boot JDK version... " >&6; }
24475            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24477$as_echo "$BOOT_JDK_VERSION" >&6; }
24478          fi # end check jdk version
24479        fi # end check javac
24480      fi # end check java
24481    fi # end check boot jdk found
24482  fi
24483
24484    done
24485  fi
24486
24487
24488    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24489    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24490      # Do we have a bin/java?
24491      if test ! -x "$BOOT_JDK/bin/java"; then
24492        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24494        BOOT_JDK_FOUND=no
24495      else
24496        # Do we have a bin/javac?
24497        if test ! -x "$BOOT_JDK/bin/javac"; then
24498          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24500          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24501$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24502          BOOT_JDK_FOUND=no
24503        else
24504          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24505          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24506
24507          # Extra M4 quote needed to protect [] in grep expression.
24508          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24509          if test "x$FOUND_CORRECT_VERSION" = x; then
24510            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24512            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24513$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24514            BOOT_JDK_FOUND=no
24515          else
24516            # We're done! :-)
24517            BOOT_JDK_FOUND=yes
24518
24519  # Only process if variable expands to non-empty
24520
24521  if test "x$BOOT_JDK" != x; then
24522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24523
24524  # Input might be given as Windows format, start by converting to
24525  # unix format.
24526  path="$BOOT_JDK"
24527  new_path=`$CYGPATH -u "$path"`
24528
24529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24532  # "foo.exe" is OK but "foo" is an error.
24533  #
24534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24535  # It is also a way to make sure we got the proper file name for the real test later on.
24536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24537  if test "x$test_shortpath" = x; then
24538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24540    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24541  fi
24542
24543  # Call helper function which possibly converts this using DOS-style short mode.
24544  # If so, the updated path is stored in $new_path.
24545
24546  input_path="$new_path"
24547  # Check if we need to convert this using DOS-style short mode. If the path
24548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24549  # take no chances and rewrite it.
24550  # Note: m4 eats our [], so we need to use [ and ] instead.
24551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24552  if test "x$has_forbidden_chars" != x; then
24553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24557      # Going to short mode and back again did indeed matter. Since short mode is
24558      # case insensitive, let's make it lowercase to improve readability.
24559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24560      # Now convert it back to Unix-style (cygpath)
24561      input_path=`$CYGPATH -u "$shortmode_path"`
24562      new_path="$input_path"
24563    fi
24564  fi
24565
24566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24567  if test "x$test_cygdrive_prefix" = x; then
24568    # As a simple fix, exclude /usr/bin since it's not a real path.
24569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24571      # a path prefixed by /cygdrive for fixpath to work.
24572      new_path="$CYGWIN_ROOT_PATH$input_path"
24573    fi
24574  fi
24575
24576
24577  if test "x$path" != "x$new_path"; then
24578    BOOT_JDK="$new_path"
24579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24581  fi
24582
24583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24584
24585  path="$BOOT_JDK"
24586  has_colon=`$ECHO $path | $GREP ^.:`
24587  new_path="$path"
24588  if test "x$has_colon" = x; then
24589    # Not in mixed or Windows style, start by that.
24590    new_path=`cmd //c echo $path`
24591  fi
24592
24593
24594  input_path="$new_path"
24595  # Check if we need to convert this using DOS-style short mode. If the path
24596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24597  # take no chances and rewrite it.
24598  # Note: m4 eats our [], so we need to use [ and ] instead.
24599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24600  if test "x$has_forbidden_chars" != x; then
24601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24603  fi
24604
24605
24606  windows_path="$new_path"
24607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24608    unix_path=`$CYGPATH -u "$windows_path"`
24609    new_path="$unix_path"
24610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24612    new_path="$unix_path"
24613  fi
24614
24615  if test "x$path" != "x$new_path"; then
24616    BOOT_JDK="$new_path"
24617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24619  fi
24620
24621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24623
24624    else
24625      # We're on a unix platform. Hooray! :)
24626      path="$BOOT_JDK"
24627      has_space=`$ECHO "$path" | $GREP " "`
24628      if test "x$has_space" != x; then
24629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24632      fi
24633
24634      # Use eval to expand a potential ~
24635      eval path="$path"
24636      if test ! -f "$path" && test ! -d "$path"; then
24637        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24638      fi
24639
24640      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24641    fi
24642  fi
24643
24644            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24645$as_echo_n "checking for Boot JDK... " >&6; }
24646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24647$as_echo "$BOOT_JDK" >&6; }
24648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24649$as_echo_n "checking Boot JDK version... " >&6; }
24650            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24652$as_echo "$BOOT_JDK_VERSION" >&6; }
24653          fi # end check jdk version
24654        fi # end check javac
24655      fi # end check java
24656    fi # end check boot jdk found
24657  fi
24658
24659  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24660
24661  if test "x$BOOT_JDK_FOUND" = xno; then
24662    # Now execute the test
24663
24664  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24665  BOOT_JDK_SUFFIX="/Contents/Home"
24666  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24667  if test "x$ALL_JDKS_FOUND" != x; then
24668    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24669
24670  if test "x$BOOT_JDK_FOUND" = xno; then
24671    # Now execute the test
24672
24673        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24674        if test -d "$BOOT_JDK"; then
24675          BOOT_JDK_FOUND=maybe
24676          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24677$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24678        fi
24679
24680
24681    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24682    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24683      # Do we have a bin/java?
24684      if test ! -x "$BOOT_JDK/bin/java"; then
24685        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24687        BOOT_JDK_FOUND=no
24688      else
24689        # Do we have a bin/javac?
24690        if test ! -x "$BOOT_JDK/bin/javac"; then
24691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24693          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24694$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24695          BOOT_JDK_FOUND=no
24696        else
24697          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24698          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24699
24700          # Extra M4 quote needed to protect [] in grep expression.
24701          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24702          if test "x$FOUND_CORRECT_VERSION" = x; then
24703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24705            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24706$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24707            BOOT_JDK_FOUND=no
24708          else
24709            # We're done! :-)
24710            BOOT_JDK_FOUND=yes
24711
24712  # Only process if variable expands to non-empty
24713
24714  if test "x$BOOT_JDK" != x; then
24715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24716
24717  # Input might be given as Windows format, start by converting to
24718  # unix format.
24719  path="$BOOT_JDK"
24720  new_path=`$CYGPATH -u "$path"`
24721
24722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24725  # "foo.exe" is OK but "foo" is an error.
24726  #
24727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24728  # It is also a way to make sure we got the proper file name for the real test later on.
24729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24730  if test "x$test_shortpath" = x; then
24731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24734  fi
24735
24736  # Call helper function which possibly converts this using DOS-style short mode.
24737  # If so, the updated path is stored in $new_path.
24738
24739  input_path="$new_path"
24740  # Check if we need to convert this using DOS-style short mode. If the path
24741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24742  # take no chances and rewrite it.
24743  # Note: m4 eats our [], so we need to use [ and ] instead.
24744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24745  if test "x$has_forbidden_chars" != x; then
24746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24750      # Going to short mode and back again did indeed matter. Since short mode is
24751      # case insensitive, let's make it lowercase to improve readability.
24752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24753      # Now convert it back to Unix-style (cygpath)
24754      input_path=`$CYGPATH -u "$shortmode_path"`
24755      new_path="$input_path"
24756    fi
24757  fi
24758
24759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24760  if test "x$test_cygdrive_prefix" = x; then
24761    # As a simple fix, exclude /usr/bin since it's not a real path.
24762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24764      # a path prefixed by /cygdrive for fixpath to work.
24765      new_path="$CYGWIN_ROOT_PATH$input_path"
24766    fi
24767  fi
24768
24769
24770  if test "x$path" != "x$new_path"; then
24771    BOOT_JDK="$new_path"
24772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24774  fi
24775
24776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24777
24778  path="$BOOT_JDK"
24779  has_colon=`$ECHO $path | $GREP ^.:`
24780  new_path="$path"
24781  if test "x$has_colon" = x; then
24782    # Not in mixed or Windows style, start by that.
24783    new_path=`cmd //c echo $path`
24784  fi
24785
24786
24787  input_path="$new_path"
24788  # Check if we need to convert this using DOS-style short mode. If the path
24789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24790  # take no chances and rewrite it.
24791  # Note: m4 eats our [], so we need to use [ and ] instead.
24792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24793  if test "x$has_forbidden_chars" != x; then
24794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24796  fi
24797
24798
24799  windows_path="$new_path"
24800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24801    unix_path=`$CYGPATH -u "$windows_path"`
24802    new_path="$unix_path"
24803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24805    new_path="$unix_path"
24806  fi
24807
24808  if test "x$path" != "x$new_path"; then
24809    BOOT_JDK="$new_path"
24810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24812  fi
24813
24814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24816
24817    else
24818      # We're on a unix platform. Hooray! :)
24819      path="$BOOT_JDK"
24820      has_space=`$ECHO "$path" | $GREP " "`
24821      if test "x$has_space" != x; then
24822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24825      fi
24826
24827      # Use eval to expand a potential ~
24828      eval path="$path"
24829      if test ! -f "$path" && test ! -d "$path"; then
24830        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24831      fi
24832
24833      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24834    fi
24835  fi
24836
24837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24838$as_echo_n "checking for Boot JDK... " >&6; }
24839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24840$as_echo "$BOOT_JDK" >&6; }
24841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24842$as_echo_n "checking Boot JDK version... " >&6; }
24843            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24845$as_echo "$BOOT_JDK_VERSION" >&6; }
24846          fi # end check jdk version
24847        fi # end check javac
24848      fi # end check java
24849    fi # end check boot jdk found
24850  fi
24851
24852    done
24853  fi
24854
24855
24856    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24857    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24858      # Do we have a bin/java?
24859      if test ! -x "$BOOT_JDK/bin/java"; then
24860        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24862        BOOT_JDK_FOUND=no
24863      else
24864        # Do we have a bin/javac?
24865        if test ! -x "$BOOT_JDK/bin/javac"; then
24866          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24868          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24869$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24870          BOOT_JDK_FOUND=no
24871        else
24872          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24873          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24874
24875          # Extra M4 quote needed to protect [] in grep expression.
24876          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24877          if test "x$FOUND_CORRECT_VERSION" = x; then
24878            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24881$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24882            BOOT_JDK_FOUND=no
24883          else
24884            # We're done! :-)
24885            BOOT_JDK_FOUND=yes
24886
24887  # Only process if variable expands to non-empty
24888
24889  if test "x$BOOT_JDK" != x; then
24890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24891
24892  # Input might be given as Windows format, start by converting to
24893  # unix format.
24894  path="$BOOT_JDK"
24895  new_path=`$CYGPATH -u "$path"`
24896
24897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24900  # "foo.exe" is OK but "foo" is an error.
24901  #
24902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24903  # It is also a way to make sure we got the proper file name for the real test later on.
24904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24905  if test "x$test_shortpath" = x; then
24906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24908    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24909  fi
24910
24911  # Call helper function which possibly converts this using DOS-style short mode.
24912  # If so, the updated path is stored in $new_path.
24913
24914  input_path="$new_path"
24915  # Check if we need to convert this using DOS-style short mode. If the path
24916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24917  # take no chances and rewrite it.
24918  # Note: m4 eats our [], so we need to use [ and ] instead.
24919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24920  if test "x$has_forbidden_chars" != x; then
24921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24925      # Going to short mode and back again did indeed matter. Since short mode is
24926      # case insensitive, let's make it lowercase to improve readability.
24927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24928      # Now convert it back to Unix-style (cygpath)
24929      input_path=`$CYGPATH -u "$shortmode_path"`
24930      new_path="$input_path"
24931    fi
24932  fi
24933
24934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24935  if test "x$test_cygdrive_prefix" = x; then
24936    # As a simple fix, exclude /usr/bin since it's not a real path.
24937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24939      # a path prefixed by /cygdrive for fixpath to work.
24940      new_path="$CYGWIN_ROOT_PATH$input_path"
24941    fi
24942  fi
24943
24944
24945  if test "x$path" != "x$new_path"; then
24946    BOOT_JDK="$new_path"
24947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24949  fi
24950
24951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24952
24953  path="$BOOT_JDK"
24954  has_colon=`$ECHO $path | $GREP ^.:`
24955  new_path="$path"
24956  if test "x$has_colon" = x; then
24957    # Not in mixed or Windows style, start by that.
24958    new_path=`cmd //c echo $path`
24959  fi
24960
24961
24962  input_path="$new_path"
24963  # Check if we need to convert this using DOS-style short mode. If the path
24964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24965  # take no chances and rewrite it.
24966  # Note: m4 eats our [], so we need to use [ and ] instead.
24967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24968  if test "x$has_forbidden_chars" != x; then
24969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24971  fi
24972
24973
24974  windows_path="$new_path"
24975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24976    unix_path=`$CYGPATH -u "$windows_path"`
24977    new_path="$unix_path"
24978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24980    new_path="$unix_path"
24981  fi
24982
24983  if test "x$path" != "x$new_path"; then
24984    BOOT_JDK="$new_path"
24985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24987  fi
24988
24989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24991
24992    else
24993      # We're on a unix platform. Hooray! :)
24994      path="$BOOT_JDK"
24995      has_space=`$ECHO "$path" | $GREP " "`
24996      if test "x$has_space" != x; then
24997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25000      fi
25001
25002      # Use eval to expand a potential ~
25003      eval path="$path"
25004      if test ! -f "$path" && test ! -d "$path"; then
25005        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25006      fi
25007
25008      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25009    fi
25010  fi
25011
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25013$as_echo_n "checking for Boot JDK... " >&6; }
25014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25015$as_echo "$BOOT_JDK" >&6; }
25016            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25017$as_echo_n "checking Boot JDK version... " >&6; }
25018            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25020$as_echo "$BOOT_JDK_VERSION" >&6; }
25021          fi # end check jdk version
25022        fi # end check javac
25023      fi # end check java
25024    fi # end check boot jdk found
25025  fi
25026
25027
25028  if test "x$BOOT_JDK_FOUND" = xno; then
25029    # Now execute the test
25030
25031  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25032  BOOT_JDK_SUFFIX="/Contents/Home"
25033  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25034  if test "x$ALL_JDKS_FOUND" != x; then
25035    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25036
25037  if test "x$BOOT_JDK_FOUND" = xno; then
25038    # Now execute the test
25039
25040        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25041        if test -d "$BOOT_JDK"; then
25042          BOOT_JDK_FOUND=maybe
25043          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25044$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25045        fi
25046
25047
25048    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25049    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25050      # Do we have a bin/java?
25051      if test ! -x "$BOOT_JDK/bin/java"; then
25052        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25054        BOOT_JDK_FOUND=no
25055      else
25056        # Do we have a bin/javac?
25057        if test ! -x "$BOOT_JDK/bin/javac"; then
25058          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25060          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25061$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25062          BOOT_JDK_FOUND=no
25063        else
25064          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25065          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25066
25067          # Extra M4 quote needed to protect [] in grep expression.
25068          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25069          if test "x$FOUND_CORRECT_VERSION" = x; then
25070            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25072            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25073$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25074            BOOT_JDK_FOUND=no
25075          else
25076            # We're done! :-)
25077            BOOT_JDK_FOUND=yes
25078
25079  # Only process if variable expands to non-empty
25080
25081  if test "x$BOOT_JDK" != x; then
25082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25083
25084  # Input might be given as Windows format, start by converting to
25085  # unix format.
25086  path="$BOOT_JDK"
25087  new_path=`$CYGPATH -u "$path"`
25088
25089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25092  # "foo.exe" is OK but "foo" is an error.
25093  #
25094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25095  # It is also a way to make sure we got the proper file name for the real test later on.
25096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25097  if test "x$test_shortpath" = x; then
25098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25100    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25101  fi
25102
25103  # Call helper function which possibly converts this using DOS-style short mode.
25104  # If so, the updated path is stored in $new_path.
25105
25106  input_path="$new_path"
25107  # Check if we need to convert this using DOS-style short mode. If the path
25108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25109  # take no chances and rewrite it.
25110  # Note: m4 eats our [], so we need to use [ and ] instead.
25111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25112  if test "x$has_forbidden_chars" != x; then
25113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25117      # Going to short mode and back again did indeed matter. Since short mode is
25118      # case insensitive, let's make it lowercase to improve readability.
25119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25120      # Now convert it back to Unix-style (cygpath)
25121      input_path=`$CYGPATH -u "$shortmode_path"`
25122      new_path="$input_path"
25123    fi
25124  fi
25125
25126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25127  if test "x$test_cygdrive_prefix" = x; then
25128    # As a simple fix, exclude /usr/bin since it's not a real path.
25129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25131      # a path prefixed by /cygdrive for fixpath to work.
25132      new_path="$CYGWIN_ROOT_PATH$input_path"
25133    fi
25134  fi
25135
25136
25137  if test "x$path" != "x$new_path"; then
25138    BOOT_JDK="$new_path"
25139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25141  fi
25142
25143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25144
25145  path="$BOOT_JDK"
25146  has_colon=`$ECHO $path | $GREP ^.:`
25147  new_path="$path"
25148  if test "x$has_colon" = x; then
25149    # Not in mixed or Windows style, start by that.
25150    new_path=`cmd //c echo $path`
25151  fi
25152
25153
25154  input_path="$new_path"
25155  # Check if we need to convert this using DOS-style short mode. If the path
25156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25157  # take no chances and rewrite it.
25158  # Note: m4 eats our [], so we need to use [ and ] instead.
25159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25160  if test "x$has_forbidden_chars" != x; then
25161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25163  fi
25164
25165
25166  windows_path="$new_path"
25167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25168    unix_path=`$CYGPATH -u "$windows_path"`
25169    new_path="$unix_path"
25170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25172    new_path="$unix_path"
25173  fi
25174
25175  if test "x$path" != "x$new_path"; then
25176    BOOT_JDK="$new_path"
25177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25178$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25179  fi
25180
25181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25183
25184    else
25185      # We're on a unix platform. Hooray! :)
25186      path="$BOOT_JDK"
25187      has_space=`$ECHO "$path" | $GREP " "`
25188      if test "x$has_space" != x; then
25189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25192      fi
25193
25194      # Use eval to expand a potential ~
25195      eval path="$path"
25196      if test ! -f "$path" && test ! -d "$path"; then
25197        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25198      fi
25199
25200      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25201    fi
25202  fi
25203
25204            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25205$as_echo_n "checking for Boot JDK... " >&6; }
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25207$as_echo "$BOOT_JDK" >&6; }
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25209$as_echo_n "checking Boot JDK version... " >&6; }
25210            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25212$as_echo "$BOOT_JDK_VERSION" >&6; }
25213          fi # end check jdk version
25214        fi # end check javac
25215      fi # end check java
25216    fi # end check boot jdk found
25217  fi
25218
25219    done
25220  fi
25221
25222
25223    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25224    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25225      # Do we have a bin/java?
25226      if test ! -x "$BOOT_JDK/bin/java"; then
25227        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25229        BOOT_JDK_FOUND=no
25230      else
25231        # Do we have a bin/javac?
25232        if test ! -x "$BOOT_JDK/bin/javac"; then
25233          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25235          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25236$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25237          BOOT_JDK_FOUND=no
25238        else
25239          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25240          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25241
25242          # Extra M4 quote needed to protect [] in grep expression.
25243          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25244          if test "x$FOUND_CORRECT_VERSION" = x; then
25245            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25247            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25248$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25249            BOOT_JDK_FOUND=no
25250          else
25251            # We're done! :-)
25252            BOOT_JDK_FOUND=yes
25253
25254  # Only process if variable expands to non-empty
25255
25256  if test "x$BOOT_JDK" != x; then
25257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25258
25259  # Input might be given as Windows format, start by converting to
25260  # unix format.
25261  path="$BOOT_JDK"
25262  new_path=`$CYGPATH -u "$path"`
25263
25264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25267  # "foo.exe" is OK but "foo" is an error.
25268  #
25269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25270  # It is also a way to make sure we got the proper file name for the real test later on.
25271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25272  if test "x$test_shortpath" = x; then
25273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25274$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25275    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25276  fi
25277
25278  # Call helper function which possibly converts this using DOS-style short mode.
25279  # If so, the updated path is stored in $new_path.
25280
25281  input_path="$new_path"
25282  # Check if we need to convert this using DOS-style short mode. If the path
25283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25284  # take no chances and rewrite it.
25285  # Note: m4 eats our [], so we need to use [ and ] instead.
25286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25287  if test "x$has_forbidden_chars" != x; then
25288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25292      # Going to short mode and back again did indeed matter. Since short mode is
25293      # case insensitive, let's make it lowercase to improve readability.
25294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25295      # Now convert it back to Unix-style (cygpath)
25296      input_path=`$CYGPATH -u "$shortmode_path"`
25297      new_path="$input_path"
25298    fi
25299  fi
25300
25301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25302  if test "x$test_cygdrive_prefix" = x; then
25303    # As a simple fix, exclude /usr/bin since it's not a real path.
25304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25306      # a path prefixed by /cygdrive for fixpath to work.
25307      new_path="$CYGWIN_ROOT_PATH$input_path"
25308    fi
25309  fi
25310
25311
25312  if test "x$path" != "x$new_path"; then
25313    BOOT_JDK="$new_path"
25314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25316  fi
25317
25318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25319
25320  path="$BOOT_JDK"
25321  has_colon=`$ECHO $path | $GREP ^.:`
25322  new_path="$path"
25323  if test "x$has_colon" = x; then
25324    # Not in mixed or Windows style, start by that.
25325    new_path=`cmd //c echo $path`
25326  fi
25327
25328
25329  input_path="$new_path"
25330  # Check if we need to convert this using DOS-style short mode. If the path
25331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25332  # take no chances and rewrite it.
25333  # Note: m4 eats our [], so we need to use [ and ] instead.
25334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25335  if test "x$has_forbidden_chars" != x; then
25336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25338  fi
25339
25340
25341  windows_path="$new_path"
25342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25343    unix_path=`$CYGPATH -u "$windows_path"`
25344    new_path="$unix_path"
25345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25347    new_path="$unix_path"
25348  fi
25349
25350  if test "x$path" != "x$new_path"; then
25351    BOOT_JDK="$new_path"
25352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25354  fi
25355
25356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25358
25359    else
25360      # We're on a unix platform. Hooray! :)
25361      path="$BOOT_JDK"
25362      has_space=`$ECHO "$path" | $GREP " "`
25363      if test "x$has_space" != x; then
25364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25366        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25367      fi
25368
25369      # Use eval to expand a potential ~
25370      eval path="$path"
25371      if test ! -f "$path" && test ! -d "$path"; then
25372        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25373      fi
25374
25375      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25376    fi
25377  fi
25378
25379            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25380$as_echo_n "checking for Boot JDK... " >&6; }
25381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25382$as_echo "$BOOT_JDK" >&6; }
25383            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25384$as_echo_n "checking Boot JDK version... " >&6; }
25385            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25387$as_echo "$BOOT_JDK_VERSION" >&6; }
25388          fi # end check jdk version
25389        fi # end check javac
25390      fi # end check java
25391    fi # end check boot jdk found
25392  fi
25393
25394  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25395
25396  if test "x$BOOT_JDK_FOUND" = xno; then
25397    # Now execute the test
25398
25399  BOOT_JDK_PREFIX="/usr/lib/jvm"
25400  BOOT_JDK_SUFFIX=""
25401  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25402  if test "x$ALL_JDKS_FOUND" != x; then
25403    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25404
25405  if test "x$BOOT_JDK_FOUND" = xno; then
25406    # Now execute the test
25407
25408        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25409        if test -d "$BOOT_JDK"; then
25410          BOOT_JDK_FOUND=maybe
25411          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25412$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25413        fi
25414
25415
25416    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25417    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25418      # Do we have a bin/java?
25419      if test ! -x "$BOOT_JDK/bin/java"; then
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25422        BOOT_JDK_FOUND=no
25423      else
25424        # Do we have a bin/javac?
25425        if test ! -x "$BOOT_JDK/bin/javac"; then
25426          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25428          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25429$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25430          BOOT_JDK_FOUND=no
25431        else
25432          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25433          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25434
25435          # Extra M4 quote needed to protect [] in grep expression.
25436          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25437          if test "x$FOUND_CORRECT_VERSION" = x; then
25438            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25440            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25441$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25442            BOOT_JDK_FOUND=no
25443          else
25444            # We're done! :-)
25445            BOOT_JDK_FOUND=yes
25446
25447  # Only process if variable expands to non-empty
25448
25449  if test "x$BOOT_JDK" != x; then
25450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25451
25452  # Input might be given as Windows format, start by converting to
25453  # unix format.
25454  path="$BOOT_JDK"
25455  new_path=`$CYGPATH -u "$path"`
25456
25457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25460  # "foo.exe" is OK but "foo" is an error.
25461  #
25462  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25463  # It is also a way to make sure we got the proper file name for the real test later on.
25464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25465  if test "x$test_shortpath" = x; then
25466    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25467$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25468    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25469  fi
25470
25471  # Call helper function which possibly converts this using DOS-style short mode.
25472  # If so, the updated path is stored in $new_path.
25473
25474  input_path="$new_path"
25475  # Check if we need to convert this using DOS-style short mode. If the path
25476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25477  # take no chances and rewrite it.
25478  # Note: m4 eats our [], so we need to use [ and ] instead.
25479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25480  if test "x$has_forbidden_chars" != x; then
25481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25485      # Going to short mode and back again did indeed matter. Since short mode is
25486      # case insensitive, let's make it lowercase to improve readability.
25487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25488      # Now convert it back to Unix-style (cygpath)
25489      input_path=`$CYGPATH -u "$shortmode_path"`
25490      new_path="$input_path"
25491    fi
25492  fi
25493
25494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25495  if test "x$test_cygdrive_prefix" = x; then
25496    # As a simple fix, exclude /usr/bin since it's not a real path.
25497    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25499      # a path prefixed by /cygdrive for fixpath to work.
25500      new_path="$CYGWIN_ROOT_PATH$input_path"
25501    fi
25502  fi
25503
25504
25505  if test "x$path" != "x$new_path"; then
25506    BOOT_JDK="$new_path"
25507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25508$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25509  fi
25510
25511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25512
25513  path="$BOOT_JDK"
25514  has_colon=`$ECHO $path | $GREP ^.:`
25515  new_path="$path"
25516  if test "x$has_colon" = x; then
25517    # Not in mixed or Windows style, start by that.
25518    new_path=`cmd //c echo $path`
25519  fi
25520
25521
25522  input_path="$new_path"
25523  # Check if we need to convert this using DOS-style short mode. If the path
25524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25525  # take no chances and rewrite it.
25526  # Note: m4 eats our [], so we need to use [ and ] instead.
25527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25528  if test "x$has_forbidden_chars" != x; then
25529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25531  fi
25532
25533
25534  windows_path="$new_path"
25535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25536    unix_path=`$CYGPATH -u "$windows_path"`
25537    new_path="$unix_path"
25538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25540    new_path="$unix_path"
25541  fi
25542
25543  if test "x$path" != "x$new_path"; then
25544    BOOT_JDK="$new_path"
25545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25546$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25547  fi
25548
25549  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25550  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25551
25552    else
25553      # We're on a unix platform. Hooray! :)
25554      path="$BOOT_JDK"
25555      has_space=`$ECHO "$path" | $GREP " "`
25556      if test "x$has_space" != x; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25559        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25560      fi
25561
25562      # Use eval to expand a potential ~
25563      eval path="$path"
25564      if test ! -f "$path" && test ! -d "$path"; then
25565        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25566      fi
25567
25568      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25569    fi
25570  fi
25571
25572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25573$as_echo_n "checking for Boot JDK... " >&6; }
25574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25575$as_echo "$BOOT_JDK" >&6; }
25576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25577$as_echo_n "checking Boot JDK version... " >&6; }
25578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25580$as_echo "$BOOT_JDK_VERSION" >&6; }
25581          fi # end check jdk version
25582        fi # end check javac
25583      fi # end check java
25584    fi # end check boot jdk found
25585  fi
25586
25587    done
25588  fi
25589
25590
25591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25593      # Do we have a bin/java?
25594      if test ! -x "$BOOT_JDK/bin/java"; then
25595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25597        BOOT_JDK_FOUND=no
25598      else
25599        # Do we have a bin/javac?
25600        if test ! -x "$BOOT_JDK/bin/javac"; then
25601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25605          BOOT_JDK_FOUND=no
25606        else
25607          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25608          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25609
25610          # Extra M4 quote needed to protect [] in grep expression.
25611          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25612          if test "x$FOUND_CORRECT_VERSION" = x; then
25613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25615            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25616$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25617            BOOT_JDK_FOUND=no
25618          else
25619            # We're done! :-)
25620            BOOT_JDK_FOUND=yes
25621
25622  # Only process if variable expands to non-empty
25623
25624  if test "x$BOOT_JDK" != x; then
25625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25626
25627  # Input might be given as Windows format, start by converting to
25628  # unix format.
25629  path="$BOOT_JDK"
25630  new_path=`$CYGPATH -u "$path"`
25631
25632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25635  # "foo.exe" is OK but "foo" is an error.
25636  #
25637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25638  # It is also a way to make sure we got the proper file name for the real test later on.
25639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25640  if test "x$test_shortpath" = x; then
25641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25644  fi
25645
25646  # Call helper function which possibly converts this using DOS-style short mode.
25647  # If so, the updated path is stored in $new_path.
25648
25649  input_path="$new_path"
25650  # Check if we need to convert this using DOS-style short mode. If the path
25651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25652  # take no chances and rewrite it.
25653  # Note: m4 eats our [], so we need to use [ and ] instead.
25654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25655  if test "x$has_forbidden_chars" != x; then
25656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25660      # Going to short mode and back again did indeed matter. Since short mode is
25661      # case insensitive, let's make it lowercase to improve readability.
25662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25663      # Now convert it back to Unix-style (cygpath)
25664      input_path=`$CYGPATH -u "$shortmode_path"`
25665      new_path="$input_path"
25666    fi
25667  fi
25668
25669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25670  if test "x$test_cygdrive_prefix" = x; then
25671    # As a simple fix, exclude /usr/bin since it's not a real path.
25672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25674      # a path prefixed by /cygdrive for fixpath to work.
25675      new_path="$CYGWIN_ROOT_PATH$input_path"
25676    fi
25677  fi
25678
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25687
25688  path="$BOOT_JDK"
25689  has_colon=`$ECHO $path | $GREP ^.:`
25690  new_path="$path"
25691  if test "x$has_colon" = x; then
25692    # Not in mixed or Windows style, start by that.
25693    new_path=`cmd //c echo $path`
25694  fi
25695
25696
25697  input_path="$new_path"
25698  # Check if we need to convert this using DOS-style short mode. If the path
25699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25700  # take no chances and rewrite it.
25701  # Note: m4 eats our [], so we need to use [ and ] instead.
25702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25703  if test "x$has_forbidden_chars" != x; then
25704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25706  fi
25707
25708
25709  windows_path="$new_path"
25710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25711    unix_path=`$CYGPATH -u "$windows_path"`
25712    new_path="$unix_path"
25713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25715    new_path="$unix_path"
25716  fi
25717
25718  if test "x$path" != "x$new_path"; then
25719    BOOT_JDK="$new_path"
25720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25722  fi
25723
25724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25726
25727    else
25728      # We're on a unix platform. Hooray! :)
25729      path="$BOOT_JDK"
25730      has_space=`$ECHO "$path" | $GREP " "`
25731      if test "x$has_space" != x; then
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25735      fi
25736
25737      # Use eval to expand a potential ~
25738      eval path="$path"
25739      if test ! -f "$path" && test ! -d "$path"; then
25740        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25741      fi
25742
25743      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25744    fi
25745  fi
25746
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25748$as_echo_n "checking for Boot JDK... " >&6; }
25749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25750$as_echo "$BOOT_JDK" >&6; }
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25752$as_echo_n "checking Boot JDK version... " >&6; }
25753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25755$as_echo "$BOOT_JDK_VERSION" >&6; }
25756          fi # end check jdk version
25757        fi # end check javac
25758      fi # end check java
25759    fi # end check boot jdk found
25760  fi
25761
25762  fi
25763
25764
25765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25767      # Do we have a bin/java?
25768      if test ! -x "$BOOT_JDK/bin/java"; then
25769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25771        BOOT_JDK_FOUND=no
25772      else
25773        # Do we have a bin/javac?
25774        if test ! -x "$BOOT_JDK/bin/javac"; then
25775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25779          BOOT_JDK_FOUND=no
25780        else
25781          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25782          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25783
25784          # Extra M4 quote needed to protect [] in grep expression.
25785          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25786          if test "x$FOUND_CORRECT_VERSION" = x; then
25787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25789            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25790$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25791            BOOT_JDK_FOUND=no
25792          else
25793            # We're done! :-)
25794            BOOT_JDK_FOUND=yes
25795
25796  # Only process if variable expands to non-empty
25797
25798  if test "x$BOOT_JDK" != x; then
25799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25800
25801  # Input might be given as Windows format, start by converting to
25802  # unix format.
25803  path="$BOOT_JDK"
25804  new_path=`$CYGPATH -u "$path"`
25805
25806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25809  # "foo.exe" is OK but "foo" is an error.
25810  #
25811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25812  # It is also a way to make sure we got the proper file name for the real test later on.
25813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25814  if test "x$test_shortpath" = x; then
25815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25818  fi
25819
25820  # Call helper function which possibly converts this using DOS-style short mode.
25821  # If so, the updated path is stored in $new_path.
25822
25823  input_path="$new_path"
25824  # Check if we need to convert this using DOS-style short mode. If the path
25825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25826  # take no chances and rewrite it.
25827  # Note: m4 eats our [], so we need to use [ and ] instead.
25828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25829  if test "x$has_forbidden_chars" != x; then
25830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25834      # Going to short mode and back again did indeed matter. Since short mode is
25835      # case insensitive, let's make it lowercase to improve readability.
25836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25837      # Now convert it back to Unix-style (cygpath)
25838      input_path=`$CYGPATH -u "$shortmode_path"`
25839      new_path="$input_path"
25840    fi
25841  fi
25842
25843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25844  if test "x$test_cygdrive_prefix" = x; then
25845    # As a simple fix, exclude /usr/bin since it's not a real path.
25846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25848      # a path prefixed by /cygdrive for fixpath to work.
25849      new_path="$CYGWIN_ROOT_PATH$input_path"
25850    fi
25851  fi
25852
25853
25854  if test "x$path" != "x$new_path"; then
25855    BOOT_JDK="$new_path"
25856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25858  fi
25859
25860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25861
25862  path="$BOOT_JDK"
25863  has_colon=`$ECHO $path | $GREP ^.:`
25864  new_path="$path"
25865  if test "x$has_colon" = x; then
25866    # Not in mixed or Windows style, start by that.
25867    new_path=`cmd //c echo $path`
25868  fi
25869
25870
25871  input_path="$new_path"
25872  # Check if we need to convert this using DOS-style short mode. If the path
25873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25874  # take no chances and rewrite it.
25875  # Note: m4 eats our [], so we need to use [ and ] instead.
25876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25877  if test "x$has_forbidden_chars" != x; then
25878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25880  fi
25881
25882
25883  windows_path="$new_path"
25884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25885    unix_path=`$CYGPATH -u "$windows_path"`
25886    new_path="$unix_path"
25887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25889    new_path="$unix_path"
25890  fi
25891
25892  if test "x$path" != "x$new_path"; then
25893    BOOT_JDK="$new_path"
25894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25896  fi
25897
25898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25900
25901    else
25902      # We're on a unix platform. Hooray! :)
25903      path="$BOOT_JDK"
25904      has_space=`$ECHO "$path" | $GREP " "`
25905      if test "x$has_space" != x; then
25906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25909      fi
25910
25911      # Use eval to expand a potential ~
25912      eval path="$path"
25913      if test ! -f "$path" && test ! -d "$path"; then
25914        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25915      fi
25916
25917      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25918    fi
25919  fi
25920
25921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25922$as_echo_n "checking for Boot JDK... " >&6; }
25923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25924$as_echo "$BOOT_JDK" >&6; }
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25926$as_echo_n "checking Boot JDK version... " >&6; }
25927            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25929$as_echo "$BOOT_JDK_VERSION" >&6; }
25930          fi # end check jdk version
25931        fi # end check javac
25932      fi # end check java
25933    fi # end check boot jdk found
25934  fi
25935
25936
25937  # If we haven't found anything yet, we've truly lost. Give up.
25938  if test "x$BOOT_JDK_FOUND" = xno; then
25939
25940  # Print a helpful message on how to acquire the necessary build dependency.
25941  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25942  MISSING_DEPENDENCY=openjdk
25943
25944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25945    cygwin_help $MISSING_DEPENDENCY
25946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25947    msys_help $MISSING_DEPENDENCY
25948  else
25949    PKGHANDLER_COMMAND=
25950
25951    case $PKGHANDLER in
25952      apt-get)
25953        apt_help     $MISSING_DEPENDENCY ;;
25954      yum)
25955        yum_help     $MISSING_DEPENDENCY ;;
25956      port)
25957        port_help    $MISSING_DEPENDENCY ;;
25958      pkgutil)
25959        pkgutil_help $MISSING_DEPENDENCY ;;
25960      pkgadd)
25961        pkgadd_help  $MISSING_DEPENDENCY ;;
25962    esac
25963
25964    if test "x$PKGHANDLER_COMMAND" != x; then
25965      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25966    fi
25967  fi
25968
25969    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25970$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25971    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25972$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25973    as_fn_error $? "Cannot continue" "$LINENO" 5
25974  fi
25975
25976
25977
25978  # Setup tools from the Boot JDK.
25979
25980  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25981
25982  # Publish this variable in the help.
25983
25984
25985  if test "x$JAVA" = x; then
25986    # The variable is not set by user, try to locate tool using the code snippet
25987
25988      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25989$as_echo_n "checking for java in Boot JDK... " >&6; }
25990      JAVA=$BOOT_JDK/bin/java
25991      if test ! -x $JAVA; then
25992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25993$as_echo "not found" >&6; }
25994        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25995$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25996        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25997      fi
25998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25999$as_echo "ok" >&6; }
26000
26001
26002  else
26003    # The variable is set, but is it from the command line or the environment?
26004
26005    # Try to remove the string !JAVA! from our list.
26006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26008      # If it failed, the variable was not from the command line. Ignore it,
26009      # but warn the user (except for BASH, which is always set by the calling BASH).
26010      if test "xJAVA" != xBASH; then
26011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26012$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26013      fi
26014      # Try to locate tool using the code snippet
26015
26016      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26017$as_echo_n "checking for java in Boot JDK... " >&6; }
26018      JAVA=$BOOT_JDK/bin/java
26019      if test ! -x $JAVA; then
26020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26021$as_echo "not found" >&6; }
26022        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26023$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26024        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26025      fi
26026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26027$as_echo "ok" >&6; }
26028
26029
26030    else
26031      # If it succeeded, then it was overridden by the user. We will use it
26032      # for the tool.
26033
26034      # First remove it from the list of overridden variables, so we can test
26035      # for unknown variables in the end.
26036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26037
26038      # Check if the provided tool contains a complete path.
26039      tool_specified="$JAVA"
26040      tool_basename="${tool_specified##*/}"
26041      if test "x$tool_basename" = "x$tool_specified"; then
26042        # A command without a complete path is provided, search $PATH.
26043        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26044$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26045        # Extract the first word of "$tool_basename", so it can be a program name with args.
26046set dummy $tool_basename; ac_word=$2
26047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26048$as_echo_n "checking for $ac_word... " >&6; }
26049if ${ac_cv_path_JAVA+:} false; then :
26050  $as_echo_n "(cached) " >&6
26051else
26052  case $JAVA in
26053  [\\/]* | ?:[\\/]*)
26054  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26055  ;;
26056  *)
26057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26058for as_dir in $PATH
26059do
26060  IFS=$as_save_IFS
26061  test -z "$as_dir" && as_dir=.
26062    for ac_exec_ext in '' $ac_executable_extensions; do
26063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26064    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26066    break 2
26067  fi
26068done
26069  done
26070IFS=$as_save_IFS
26071
26072  ;;
26073esac
26074fi
26075JAVA=$ac_cv_path_JAVA
26076if test -n "$JAVA"; then
26077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26078$as_echo "$JAVA" >&6; }
26079else
26080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26081$as_echo "no" >&6; }
26082fi
26083
26084
26085        if test "x$JAVA" = x; then
26086          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26087        fi
26088      else
26089        # Otherwise we believe it is a complete path. Use it as it is.
26090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26091$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26093$as_echo_n "checking for JAVA... " >&6; }
26094        if test ! -x "$tool_specified"; then
26095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26096$as_echo "not found" >&6; }
26097          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26098        fi
26099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26100$as_echo "$tool_specified" >&6; }
26101      fi
26102    fi
26103  fi
26104
26105
26106
26107  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26108
26109  # Publish this variable in the help.
26110
26111
26112  if test "x$JAVAC" = x; then
26113    # The variable is not set by user, try to locate tool using the code snippet
26114
26115      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26116$as_echo_n "checking for javac in Boot JDK... " >&6; }
26117      JAVAC=$BOOT_JDK/bin/javac
26118      if test ! -x $JAVAC; then
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26120$as_echo "not found" >&6; }
26121        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26122$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26123        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26124      fi
26125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26126$as_echo "ok" >&6; }
26127
26128
26129  else
26130    # The variable is set, but is it from the command line or the environment?
26131
26132    # Try to remove the string !JAVAC! from our list.
26133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26135      # If it failed, the variable was not from the command line. Ignore it,
26136      # but warn the user (except for BASH, which is always set by the calling BASH).
26137      if test "xJAVAC" != xBASH; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26139$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26140      fi
26141      # Try to locate tool using the code snippet
26142
26143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26144$as_echo_n "checking for javac in Boot JDK... " >&6; }
26145      JAVAC=$BOOT_JDK/bin/javac
26146      if test ! -x $JAVAC; then
26147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26148$as_echo "not found" >&6; }
26149        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26150$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26151        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26152      fi
26153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26154$as_echo "ok" >&6; }
26155
26156
26157    else
26158      # If it succeeded, then it was overridden by the user. We will use it
26159      # for the tool.
26160
26161      # First remove it from the list of overridden variables, so we can test
26162      # for unknown variables in the end.
26163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26164
26165      # Check if the provided tool contains a complete path.
26166      tool_specified="$JAVAC"
26167      tool_basename="${tool_specified##*/}"
26168      if test "x$tool_basename" = "x$tool_specified"; then
26169        # A command without a complete path is provided, search $PATH.
26170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26171$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26172        # Extract the first word of "$tool_basename", so it can be a program name with args.
26173set dummy $tool_basename; ac_word=$2
26174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26175$as_echo_n "checking for $ac_word... " >&6; }
26176if ${ac_cv_path_JAVAC+:} false; then :
26177  $as_echo_n "(cached) " >&6
26178else
26179  case $JAVAC in
26180  [\\/]* | ?:[\\/]*)
26181  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26182  ;;
26183  *)
26184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26185for as_dir in $PATH
26186do
26187  IFS=$as_save_IFS
26188  test -z "$as_dir" && as_dir=.
26189    for ac_exec_ext in '' $ac_executable_extensions; do
26190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26191    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26193    break 2
26194  fi
26195done
26196  done
26197IFS=$as_save_IFS
26198
26199  ;;
26200esac
26201fi
26202JAVAC=$ac_cv_path_JAVAC
26203if test -n "$JAVAC"; then
26204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26205$as_echo "$JAVAC" >&6; }
26206else
26207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26208$as_echo "no" >&6; }
26209fi
26210
26211
26212        if test "x$JAVAC" = x; then
26213          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26214        fi
26215      else
26216        # Otherwise we believe it is a complete path. Use it as it is.
26217        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26218$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26220$as_echo_n "checking for JAVAC... " >&6; }
26221        if test ! -x "$tool_specified"; then
26222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26223$as_echo "not found" >&6; }
26224          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26225        fi
26226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26227$as_echo "$tool_specified" >&6; }
26228      fi
26229    fi
26230  fi
26231
26232
26233
26234  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26235
26236  # Publish this variable in the help.
26237
26238
26239  if test "x$JAVAH" = x; then
26240    # The variable is not set by user, try to locate tool using the code snippet
26241
26242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26243$as_echo_n "checking for javah in Boot JDK... " >&6; }
26244      JAVAH=$BOOT_JDK/bin/javah
26245      if test ! -x $JAVAH; then
26246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26247$as_echo "not found" >&6; }
26248        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26249$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26250        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26251      fi
26252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26253$as_echo "ok" >&6; }
26254
26255
26256  else
26257    # The variable is set, but is it from the command line or the environment?
26258
26259    # Try to remove the string !JAVAH! from our list.
26260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26262      # If it failed, the variable was not from the command line. Ignore it,
26263      # but warn the user (except for BASH, which is always set by the calling BASH).
26264      if test "xJAVAH" != xBASH; then
26265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26266$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26267      fi
26268      # Try to locate tool using the code snippet
26269
26270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26271$as_echo_n "checking for javah in Boot JDK... " >&6; }
26272      JAVAH=$BOOT_JDK/bin/javah
26273      if test ! -x $JAVAH; then
26274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26275$as_echo "not found" >&6; }
26276        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26277$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26278        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26279      fi
26280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26281$as_echo "ok" >&6; }
26282
26283
26284    else
26285      # If it succeeded, then it was overridden by the user. We will use it
26286      # for the tool.
26287
26288      # First remove it from the list of overridden variables, so we can test
26289      # for unknown variables in the end.
26290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26291
26292      # Check if the provided tool contains a complete path.
26293      tool_specified="$JAVAH"
26294      tool_basename="${tool_specified##*/}"
26295      if test "x$tool_basename" = "x$tool_specified"; then
26296        # A command without a complete path is provided, search $PATH.
26297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26298$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26299        # Extract the first word of "$tool_basename", so it can be a program name with args.
26300set dummy $tool_basename; ac_word=$2
26301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26302$as_echo_n "checking for $ac_word... " >&6; }
26303if ${ac_cv_path_JAVAH+:} false; then :
26304  $as_echo_n "(cached) " >&6
26305else
26306  case $JAVAH in
26307  [\\/]* | ?:[\\/]*)
26308  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26309  ;;
26310  *)
26311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26312for as_dir in $PATH
26313do
26314  IFS=$as_save_IFS
26315  test -z "$as_dir" && as_dir=.
26316    for ac_exec_ext in '' $ac_executable_extensions; do
26317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26318    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26320    break 2
26321  fi
26322done
26323  done
26324IFS=$as_save_IFS
26325
26326  ;;
26327esac
26328fi
26329JAVAH=$ac_cv_path_JAVAH
26330if test -n "$JAVAH"; then
26331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26332$as_echo "$JAVAH" >&6; }
26333else
26334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26335$as_echo "no" >&6; }
26336fi
26337
26338
26339        if test "x$JAVAH" = x; then
26340          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26341        fi
26342      else
26343        # Otherwise we believe it is a complete path. Use it as it is.
26344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26345$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26347$as_echo_n "checking for JAVAH... " >&6; }
26348        if test ! -x "$tool_specified"; then
26349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26350$as_echo "not found" >&6; }
26351          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26352        fi
26353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26354$as_echo "$tool_specified" >&6; }
26355      fi
26356    fi
26357  fi
26358
26359
26360
26361  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26362
26363  # Publish this variable in the help.
26364
26365
26366  if test "x$JAR" = x; then
26367    # The variable is not set by user, try to locate tool using the code snippet
26368
26369      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26370$as_echo_n "checking for jar in Boot JDK... " >&6; }
26371      JAR=$BOOT_JDK/bin/jar
26372      if test ! -x $JAR; then
26373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26374$as_echo "not found" >&6; }
26375        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26376$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26377        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26378      fi
26379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26380$as_echo "ok" >&6; }
26381
26382
26383  else
26384    # The variable is set, but is it from the command line or the environment?
26385
26386    # Try to remove the string !JAR! from our list.
26387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26389      # If it failed, the variable was not from the command line. Ignore it,
26390      # but warn the user (except for BASH, which is always set by the calling BASH).
26391      if test "xJAR" != xBASH; then
26392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26393$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26394      fi
26395      # Try to locate tool using the code snippet
26396
26397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26398$as_echo_n "checking for jar in Boot JDK... " >&6; }
26399      JAR=$BOOT_JDK/bin/jar
26400      if test ! -x $JAR; then
26401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26402$as_echo "not found" >&6; }
26403        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26404$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26405        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26406      fi
26407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26408$as_echo "ok" >&6; }
26409
26410
26411    else
26412      # If it succeeded, then it was overridden by the user. We will use it
26413      # for the tool.
26414
26415      # First remove it from the list of overridden variables, so we can test
26416      # for unknown variables in the end.
26417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26418
26419      # Check if the provided tool contains a complete path.
26420      tool_specified="$JAR"
26421      tool_basename="${tool_specified##*/}"
26422      if test "x$tool_basename" = "x$tool_specified"; then
26423        # A command without a complete path is provided, search $PATH.
26424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26425$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26426        # Extract the first word of "$tool_basename", so it can be a program name with args.
26427set dummy $tool_basename; ac_word=$2
26428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26429$as_echo_n "checking for $ac_word... " >&6; }
26430if ${ac_cv_path_JAR+:} false; then :
26431  $as_echo_n "(cached) " >&6
26432else
26433  case $JAR in
26434  [\\/]* | ?:[\\/]*)
26435  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26436  ;;
26437  *)
26438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26439for as_dir in $PATH
26440do
26441  IFS=$as_save_IFS
26442  test -z "$as_dir" && as_dir=.
26443    for ac_exec_ext in '' $ac_executable_extensions; do
26444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26445    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26447    break 2
26448  fi
26449done
26450  done
26451IFS=$as_save_IFS
26452
26453  ;;
26454esac
26455fi
26456JAR=$ac_cv_path_JAR
26457if test -n "$JAR"; then
26458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26459$as_echo "$JAR" >&6; }
26460else
26461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26462$as_echo "no" >&6; }
26463fi
26464
26465
26466        if test "x$JAR" = x; then
26467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26468        fi
26469      else
26470        # Otherwise we believe it is a complete path. Use it as it is.
26471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26472$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26474$as_echo_n "checking for JAR... " >&6; }
26475        if test ! -x "$tool_specified"; then
26476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26477$as_echo "not found" >&6; }
26478          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26479        fi
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26481$as_echo "$tool_specified" >&6; }
26482      fi
26483    fi
26484  fi
26485
26486
26487
26488  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26489
26490  # Publish this variable in the help.
26491
26492
26493  if test "x$JARSIGNER" = x; then
26494    # The variable is not set by user, try to locate tool using the code snippet
26495
26496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26497$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26498      JARSIGNER=$BOOT_JDK/bin/jarsigner
26499      if test ! -x $JARSIGNER; then
26500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26501$as_echo "not found" >&6; }
26502        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26503$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26504        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26505      fi
26506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26507$as_echo "ok" >&6; }
26508
26509
26510  else
26511    # The variable is set, but is it from the command line or the environment?
26512
26513    # Try to remove the string !JARSIGNER! from our list.
26514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26516      # If it failed, the variable was not from the command line. Ignore it,
26517      # but warn the user (except for BASH, which is always set by the calling BASH).
26518      if test "xJARSIGNER" != xBASH; then
26519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26520$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26521      fi
26522      # Try to locate tool using the code snippet
26523
26524      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26525$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26526      JARSIGNER=$BOOT_JDK/bin/jarsigner
26527      if test ! -x $JARSIGNER; then
26528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26529$as_echo "not found" >&6; }
26530        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26531$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26532        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26533      fi
26534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26535$as_echo "ok" >&6; }
26536
26537
26538    else
26539      # If it succeeded, then it was overridden by the user. We will use it
26540      # for the tool.
26541
26542      # First remove it from the list of overridden variables, so we can test
26543      # for unknown variables in the end.
26544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26545
26546      # Check if the provided tool contains a complete path.
26547      tool_specified="$JARSIGNER"
26548      tool_basename="${tool_specified##*/}"
26549      if test "x$tool_basename" = "x$tool_specified"; then
26550        # A command without a complete path is provided, search $PATH.
26551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26552$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26553        # Extract the first word of "$tool_basename", so it can be a program name with args.
26554set dummy $tool_basename; ac_word=$2
26555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26556$as_echo_n "checking for $ac_word... " >&6; }
26557if ${ac_cv_path_JARSIGNER+:} false; then :
26558  $as_echo_n "(cached) " >&6
26559else
26560  case $JARSIGNER in
26561  [\\/]* | ?:[\\/]*)
26562  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26563  ;;
26564  *)
26565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26566for as_dir in $PATH
26567do
26568  IFS=$as_save_IFS
26569  test -z "$as_dir" && as_dir=.
26570    for ac_exec_ext in '' $ac_executable_extensions; do
26571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26572    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26574    break 2
26575  fi
26576done
26577  done
26578IFS=$as_save_IFS
26579
26580  ;;
26581esac
26582fi
26583JARSIGNER=$ac_cv_path_JARSIGNER
26584if test -n "$JARSIGNER"; then
26585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26586$as_echo "$JARSIGNER" >&6; }
26587else
26588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26589$as_echo "no" >&6; }
26590fi
26591
26592
26593        if test "x$JARSIGNER" = x; then
26594          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26595        fi
26596      else
26597        # Otherwise we believe it is a complete path. Use it as it is.
26598        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26599$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26601$as_echo_n "checking for JARSIGNER... " >&6; }
26602        if test ! -x "$tool_specified"; then
26603          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26604$as_echo "not found" >&6; }
26605          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26606        fi
26607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26608$as_echo "$tool_specified" >&6; }
26609      fi
26610    fi
26611  fi
26612
26613
26614
26615  # Finally, set some other options...
26616
26617  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26618  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26619
26620
26621
26622
26623###############################################################################
26624#
26625# Configure the sources to use. We can add or override individual directories.
26626#
26627###############################################################################
26628
26629
26630  # Where are the sources. Any of these can be overridden
26631  # using --with-override-corba and the likes.
26632  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26633  CORBA_TOPDIR="$SRC_ROOT/corba"
26634  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26635  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26636  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26637  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26638  JDK_TOPDIR="$SRC_ROOT/jdk"
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649  ###############################################################################
26650  #
26651  # Pickup additional source for a component from outside of the source root
26652  # or override source for a component.
26653  #
26654
26655# Check whether --with-add-source-root was given.
26656if test "${with_add_source_root+set}" = set; then :
26657  withval=$with_add_source_root;
26658fi
26659
26660
26661
26662# Check whether --with-override-source-root was given.
26663if test "${with_override_source_root+set}" = set; then :
26664  withval=$with_override_source_root;
26665fi
26666
26667
26668
26669# Check whether --with-adds-and-overrides was given.
26670if test "${with_adds_and_overrides+set}" = set; then :
26671  withval=$with_adds_and_overrides;
26672fi
26673
26674
26675  if test "x$with_adds_and_overrides" != x; then
26676    with_add_source_root="$with_adds_and_overrides/adds"
26677    with_override_source_root="$with_adds_and_overrides/overrides"
26678  fi
26679
26680  if test "x$with_add_source_root" != x; then
26681    if ! test -d $with_add_source_root; then
26682      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26683    fi
26684    CURDIR="$PWD"
26685    cd "$with_add_source_root"
26686    ADD_SRC_ROOT="`pwd`"
26687    cd "$CURDIR"
26688    # Verify that the addon source root does not have any root makefiles.
26689    # If it does, then it is usually an error, prevent this.
26690    if test -f $with_add_source_root/langtools/make/Makefile; then
26691      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
26692    fi
26693    if test -f $with_add_source_root/corba/make/Makefile; then
26694      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
26695    fi
26696    if test -f $with_add_source_root/jaxp/make/Makefile; then
26697      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
26698    fi
26699    if test -f $with_add_source_root/jaxws/make/Makefile; then
26700      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
26701    fi
26702    if test -f $with_add_source_root/hotspot/make/Makefile; then
26703      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
26704    fi
26705    if test -f $with_add_source_root/nashorn/make/Makefile; then
26706      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
26707    fi
26708    if test -f $with_add_source_root/jdk/make/Makefile; then
26709      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
26710    fi
26711  fi
26712
26713
26714  if test "x$with_override_source_root" != x; then
26715    if ! test -d $with_override_source_root; then
26716      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26717    fi
26718    CURDIR="$PWD"
26719    cd "$with_override_source_root"
26720    OVERRIDE_SRC_ROOT="`pwd`"
26721    cd "$CURDIR"
26722    if test -f $with_override_source_root/langtools/make/Makefile; then
26723      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
26724    fi
26725    if test -f $with_override_source_root/corba/make/Makefile; then
26726      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
26727    fi
26728    if test -f $with_override_source_root/jaxp/make/Makefile; then
26729      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
26730    fi
26731    if test -f $with_override_source_root/jaxws/make/Makefile; then
26732      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
26733    fi
26734    if test -f $with_override_source_root/hotspot/make/Makefile; then
26735      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
26736    fi
26737    if test -f $with_override_source_root/nashorn/make/Makefile; then
26738      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
26739    fi
26740    if test -f $with_override_source_root/jdk/make/Makefile; then
26741      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
26742    fi
26743  fi
26744
26745
26746  ###############################################################################
26747  #
26748  # Override a repo completely, this is used for example when you have 3 small
26749  # development sandboxes of the langtools sources and want to avoid having 3 full
26750  # OpenJDK sources checked out on disk.
26751  #
26752  # Assuming that the 3 langtools sandboxes are located here:
26753  # /home/fredrik/sandbox1/langtools
26754  # /home/fredrik/sandbox2/langtools
26755  # /home/fredrik/sandbox3/langtools
26756  #
26757  # From the source root you create build subdirs manually:
26758  #     mkdir -p build1 build2 build3
26759  # in each build directory run:
26760  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26761  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26762  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26763  #
26764
26765
26766# Check whether --with-override-langtools was given.
26767if test "${with_override_langtools+set}" = set; then :
26768  withval=$with_override_langtools;
26769fi
26770
26771
26772
26773# Check whether --with-override-corba was given.
26774if test "${with_override_corba+set}" = set; then :
26775  withval=$with_override_corba;
26776fi
26777
26778
26779
26780# Check whether --with-override-jaxp was given.
26781if test "${with_override_jaxp+set}" = set; then :
26782  withval=$with_override_jaxp;
26783fi
26784
26785
26786
26787# Check whether --with-override-jaxws was given.
26788if test "${with_override_jaxws+set}" = set; then :
26789  withval=$with_override_jaxws;
26790fi
26791
26792
26793
26794# Check whether --with-override-hotspot was given.
26795if test "${with_override_hotspot+set}" = set; then :
26796  withval=$with_override_hotspot;
26797fi
26798
26799
26800
26801# Check whether --with-override-nashorn was given.
26802if test "${with_override_nashorn+set}" = set; then :
26803  withval=$with_override_nashorn;
26804fi
26805
26806
26807
26808# Check whether --with-override-jdk was given.
26809if test "${with_override_jdk+set}" = set; then :
26810  withval=$with_override_jdk;
26811fi
26812
26813
26814  if test "x$with_override_langtools" != x; then
26815    CURDIR="$PWD"
26816    cd "$with_override_langtools"
26817    LANGTOOLS_TOPDIR="`pwd`"
26818    cd "$CURDIR"
26819    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26820      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26821    fi
26822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26823$as_echo_n "checking if langtools should be overridden... " >&6; }
26824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26825$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26826  fi
26827  if test "x$with_override_corba" != x; then
26828    CURDIR="$PWD"
26829    cd "$with_override_corba"
26830    CORBA_TOPDIR="`pwd`"
26831    cd "$CURDIR"
26832    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26833      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26834    fi
26835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26836$as_echo_n "checking if corba should be overridden... " >&6; }
26837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26838$as_echo "yes with $CORBA_TOPDIR" >&6; }
26839  fi
26840  if test "x$with_override_jaxp" != x; then
26841    CURDIR="$PWD"
26842    cd "$with_override_jaxp"
26843    JAXP_TOPDIR="`pwd`"
26844    cd "$CURDIR"
26845    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26846      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26847    fi
26848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26849$as_echo_n "checking if jaxp should be overridden... " >&6; }
26850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26851$as_echo "yes with $JAXP_TOPDIR" >&6; }
26852  fi
26853  if test "x$with_override_jaxws" != x; then
26854    CURDIR="$PWD"
26855    cd "$with_override_jaxws"
26856    JAXWS_TOPDIR="`pwd`"
26857    cd "$CURDIR"
26858    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26859      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26860    fi
26861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26862$as_echo_n "checking if jaxws should be overridden... " >&6; }
26863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26864$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26865  fi
26866  if test "x$with_override_hotspot" != x; then
26867    CURDIR="$PWD"
26868    cd "$with_override_hotspot"
26869    HOTSPOT_TOPDIR="`pwd`"
26870    cd "$CURDIR"
26871    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26872      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26873    fi
26874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26875$as_echo_n "checking if hotspot should be overridden... " >&6; }
26876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26877$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26878  fi
26879  if test "x$with_override_nashorn" != x; then
26880    CURDIR="$PWD"
26881    cd "$with_override_nashorn"
26882    NASHORN_TOPDIR="`pwd`"
26883    cd "$CURDIR"
26884    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26885      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26886    fi
26887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26888$as_echo_n "checking if nashorn should be overridden... " >&6; }
26889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26890$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26891  fi
26892  if test "x$with_override_jdk" != x; then
26893    CURDIR="$PWD"
26894    cd "$with_override_jdk"
26895    JDK_TOPDIR="`pwd`"
26896    cd "$CURDIR"
26897    if ! test -f $JDK_TOPDIR/make/Makefile; then
26898      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26899    fi
26900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26901$as_echo_n "checking if JDK should be overridden... " >&6; }
26902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26903$as_echo "yes with $JDK_TOPDIR" >&6; }
26904  fi
26905
26906
26907  BUILD_OUTPUT="$OUTPUT_ROOT"
26908
26909
26910  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26911  BUILD_HOTSPOT=true
26912
26913
26914
26915# Check whether --with-import-hotspot was given.
26916if test "${with_import_hotspot+set}" = set; then :
26917  withval=$with_import_hotspot;
26918fi
26919
26920  if test "x$with_import_hotspot" != x; then
26921    CURDIR="$PWD"
26922    cd "$with_import_hotspot"
26923    HOTSPOT_DIST="`pwd`"
26924    cd "$CURDIR"
26925    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26926      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26927    fi
26928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26929$as_echo_n "checking if hotspot should be imported... " >&6; }
26930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26931$as_echo "yes from $HOTSPOT_DIST" >&6; }
26932    BUILD_HOTSPOT=false
26933  fi
26934
26935  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26936
26937
26938###############################################################################
26939#
26940# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26941# native code.
26942#
26943###############################################################################
26944
26945# First determine the toolchain type (compiler family)
26946
26947
26948# Check whether --with-toolchain-type was given.
26949if test "${with_toolchain_type+set}" = set; then :
26950  withval=$with_toolchain_type;
26951fi
26952
26953
26954  # Use indirect variable referencing
26955  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26956  VALID_TOOLCHAINS=${!toolchain_var_name}
26957
26958  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26959    if test -n "$XCODEBUILD"; then
26960      # On Mac OS X, default toolchain to clang after Xcode 5
26961      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26962      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26963      if test $? -ne 0; then
26964        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26965      fi
26966      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26967          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26968          $CUT -f 1 -d .`
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26970$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26971      if test $XCODE_MAJOR_VERSION -ge 5; then
26972          DEFAULT_TOOLCHAIN="clang"
26973      else
26974          DEFAULT_TOOLCHAIN="gcc"
26975      fi
26976    else
26977      # If Xcode is not installed, but the command line tools are
26978      # then we can't run xcodebuild. On these systems we should
26979      # default to clang
26980      DEFAULT_TOOLCHAIN="clang"
26981    fi
26982  else
26983    # First toolchain type in the list is the default
26984    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26985  fi
26986
26987  if test "x$with_toolchain_type" = xlist; then
26988    # List all toolchains
26989    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26990$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26991    for toolchain in $VALID_TOOLCHAINS; do
26992      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26993      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26994      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26995    done
26996
26997    exit 0
26998  elif test "x$with_toolchain_type" != x; then
26999    # User override; check that it is valid
27000    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27001      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27002$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27003      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27004$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27005      as_fn_error $? "Cannot continue." "$LINENO" 5
27006    fi
27007    TOOLCHAIN_TYPE=$with_toolchain_type
27008  else
27009    # No flag given, use default
27010    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27011  fi
27012
27013
27014  TOOLCHAIN_CC_BINARY_clang="clang"
27015  TOOLCHAIN_CC_BINARY_gcc="gcc"
27016  TOOLCHAIN_CC_BINARY_microsoft="cl"
27017  TOOLCHAIN_CC_BINARY_solstudio="cc"
27018  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27019
27020  TOOLCHAIN_CXX_BINARY_clang="clang++"
27021  TOOLCHAIN_CXX_BINARY_gcc="g++"
27022  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27023  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27024  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27025
27026  # Use indirect variable referencing
27027  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27028  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27029  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27030  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27031  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27032  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27033
27034
27035  # Define filename patterns
27036  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27037    LIBRARY_PREFIX=
27038    SHARED_LIBRARY_SUFFIX='.dll'
27039    STATIC_LIBRARY_SUFFIX='.lib'
27040    SHARED_LIBRARY='$1.dll'
27041    STATIC_LIBRARY='$1.lib'
27042    OBJ_SUFFIX='.obj'
27043    EXE_SUFFIX='.exe'
27044  else
27045    LIBRARY_PREFIX=lib
27046    SHARED_LIBRARY_SUFFIX='.so'
27047    STATIC_LIBRARY_SUFFIX='.a'
27048    SHARED_LIBRARY='lib$1.so'
27049    STATIC_LIBRARY='lib$1.a'
27050    OBJ_SUFFIX='.o'
27051    EXE_SUFFIX=''
27052    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27053      SHARED_LIBRARY='lib$1.dylib'
27054      SHARED_LIBRARY_SUFFIX='.dylib'
27055    fi
27056  fi
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27068    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27069$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27070  else
27071    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27072$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27073  fi
27074
27075
27076# Then detect the actual binaries needed
27077
27078  # FIXME: Is this needed?
27079  ac_ext=cpp
27080ac_cpp='$CXXCPP $CPPFLAGS'
27081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27084
27085
27086  # Store the CFLAGS etc passed to the configure script.
27087  ORG_CFLAGS="$CFLAGS"
27088  ORG_CXXFLAGS="$CXXFLAGS"
27089
27090  # autoconf magic only relies on PATH, so update it if tools dir is specified
27091  OLD_PATH="$PATH"
27092
27093  # On Windows, we need to detect the visual studio installation first.
27094  # This will change the PATH, but we need to keep that new PATH even
27095  # after toolchain detection is done, since the compiler (on x86) uses
27096  # it for DLL resolution in runtime.
27097  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27098      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27099
27100  # Store path to cygwin link.exe to help excluding it when searching for
27101  # VS linker. This must be done before changing the PATH when looking for VS.
27102  # Extract the first word of "link", so it can be a program name with args.
27103set dummy link; ac_word=$2
27104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27105$as_echo_n "checking for $ac_word... " >&6; }
27106if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27107  $as_echo_n "(cached) " >&6
27108else
27109  case $CYGWIN_LINK in
27110  [\\/]* | ?:[\\/]*)
27111  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27112  ;;
27113  *)
27114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27115for as_dir in $PATH
27116do
27117  IFS=$as_save_IFS
27118  test -z "$as_dir" && as_dir=.
27119    for ac_exec_ext in '' $ac_executable_extensions; do
27120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27121    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27123    break 2
27124  fi
27125done
27126  done
27127IFS=$as_save_IFS
27128
27129  ;;
27130esac
27131fi
27132CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27133if test -n "$CYGWIN_LINK"; then
27134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27135$as_echo "$CYGWIN_LINK" >&6; }
27136else
27137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27138$as_echo "no" >&6; }
27139fi
27140
27141
27142  if test "x$CYGWIN_LINK" != x; then
27143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27144$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27145    "$CYGWIN_LINK" --version > /dev/null
27146    if test $? -eq 0 ; then
27147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27148$as_echo "yes" >&6; }
27149    else
27150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27151$as_echo "no" >&6; }
27152      # This might be the VS linker. Don't exclude it later on.
27153      CYGWIN_LINK=""
27154    fi
27155  fi
27156
27157  # First-hand choice is to locate and run the vsvars bat file.
27158
27159
27160# Check whether --with-toolchain-version was given.
27161if test "${with_toolchain_version+set}" = set; then :
27162  withval=$with_toolchain_version;
27163fi
27164
27165
27166  if test "x$with_toolchain_version" = xlist; then
27167    # List all toolchains
27168    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27169$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27170    for version in $VALID_VS_VERSIONS; do
27171      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27172      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27173    done
27174
27175    exit 0
27176  elif test "x$DEVKIT_VS_VERSION" != x; then
27177    VS_VERSION=$DEVKIT_VS_VERSION
27178    TOOLCHAIN_VERSION=$VS_VERSION
27179    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27180    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27181    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27182    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27183    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27184    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27185
27186    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27187    # can still be exported as INCLUDE for compiler invocations without
27188    # SYSROOT_CFLAGS
27189    OLDIFS="$IFS"
27190    IFS=";"
27191    for i in $DEVKIT_VS_INCLUDE; do
27192      ipath=$i
27193
27194  unix_path="$ipath"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    windows_path=`$CYGPATH -m "$unix_path"`
27197    ipath="$windows_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    windows_path=`cmd //c echo $unix_path`
27200    ipath="$windows_path"
27201  fi
27202
27203      VS_INCLUDE="$VS_INCLUDE;$ipath"
27204    done
27205    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27206    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27207    for i in $DEVKIT_VS_LIB; do
27208      libpath=$i
27209
27210  unix_path="$libpath"
27211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27212    windows_path=`$CYGPATH -m "$unix_path"`
27213    libpath="$windows_path"
27214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27215    windows_path=`cmd //c echo $unix_path`
27216    libpath="$windows_path"
27217  fi
27218
27219      VS_LIB="$VS_LIB;$libpath"
27220    done
27221    IFS="$OLDIFS"
27222
27223    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27224$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27225
27226  elif test "x$with_toolchain_version" != x; then
27227    # User override; check that it is valid
27228    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27229      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27230$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27231      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27232$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27233      as_fn_error $? "Cannot continue." "$LINENO" 5
27234    fi
27235    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27236  else
27237    # No flag given, use default
27238    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27239  fi
27240
27241  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27242
27243  VS_VERSION="$VS_VERSION"
27244  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27245  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27246  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27247  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27248
27249  # When using --with-tools-dir, assume it points to the correct and default
27250  # version of Visual Studio or that --with-toolchain-version was also set.
27251  if test "x$with_tools_dir" != x; then
27252
27253  if test "x$VS_ENV_CMD" = x; then
27254    VS_VERSION="${VS_VERSION}"
27255    VS_BASE="$with_tools_dir/../.."
27256    METHOD="--with-tools-dir"
27257
27258    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27259      VCVARSFILE="vc/bin/vcvars32.bat"
27260    else
27261      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27262    fi
27263
27264
27265  windows_path="$VS_BASE"
27266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27267    unix_path=`$CYGPATH -u "$windows_path"`
27268    VS_BASE="$unix_path"
27269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27271    VS_BASE="$unix_path"
27272  fi
27273
27274    if test -d "$VS_BASE"; then
27275      if test -f "$VS_BASE/$VCVARSFILE"; then
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27277$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27278        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27279        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27280        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27281        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27282      else
27283        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27284$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27285        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27286$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27287      fi
27288    fi
27289  fi
27290
27291
27292  if test "x$VS_ENV_CMD" = x; then
27293    VS_VERSION="${VS_VERSION}"
27294    VS_BASE="$with_tools_dir/../../.."
27295    METHOD="--with-tools-dir"
27296
27297    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27298      VCVARSFILE="vc/bin/vcvars32.bat"
27299    else
27300      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27301    fi
27302
27303
27304  windows_path="$VS_BASE"
27305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27306    unix_path=`$CYGPATH -u "$windows_path"`
27307    VS_BASE="$unix_path"
27308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27310    VS_BASE="$unix_path"
27311  fi
27312
27313    if test -d "$VS_BASE"; then
27314      if test -f "$VS_BASE/$VCVARSFILE"; then
27315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27316$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27317        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27318        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27319        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27320        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27321      else
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27323$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27324        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27325$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27326      fi
27327    fi
27328  fi
27329
27330    if test "x$VS_ENV_CMD" = x; then
27331      # Having specified an argument which is incorrect will produce an instant failure;
27332      # we should not go on looking
27333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27334$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27335      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27336$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27337      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27338$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27339      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27340    fi
27341  fi
27342
27343  VS_ENV_CMD=""
27344  VS_ENV_ARGS=""
27345
27346  if test "x$VS_COMNTOOLS" != x; then
27347
27348  if test "x$VS_ENV_CMD" = x; then
27349    VS_VERSION="${VS_VERSION}"
27350    VS_BASE="$VS_COMNTOOLS/../.."
27351    METHOD="$VS_COMNTOOLS_VAR variable"
27352
27353    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27354      VCVARSFILE="vc/bin/vcvars32.bat"
27355    else
27356      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27357    fi
27358
27359
27360  windows_path="$VS_BASE"
27361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27362    unix_path=`$CYGPATH -u "$windows_path"`
27363    VS_BASE="$unix_path"
27364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27366    VS_BASE="$unix_path"
27367  fi
27368
27369    if test -d "$VS_BASE"; then
27370      if test -f "$VS_BASE/$VCVARSFILE"; then
27371        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27372$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27373        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27374        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27375        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27376        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27377      else
27378        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27379$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27380        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27381$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27382      fi
27383    fi
27384  fi
27385
27386  fi
27387  if test "x$PROGRAMFILES" != x; then
27388
27389  if test "x$VS_ENV_CMD" = x; then
27390    VS_VERSION="${VS_VERSION}"
27391    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27392    METHOD="well-known name"
27393
27394    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27395      VCVARSFILE="vc/bin/vcvars32.bat"
27396    else
27397      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27398    fi
27399
27400
27401  windows_path="$VS_BASE"
27402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27403    unix_path=`$CYGPATH -u "$windows_path"`
27404    VS_BASE="$unix_path"
27405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27407    VS_BASE="$unix_path"
27408  fi
27409
27410    if test -d "$VS_BASE"; then
27411      if test -f "$VS_BASE/$VCVARSFILE"; then
27412        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27413$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27414        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27415        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27416        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27417        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27418      else
27419        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27420$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27421        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27422$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27423      fi
27424    fi
27425  fi
27426
27427  fi
27428  # Work around the insanely named ProgramFiles(x86) env variable
27429  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27430  if test "x$PROGRAMFILES_X86" != x; then
27431
27432  if test "x$VS_ENV_CMD" = x; then
27433    VS_VERSION="${VS_VERSION}"
27434    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27435    METHOD="well-known name"
27436
27437    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27438      VCVARSFILE="vc/bin/vcvars32.bat"
27439    else
27440      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27441    fi
27442
27443
27444  windows_path="$VS_BASE"
27445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27446    unix_path=`$CYGPATH -u "$windows_path"`
27447    VS_BASE="$unix_path"
27448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27450    VS_BASE="$unix_path"
27451  fi
27452
27453    if test -d "$VS_BASE"; then
27454      if test -f "$VS_BASE/$VCVARSFILE"; then
27455        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27456$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27457        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27458        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27459        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27460        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27461      else
27462        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27463$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27464        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27465$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27466      fi
27467    fi
27468  fi
27469
27470  fi
27471
27472  if test "x$VS_ENV_CMD" = x; then
27473    VS_VERSION="${VS_VERSION}"
27474    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27475    METHOD="well-known name"
27476
27477    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27478      VCVARSFILE="vc/bin/vcvars32.bat"
27479    else
27480      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27481    fi
27482
27483
27484  windows_path="$VS_BASE"
27485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27486    unix_path=`$CYGPATH -u "$windows_path"`
27487    VS_BASE="$unix_path"
27488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27490    VS_BASE="$unix_path"
27491  fi
27492
27493    if test -d "$VS_BASE"; then
27494      if test -f "$VS_BASE/$VCVARSFILE"; then
27495        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27496$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27497        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27498        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27499        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27500        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27501      else
27502        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27503$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27504        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27505$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27506      fi
27507    fi
27508  fi
27509
27510
27511  if test "x$VS_ENV_CMD" = x; then
27512    VS_VERSION="${VS_VERSION}"
27513    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27514    METHOD="well-known name"
27515
27516    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27517      VCVARSFILE="vc/bin/vcvars32.bat"
27518    else
27519      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27520    fi
27521
27522
27523  windows_path="$VS_BASE"
27524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27525    unix_path=`$CYGPATH -u "$windows_path"`
27526    VS_BASE="$unix_path"
27527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27529    VS_BASE="$unix_path"
27530  fi
27531
27532    if test -d "$VS_BASE"; then
27533      if test -f "$VS_BASE/$VCVARSFILE"; then
27534        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27535$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27536        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27537        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27538        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27539        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27540      else
27541        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27542$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27543        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27544$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27545      fi
27546    fi
27547  fi
27548
27549
27550  if test "x$SDK_INSTALL_DIR" != x; then
27551    if test "x$ProgramW6432" != x; then
27552
27553  if test "x$VS_ENV_CMD" = x; then
27554    VS_VERSION="${VS_VERSION}"
27555    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27556    METHOD="well-known name"
27557
27558  windows_path="$WIN_SDK_BASE"
27559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27560    unix_path=`$CYGPATH -u "$windows_path"`
27561    WIN_SDK_BASE="$unix_path"
27562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27564    WIN_SDK_BASE="$unix_path"
27565  fi
27566
27567    if test -d "$WIN_SDK_BASE"; then
27568      # There have been cases of partial or broken SDK installations. A missing
27569      # lib dir is not going to work.
27570      if test ! -d "$WIN_SDK_BASE/lib"; then
27571        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27572$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27573        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27574$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27575      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27576        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27577$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27578        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27579        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27580          VS_ENV_ARGS="/x86"
27581        else
27582          VS_ENV_ARGS="/x64"
27583        fi
27584        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27585        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27586        # TODO: improve detection for other versions of SDK
27587        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27588      else
27589        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27590$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27591        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27592$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27593      fi
27594    fi
27595  fi
27596
27597    fi
27598    if test "x$PROGRAMW6432" != x; then
27599
27600  if test "x$VS_ENV_CMD" = x; then
27601    VS_VERSION="${VS_VERSION}"
27602    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27603    METHOD="well-known name"
27604
27605  windows_path="$WIN_SDK_BASE"
27606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27607    unix_path=`$CYGPATH -u "$windows_path"`
27608    WIN_SDK_BASE="$unix_path"
27609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27611    WIN_SDK_BASE="$unix_path"
27612  fi
27613
27614    if test -d "$WIN_SDK_BASE"; then
27615      # There have been cases of partial or broken SDK installations. A missing
27616      # lib dir is not going to work.
27617      if test ! -d "$WIN_SDK_BASE/lib"; then
27618        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27619$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27620        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27621$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27622      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27623        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27624$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27625        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27626        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27627          VS_ENV_ARGS="/x86"
27628        else
27629          VS_ENV_ARGS="/x64"
27630        fi
27631        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27632        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27633        # TODO: improve detection for other versions of SDK
27634        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27635      else
27636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27637$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27639$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27640      fi
27641    fi
27642  fi
27643
27644    fi
27645    if test "x$PROGRAMFILES" != x; then
27646
27647  if test "x$VS_ENV_CMD" = x; then
27648    VS_VERSION="${VS_VERSION}"
27649    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27650    METHOD="well-known name"
27651
27652  windows_path="$WIN_SDK_BASE"
27653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27654    unix_path=`$CYGPATH -u "$windows_path"`
27655    WIN_SDK_BASE="$unix_path"
27656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27658    WIN_SDK_BASE="$unix_path"
27659  fi
27660
27661    if test -d "$WIN_SDK_BASE"; then
27662      # There have been cases of partial or broken SDK installations. A missing
27663      # lib dir is not going to work.
27664      if test ! -d "$WIN_SDK_BASE/lib"; then
27665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27666$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27668$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27669      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27670        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27671$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27672        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27673        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27674          VS_ENV_ARGS="/x86"
27675        else
27676          VS_ENV_ARGS="/x64"
27677        fi
27678        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27679        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27680        # TODO: improve detection for other versions of SDK
27681        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27682      else
27683        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27684$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27685        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27686$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27687      fi
27688    fi
27689  fi
27690
27691    fi
27692
27693  if test "x$VS_ENV_CMD" = x; then
27694    VS_VERSION="${VS_VERSION}"
27695    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27696    METHOD="well-known name"
27697
27698  windows_path="$WIN_SDK_BASE"
27699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27700    unix_path=`$CYGPATH -u "$windows_path"`
27701    WIN_SDK_BASE="$unix_path"
27702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27704    WIN_SDK_BASE="$unix_path"
27705  fi
27706
27707    if test -d "$WIN_SDK_BASE"; then
27708      # There have been cases of partial or broken SDK installations. A missing
27709      # lib dir is not going to work.
27710      if test ! -d "$WIN_SDK_BASE/lib"; then
27711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27712$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27713        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27714$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27715      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27717$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27718        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27719        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27720          VS_ENV_ARGS="/x86"
27721        else
27722          VS_ENV_ARGS="/x64"
27723        fi
27724        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27725        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27726        # TODO: improve detection for other versions of SDK
27727        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27728      else
27729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27730$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27732$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27733      fi
27734    fi
27735  fi
27736
27737
27738  if test "x$VS_ENV_CMD" = x; then
27739    VS_VERSION="${VS_VERSION}"
27740    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27741    METHOD="well-known name"
27742
27743  windows_path="$WIN_SDK_BASE"
27744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27745    unix_path=`$CYGPATH -u "$windows_path"`
27746    WIN_SDK_BASE="$unix_path"
27747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27749    WIN_SDK_BASE="$unix_path"
27750  fi
27751
27752    if test -d "$WIN_SDK_BASE"; then
27753      # There have been cases of partial or broken SDK installations. A missing
27754      # lib dir is not going to work.
27755      if test ! -d "$WIN_SDK_BASE/lib"; then
27756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27757$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27758        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27759$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27760      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27762$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27763        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27764        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27765          VS_ENV_ARGS="/x86"
27766        else
27767          VS_ENV_ARGS="/x64"
27768        fi
27769        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27770        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27771        # TODO: improve detection for other versions of SDK
27772        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27773      else
27774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27775$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27777$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27778      fi
27779    fi
27780  fi
27781
27782  fi
27783
27784    if test "x$VS_ENV_CMD" != x; then
27785      TOOLCHAIN_VERSION=$VS_VERSION
27786      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27787      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27788      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27789      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27790      # The rest of the variables are already evaled while probing
27791      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27792$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27793      break
27794    fi
27795  done
27796
27797
27798  # If we have a devkit, skip all of the below.
27799  if test "x$DEVKIT_VS_VERSION" = x; then
27800    if test "x$VS_ENV_CMD" != x; then
27801      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27802
27803  # Only process if variable expands to non-empty
27804
27805  if test "x$VS_ENV_CMD" != x; then
27806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27807
27808  # First separate the path from the arguments. This will split at the first
27809  # space.
27810  complete="$VS_ENV_CMD"
27811  path="${complete%% *}"
27812  tmp="$complete EOL"
27813  arguments="${tmp#* }"
27814
27815  # Input might be given as Windows format, start by converting to
27816  # unix format.
27817  new_path=`$CYGPATH -u "$path"`
27818
27819  # Now try to locate executable using which
27820  new_path=`$WHICH "$new_path" 2> /dev/null`
27821  # bat and cmd files are not always considered executable in cygwin causing which
27822  # to not find them
27823  if test "x$new_path" = x \
27824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27826    new_path=`$CYGPATH -u "$path"`
27827  fi
27828  if test "x$new_path" = x; then
27829    # Oops. Which didn't find the executable.
27830    # The splitting of arguments from the executable at a space might have been incorrect,
27831    # since paths with space are more likely in Windows. Give it another try with the whole
27832    # argument.
27833    path="$complete"
27834    arguments="EOL"
27835    new_path=`$CYGPATH -u "$path"`
27836    new_path=`$WHICH "$new_path" 2> /dev/null`
27837    # bat and cmd files are not always considered executable in cygwin causing which
27838    # to not find them
27839    if test "x$new_path" = x \
27840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27842      new_path=`$CYGPATH -u "$path"`
27843    fi
27844    if test "x$new_path" = x; then
27845      # It's still not found. Now this is an unrecoverable error.
27846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27847$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27848      has_space=`$ECHO "$complete" | $GREP " "`
27849      if test "x$has_space" != x; then
27850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27852      fi
27853      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27854    fi
27855  fi
27856
27857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27860  # "foo.exe" is OK but "foo" is an error.
27861  #
27862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27863  # It is also a way to make sure we got the proper file name for the real test later on.
27864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27865  if test "x$test_shortpath" = x; then
27866    # Short path failed, file does not exist as specified.
27867    # Try adding .exe or .cmd
27868    if test -f "${new_path}.exe"; then
27869      input_to_shortpath="${new_path}.exe"
27870    elif test -f "${new_path}.cmd"; then
27871      input_to_shortpath="${new_path}.cmd"
27872    else
27873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27874$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27877      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27878    fi
27879  else
27880    input_to_shortpath="$new_path"
27881  fi
27882
27883  # Call helper function which possibly converts this using DOS-style short mode.
27884  # If so, the updated path is stored in $new_path.
27885  new_path="$input_to_shortpath"
27886
27887  input_path="$input_to_shortpath"
27888  # Check if we need to convert this using DOS-style short mode. If the path
27889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27890  # take no chances and rewrite it.
27891  # Note: m4 eats our [], so we need to use [ and ] instead.
27892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27893  if test "x$has_forbidden_chars" != x; then
27894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27898      # Going to short mode and back again did indeed matter. Since short mode is
27899      # case insensitive, let's make it lowercase to improve readability.
27900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27901      # Now convert it back to Unix-style (cygpath)
27902      input_path=`$CYGPATH -u "$shortmode_path"`
27903      new_path="$input_path"
27904    fi
27905  fi
27906
27907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27908  if test "x$test_cygdrive_prefix" = x; then
27909    # As a simple fix, exclude /usr/bin since it's not a real path.
27910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27912      # a path prefixed by /cygdrive for fixpath to work.
27913      new_path="$CYGWIN_ROOT_PATH$input_path"
27914    fi
27915  fi
27916
27917  # remove trailing .exe if any
27918  new_path="${new_path/%.exe/}"
27919
27920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27921
27922  # First separate the path from the arguments. This will split at the first
27923  # space.
27924  complete="$VS_ENV_CMD"
27925  path="${complete%% *}"
27926  tmp="$complete EOL"
27927  arguments="${tmp#* }"
27928
27929  # Input might be given as Windows format, start by converting to
27930  # unix format.
27931  new_path="$path"
27932
27933  windows_path="$new_path"
27934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27935    unix_path=`$CYGPATH -u "$windows_path"`
27936    new_path="$unix_path"
27937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27939    new_path="$unix_path"
27940  fi
27941
27942
27943  # Now try to locate executable using which
27944  new_path=`$WHICH "$new_path" 2> /dev/null`
27945
27946  if test "x$new_path" = x; then
27947    # Oops. Which didn't find the executable.
27948    # The splitting of arguments from the executable at a space might have been incorrect,
27949    # since paths with space are more likely in Windows. Give it another try with the whole
27950    # argument.
27951    path="$complete"
27952    arguments="EOL"
27953    new_path="$path"
27954
27955  windows_path="$new_path"
27956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27957    unix_path=`$CYGPATH -u "$windows_path"`
27958    new_path="$unix_path"
27959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27961    new_path="$unix_path"
27962  fi
27963
27964
27965    new_path=`$WHICH "$new_path" 2> /dev/null`
27966    # bat and cmd files are not always considered executable in MSYS causing which
27967    # to not find them
27968    if test "x$new_path" = x \
27969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27971      new_path="$path"
27972
27973  windows_path="$new_path"
27974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27975    unix_path=`$CYGPATH -u "$windows_path"`
27976    new_path="$unix_path"
27977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27979    new_path="$unix_path"
27980  fi
27981
27982    fi
27983
27984    if test "x$new_path" = x; then
27985      # It's still not found. Now this is an unrecoverable error.
27986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27987$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27988      has_space=`$ECHO "$complete" | $GREP " "`
27989      if test "x$has_space" != x; then
27990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27992      fi
27993      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27994    fi
27995  fi
27996
27997  # Now new_path has a complete unix path to the binary
27998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27999    # Keep paths in /bin as-is, but remove trailing .exe if any
28000    new_path="${new_path/%.exe/}"
28001    # Do not save /bin paths to all_fixpath_prefixes!
28002  else
28003    # Not in mixed or Windows style, start by that.
28004    new_path=`cmd //c echo $new_path`
28005
28006  input_path="$new_path"
28007  # Check if we need to convert this using DOS-style short mode. If the path
28008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28009  # take no chances and rewrite it.
28010  # Note: m4 eats our [], so we need to use [ and ] instead.
28011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28012  if test "x$has_forbidden_chars" != x; then
28013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28015  fi
28016
28017    # Output is in $new_path
28018
28019  windows_path="$new_path"
28020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28021    unix_path=`$CYGPATH -u "$windows_path"`
28022    new_path="$unix_path"
28023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28025    new_path="$unix_path"
28026  fi
28027
28028    # remove trailing .exe if any
28029    new_path="${new_path/%.exe/}"
28030
28031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28033  fi
28034
28035    else
28036      # We're on a unix platform. Hooray! :)
28037      # First separate the path from the arguments. This will split at the first
28038      # space.
28039      complete="$VS_ENV_CMD"
28040      path="${complete%% *}"
28041      tmp="$complete EOL"
28042      arguments="${tmp#* }"
28043
28044      # Cannot rely on the command "which" here since it doesn't always work.
28045      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28046      if test -z "$is_absolute_path"; then
28047        # Path to executable is not absolute. Find it.
28048        IFS_save="$IFS"
28049        IFS=:
28050        for p in $PATH; do
28051          if test -f "$p/$path" && test -x "$p/$path"; then
28052            new_path="$p/$path"
28053            break
28054          fi
28055        done
28056        IFS="$IFS_save"
28057      else
28058        # This is an absolute path, we can use it without further modifications.
28059        new_path="$path"
28060      fi
28061
28062      if test "x$new_path" = x; then
28063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28064$as_echo "$as_me: The path of VS_ENV_CMD, 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}: This might be caused by spaces in the path, which is not allowed." >&5
28068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28069        fi
28070        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28071      fi
28072    fi
28073
28074    # Now join together the path and the arguments once again
28075    if test "x$arguments" != xEOL; then
28076      new_complete="$new_path ${arguments% *}"
28077    else
28078      new_complete="$new_path"
28079    fi
28080
28081    if test "x$complete" != "x$new_complete"; then
28082      VS_ENV_CMD="$new_complete"
28083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28084$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28085    fi
28086  fi
28087
28088
28089      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28090      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28091$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28092
28093      # We need to create a couple of temporary files.
28094      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28095      $MKDIR -p $VS_ENV_TMP_DIR
28096
28097      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28098      # Instead create a shell script which will set the relevant variables when run.
28099      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28100
28101  unix_path="$WINPATH_VS_ENV_CMD"
28102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28103    windows_path=`$CYGPATH -m "$unix_path"`
28104    WINPATH_VS_ENV_CMD="$windows_path"
28105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28106    windows_path=`cmd //c echo $unix_path`
28107    WINPATH_VS_ENV_CMD="$windows_path"
28108  fi
28109
28110      WINPATH_BASH="$BASH"
28111
28112  unix_path="$WINPATH_BASH"
28113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28114    windows_path=`$CYGPATH -m "$unix_path"`
28115    WINPATH_BASH="$windows_path"
28116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28117    windows_path=`cmd //c echo $unix_path`
28118    WINPATH_BASH="$windows_path"
28119  fi
28120
28121
28122      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28123      # script (executable by bash) that will setup the important variables.
28124      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28125      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28126      # This will end up something like:
28127      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28128      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28129      # These will end up something like:
28130      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28131      # The trailing space for everyone except PATH is no typo, but is needed due
28132      # to trailing \ in the Windows paths. These will be stripped later.
28133      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28134          >> $EXTRACT_VC_ENV_BAT_FILE
28135      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28136          >> $EXTRACT_VC_ENV_BAT_FILE
28137      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28138          >> $EXTRACT_VC_ENV_BAT_FILE
28139      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28140          >> $EXTRACT_VC_ENV_BAT_FILE
28141      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28142          >> $EXTRACT_VC_ENV_BAT_FILE
28143      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28144          >> $EXTRACT_VC_ENV_BAT_FILE
28145
28146      # Now execute the newly created bat file.
28147      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28148      # Change directory so we don't need to mess with Windows paths in redirects.
28149      cd $VS_ENV_TMP_DIR
28150      cmd /c extract-vs-env.bat | $CAT
28151      cd $CURDIR
28152
28153      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28154        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28155$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28156        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28157$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28158        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28159$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28160        as_fn_error $? "Cannot continue" "$LINENO" 5
28161      fi
28162
28163      # Now set all paths and other env variables. This will allow the rest of
28164      # the configure script to find and run the compiler in the proper way.
28165      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28166$as_echo "$as_me: Setting extracted environment variables" >&6;}
28167      . $VS_ENV_TMP_DIR/set-vs-env.sh
28168      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28169      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28170    else
28171      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28172      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28173$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28174    fi
28175  fi
28176
28177  # At this point, we should have correct variables in the environment, or we can't continue.
28178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28179$as_echo_n "checking for Visual Studio variables... " >&6; }
28180
28181  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28182      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28183    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28185$as_echo "present but broken" >&6; }
28186      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28187    else
28188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28189$as_echo "ok" >&6; }
28190      # Remove any trailing "\" ";" and " " from the variables.
28191      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28192      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28193      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28194      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28195      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28196      # Remove any paths containing # (typically F#) as that messes up make. This
28197      # is needed if visual studio was installed with F# support.
28198      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28199
28200
28201
28202
28203
28204      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28205      OLDIFS="$IFS"
28206      IFS=";"
28207      for i in $VS_INCLUDE; do
28208        ipath=$i
28209        # Only process non-empty elements
28210        if test "x$ipath" != x; then
28211          IFS="$OLDIFS"
28212          # Check that directory exists before calling fixup_path
28213          testpath=$ipath
28214
28215  windows_path="$testpath"
28216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217    unix_path=`$CYGPATH -u "$windows_path"`
28218    testpath="$unix_path"
28219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28221    testpath="$unix_path"
28222  fi
28223
28224          if test -d "$testpath"; then
28225
28226  # Only process if variable expands to non-empty
28227
28228  if test "x$ipath" != x; then
28229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28230
28231  # Input might be given as Windows format, start by converting to
28232  # unix format.
28233  path="$ipath"
28234  new_path=`$CYGPATH -u "$path"`
28235
28236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28239  # "foo.exe" is OK but "foo" is an error.
28240  #
28241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28242  # It is also a way to make sure we got the proper file name for the real test later on.
28243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28244  if test "x$test_shortpath" = x; then
28245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28246$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28247    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28248  fi
28249
28250  # Call helper function which possibly converts this using DOS-style short mode.
28251  # If so, the updated path is stored in $new_path.
28252
28253  input_path="$new_path"
28254  # Check if we need to convert this using DOS-style short mode. If the path
28255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28256  # take no chances and rewrite it.
28257  # Note: m4 eats our [], so we need to use [ and ] instead.
28258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28259  if test "x$has_forbidden_chars" != x; then
28260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28264      # Going to short mode and back again did indeed matter. Since short mode is
28265      # case insensitive, let's make it lowercase to improve readability.
28266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28267      # Now convert it back to Unix-style (cygpath)
28268      input_path=`$CYGPATH -u "$shortmode_path"`
28269      new_path="$input_path"
28270    fi
28271  fi
28272
28273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28274  if test "x$test_cygdrive_prefix" = x; then
28275    # As a simple fix, exclude /usr/bin since it's not a real path.
28276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28278      # a path prefixed by /cygdrive for fixpath to work.
28279      new_path="$CYGWIN_ROOT_PATH$input_path"
28280    fi
28281  fi
28282
28283
28284  if test "x$path" != "x$new_path"; then
28285    ipath="$new_path"
28286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28287$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28288  fi
28289
28290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28291
28292  path="$ipath"
28293  has_colon=`$ECHO $path | $GREP ^.:`
28294  new_path="$path"
28295  if test "x$has_colon" = x; then
28296    # Not in mixed or Windows style, start by that.
28297    new_path=`cmd //c echo $path`
28298  fi
28299
28300
28301  input_path="$new_path"
28302  # Check if we need to convert this using DOS-style short mode. If the path
28303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28304  # take no chances and rewrite it.
28305  # Note: m4 eats our [], so we need to use [ and ] instead.
28306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28307  if test "x$has_forbidden_chars" != x; then
28308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28310  fi
28311
28312
28313  windows_path="$new_path"
28314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28315    unix_path=`$CYGPATH -u "$windows_path"`
28316    new_path="$unix_path"
28317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28319    new_path="$unix_path"
28320  fi
28321
28322  if test "x$path" != "x$new_path"; then
28323    ipath="$new_path"
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28325$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28326  fi
28327
28328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28330
28331    else
28332      # We're on a unix platform. Hooray! :)
28333      path="$ipath"
28334      has_space=`$ECHO "$path" | $GREP " "`
28335      if test "x$has_space" != x; then
28336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28337$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28339      fi
28340
28341      # Use eval to expand a potential ~
28342      eval path="$path"
28343      if test ! -f "$path" && test ! -d "$path"; then
28344        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28345      fi
28346
28347      ipath="`cd "$path"; $THEPWDCMD -L`"
28348    fi
28349  fi
28350
28351            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28352          fi
28353          IFS=";"
28354        fi
28355      done
28356      # Convert VS_LIB into SYSROOT_LDFLAGS
28357      for i in $VS_LIB; do
28358        libpath=$i
28359        # Only process non-empty elements
28360        if test "x$libpath" != x; then
28361          IFS="$OLDIFS"
28362          # Check that directory exists before calling fixup_path
28363          testpath=$libpath
28364
28365  windows_path="$testpath"
28366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28367    unix_path=`$CYGPATH -u "$windows_path"`
28368    testpath="$unix_path"
28369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28371    testpath="$unix_path"
28372  fi
28373
28374          if test -d "$testpath"; then
28375
28376  # Only process if variable expands to non-empty
28377
28378  if test "x$libpath" != x; then
28379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28380
28381  # Input might be given as Windows format, start by converting to
28382  # unix format.
28383  path="$libpath"
28384  new_path=`$CYGPATH -u "$path"`
28385
28386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28389  # "foo.exe" is OK but "foo" is an error.
28390  #
28391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28392  # It is also a way to make sure we got the proper file name for the real test later on.
28393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28394  if test "x$test_shortpath" = x; then
28395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28396$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28397    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28398  fi
28399
28400  # Call helper function which possibly converts this using DOS-style short mode.
28401  # If so, the updated path is stored in $new_path.
28402
28403  input_path="$new_path"
28404  # Check if we need to convert this using DOS-style short mode. If the path
28405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28406  # take no chances and rewrite it.
28407  # Note: m4 eats our [], so we need to use [ and ] instead.
28408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28409  if test "x$has_forbidden_chars" != x; then
28410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28414      # Going to short mode and back again did indeed matter. Since short mode is
28415      # case insensitive, let's make it lowercase to improve readability.
28416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28417      # Now convert it back to Unix-style (cygpath)
28418      input_path=`$CYGPATH -u "$shortmode_path"`
28419      new_path="$input_path"
28420    fi
28421  fi
28422
28423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28424  if test "x$test_cygdrive_prefix" = x; then
28425    # As a simple fix, exclude /usr/bin since it's not a real path.
28426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28428      # a path prefixed by /cygdrive for fixpath to work.
28429      new_path="$CYGWIN_ROOT_PATH$input_path"
28430    fi
28431  fi
28432
28433
28434  if test "x$path" != "x$new_path"; then
28435    libpath="$new_path"
28436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28437$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28438  fi
28439
28440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28441
28442  path="$libpath"
28443  has_colon=`$ECHO $path | $GREP ^.:`
28444  new_path="$path"
28445  if test "x$has_colon" = x; then
28446    # Not in mixed or Windows style, start by that.
28447    new_path=`cmd //c echo $path`
28448  fi
28449
28450
28451  input_path="$new_path"
28452  # Check if we need to convert this using DOS-style short mode. If the path
28453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28454  # take no chances and rewrite it.
28455  # Note: m4 eats our [], so we need to use [ and ] instead.
28456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28457  if test "x$has_forbidden_chars" != x; then
28458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28460  fi
28461
28462
28463  windows_path="$new_path"
28464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28465    unix_path=`$CYGPATH -u "$windows_path"`
28466    new_path="$unix_path"
28467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28469    new_path="$unix_path"
28470  fi
28471
28472  if test "x$path" != "x$new_path"; then
28473    libpath="$new_path"
28474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28475$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28476  fi
28477
28478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28480
28481    else
28482      # We're on a unix platform. Hooray! :)
28483      path="$libpath"
28484      has_space=`$ECHO "$path" | $GREP " "`
28485      if test "x$has_space" != x; then
28486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28487$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28489      fi
28490
28491      # Use eval to expand a potential ~
28492      eval path="$path"
28493      if test ! -f "$path" && test ! -d "$path"; then
28494        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28495      fi
28496
28497      libpath="`cd "$path"; $THEPWDCMD -L`"
28498    fi
28499  fi
28500
28501            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28502          fi
28503          IFS=";"
28504        fi
28505      done
28506      IFS="$OLDIFS"
28507    fi
28508  else
28509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28510$as_echo "not found" >&6; }
28511
28512    if test "x$VS_ENV_CMD" = x; then
28513      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28514$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28515      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28516$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28517    else
28518      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28519$as_echo "$as_me: Running the extraction script failed." >&6;}
28520    fi
28521    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28522$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28524$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28525    as_fn_error $? "Cannot continue" "$LINENO" 5
28526  fi
28527
28528    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28529    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28530    PATH="$VS_PATH"
28531    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28532    export INCLUDE="$VS_INCLUDE"
28533    export LIB="$VS_LIB"
28534  fi
28535
28536  # For solaris we really need solaris tools, and not the GNU equivalent.
28537  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28538  # so add that to path before starting to probe.
28539  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28540  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28541    PATH="/usr/ccs/bin:$PATH"
28542  fi
28543
28544  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28545  # override all other locations.
28546  if test "x$TOOLCHAIN_PATH" != x; then
28547    PATH=$TOOLCHAIN_PATH:$PATH
28548  fi
28549
28550
28551  #
28552  # Setup the compilers (CC and CXX)
28553  #
28554
28555  COMPILER_NAME=C
28556  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28557
28558  if test "x$CC" != x; then
28559    # User has supplied compiler name already, always let that override.
28560    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28561$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28562    if test "x`basename $CC`" = "x$CC"; then
28563      # A command without a complete path is provided, search $PATH.
28564
28565      for ac_prog in $CC
28566do
28567  # Extract the first word of "$ac_prog", so it can be a program name with args.
28568set dummy $ac_prog; ac_word=$2
28569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28570$as_echo_n "checking for $ac_word... " >&6; }
28571if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28572  $as_echo_n "(cached) " >&6
28573else
28574  case $POTENTIAL_CC in
28575  [\\/]* | ?:[\\/]*)
28576  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28577  ;;
28578  *)
28579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28580for as_dir in $PATH
28581do
28582  IFS=$as_save_IFS
28583  test -z "$as_dir" && as_dir=.
28584    for ac_exec_ext in '' $ac_executable_extensions; do
28585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28586    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28588    break 2
28589  fi
28590done
28591  done
28592IFS=$as_save_IFS
28593
28594  ;;
28595esac
28596fi
28597POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28598if test -n "$POTENTIAL_CC"; then
28599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28600$as_echo "$POTENTIAL_CC" >&6; }
28601else
28602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28603$as_echo "no" >&6; }
28604fi
28605
28606
28607  test -n "$POTENTIAL_CC" && break
28608done
28609
28610      if test "x$POTENTIAL_CC" != x; then
28611        CC=$POTENTIAL_CC
28612      else
28613        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28614      fi
28615    else
28616      # Otherwise it might already be a complete path
28617      if test ! -x "$CC"; then
28618        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28619      fi
28620    fi
28621  else
28622    # No user supplied value. Locate compiler ourselves.
28623
28624    # If we are cross compiling, assume cross compilation tools follows the
28625    # cross compilation standard where they are prefixed with the autoconf
28626    # standard name for the target. For example the binary
28627    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28628    # If we are not cross compiling, then the default compiler name will be
28629    # used.
28630
28631    CC=
28632    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28633    # before checking the rest of the PATH.
28634    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28635    # step, this should not be necessary.
28636    if test -n "$TOOLCHAIN_PATH"; then
28637      PATH_save="$PATH"
28638      PATH="$TOOLCHAIN_PATH"
28639      for ac_prog in $SEARCH_LIST
28640do
28641  # Extract the first word of "$ac_prog", so it can be a program name with args.
28642set dummy $ac_prog; ac_word=$2
28643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28644$as_echo_n "checking for $ac_word... " >&6; }
28645if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28646  $as_echo_n "(cached) " >&6
28647else
28648  case $TOOLCHAIN_PATH_CC in
28649  [\\/]* | ?:[\\/]*)
28650  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28651  ;;
28652  *)
28653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28654for as_dir in $PATH
28655do
28656  IFS=$as_save_IFS
28657  test -z "$as_dir" && as_dir=.
28658    for ac_exec_ext in '' $ac_executable_extensions; do
28659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28660    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28662    break 2
28663  fi
28664done
28665  done
28666IFS=$as_save_IFS
28667
28668  ;;
28669esac
28670fi
28671TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28672if test -n "$TOOLCHAIN_PATH_CC"; then
28673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28674$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28675else
28676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28677$as_echo "no" >&6; }
28678fi
28679
28680
28681  test -n "$TOOLCHAIN_PATH_CC" && break
28682done
28683
28684      CC=$TOOLCHAIN_PATH_CC
28685      PATH="$PATH_save"
28686    fi
28687
28688    # AC_PATH_PROGS can't be run multiple times with the same variable,
28689    # so create a new name for this run.
28690    if test "x$CC" = x; then
28691      for ac_prog in $SEARCH_LIST
28692do
28693  # Extract the first word of "$ac_prog", so it can be a program name with args.
28694set dummy $ac_prog; ac_word=$2
28695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28696$as_echo_n "checking for $ac_word... " >&6; }
28697if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28698  $as_echo_n "(cached) " >&6
28699else
28700  case $POTENTIAL_CC in
28701  [\\/]* | ?:[\\/]*)
28702  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28703  ;;
28704  *)
28705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28706for as_dir in $PATH
28707do
28708  IFS=$as_save_IFS
28709  test -z "$as_dir" && as_dir=.
28710    for ac_exec_ext in '' $ac_executable_extensions; do
28711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28712    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28714    break 2
28715  fi
28716done
28717  done
28718IFS=$as_save_IFS
28719
28720  ;;
28721esac
28722fi
28723POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28724if test -n "$POTENTIAL_CC"; then
28725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28726$as_echo "$POTENTIAL_CC" >&6; }
28727else
28728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28729$as_echo "no" >&6; }
28730fi
28731
28732
28733  test -n "$POTENTIAL_CC" && break
28734done
28735
28736      CC=$POTENTIAL_CC
28737    fi
28738
28739    if test "x$CC" = x; then
28740
28741  # Print a helpful message on how to acquire the necessary build dependency.
28742  # devkit is the help tag: freetype, cups, pulse, alsa etc
28743  MISSING_DEPENDENCY=devkit
28744
28745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28746    cygwin_help $MISSING_DEPENDENCY
28747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28748    msys_help $MISSING_DEPENDENCY
28749  else
28750    PKGHANDLER_COMMAND=
28751
28752    case $PKGHANDLER in
28753      apt-get)
28754        apt_help     $MISSING_DEPENDENCY ;;
28755      yum)
28756        yum_help     $MISSING_DEPENDENCY ;;
28757      port)
28758        port_help    $MISSING_DEPENDENCY ;;
28759      pkgutil)
28760        pkgutil_help $MISSING_DEPENDENCY ;;
28761      pkgadd)
28762        pkgadd_help  $MISSING_DEPENDENCY ;;
28763    esac
28764
28765    if test "x$PKGHANDLER_COMMAND" != x; then
28766      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28767    fi
28768  fi
28769
28770      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28771    fi
28772  fi
28773
28774  # Now we have a compiler binary in CC. Make sure it's okay.
28775
28776  # Only process if variable expands to non-empty
28777
28778  if test "x$CC" != x; then
28779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28780
28781  # First separate the path from the arguments. This will split at the first
28782  # space.
28783  complete="$CC"
28784  path="${complete%% *}"
28785  tmp="$complete EOL"
28786  arguments="${tmp#* }"
28787
28788  # Input might be given as Windows format, start by converting to
28789  # unix format.
28790  new_path=`$CYGPATH -u "$path"`
28791
28792  # Now try to locate executable using which
28793  new_path=`$WHICH "$new_path" 2> /dev/null`
28794  # bat and cmd files are not always considered executable in cygwin causing which
28795  # to not find them
28796  if test "x$new_path" = x \
28797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28799    new_path=`$CYGPATH -u "$path"`
28800  fi
28801  if test "x$new_path" = x; then
28802    # Oops. Which didn't find the executable.
28803    # The splitting of arguments from the executable at a space might have been incorrect,
28804    # since paths with space are more likely in Windows. Give it another try with the whole
28805    # argument.
28806    path="$complete"
28807    arguments="EOL"
28808    new_path=`$CYGPATH -u "$path"`
28809    new_path=`$WHICH "$new_path" 2> /dev/null`
28810    # bat and cmd files are not always considered executable in cygwin causing which
28811    # to not find them
28812    if test "x$new_path" = x \
28813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28815      new_path=`$CYGPATH -u "$path"`
28816    fi
28817    if test "x$new_path" = x; then
28818      # It's still not found. Now this is an unrecoverable error.
28819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28820$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28821      has_space=`$ECHO "$complete" | $GREP " "`
28822      if test "x$has_space" != x; then
28823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28825      fi
28826      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28827    fi
28828  fi
28829
28830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28833  # "foo.exe" is OK but "foo" is an error.
28834  #
28835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28836  # It is also a way to make sure we got the proper file name for the real test later on.
28837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28838  if test "x$test_shortpath" = x; then
28839    # Short path failed, file does not exist as specified.
28840    # Try adding .exe or .cmd
28841    if test -f "${new_path}.exe"; then
28842      input_to_shortpath="${new_path}.exe"
28843    elif test -f "${new_path}.cmd"; then
28844      input_to_shortpath="${new_path}.cmd"
28845    else
28846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28847$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28850      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28851    fi
28852  else
28853    input_to_shortpath="$new_path"
28854  fi
28855
28856  # Call helper function which possibly converts this using DOS-style short mode.
28857  # If so, the updated path is stored in $new_path.
28858  new_path="$input_to_shortpath"
28859
28860  input_path="$input_to_shortpath"
28861  # Check if we need to convert this using DOS-style short mode. If the path
28862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28863  # take no chances and rewrite it.
28864  # Note: m4 eats our [], so we need to use [ and ] instead.
28865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28866  if test "x$has_forbidden_chars" != x; then
28867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28871      # Going to short mode and back again did indeed matter. Since short mode is
28872      # case insensitive, let's make it lowercase to improve readability.
28873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28874      # Now convert it back to Unix-style (cygpath)
28875      input_path=`$CYGPATH -u "$shortmode_path"`
28876      new_path="$input_path"
28877    fi
28878  fi
28879
28880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28881  if test "x$test_cygdrive_prefix" = x; then
28882    # As a simple fix, exclude /usr/bin since it's not a real path.
28883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28885      # a path prefixed by /cygdrive for fixpath to work.
28886      new_path="$CYGWIN_ROOT_PATH$input_path"
28887    fi
28888  fi
28889
28890  # remove trailing .exe if any
28891  new_path="${new_path/%.exe/}"
28892
28893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28894
28895  # First separate the path from the arguments. This will split at the first
28896  # space.
28897  complete="$CC"
28898  path="${complete%% *}"
28899  tmp="$complete EOL"
28900  arguments="${tmp#* }"
28901
28902  # Input might be given as Windows format, start by converting to
28903  # unix format.
28904  new_path="$path"
28905
28906  windows_path="$new_path"
28907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28908    unix_path=`$CYGPATH -u "$windows_path"`
28909    new_path="$unix_path"
28910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28912    new_path="$unix_path"
28913  fi
28914
28915
28916  # Now try to locate executable using which
28917  new_path=`$WHICH "$new_path" 2> /dev/null`
28918
28919  if test "x$new_path" = x; then
28920    # Oops. Which didn't find the executable.
28921    # The splitting of arguments from the executable at a space might have been incorrect,
28922    # since paths with space are more likely in Windows. Give it another try with the whole
28923    # argument.
28924    path="$complete"
28925    arguments="EOL"
28926    new_path="$path"
28927
28928  windows_path="$new_path"
28929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28930    unix_path=`$CYGPATH -u "$windows_path"`
28931    new_path="$unix_path"
28932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28934    new_path="$unix_path"
28935  fi
28936
28937
28938    new_path=`$WHICH "$new_path" 2> /dev/null`
28939    # bat and cmd files are not always considered executable in MSYS causing which
28940    # to not find them
28941    if test "x$new_path" = x \
28942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28944      new_path="$path"
28945
28946  windows_path="$new_path"
28947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28948    unix_path=`$CYGPATH -u "$windows_path"`
28949    new_path="$unix_path"
28950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28952    new_path="$unix_path"
28953  fi
28954
28955    fi
28956
28957    if test "x$new_path" = x; then
28958      # It's still not found. Now this is an unrecoverable error.
28959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28960$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28961      has_space=`$ECHO "$complete" | $GREP " "`
28962      if test "x$has_space" != x; then
28963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28965      fi
28966      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28967    fi
28968  fi
28969
28970  # Now new_path has a complete unix path to the binary
28971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28972    # Keep paths in /bin as-is, but remove trailing .exe if any
28973    new_path="${new_path/%.exe/}"
28974    # Do not save /bin paths to all_fixpath_prefixes!
28975  else
28976    # Not in mixed or Windows style, start by that.
28977    new_path=`cmd //c echo $new_path`
28978
28979  input_path="$new_path"
28980  # Check if we need to convert this using DOS-style short mode. If the path
28981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28982  # take no chances and rewrite it.
28983  # Note: m4 eats our [], so we need to use [ and ] instead.
28984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28985  if test "x$has_forbidden_chars" != x; then
28986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28988  fi
28989
28990    # Output is in $new_path
28991
28992  windows_path="$new_path"
28993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28994    unix_path=`$CYGPATH -u "$windows_path"`
28995    new_path="$unix_path"
28996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28998    new_path="$unix_path"
28999  fi
29000
29001    # remove trailing .exe if any
29002    new_path="${new_path/%.exe/}"
29003
29004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29006  fi
29007
29008    else
29009      # We're on a unix platform. Hooray! :)
29010      # First separate the path from the arguments. This will split at the first
29011      # space.
29012      complete="$CC"
29013      path="${complete%% *}"
29014      tmp="$complete EOL"
29015      arguments="${tmp#* }"
29016
29017      # Cannot rely on the command "which" here since it doesn't always work.
29018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29019      if test -z "$is_absolute_path"; then
29020        # Path to executable is not absolute. Find it.
29021        IFS_save="$IFS"
29022        IFS=:
29023        for p in $PATH; do
29024          if test -f "$p/$path" && test -x "$p/$path"; then
29025            new_path="$p/$path"
29026            break
29027          fi
29028        done
29029        IFS="$IFS_save"
29030      else
29031        # This is an absolute path, we can use it without further modifications.
29032        new_path="$path"
29033      fi
29034
29035      if test "x$new_path" = x; then
29036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29037$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29038        has_space=`$ECHO "$complete" | $GREP " "`
29039        if test "x$has_space" != x; then
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29042        fi
29043        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29044      fi
29045    fi
29046
29047    # Now join together the path and the arguments once again
29048    if test "x$arguments" != xEOL; then
29049      new_complete="$new_path ${arguments% *}"
29050    else
29051      new_complete="$new_path"
29052    fi
29053
29054    if test "x$complete" != "x$new_complete"; then
29055      CC="$new_complete"
29056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29057$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29058    fi
29059  fi
29060
29061  TEST_COMPILER="$CC"
29062  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29063  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29064  if test "x$OPENJDK_BUILD_OS" != xaix; then
29065    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29067$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29068
29069  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29070    # Follow a chain of symbolic links. Use readlink
29071    # where it exists, else fall back to horribly
29072    # complicated shell code.
29073    if test "x$READLINK_TESTED" != yes; then
29074      # On MacOSX there is a readlink tool with a different
29075      # purpose than the GNU readlink tool. Check the found readlink.
29076      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29077      if test "x$ISGNU" = x; then
29078        # A readlink that we do not know how to use.
29079        # Are there other non-GNU readlinks out there?
29080        READLINK_TESTED=yes
29081        READLINK=
29082      fi
29083    fi
29084
29085    if test "x$READLINK" != x; then
29086      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29087    else
29088      # Save the current directory for restoring afterwards
29089      STARTDIR=$PWD
29090      COUNTER=0
29091      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29092      sym_link_file=`$BASENAME $TEST_COMPILER`
29093      cd $sym_link_dir
29094      # Use -P flag to resolve symlinks in directories.
29095      cd `$THEPWDCMD -P`
29096      sym_link_dir=`$THEPWDCMD -P`
29097      # Resolve file symlinks
29098      while test $COUNTER -lt 20; do
29099        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29100        if test "x$ISLINK" == x; then
29101          # This is not a symbolic link! We are done!
29102          break
29103        fi
29104        # Again resolve directory symlinks since the target of the just found
29105        # link could be in a different directory
29106        cd `$DIRNAME $ISLINK`
29107        sym_link_dir=`$THEPWDCMD -P`
29108        sym_link_file=`$BASENAME $ISLINK`
29109        let COUNTER=COUNTER+1
29110      done
29111      cd $STARTDIR
29112      TEST_COMPILER=$sym_link_dir/$sym_link_file
29113    fi
29114  fi
29115
29116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29117$as_echo "$TEST_COMPILER" >&6; }
29118  fi
29119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29120$as_echo_n "checking if CC is disguised ccache... " >&6; }
29121
29122  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29123  if test "x$COMPILER_BASENAME" = "xccache"; then
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29125$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29126    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29127    # We want to control ccache invocation ourselves, so ignore this cc and try
29128    # searching again.
29129
29130    # Remove the path to the fake ccache cc from the PATH
29131    RETRY_COMPILER_SAVED_PATH="$PATH"
29132    COMPILER_DIRNAME=`$DIRNAME $CC`
29133    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29134
29135    # Try again looking for our compiler
29136    if test -n "$ac_tool_prefix"; then
29137  for ac_prog in $TOOLCHAIN_CC_BINARY
29138  do
29139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29142$as_echo_n "checking for $ac_word... " >&6; }
29143if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29144  $as_echo_n "(cached) " >&6
29145else
29146  if test -n "$PROPER_COMPILER_CC"; then
29147  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29148else
29149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29150for as_dir in $PATH
29151do
29152  IFS=$as_save_IFS
29153  test -z "$as_dir" && as_dir=.
29154    for ac_exec_ext in '' $ac_executable_extensions; do
29155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29156    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29158    break 2
29159  fi
29160done
29161  done
29162IFS=$as_save_IFS
29163
29164fi
29165fi
29166PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29167if test -n "$PROPER_COMPILER_CC"; then
29168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29169$as_echo "$PROPER_COMPILER_CC" >&6; }
29170else
29171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29172$as_echo "no" >&6; }
29173fi
29174
29175
29176    test -n "$PROPER_COMPILER_CC" && break
29177  done
29178fi
29179if test -z "$PROPER_COMPILER_CC"; then
29180  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29181  for ac_prog in $TOOLCHAIN_CC_BINARY
29182do
29183  # Extract the first word of "$ac_prog", so it can be a program name with args.
29184set dummy $ac_prog; ac_word=$2
29185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29186$as_echo_n "checking for $ac_word... " >&6; }
29187if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29188  $as_echo_n "(cached) " >&6
29189else
29190  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29191  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29192else
29193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29194for as_dir in $PATH
29195do
29196  IFS=$as_save_IFS
29197  test -z "$as_dir" && as_dir=.
29198    for ac_exec_ext in '' $ac_executable_extensions; do
29199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29200    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29202    break 2
29203  fi
29204done
29205  done
29206IFS=$as_save_IFS
29207
29208fi
29209fi
29210ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29211if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29213$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29214else
29215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29216$as_echo "no" >&6; }
29217fi
29218
29219
29220  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29221done
29222
29223  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29224    PROPER_COMPILER_CC=""
29225  else
29226    case $cross_compiling:$ac_tool_warned in
29227yes:)
29228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29230ac_tool_warned=yes ;;
29231esac
29232    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29233  fi
29234fi
29235
29236
29237  # Only process if variable expands to non-empty
29238
29239  if test "x$PROPER_COMPILER_CC" != x; then
29240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29241
29242  # First separate the path from the arguments. This will split at the first
29243  # space.
29244  complete="$PROPER_COMPILER_CC"
29245  path="${complete%% *}"
29246  tmp="$complete EOL"
29247  arguments="${tmp#* }"
29248
29249  # Input might be given as Windows format, start by converting to
29250  # unix format.
29251  new_path=`$CYGPATH -u "$path"`
29252
29253  # Now try to locate executable using which
29254  new_path=`$WHICH "$new_path" 2> /dev/null`
29255  # bat and cmd files are not always considered executable in cygwin causing which
29256  # to not find them
29257  if test "x$new_path" = x \
29258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29260    new_path=`$CYGPATH -u "$path"`
29261  fi
29262  if test "x$new_path" = x; then
29263    # Oops. Which didn't find the executable.
29264    # The splitting of arguments from the executable at a space might have been incorrect,
29265    # since paths with space are more likely in Windows. Give it another try with the whole
29266    # argument.
29267    path="$complete"
29268    arguments="EOL"
29269    new_path=`$CYGPATH -u "$path"`
29270    new_path=`$WHICH "$new_path" 2> /dev/null`
29271    # bat and cmd files are not always considered executable in cygwin causing which
29272    # to not find them
29273    if test "x$new_path" = x \
29274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29276      new_path=`$CYGPATH -u "$path"`
29277    fi
29278    if test "x$new_path" = x; then
29279      # It's still not found. Now this is an unrecoverable error.
29280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29281$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29282      has_space=`$ECHO "$complete" | $GREP " "`
29283      if test "x$has_space" != x; then
29284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29286      fi
29287      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29288    fi
29289  fi
29290
29291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29294  # "foo.exe" is OK but "foo" is an error.
29295  #
29296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29297  # It is also a way to make sure we got the proper file name for the real test later on.
29298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29299  if test "x$test_shortpath" = x; then
29300    # Short path failed, file does not exist as specified.
29301    # Try adding .exe or .cmd
29302    if test -f "${new_path}.exe"; then
29303      input_to_shortpath="${new_path}.exe"
29304    elif test -f "${new_path}.cmd"; then
29305      input_to_shortpath="${new_path}.cmd"
29306    else
29307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29308$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29311      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29312    fi
29313  else
29314    input_to_shortpath="$new_path"
29315  fi
29316
29317  # Call helper function which possibly converts this using DOS-style short mode.
29318  # If so, the updated path is stored in $new_path.
29319  new_path="$input_to_shortpath"
29320
29321  input_path="$input_to_shortpath"
29322  # Check if we need to convert this using DOS-style short mode. If the path
29323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29324  # take no chances and rewrite it.
29325  # Note: m4 eats our [], so we need to use [ and ] instead.
29326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29327  if test "x$has_forbidden_chars" != x; then
29328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29332      # Going to short mode and back again did indeed matter. Since short mode is
29333      # case insensitive, let's make it lowercase to improve readability.
29334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29335      # Now convert it back to Unix-style (cygpath)
29336      input_path=`$CYGPATH -u "$shortmode_path"`
29337      new_path="$input_path"
29338    fi
29339  fi
29340
29341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29342  if test "x$test_cygdrive_prefix" = x; then
29343    # As a simple fix, exclude /usr/bin since it's not a real path.
29344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29346      # a path prefixed by /cygdrive for fixpath to work.
29347      new_path="$CYGWIN_ROOT_PATH$input_path"
29348    fi
29349  fi
29350
29351  # remove trailing .exe if any
29352  new_path="${new_path/%.exe/}"
29353
29354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29355
29356  # First separate the path from the arguments. This will split at the first
29357  # space.
29358  complete="$PROPER_COMPILER_CC"
29359  path="${complete%% *}"
29360  tmp="$complete EOL"
29361  arguments="${tmp#* }"
29362
29363  # Input might be given as Windows format, start by converting to
29364  # unix format.
29365  new_path="$path"
29366
29367  windows_path="$new_path"
29368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29369    unix_path=`$CYGPATH -u "$windows_path"`
29370    new_path="$unix_path"
29371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29373    new_path="$unix_path"
29374  fi
29375
29376
29377  # Now try to locate executable using which
29378  new_path=`$WHICH "$new_path" 2> /dev/null`
29379
29380  if test "x$new_path" = x; then
29381    # Oops. Which didn't find the executable.
29382    # The splitting of arguments from the executable at a space might have been incorrect,
29383    # since paths with space are more likely in Windows. Give it another try with the whole
29384    # argument.
29385    path="$complete"
29386    arguments="EOL"
29387    new_path="$path"
29388
29389  windows_path="$new_path"
29390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29391    unix_path=`$CYGPATH -u "$windows_path"`
29392    new_path="$unix_path"
29393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29395    new_path="$unix_path"
29396  fi
29397
29398
29399    new_path=`$WHICH "$new_path" 2> /dev/null`
29400    # bat and cmd files are not always considered executable in MSYS causing which
29401    # to not find them
29402    if test "x$new_path" = x \
29403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29405      new_path="$path"
29406
29407  windows_path="$new_path"
29408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29409    unix_path=`$CYGPATH -u "$windows_path"`
29410    new_path="$unix_path"
29411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29413    new_path="$unix_path"
29414  fi
29415
29416    fi
29417
29418    if test "x$new_path" = x; then
29419      # It's still not found. Now this is an unrecoverable error.
29420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29421$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29422      has_space=`$ECHO "$complete" | $GREP " "`
29423      if test "x$has_space" != x; then
29424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29426      fi
29427      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29428    fi
29429  fi
29430
29431  # Now new_path has a complete unix path to the binary
29432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29433    # Keep paths in /bin as-is, but remove trailing .exe if any
29434    new_path="${new_path/%.exe/}"
29435    # Do not save /bin paths to all_fixpath_prefixes!
29436  else
29437    # Not in mixed or Windows style, start by that.
29438    new_path=`cmd //c echo $new_path`
29439
29440  input_path="$new_path"
29441  # Check if we need to convert this using DOS-style short mode. If the path
29442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29443  # take no chances and rewrite it.
29444  # Note: m4 eats our [], so we need to use [ and ] instead.
29445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29446  if test "x$has_forbidden_chars" != x; then
29447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29449  fi
29450
29451    # Output is in $new_path
29452
29453  windows_path="$new_path"
29454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29455    unix_path=`$CYGPATH -u "$windows_path"`
29456    new_path="$unix_path"
29457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29459    new_path="$unix_path"
29460  fi
29461
29462    # remove trailing .exe if any
29463    new_path="${new_path/%.exe/}"
29464
29465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29467  fi
29468
29469    else
29470      # We're on a unix platform. Hooray! :)
29471      # First separate the path from the arguments. This will split at the first
29472      # space.
29473      complete="$PROPER_COMPILER_CC"
29474      path="${complete%% *}"
29475      tmp="$complete EOL"
29476      arguments="${tmp#* }"
29477
29478      # Cannot rely on the command "which" here since it doesn't always work.
29479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29480      if test -z "$is_absolute_path"; then
29481        # Path to executable is not absolute. Find it.
29482        IFS_save="$IFS"
29483        IFS=:
29484        for p in $PATH; do
29485          if test -f "$p/$path" && test -x "$p/$path"; then
29486            new_path="$p/$path"
29487            break
29488          fi
29489        done
29490        IFS="$IFS_save"
29491      else
29492        # This is an absolute path, we can use it without further modifications.
29493        new_path="$path"
29494      fi
29495
29496      if test "x$new_path" = x; then
29497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29498$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29499        has_space=`$ECHO "$complete" | $GREP " "`
29500        if test "x$has_space" != x; then
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29503        fi
29504        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29505      fi
29506    fi
29507
29508    # Now join together the path and the arguments once again
29509    if test "x$arguments" != xEOL; then
29510      new_complete="$new_path ${arguments% *}"
29511    else
29512      new_complete="$new_path"
29513    fi
29514
29515    if test "x$complete" != "x$new_complete"; then
29516      PROPER_COMPILER_CC="$new_complete"
29517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29518$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29519    fi
29520  fi
29521
29522    PATH="$RETRY_COMPILER_SAVED_PATH"
29523
29524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29525$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29526
29527  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29528    # Follow a chain of symbolic links. Use readlink
29529    # where it exists, else fall back to horribly
29530    # complicated shell code.
29531    if test "x$READLINK_TESTED" != yes; then
29532      # On MacOSX there is a readlink tool with a different
29533      # purpose than the GNU readlink tool. Check the found readlink.
29534      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29535      if test "x$ISGNU" = x; then
29536        # A readlink that we do not know how to use.
29537        # Are there other non-GNU readlinks out there?
29538        READLINK_TESTED=yes
29539        READLINK=
29540      fi
29541    fi
29542
29543    if test "x$READLINK" != x; then
29544      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29545    else
29546      # Save the current directory for restoring afterwards
29547      STARTDIR=$PWD
29548      COUNTER=0
29549      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29550      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29551      cd $sym_link_dir
29552      # Use -P flag to resolve symlinks in directories.
29553      cd `$THEPWDCMD -P`
29554      sym_link_dir=`$THEPWDCMD -P`
29555      # Resolve file symlinks
29556      while test $COUNTER -lt 20; do
29557        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29558        if test "x$ISLINK" == x; then
29559          # This is not a symbolic link! We are done!
29560          break
29561        fi
29562        # Again resolve directory symlinks since the target of the just found
29563        # link could be in a different directory
29564        cd `$DIRNAME $ISLINK`
29565        sym_link_dir=`$THEPWDCMD -P`
29566        sym_link_file=`$BASENAME $ISLINK`
29567        let COUNTER=COUNTER+1
29568      done
29569      cd $STARTDIR
29570      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29571    fi
29572  fi
29573
29574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29575$as_echo "$PROPER_COMPILER_CC" >&6; }
29576    CC="$PROPER_COMPILER_CC"
29577  else
29578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29579$as_echo "no, keeping CC" >&6; }
29580  fi
29581
29582
29583  COMPILER=$CC
29584  COMPILER_NAME=$COMPILER_NAME
29585
29586  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29587    # cc -V output typically looks like
29588    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29589    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29590    # Check that this is likely to be the Solaris Studio cc.
29591    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29592    if test $? -ne 0; then
29593      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29594      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29595$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29596      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29597$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29598      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29599$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29600      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29601    fi
29602    # Remove usage instructions (if present), and
29603    # collapse compiler output into a single line
29604    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29605        $SED -e 's/ *[Uu]sage:.*//'`
29606    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29607        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29608  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29609    # xlc -qversion output typically looks like
29610    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29611    #     Version: 11.01.0000.0015
29612    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29613    # Check that this is likely to be the IBM XL C compiler.
29614    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29615    if test $? -ne 0; then
29616      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29617      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29618$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29620$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29621      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29622$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29623      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29624    fi
29625    # Collapse compiler output into a single line
29626    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29627    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29628        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29629  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29630    # There is no specific version flag, but all output starts with a version string.
29631    # First line typically looks something like:
29632    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29633    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29634    # Check that this is likely to be Microsoft CL.EXE.
29635    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29636    if test $? -ne 0; then
29637      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29638$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29639      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29640$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29641      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29642    fi
29643    # Collapse compiler output into a single line
29644    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29645    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29646        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29647  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29648    # gcc --version output typically looks like
29649    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29650    #     Copyright (C) 2013 Free Software Foundation, Inc.
29651    #     This is free software; see the source for copying conditions.  There is NO
29652    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29653    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29654    # Check that this is likely to be GCC.
29655    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29656    if test $? -ne 0; then
29657      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29658$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29659      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29660$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29661      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29662    fi
29663    # Remove Copyright and legalese from version string, and
29664    # collapse into a single line
29665    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29666        $SED -e 's/ *Copyright .*//'`
29667    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29668        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29669  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29670    # clang --version output typically looks like
29671    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29672    #    clang version 3.3 (tags/RELEASE_33/final)
29673    # or
29674    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29675    #    Target: x86_64-pc-linux-gnu
29676    #    Thread model: posix
29677    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29678    # Check that this is likely to be clang
29679    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29680    if test $? -ne 0; then
29681      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29682$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29683      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29684$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29685      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29686    fi
29687    # Collapse compiler output into a single line
29688    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29689    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29690        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29691  else
29692      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29693  fi
29694  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29695  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29696  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29697  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29698
29699  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29700$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29701
29702
29703  # Now that we have resolved CC ourself, let autoconf have its go at it
29704  ac_ext=c
29705ac_cpp='$CPP $CPPFLAGS'
29706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29708ac_compiler_gnu=$ac_cv_c_compiler_gnu
29709if test -n "$ac_tool_prefix"; then
29710  for ac_prog in $CC
29711  do
29712    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29713set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29715$as_echo_n "checking for $ac_word... " >&6; }
29716if ${ac_cv_prog_CC+:} false; then :
29717  $as_echo_n "(cached) " >&6
29718else
29719  if test -n "$CC"; then
29720  ac_cv_prog_CC="$CC" # Let the user override the test.
29721else
29722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29723for as_dir in $PATH
29724do
29725  IFS=$as_save_IFS
29726  test -z "$as_dir" && as_dir=.
29727    for ac_exec_ext in '' $ac_executable_extensions; do
29728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29729    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29731    break 2
29732  fi
29733done
29734  done
29735IFS=$as_save_IFS
29736
29737fi
29738fi
29739CC=$ac_cv_prog_CC
29740if test -n "$CC"; then
29741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29742$as_echo "$CC" >&6; }
29743else
29744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29745$as_echo "no" >&6; }
29746fi
29747
29748
29749    test -n "$CC" && break
29750  done
29751fi
29752if test -z "$CC"; then
29753  ac_ct_CC=$CC
29754  for ac_prog in $CC
29755do
29756  # Extract the first word of "$ac_prog", so it can be a program name with args.
29757set dummy $ac_prog; ac_word=$2
29758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29759$as_echo_n "checking for $ac_word... " >&6; }
29760if ${ac_cv_prog_ac_ct_CC+:} false; then :
29761  $as_echo_n "(cached) " >&6
29762else
29763  if test -n "$ac_ct_CC"; then
29764  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29765else
29766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29767for as_dir in $PATH
29768do
29769  IFS=$as_save_IFS
29770  test -z "$as_dir" && as_dir=.
29771    for ac_exec_ext in '' $ac_executable_extensions; do
29772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29773    ac_cv_prog_ac_ct_CC="$ac_prog"
29774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29775    break 2
29776  fi
29777done
29778  done
29779IFS=$as_save_IFS
29780
29781fi
29782fi
29783ac_ct_CC=$ac_cv_prog_ac_ct_CC
29784if test -n "$ac_ct_CC"; then
29785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29786$as_echo "$ac_ct_CC" >&6; }
29787else
29788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29789$as_echo "no" >&6; }
29790fi
29791
29792
29793  test -n "$ac_ct_CC" && break
29794done
29795
29796  if test "x$ac_ct_CC" = x; then
29797    CC=""
29798  else
29799    case $cross_compiling:$ac_tool_warned in
29800yes:)
29801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29803ac_tool_warned=yes ;;
29804esac
29805    CC=$ac_ct_CC
29806  fi
29807fi
29808
29809
29810test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29812as_fn_error $? "no acceptable C compiler found in \$PATH
29813See \`config.log' for more details" "$LINENO" 5; }
29814
29815# Provide some information about the compiler.
29816$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29817set X $ac_compile
29818ac_compiler=$2
29819for ac_option in --version -v -V -qversion; do
29820  { { ac_try="$ac_compiler $ac_option >&5"
29821case "(($ac_try" in
29822  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29823  *) ac_try_echo=$ac_try;;
29824esac
29825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29826$as_echo "$ac_try_echo"; } >&5
29827  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29828  ac_status=$?
29829  if test -s conftest.err; then
29830    sed '10a\
29831... rest of stderr output deleted ...
29832         10q' conftest.err >conftest.er1
29833    cat conftest.er1 >&5
29834  fi
29835  rm -f conftest.er1 conftest.err
29836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29837  test $ac_status = 0; }
29838done
29839
29840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29841/* end confdefs.h.  */
29842
29843int
29844main ()
29845{
29846
29847  ;
29848  return 0;
29849}
29850_ACEOF
29851ac_clean_files_save=$ac_clean_files
29852ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29853# Try to create an executable without -o first, disregard a.out.
29854# It will help us diagnose broken compilers, and finding out an intuition
29855# of exeext.
29856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29857$as_echo_n "checking whether the C compiler works... " >&6; }
29858ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29859
29860# The possible output files:
29861ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29862
29863ac_rmfiles=
29864for ac_file in $ac_files
29865do
29866  case $ac_file in
29867    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29868    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29869  esac
29870done
29871rm -f $ac_rmfiles
29872
29873if { { ac_try="$ac_link_default"
29874case "(($ac_try" in
29875  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29876  *) ac_try_echo=$ac_try;;
29877esac
29878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29879$as_echo "$ac_try_echo"; } >&5
29880  (eval "$ac_link_default") 2>&5
29881  ac_status=$?
29882  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29883  test $ac_status = 0; }; then :
29884  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29885# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29886# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29887# so that the user can short-circuit this test for compilers unknown to
29888# Autoconf.
29889for ac_file in $ac_files ''
29890do
29891  test -f "$ac_file" || continue
29892  case $ac_file in
29893    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29894	;;
29895    [ab].out )
29896	# We found the default executable, but exeext='' is most
29897	# certainly right.
29898	break;;
29899    *.* )
29900	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29901	then :; else
29902	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29903	fi
29904	# We set ac_cv_exeext here because the later test for it is not
29905	# safe: cross compilers may not add the suffix if given an `-o'
29906	# argument, so we may need to know it at that point already.
29907	# Even if this section looks crufty: it has the advantage of
29908	# actually working.
29909	break;;
29910    * )
29911	break;;
29912  esac
29913done
29914test "$ac_cv_exeext" = no && ac_cv_exeext=
29915
29916else
29917  ac_file=''
29918fi
29919if test -z "$ac_file"; then :
29920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29921$as_echo "no" >&6; }
29922$as_echo "$as_me: failed program was:" >&5
29923sed 's/^/| /' conftest.$ac_ext >&5
29924
29925{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29927as_fn_error 77 "C compiler cannot create executables
29928See \`config.log' for more details" "$LINENO" 5; }
29929else
29930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29931$as_echo "yes" >&6; }
29932fi
29933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29934$as_echo_n "checking for C compiler default output file name... " >&6; }
29935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29936$as_echo "$ac_file" >&6; }
29937ac_exeext=$ac_cv_exeext
29938
29939rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29940ac_clean_files=$ac_clean_files_save
29941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29942$as_echo_n "checking for suffix of executables... " >&6; }
29943if { { ac_try="$ac_link"
29944case "(($ac_try" in
29945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29946  *) ac_try_echo=$ac_try;;
29947esac
29948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29949$as_echo "$ac_try_echo"; } >&5
29950  (eval "$ac_link") 2>&5
29951  ac_status=$?
29952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29953  test $ac_status = 0; }; then :
29954  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29955# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29956# work properly (i.e., refer to `conftest.exe'), while it won't with
29957# `rm'.
29958for ac_file in conftest.exe conftest conftest.*; do
29959  test -f "$ac_file" || continue
29960  case $ac_file in
29961    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29962    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29963	  break;;
29964    * ) break;;
29965  esac
29966done
29967else
29968  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29970as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29971See \`config.log' for more details" "$LINENO" 5; }
29972fi
29973rm -f conftest conftest$ac_cv_exeext
29974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29975$as_echo "$ac_cv_exeext" >&6; }
29976
29977rm -f conftest.$ac_ext
29978EXEEXT=$ac_cv_exeext
29979ac_exeext=$EXEEXT
29980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29981/* end confdefs.h.  */
29982#include <stdio.h>
29983int
29984main ()
29985{
29986FILE *f = fopen ("conftest.out", "w");
29987 return ferror (f) || fclose (f) != 0;
29988
29989  ;
29990  return 0;
29991}
29992_ACEOF
29993ac_clean_files="$ac_clean_files conftest.out"
29994# Check that the compiler produces executables we can run.  If not, either
29995# the compiler is broken, or we cross compile.
29996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29997$as_echo_n "checking whether we are cross compiling... " >&6; }
29998if test "$cross_compiling" != yes; then
29999  { { ac_try="$ac_link"
30000case "(($ac_try" in
30001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30002  *) ac_try_echo=$ac_try;;
30003esac
30004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30005$as_echo "$ac_try_echo"; } >&5
30006  (eval "$ac_link") 2>&5
30007  ac_status=$?
30008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30009  test $ac_status = 0; }
30010  if { ac_try='./conftest$ac_cv_exeext'
30011  { { case "(($ac_try" in
30012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30013  *) ac_try_echo=$ac_try;;
30014esac
30015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30016$as_echo "$ac_try_echo"; } >&5
30017  (eval "$ac_try") 2>&5
30018  ac_status=$?
30019  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30020  test $ac_status = 0; }; }; then
30021    cross_compiling=no
30022  else
30023    if test "$cross_compiling" = maybe; then
30024	cross_compiling=yes
30025    else
30026	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30028as_fn_error $? "cannot run C compiled programs.
30029If you meant to cross compile, use \`--host'.
30030See \`config.log' for more details" "$LINENO" 5; }
30031    fi
30032  fi
30033fi
30034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30035$as_echo "$cross_compiling" >&6; }
30036
30037rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30038ac_clean_files=$ac_clean_files_save
30039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30040$as_echo_n "checking for suffix of object files... " >&6; }
30041if ${ac_cv_objext+:} false; then :
30042  $as_echo_n "(cached) " >&6
30043else
30044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30045/* end confdefs.h.  */
30046
30047int
30048main ()
30049{
30050
30051  ;
30052  return 0;
30053}
30054_ACEOF
30055rm -f conftest.o conftest.obj
30056if { { ac_try="$ac_compile"
30057case "(($ac_try" in
30058  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30059  *) ac_try_echo=$ac_try;;
30060esac
30061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30062$as_echo "$ac_try_echo"; } >&5
30063  (eval "$ac_compile") 2>&5
30064  ac_status=$?
30065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30066  test $ac_status = 0; }; then :
30067  for ac_file in conftest.o conftest.obj conftest.*; do
30068  test -f "$ac_file" || continue;
30069  case $ac_file in
30070    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30071    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30072       break;;
30073  esac
30074done
30075else
30076  $as_echo "$as_me: failed program was:" >&5
30077sed 's/^/| /' conftest.$ac_ext >&5
30078
30079{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30081as_fn_error $? "cannot compute suffix of object files: cannot compile
30082See \`config.log' for more details" "$LINENO" 5; }
30083fi
30084rm -f conftest.$ac_cv_objext conftest.$ac_ext
30085fi
30086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30087$as_echo "$ac_cv_objext" >&6; }
30088OBJEXT=$ac_cv_objext
30089ac_objext=$OBJEXT
30090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30091$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30092if ${ac_cv_c_compiler_gnu+:} false; then :
30093  $as_echo_n "(cached) " >&6
30094else
30095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30096/* end confdefs.h.  */
30097
30098int
30099main ()
30100{
30101#ifndef __GNUC__
30102       choke me
30103#endif
30104
30105  ;
30106  return 0;
30107}
30108_ACEOF
30109if ac_fn_c_try_compile "$LINENO"; then :
30110  ac_compiler_gnu=yes
30111else
30112  ac_compiler_gnu=no
30113fi
30114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30115ac_cv_c_compiler_gnu=$ac_compiler_gnu
30116
30117fi
30118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30119$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30120if test $ac_compiler_gnu = yes; then
30121  GCC=yes
30122else
30123  GCC=
30124fi
30125ac_test_CFLAGS=${CFLAGS+set}
30126ac_save_CFLAGS=$CFLAGS
30127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30128$as_echo_n "checking whether $CC accepts -g... " >&6; }
30129if ${ac_cv_prog_cc_g+:} false; then :
30130  $as_echo_n "(cached) " >&6
30131else
30132  ac_save_c_werror_flag=$ac_c_werror_flag
30133   ac_c_werror_flag=yes
30134   ac_cv_prog_cc_g=no
30135   CFLAGS="-g"
30136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30137/* end confdefs.h.  */
30138
30139int
30140main ()
30141{
30142
30143  ;
30144  return 0;
30145}
30146_ACEOF
30147if ac_fn_c_try_compile "$LINENO"; then :
30148  ac_cv_prog_cc_g=yes
30149else
30150  CFLAGS=""
30151      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30152/* end confdefs.h.  */
30153
30154int
30155main ()
30156{
30157
30158  ;
30159  return 0;
30160}
30161_ACEOF
30162if ac_fn_c_try_compile "$LINENO"; then :
30163
30164else
30165  ac_c_werror_flag=$ac_save_c_werror_flag
30166	 CFLAGS="-g"
30167	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30168/* end confdefs.h.  */
30169
30170int
30171main ()
30172{
30173
30174  ;
30175  return 0;
30176}
30177_ACEOF
30178if ac_fn_c_try_compile "$LINENO"; then :
30179  ac_cv_prog_cc_g=yes
30180fi
30181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30182fi
30183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30184fi
30185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30186   ac_c_werror_flag=$ac_save_c_werror_flag
30187fi
30188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30189$as_echo "$ac_cv_prog_cc_g" >&6; }
30190if test "$ac_test_CFLAGS" = set; then
30191  CFLAGS=$ac_save_CFLAGS
30192elif test $ac_cv_prog_cc_g = yes; then
30193  if test "$GCC" = yes; then
30194    CFLAGS="-g -O2"
30195  else
30196    CFLAGS="-g"
30197  fi
30198else
30199  if test "$GCC" = yes; then
30200    CFLAGS="-O2"
30201  else
30202    CFLAGS=
30203  fi
30204fi
30205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30206$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30207if ${ac_cv_prog_cc_c89+:} false; then :
30208  $as_echo_n "(cached) " >&6
30209else
30210  ac_cv_prog_cc_c89=no
30211ac_save_CC=$CC
30212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30213/* end confdefs.h.  */
30214#include <stdarg.h>
30215#include <stdio.h>
30216struct stat;
30217/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30218struct buf { int x; };
30219FILE * (*rcsopen) (struct buf *, struct stat *, int);
30220static char *e (p, i)
30221     char **p;
30222     int i;
30223{
30224  return p[i];
30225}
30226static char *f (char * (*g) (char **, int), char **p, ...)
30227{
30228  char *s;
30229  va_list v;
30230  va_start (v,p);
30231  s = g (p, va_arg (v,int));
30232  va_end (v);
30233  return s;
30234}
30235
30236/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30237   function prototypes and stuff, but not '\xHH' hex character constants.
30238   These don't provoke an error unfortunately, instead are silently treated
30239   as 'x'.  The following induces an error, until -std is added to get
30240   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30241   array size at least.  It's necessary to write '\x00'==0 to get something
30242   that's true only with -std.  */
30243int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30244
30245/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30246   inside strings and character constants.  */
30247#define FOO(x) 'x'
30248int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30249
30250int test (int i, double x);
30251struct s1 {int (*f) (int a);};
30252struct s2 {int (*f) (double a);};
30253int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30254int argc;
30255char **argv;
30256int
30257main ()
30258{
30259return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30260  ;
30261  return 0;
30262}
30263_ACEOF
30264for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30265	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30266do
30267  CC="$ac_save_CC $ac_arg"
30268  if ac_fn_c_try_compile "$LINENO"; then :
30269  ac_cv_prog_cc_c89=$ac_arg
30270fi
30271rm -f core conftest.err conftest.$ac_objext
30272  test "x$ac_cv_prog_cc_c89" != "xno" && break
30273done
30274rm -f conftest.$ac_ext
30275CC=$ac_save_CC
30276
30277fi
30278# AC_CACHE_VAL
30279case "x$ac_cv_prog_cc_c89" in
30280  x)
30281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30282$as_echo "none needed" >&6; } ;;
30283  xno)
30284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30285$as_echo "unsupported" >&6; } ;;
30286  *)
30287    CC="$CC $ac_cv_prog_cc_c89"
30288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30289$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30290esac
30291if test "x$ac_cv_prog_cc_c89" != xno; then :
30292
30293fi
30294
30295ac_ext=cpp
30296ac_cpp='$CXXCPP $CPPFLAGS'
30297ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30298ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30299ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30300
30301
30302
30303  COMPILER_NAME=C++
30304  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30305
30306  if test "x$CXX" != x; then
30307    # User has supplied compiler name already, always let that override.
30308    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30309$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30310    if test "x`basename $CXX`" = "x$CXX"; then
30311      # A command without a complete path is provided, search $PATH.
30312
30313      for ac_prog in $CXX
30314do
30315  # Extract the first word of "$ac_prog", so it can be a program name with args.
30316set dummy $ac_prog; ac_word=$2
30317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30318$as_echo_n "checking for $ac_word... " >&6; }
30319if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30320  $as_echo_n "(cached) " >&6
30321else
30322  case $POTENTIAL_CXX in
30323  [\\/]* | ?:[\\/]*)
30324  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30325  ;;
30326  *)
30327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30328for as_dir in $PATH
30329do
30330  IFS=$as_save_IFS
30331  test -z "$as_dir" && as_dir=.
30332    for ac_exec_ext in '' $ac_executable_extensions; do
30333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30334    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30336    break 2
30337  fi
30338done
30339  done
30340IFS=$as_save_IFS
30341
30342  ;;
30343esac
30344fi
30345POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30346if test -n "$POTENTIAL_CXX"; then
30347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30348$as_echo "$POTENTIAL_CXX" >&6; }
30349else
30350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30351$as_echo "no" >&6; }
30352fi
30353
30354
30355  test -n "$POTENTIAL_CXX" && break
30356done
30357
30358      if test "x$POTENTIAL_CXX" != x; then
30359        CXX=$POTENTIAL_CXX
30360      else
30361        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30362      fi
30363    else
30364      # Otherwise it might already be a complete path
30365      if test ! -x "$CXX"; then
30366        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30367      fi
30368    fi
30369  else
30370    # No user supplied value. Locate compiler ourselves.
30371
30372    # If we are cross compiling, assume cross compilation tools follows the
30373    # cross compilation standard where they are prefixed with the autoconf
30374    # standard name for the target. For example the binary
30375    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30376    # If we are not cross compiling, then the default compiler name will be
30377    # used.
30378
30379    CXX=
30380    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30381    # before checking the rest of the PATH.
30382    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30383    # step, this should not be necessary.
30384    if test -n "$TOOLCHAIN_PATH"; then
30385      PATH_save="$PATH"
30386      PATH="$TOOLCHAIN_PATH"
30387      for ac_prog in $SEARCH_LIST
30388do
30389  # Extract the first word of "$ac_prog", so it can be a program name with args.
30390set dummy $ac_prog; ac_word=$2
30391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30392$as_echo_n "checking for $ac_word... " >&6; }
30393if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30394  $as_echo_n "(cached) " >&6
30395else
30396  case $TOOLCHAIN_PATH_CXX in
30397  [\\/]* | ?:[\\/]*)
30398  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30399  ;;
30400  *)
30401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30402for as_dir in $PATH
30403do
30404  IFS=$as_save_IFS
30405  test -z "$as_dir" && as_dir=.
30406    for ac_exec_ext in '' $ac_executable_extensions; do
30407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30408    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30410    break 2
30411  fi
30412done
30413  done
30414IFS=$as_save_IFS
30415
30416  ;;
30417esac
30418fi
30419TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30420if test -n "$TOOLCHAIN_PATH_CXX"; then
30421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30422$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30423else
30424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30425$as_echo "no" >&6; }
30426fi
30427
30428
30429  test -n "$TOOLCHAIN_PATH_CXX" && break
30430done
30431
30432      CXX=$TOOLCHAIN_PATH_CXX
30433      PATH="$PATH_save"
30434    fi
30435
30436    # AC_PATH_PROGS can't be run multiple times with the same variable,
30437    # so create a new name for this run.
30438    if test "x$CXX" = x; then
30439      for ac_prog in $SEARCH_LIST
30440do
30441  # Extract the first word of "$ac_prog", so it can be a program name with args.
30442set dummy $ac_prog; ac_word=$2
30443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30444$as_echo_n "checking for $ac_word... " >&6; }
30445if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30446  $as_echo_n "(cached) " >&6
30447else
30448  case $POTENTIAL_CXX in
30449  [\\/]* | ?:[\\/]*)
30450  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30451  ;;
30452  *)
30453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30454for as_dir in $PATH
30455do
30456  IFS=$as_save_IFS
30457  test -z "$as_dir" && as_dir=.
30458    for ac_exec_ext in '' $ac_executable_extensions; do
30459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30460    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30462    break 2
30463  fi
30464done
30465  done
30466IFS=$as_save_IFS
30467
30468  ;;
30469esac
30470fi
30471POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30472if test -n "$POTENTIAL_CXX"; then
30473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30474$as_echo "$POTENTIAL_CXX" >&6; }
30475else
30476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30477$as_echo "no" >&6; }
30478fi
30479
30480
30481  test -n "$POTENTIAL_CXX" && break
30482done
30483
30484      CXX=$POTENTIAL_CXX
30485    fi
30486
30487    if test "x$CXX" = x; then
30488
30489  # Print a helpful message on how to acquire the necessary build dependency.
30490  # devkit is the help tag: freetype, cups, pulse, alsa etc
30491  MISSING_DEPENDENCY=devkit
30492
30493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30494    cygwin_help $MISSING_DEPENDENCY
30495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30496    msys_help $MISSING_DEPENDENCY
30497  else
30498    PKGHANDLER_COMMAND=
30499
30500    case $PKGHANDLER in
30501      apt-get)
30502        apt_help     $MISSING_DEPENDENCY ;;
30503      yum)
30504        yum_help     $MISSING_DEPENDENCY ;;
30505      port)
30506        port_help    $MISSING_DEPENDENCY ;;
30507      pkgutil)
30508        pkgutil_help $MISSING_DEPENDENCY ;;
30509      pkgadd)
30510        pkgadd_help  $MISSING_DEPENDENCY ;;
30511    esac
30512
30513    if test "x$PKGHANDLER_COMMAND" != x; then
30514      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30515    fi
30516  fi
30517
30518      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30519    fi
30520  fi
30521
30522  # Now we have a compiler binary in CXX. Make sure it's okay.
30523
30524  # Only process if variable expands to non-empty
30525
30526  if test "x$CXX" != x; then
30527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30528
30529  # First separate the path from the arguments. This will split at the first
30530  # space.
30531  complete="$CXX"
30532  path="${complete%% *}"
30533  tmp="$complete EOL"
30534  arguments="${tmp#* }"
30535
30536  # Input might be given as Windows format, start by converting to
30537  # unix format.
30538  new_path=`$CYGPATH -u "$path"`
30539
30540  # Now try to locate executable using which
30541  new_path=`$WHICH "$new_path" 2> /dev/null`
30542  # bat and cmd files are not always considered executable in cygwin causing which
30543  # to not find them
30544  if test "x$new_path" = x \
30545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30547    new_path=`$CYGPATH -u "$path"`
30548  fi
30549  if test "x$new_path" = x; then
30550    # Oops. Which didn't find the executable.
30551    # The splitting of arguments from the executable at a space might have been incorrect,
30552    # since paths with space are more likely in Windows. Give it another try with the whole
30553    # argument.
30554    path="$complete"
30555    arguments="EOL"
30556    new_path=`$CYGPATH -u "$path"`
30557    new_path=`$WHICH "$new_path" 2> /dev/null`
30558    # bat and cmd files are not always considered executable in cygwin causing which
30559    # to not find them
30560    if test "x$new_path" = x \
30561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30563      new_path=`$CYGPATH -u "$path"`
30564    fi
30565    if test "x$new_path" = x; then
30566      # It's still not found. Now this is an unrecoverable error.
30567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30568$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30569      has_space=`$ECHO "$complete" | $GREP " "`
30570      if test "x$has_space" != x; then
30571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30573      fi
30574      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30575    fi
30576  fi
30577
30578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30581  # "foo.exe" is OK but "foo" is an error.
30582  #
30583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30584  # It is also a way to make sure we got the proper file name for the real test later on.
30585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30586  if test "x$test_shortpath" = x; then
30587    # Short path failed, file does not exist as specified.
30588    # Try adding .exe or .cmd
30589    if test -f "${new_path}.exe"; then
30590      input_to_shortpath="${new_path}.exe"
30591    elif test -f "${new_path}.cmd"; then
30592      input_to_shortpath="${new_path}.cmd"
30593    else
30594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30595$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30598      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30599    fi
30600  else
30601    input_to_shortpath="$new_path"
30602  fi
30603
30604  # Call helper function which possibly converts this using DOS-style short mode.
30605  # If so, the updated path is stored in $new_path.
30606  new_path="$input_to_shortpath"
30607
30608  input_path="$input_to_shortpath"
30609  # Check if we need to convert this using DOS-style short mode. If the path
30610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30611  # take no chances and rewrite it.
30612  # Note: m4 eats our [], so we need to use [ and ] instead.
30613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30614  if test "x$has_forbidden_chars" != x; then
30615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30619      # Going to short mode and back again did indeed matter. Since short mode is
30620      # case insensitive, let's make it lowercase to improve readability.
30621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30622      # Now convert it back to Unix-style (cygpath)
30623      input_path=`$CYGPATH -u "$shortmode_path"`
30624      new_path="$input_path"
30625    fi
30626  fi
30627
30628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30629  if test "x$test_cygdrive_prefix" = x; then
30630    # As a simple fix, exclude /usr/bin since it's not a real path.
30631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30633      # a path prefixed by /cygdrive for fixpath to work.
30634      new_path="$CYGWIN_ROOT_PATH$input_path"
30635    fi
30636  fi
30637
30638  # remove trailing .exe if any
30639  new_path="${new_path/%.exe/}"
30640
30641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30642
30643  # First separate the path from the arguments. This will split at the first
30644  # space.
30645  complete="$CXX"
30646  path="${complete%% *}"
30647  tmp="$complete EOL"
30648  arguments="${tmp#* }"
30649
30650  # Input might be given as Windows format, start by converting to
30651  # unix format.
30652  new_path="$path"
30653
30654  windows_path="$new_path"
30655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30656    unix_path=`$CYGPATH -u "$windows_path"`
30657    new_path="$unix_path"
30658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30660    new_path="$unix_path"
30661  fi
30662
30663
30664  # Now try to locate executable using which
30665  new_path=`$WHICH "$new_path" 2> /dev/null`
30666
30667  if test "x$new_path" = x; then
30668    # Oops. Which didn't find the executable.
30669    # The splitting of arguments from the executable at a space might have been incorrect,
30670    # since paths with space are more likely in Windows. Give it another try with the whole
30671    # argument.
30672    path="$complete"
30673    arguments="EOL"
30674    new_path="$path"
30675
30676  windows_path="$new_path"
30677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30678    unix_path=`$CYGPATH -u "$windows_path"`
30679    new_path="$unix_path"
30680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30682    new_path="$unix_path"
30683  fi
30684
30685
30686    new_path=`$WHICH "$new_path" 2> /dev/null`
30687    # bat and cmd files are not always considered executable in MSYS causing which
30688    # to not find them
30689    if test "x$new_path" = x \
30690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30692      new_path="$path"
30693
30694  windows_path="$new_path"
30695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30696    unix_path=`$CYGPATH -u "$windows_path"`
30697    new_path="$unix_path"
30698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30700    new_path="$unix_path"
30701  fi
30702
30703    fi
30704
30705    if test "x$new_path" = x; then
30706      # It's still not found. Now this is an unrecoverable error.
30707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30708$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30709      has_space=`$ECHO "$complete" | $GREP " "`
30710      if test "x$has_space" != x; then
30711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30713      fi
30714      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30715    fi
30716  fi
30717
30718  # Now new_path has a complete unix path to the binary
30719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30720    # Keep paths in /bin as-is, but remove trailing .exe if any
30721    new_path="${new_path/%.exe/}"
30722    # Do not save /bin paths to all_fixpath_prefixes!
30723  else
30724    # Not in mixed or Windows style, start by that.
30725    new_path=`cmd //c echo $new_path`
30726
30727  input_path="$new_path"
30728  # Check if we need to convert this using DOS-style short mode. If the path
30729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30730  # take no chances and rewrite it.
30731  # Note: m4 eats our [], so we need to use [ and ] instead.
30732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30733  if test "x$has_forbidden_chars" != x; then
30734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30736  fi
30737
30738    # Output is in $new_path
30739
30740  windows_path="$new_path"
30741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30742    unix_path=`$CYGPATH -u "$windows_path"`
30743    new_path="$unix_path"
30744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30746    new_path="$unix_path"
30747  fi
30748
30749    # remove trailing .exe if any
30750    new_path="${new_path/%.exe/}"
30751
30752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30754  fi
30755
30756    else
30757      # We're on a unix platform. Hooray! :)
30758      # First separate the path from the arguments. This will split at the first
30759      # space.
30760      complete="$CXX"
30761      path="${complete%% *}"
30762      tmp="$complete EOL"
30763      arguments="${tmp#* }"
30764
30765      # Cannot rely on the command "which" here since it doesn't always work.
30766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30767      if test -z "$is_absolute_path"; then
30768        # Path to executable is not absolute. Find it.
30769        IFS_save="$IFS"
30770        IFS=:
30771        for p in $PATH; do
30772          if test -f "$p/$path" && test -x "$p/$path"; then
30773            new_path="$p/$path"
30774            break
30775          fi
30776        done
30777        IFS="$IFS_save"
30778      else
30779        # This is an absolute path, we can use it without further modifications.
30780        new_path="$path"
30781      fi
30782
30783      if test "x$new_path" = x; then
30784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30785$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30786        has_space=`$ECHO "$complete" | $GREP " "`
30787        if test "x$has_space" != x; then
30788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30790        fi
30791        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30792      fi
30793    fi
30794
30795    # Now join together the path and the arguments once again
30796    if test "x$arguments" != xEOL; then
30797      new_complete="$new_path ${arguments% *}"
30798    else
30799      new_complete="$new_path"
30800    fi
30801
30802    if test "x$complete" != "x$new_complete"; then
30803      CXX="$new_complete"
30804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30805$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30806    fi
30807  fi
30808
30809  TEST_COMPILER="$CXX"
30810  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30811  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30812  if test "x$OPENJDK_BUILD_OS" != xaix; then
30813    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30815$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30816
30817  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30818    # Follow a chain of symbolic links. Use readlink
30819    # where it exists, else fall back to horribly
30820    # complicated shell code.
30821    if test "x$READLINK_TESTED" != yes; then
30822      # On MacOSX there is a readlink tool with a different
30823      # purpose than the GNU readlink tool. Check the found readlink.
30824      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30825      if test "x$ISGNU" = x; then
30826        # A readlink that we do not know how to use.
30827        # Are there other non-GNU readlinks out there?
30828        READLINK_TESTED=yes
30829        READLINK=
30830      fi
30831    fi
30832
30833    if test "x$READLINK" != x; then
30834      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30835    else
30836      # Save the current directory for restoring afterwards
30837      STARTDIR=$PWD
30838      COUNTER=0
30839      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30840      sym_link_file=`$BASENAME $TEST_COMPILER`
30841      cd $sym_link_dir
30842      # Use -P flag to resolve symlinks in directories.
30843      cd `$THEPWDCMD -P`
30844      sym_link_dir=`$THEPWDCMD -P`
30845      # Resolve file symlinks
30846      while test $COUNTER -lt 20; do
30847        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30848        if test "x$ISLINK" == x; then
30849          # This is not a symbolic link! We are done!
30850          break
30851        fi
30852        # Again resolve directory symlinks since the target of the just found
30853        # link could be in a different directory
30854        cd `$DIRNAME $ISLINK`
30855        sym_link_dir=`$THEPWDCMD -P`
30856        sym_link_file=`$BASENAME $ISLINK`
30857        let COUNTER=COUNTER+1
30858      done
30859      cd $STARTDIR
30860      TEST_COMPILER=$sym_link_dir/$sym_link_file
30861    fi
30862  fi
30863
30864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30865$as_echo "$TEST_COMPILER" >&6; }
30866  fi
30867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30868$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30869
30870  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30871  if test "x$COMPILER_BASENAME" = "xccache"; then
30872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30873$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30874    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30875    # We want to control ccache invocation ourselves, so ignore this cc and try
30876    # searching again.
30877
30878    # Remove the path to the fake ccache cc from the PATH
30879    RETRY_COMPILER_SAVED_PATH="$PATH"
30880    COMPILER_DIRNAME=`$DIRNAME $CXX`
30881    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30882
30883    # Try again looking for our compiler
30884    if test -n "$ac_tool_prefix"; then
30885  for ac_prog in $TOOLCHAIN_CXX_BINARY
30886  do
30887    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30888set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30890$as_echo_n "checking for $ac_word... " >&6; }
30891if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30892  $as_echo_n "(cached) " >&6
30893else
30894  if test -n "$PROPER_COMPILER_CXX"; then
30895  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30896else
30897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30898for as_dir in $PATH
30899do
30900  IFS=$as_save_IFS
30901  test -z "$as_dir" && as_dir=.
30902    for ac_exec_ext in '' $ac_executable_extensions; do
30903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30904    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30906    break 2
30907  fi
30908done
30909  done
30910IFS=$as_save_IFS
30911
30912fi
30913fi
30914PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30915if test -n "$PROPER_COMPILER_CXX"; then
30916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30917$as_echo "$PROPER_COMPILER_CXX" >&6; }
30918else
30919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30920$as_echo "no" >&6; }
30921fi
30922
30923
30924    test -n "$PROPER_COMPILER_CXX" && break
30925  done
30926fi
30927if test -z "$PROPER_COMPILER_CXX"; then
30928  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30929  for ac_prog in $TOOLCHAIN_CXX_BINARY
30930do
30931  # Extract the first word of "$ac_prog", so it can be a program name with args.
30932set dummy $ac_prog; ac_word=$2
30933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30934$as_echo_n "checking for $ac_word... " >&6; }
30935if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30936  $as_echo_n "(cached) " >&6
30937else
30938  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30939  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30940else
30941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30942for as_dir in $PATH
30943do
30944  IFS=$as_save_IFS
30945  test -z "$as_dir" && as_dir=.
30946    for ac_exec_ext in '' $ac_executable_extensions; do
30947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30948    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30950    break 2
30951  fi
30952done
30953  done
30954IFS=$as_save_IFS
30955
30956fi
30957fi
30958ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30959if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30961$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30962else
30963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30964$as_echo "no" >&6; }
30965fi
30966
30967
30968  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30969done
30970
30971  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30972    PROPER_COMPILER_CXX=""
30973  else
30974    case $cross_compiling:$ac_tool_warned in
30975yes:)
30976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30978ac_tool_warned=yes ;;
30979esac
30980    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30981  fi
30982fi
30983
30984
30985  # Only process if variable expands to non-empty
30986
30987  if test "x$PROPER_COMPILER_CXX" != x; then
30988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30989
30990  # First separate the path from the arguments. This will split at the first
30991  # space.
30992  complete="$PROPER_COMPILER_CXX"
30993  path="${complete%% *}"
30994  tmp="$complete EOL"
30995  arguments="${tmp#* }"
30996
30997  # Input might be given as Windows format, start by converting to
30998  # unix format.
30999  new_path=`$CYGPATH -u "$path"`
31000
31001  # Now try to locate executable using which
31002  new_path=`$WHICH "$new_path" 2> /dev/null`
31003  # bat and cmd files are not always considered executable in cygwin causing which
31004  # to not find them
31005  if test "x$new_path" = x \
31006      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31007      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31008    new_path=`$CYGPATH -u "$path"`
31009  fi
31010  if test "x$new_path" = x; then
31011    # Oops. Which didn't find the executable.
31012    # The splitting of arguments from the executable at a space might have been incorrect,
31013    # since paths with space are more likely in Windows. Give it another try with the whole
31014    # argument.
31015    path="$complete"
31016    arguments="EOL"
31017    new_path=`$CYGPATH -u "$path"`
31018    new_path=`$WHICH "$new_path" 2> /dev/null`
31019    # bat and cmd files are not always considered executable in cygwin causing which
31020    # to not find them
31021    if test "x$new_path" = x \
31022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31024      new_path=`$CYGPATH -u "$path"`
31025    fi
31026    if test "x$new_path" = x; then
31027      # It's still not found. Now this is an unrecoverable error.
31028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31029$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31030      has_space=`$ECHO "$complete" | $GREP " "`
31031      if test "x$has_space" != x; then
31032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31034      fi
31035      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31036    fi
31037  fi
31038
31039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31042  # "foo.exe" is OK but "foo" is an error.
31043  #
31044  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31045  # It is also a way to make sure we got the proper file name for the real test later on.
31046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31047  if test "x$test_shortpath" = x; then
31048    # Short path failed, file does not exist as specified.
31049    # Try adding .exe or .cmd
31050    if test -f "${new_path}.exe"; then
31051      input_to_shortpath="${new_path}.exe"
31052    elif test -f "${new_path}.cmd"; then
31053      input_to_shortpath="${new_path}.cmd"
31054    else
31055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31056$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31059      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31060    fi
31061  else
31062    input_to_shortpath="$new_path"
31063  fi
31064
31065  # Call helper function which possibly converts this using DOS-style short mode.
31066  # If so, the updated path is stored in $new_path.
31067  new_path="$input_to_shortpath"
31068
31069  input_path="$input_to_shortpath"
31070  # Check if we need to convert this using DOS-style short mode. If the path
31071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31072  # take no chances and rewrite it.
31073  # Note: m4 eats our [], so we need to use [ and ] instead.
31074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31075  if test "x$has_forbidden_chars" != x; then
31076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31080      # Going to short mode and back again did indeed matter. Since short mode is
31081      # case insensitive, let's make it lowercase to improve readability.
31082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31083      # Now convert it back to Unix-style (cygpath)
31084      input_path=`$CYGPATH -u "$shortmode_path"`
31085      new_path="$input_path"
31086    fi
31087  fi
31088
31089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31090  if test "x$test_cygdrive_prefix" = x; then
31091    # As a simple fix, exclude /usr/bin since it's not a real path.
31092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31094      # a path prefixed by /cygdrive for fixpath to work.
31095      new_path="$CYGWIN_ROOT_PATH$input_path"
31096    fi
31097  fi
31098
31099  # remove trailing .exe if any
31100  new_path="${new_path/%.exe/}"
31101
31102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31103
31104  # First separate the path from the arguments. This will split at the first
31105  # space.
31106  complete="$PROPER_COMPILER_CXX"
31107  path="${complete%% *}"
31108  tmp="$complete EOL"
31109  arguments="${tmp#* }"
31110
31111  # Input might be given as Windows format, start by converting to
31112  # unix format.
31113  new_path="$path"
31114
31115  windows_path="$new_path"
31116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31117    unix_path=`$CYGPATH -u "$windows_path"`
31118    new_path="$unix_path"
31119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31121    new_path="$unix_path"
31122  fi
31123
31124
31125  # Now try to locate executable using which
31126  new_path=`$WHICH "$new_path" 2> /dev/null`
31127
31128  if test "x$new_path" = x; then
31129    # Oops. Which didn't find the executable.
31130    # The splitting of arguments from the executable at a space might have been incorrect,
31131    # since paths with space are more likely in Windows. Give it another try with the whole
31132    # argument.
31133    path="$complete"
31134    arguments="EOL"
31135    new_path="$path"
31136
31137  windows_path="$new_path"
31138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31139    unix_path=`$CYGPATH -u "$windows_path"`
31140    new_path="$unix_path"
31141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31143    new_path="$unix_path"
31144  fi
31145
31146
31147    new_path=`$WHICH "$new_path" 2> /dev/null`
31148    # bat and cmd files are not always considered executable in MSYS causing which
31149    # to not find them
31150    if test "x$new_path" = x \
31151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31153      new_path="$path"
31154
31155  windows_path="$new_path"
31156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31157    unix_path=`$CYGPATH -u "$windows_path"`
31158    new_path="$unix_path"
31159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31161    new_path="$unix_path"
31162  fi
31163
31164    fi
31165
31166    if test "x$new_path" = x; then
31167      # It's still not found. Now this is an unrecoverable error.
31168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31169$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31170      has_space=`$ECHO "$complete" | $GREP " "`
31171      if test "x$has_space" != x; then
31172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31174      fi
31175      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31176    fi
31177  fi
31178
31179  # Now new_path has a complete unix path to the binary
31180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31181    # Keep paths in /bin as-is, but remove trailing .exe if any
31182    new_path="${new_path/%.exe/}"
31183    # Do not save /bin paths to all_fixpath_prefixes!
31184  else
31185    # Not in mixed or Windows style, start by that.
31186    new_path=`cmd //c echo $new_path`
31187
31188  input_path="$new_path"
31189  # Check if we need to convert this using DOS-style short mode. If the path
31190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31191  # take no chances and rewrite it.
31192  # Note: m4 eats our [], so we need to use [ and ] instead.
31193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31194  if test "x$has_forbidden_chars" != x; then
31195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31197  fi
31198
31199    # Output is in $new_path
31200
31201  windows_path="$new_path"
31202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31203    unix_path=`$CYGPATH -u "$windows_path"`
31204    new_path="$unix_path"
31205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31207    new_path="$unix_path"
31208  fi
31209
31210    # remove trailing .exe if any
31211    new_path="${new_path/%.exe/}"
31212
31213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31215  fi
31216
31217    else
31218      # We're on a unix platform. Hooray! :)
31219      # First separate the path from the arguments. This will split at the first
31220      # space.
31221      complete="$PROPER_COMPILER_CXX"
31222      path="${complete%% *}"
31223      tmp="$complete EOL"
31224      arguments="${tmp#* }"
31225
31226      # Cannot rely on the command "which" here since it doesn't always work.
31227      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31228      if test -z "$is_absolute_path"; then
31229        # Path to executable is not absolute. Find it.
31230        IFS_save="$IFS"
31231        IFS=:
31232        for p in $PATH; do
31233          if test -f "$p/$path" && test -x "$p/$path"; then
31234            new_path="$p/$path"
31235            break
31236          fi
31237        done
31238        IFS="$IFS_save"
31239      else
31240        # This is an absolute path, we can use it without further modifications.
31241        new_path="$path"
31242      fi
31243
31244      if test "x$new_path" = x; then
31245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31246$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31247        has_space=`$ECHO "$complete" | $GREP " "`
31248        if test "x$has_space" != x; then
31249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31251        fi
31252        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31253      fi
31254    fi
31255
31256    # Now join together the path and the arguments once again
31257    if test "x$arguments" != xEOL; then
31258      new_complete="$new_path ${arguments% *}"
31259    else
31260      new_complete="$new_path"
31261    fi
31262
31263    if test "x$complete" != "x$new_complete"; then
31264      PROPER_COMPILER_CXX="$new_complete"
31265      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31266$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31267    fi
31268  fi
31269
31270    PATH="$RETRY_COMPILER_SAVED_PATH"
31271
31272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31273$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31274
31275  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31276    # Follow a chain of symbolic links. Use readlink
31277    # where it exists, else fall back to horribly
31278    # complicated shell code.
31279    if test "x$READLINK_TESTED" != yes; then
31280      # On MacOSX there is a readlink tool with a different
31281      # purpose than the GNU readlink tool. Check the found readlink.
31282      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31283      if test "x$ISGNU" = x; then
31284        # A readlink that we do not know how to use.
31285        # Are there other non-GNU readlinks out there?
31286        READLINK_TESTED=yes
31287        READLINK=
31288      fi
31289    fi
31290
31291    if test "x$READLINK" != x; then
31292      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31293    else
31294      # Save the current directory for restoring afterwards
31295      STARTDIR=$PWD
31296      COUNTER=0
31297      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31298      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31299      cd $sym_link_dir
31300      # Use -P flag to resolve symlinks in directories.
31301      cd `$THEPWDCMD -P`
31302      sym_link_dir=`$THEPWDCMD -P`
31303      # Resolve file symlinks
31304      while test $COUNTER -lt 20; do
31305        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31306        if test "x$ISLINK" == x; then
31307          # This is not a symbolic link! We are done!
31308          break
31309        fi
31310        # Again resolve directory symlinks since the target of the just found
31311        # link could be in a different directory
31312        cd `$DIRNAME $ISLINK`
31313        sym_link_dir=`$THEPWDCMD -P`
31314        sym_link_file=`$BASENAME $ISLINK`
31315        let COUNTER=COUNTER+1
31316      done
31317      cd $STARTDIR
31318      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31319    fi
31320  fi
31321
31322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31323$as_echo "$PROPER_COMPILER_CXX" >&6; }
31324    CXX="$PROPER_COMPILER_CXX"
31325  else
31326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31327$as_echo "no, keeping CXX" >&6; }
31328  fi
31329
31330
31331  COMPILER=$CXX
31332  COMPILER_NAME=$COMPILER_NAME
31333
31334  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31335    # cc -V output typically looks like
31336    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31337    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31338    # Check that this is likely to be the Solaris Studio cc.
31339    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31340    if test $? -ne 0; then
31341      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31342      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31343$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31344      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31345$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31346      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31347$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31348      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31349    fi
31350    # Remove usage instructions (if present), and
31351    # collapse compiler output into a single line
31352    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31353        $SED -e 's/ *[Uu]sage:.*//'`
31354    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31355        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31356  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31357    # xlc -qversion output typically looks like
31358    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31359    #     Version: 11.01.0000.0015
31360    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31361    # Check that this is likely to be the IBM XL C compiler.
31362    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31363    if test $? -ne 0; then
31364      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31365      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31366$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31367      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31368$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31369      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31370$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31371      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31372    fi
31373    # Collapse compiler output into a single line
31374    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31376        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31377  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31378    # There is no specific version flag, but all output starts with a version string.
31379    # First line typically looks something like:
31380    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31381    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31382    # Check that this is likely to be Microsoft CL.EXE.
31383    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31384    if test $? -ne 0; then
31385      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31386$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31387      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31388$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31389      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31390    fi
31391    # Collapse compiler output into a single line
31392    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31393    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31394        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31395  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31396    # gcc --version output typically looks like
31397    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31398    #     Copyright (C) 2013 Free Software Foundation, Inc.
31399    #     This is free software; see the source for copying conditions.  There is NO
31400    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31401    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31402    # Check that this is likely to be GCC.
31403    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31404    if test $? -ne 0; then
31405      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31406$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31407      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31408$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31409      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31410    fi
31411    # Remove Copyright and legalese from version string, and
31412    # collapse into a single line
31413    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31414        $SED -e 's/ *Copyright .*//'`
31415    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31416        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31417  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31418    # clang --version output typically looks like
31419    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31420    #    clang version 3.3 (tags/RELEASE_33/final)
31421    # or
31422    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31423    #    Target: x86_64-pc-linux-gnu
31424    #    Thread model: posix
31425    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31426    # Check that this is likely to be clang
31427    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31428    if test $? -ne 0; then
31429      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31430$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31432$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31434    fi
31435    # Collapse compiler output into a single line
31436    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31437    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31438        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31439  else
31440      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31441  fi
31442  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31443  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31444  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31445  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31446
31447  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31448$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31449
31450
31451  # Now that we have resolved CXX ourself, let autoconf have its go at it
31452  ac_ext=cpp
31453ac_cpp='$CXXCPP $CPPFLAGS'
31454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31457if test -z "$CXX"; then
31458  if test -n "$CCC"; then
31459    CXX=$CCC
31460  else
31461    if test -n "$ac_tool_prefix"; then
31462  for ac_prog in $CXX
31463  do
31464    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31465set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31467$as_echo_n "checking for $ac_word... " >&6; }
31468if ${ac_cv_prog_CXX+:} false; then :
31469  $as_echo_n "(cached) " >&6
31470else
31471  if test -n "$CXX"; then
31472  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31473else
31474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31475for as_dir in $PATH
31476do
31477  IFS=$as_save_IFS
31478  test -z "$as_dir" && as_dir=.
31479    for ac_exec_ext in '' $ac_executable_extensions; do
31480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31481    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31483    break 2
31484  fi
31485done
31486  done
31487IFS=$as_save_IFS
31488
31489fi
31490fi
31491CXX=$ac_cv_prog_CXX
31492if test -n "$CXX"; then
31493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31494$as_echo "$CXX" >&6; }
31495else
31496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31497$as_echo "no" >&6; }
31498fi
31499
31500
31501    test -n "$CXX" && break
31502  done
31503fi
31504if test -z "$CXX"; then
31505  ac_ct_CXX=$CXX
31506  for ac_prog in $CXX
31507do
31508  # Extract the first word of "$ac_prog", so it can be a program name with args.
31509set dummy $ac_prog; ac_word=$2
31510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31511$as_echo_n "checking for $ac_word... " >&6; }
31512if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31513  $as_echo_n "(cached) " >&6
31514else
31515  if test -n "$ac_ct_CXX"; then
31516  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31517else
31518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31519for as_dir in $PATH
31520do
31521  IFS=$as_save_IFS
31522  test -z "$as_dir" && as_dir=.
31523    for ac_exec_ext in '' $ac_executable_extensions; do
31524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31525    ac_cv_prog_ac_ct_CXX="$ac_prog"
31526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31527    break 2
31528  fi
31529done
31530  done
31531IFS=$as_save_IFS
31532
31533fi
31534fi
31535ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31536if test -n "$ac_ct_CXX"; then
31537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31538$as_echo "$ac_ct_CXX" >&6; }
31539else
31540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31541$as_echo "no" >&6; }
31542fi
31543
31544
31545  test -n "$ac_ct_CXX" && break
31546done
31547
31548  if test "x$ac_ct_CXX" = x; then
31549    CXX="g++"
31550  else
31551    case $cross_compiling:$ac_tool_warned in
31552yes:)
31553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31555ac_tool_warned=yes ;;
31556esac
31557    CXX=$ac_ct_CXX
31558  fi
31559fi
31560
31561  fi
31562fi
31563# Provide some information about the compiler.
31564$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31565set X $ac_compile
31566ac_compiler=$2
31567for ac_option in --version -v -V -qversion; do
31568  { { ac_try="$ac_compiler $ac_option >&5"
31569case "(($ac_try" in
31570  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31571  *) ac_try_echo=$ac_try;;
31572esac
31573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31574$as_echo "$ac_try_echo"; } >&5
31575  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31576  ac_status=$?
31577  if test -s conftest.err; then
31578    sed '10a\
31579... rest of stderr output deleted ...
31580         10q' conftest.err >conftest.er1
31581    cat conftest.er1 >&5
31582  fi
31583  rm -f conftest.er1 conftest.err
31584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31585  test $ac_status = 0; }
31586done
31587
31588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31589$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31590if ${ac_cv_cxx_compiler_gnu+:} false; then :
31591  $as_echo_n "(cached) " >&6
31592else
31593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31594/* end confdefs.h.  */
31595
31596int
31597main ()
31598{
31599#ifndef __GNUC__
31600       choke me
31601#endif
31602
31603  ;
31604  return 0;
31605}
31606_ACEOF
31607if ac_fn_cxx_try_compile "$LINENO"; then :
31608  ac_compiler_gnu=yes
31609else
31610  ac_compiler_gnu=no
31611fi
31612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31613ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31614
31615fi
31616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31617$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31618if test $ac_compiler_gnu = yes; then
31619  GXX=yes
31620else
31621  GXX=
31622fi
31623ac_test_CXXFLAGS=${CXXFLAGS+set}
31624ac_save_CXXFLAGS=$CXXFLAGS
31625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31626$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31627if ${ac_cv_prog_cxx_g+:} false; then :
31628  $as_echo_n "(cached) " >&6
31629else
31630  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31631   ac_cxx_werror_flag=yes
31632   ac_cv_prog_cxx_g=no
31633   CXXFLAGS="-g"
31634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31635/* end confdefs.h.  */
31636
31637int
31638main ()
31639{
31640
31641  ;
31642  return 0;
31643}
31644_ACEOF
31645if ac_fn_cxx_try_compile "$LINENO"; then :
31646  ac_cv_prog_cxx_g=yes
31647else
31648  CXXFLAGS=""
31649      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31650/* end confdefs.h.  */
31651
31652int
31653main ()
31654{
31655
31656  ;
31657  return 0;
31658}
31659_ACEOF
31660if ac_fn_cxx_try_compile "$LINENO"; then :
31661
31662else
31663  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31664	 CXXFLAGS="-g"
31665	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31666/* end confdefs.h.  */
31667
31668int
31669main ()
31670{
31671
31672  ;
31673  return 0;
31674}
31675_ACEOF
31676if ac_fn_cxx_try_compile "$LINENO"; then :
31677  ac_cv_prog_cxx_g=yes
31678fi
31679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31680fi
31681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31682fi
31683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31684   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31685fi
31686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31687$as_echo "$ac_cv_prog_cxx_g" >&6; }
31688if test "$ac_test_CXXFLAGS" = set; then
31689  CXXFLAGS=$ac_save_CXXFLAGS
31690elif test $ac_cv_prog_cxx_g = yes; then
31691  if test "$GXX" = yes; then
31692    CXXFLAGS="-g -O2"
31693  else
31694    CXXFLAGS="-g"
31695  fi
31696else
31697  if test "$GXX" = yes; then
31698    CXXFLAGS="-O2"
31699  else
31700    CXXFLAGS=
31701  fi
31702fi
31703ac_ext=cpp
31704ac_cpp='$CXXCPP $CPPFLAGS'
31705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31708
31709
31710  #
31711  # Setup the preprocessor (CPP and CXXCPP)
31712  #
31713  ac_ext=c
31714ac_cpp='$CPP $CPPFLAGS'
31715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31717ac_compiler_gnu=$ac_cv_c_compiler_gnu
31718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31719$as_echo_n "checking how to run the C preprocessor... " >&6; }
31720# On Suns, sometimes $CPP names a directory.
31721if test -n "$CPP" && test -d "$CPP"; then
31722  CPP=
31723fi
31724if test -z "$CPP"; then
31725  if ${ac_cv_prog_CPP+:} false; then :
31726  $as_echo_n "(cached) " >&6
31727else
31728      # Double quotes because CPP needs to be expanded
31729    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31730    do
31731      ac_preproc_ok=false
31732for ac_c_preproc_warn_flag in '' yes
31733do
31734  # Use a header file that comes with gcc, so configuring glibc
31735  # with a fresh cross-compiler works.
31736  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31737  # <limits.h> exists even on freestanding compilers.
31738  # On the NeXT, cc -E runs the code through the compiler's parser,
31739  # not just through cpp. "Syntax error" is here to catch this case.
31740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31741/* end confdefs.h.  */
31742#ifdef __STDC__
31743# include <limits.h>
31744#else
31745# include <assert.h>
31746#endif
31747		     Syntax error
31748_ACEOF
31749if ac_fn_c_try_cpp "$LINENO"; then :
31750
31751else
31752  # Broken: fails on valid input.
31753continue
31754fi
31755rm -f conftest.err conftest.i conftest.$ac_ext
31756
31757  # OK, works on sane cases.  Now check whether nonexistent headers
31758  # can be detected and how.
31759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31760/* end confdefs.h.  */
31761#include <ac_nonexistent.h>
31762_ACEOF
31763if ac_fn_c_try_cpp "$LINENO"; then :
31764  # Broken: success on invalid input.
31765continue
31766else
31767  # Passes both tests.
31768ac_preproc_ok=:
31769break
31770fi
31771rm -f conftest.err conftest.i conftest.$ac_ext
31772
31773done
31774# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31775rm -f conftest.i conftest.err conftest.$ac_ext
31776if $ac_preproc_ok; then :
31777  break
31778fi
31779
31780    done
31781    ac_cv_prog_CPP=$CPP
31782
31783fi
31784  CPP=$ac_cv_prog_CPP
31785else
31786  ac_cv_prog_CPP=$CPP
31787fi
31788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31789$as_echo "$CPP" >&6; }
31790ac_preproc_ok=false
31791for ac_c_preproc_warn_flag in '' yes
31792do
31793  # Use a header file that comes with gcc, so configuring glibc
31794  # with a fresh cross-compiler works.
31795  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31796  # <limits.h> exists even on freestanding compilers.
31797  # On the NeXT, cc -E runs the code through the compiler's parser,
31798  # not just through cpp. "Syntax error" is here to catch this case.
31799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31800/* end confdefs.h.  */
31801#ifdef __STDC__
31802# include <limits.h>
31803#else
31804# include <assert.h>
31805#endif
31806		     Syntax error
31807_ACEOF
31808if ac_fn_c_try_cpp "$LINENO"; then :
31809
31810else
31811  # Broken: fails on valid input.
31812continue
31813fi
31814rm -f conftest.err conftest.i conftest.$ac_ext
31815
31816  # OK, works on sane cases.  Now check whether nonexistent headers
31817  # can be detected and how.
31818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31819/* end confdefs.h.  */
31820#include <ac_nonexistent.h>
31821_ACEOF
31822if ac_fn_c_try_cpp "$LINENO"; then :
31823  # Broken: success on invalid input.
31824continue
31825else
31826  # Passes both tests.
31827ac_preproc_ok=:
31828break
31829fi
31830rm -f conftest.err conftest.i conftest.$ac_ext
31831
31832done
31833# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31834rm -f conftest.i conftest.err conftest.$ac_ext
31835if $ac_preproc_ok; then :
31836
31837else
31838  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31840as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31841See \`config.log' for more details" "$LINENO" 5; }
31842fi
31843
31844ac_ext=cpp
31845ac_cpp='$CXXCPP $CPPFLAGS'
31846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31849
31850
31851  # Only process if variable expands to non-empty
31852
31853  if test "x$CPP" != x; then
31854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31855
31856  # First separate the path from the arguments. This will split at the first
31857  # space.
31858  complete="$CPP"
31859  path="${complete%% *}"
31860  tmp="$complete EOL"
31861  arguments="${tmp#* }"
31862
31863  # Input might be given as Windows format, start by converting to
31864  # unix format.
31865  new_path=`$CYGPATH -u "$path"`
31866
31867  # Now try to locate executable using which
31868  new_path=`$WHICH "$new_path" 2> /dev/null`
31869  # bat and cmd files are not always considered executable in cygwin causing which
31870  # to not find them
31871  if test "x$new_path" = x \
31872      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31873      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31874    new_path=`$CYGPATH -u "$path"`
31875  fi
31876  if test "x$new_path" = x; then
31877    # Oops. Which didn't find the executable.
31878    # The splitting of arguments from the executable at a space might have been incorrect,
31879    # since paths with space are more likely in Windows. Give it another try with the whole
31880    # argument.
31881    path="$complete"
31882    arguments="EOL"
31883    new_path=`$CYGPATH -u "$path"`
31884    new_path=`$WHICH "$new_path" 2> /dev/null`
31885    # bat and cmd files are not always considered executable in cygwin causing which
31886    # to not find them
31887    if test "x$new_path" = x \
31888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31890      new_path=`$CYGPATH -u "$path"`
31891    fi
31892    if test "x$new_path" = x; then
31893      # It's still not found. Now this is an unrecoverable error.
31894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31895$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31896      has_space=`$ECHO "$complete" | $GREP " "`
31897      if test "x$has_space" != x; then
31898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31900      fi
31901      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31902    fi
31903  fi
31904
31905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31908  # "foo.exe" is OK but "foo" is an error.
31909  #
31910  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31911  # It is also a way to make sure we got the proper file name for the real test later on.
31912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31913  if test "x$test_shortpath" = x; then
31914    # Short path failed, file does not exist as specified.
31915    # Try adding .exe or .cmd
31916    if test -f "${new_path}.exe"; then
31917      input_to_shortpath="${new_path}.exe"
31918    elif test -f "${new_path}.cmd"; then
31919      input_to_shortpath="${new_path}.cmd"
31920    else
31921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31922$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31923      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31924$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31925      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31926    fi
31927  else
31928    input_to_shortpath="$new_path"
31929  fi
31930
31931  # Call helper function which possibly converts this using DOS-style short mode.
31932  # If so, the updated path is stored in $new_path.
31933  new_path="$input_to_shortpath"
31934
31935  input_path="$input_to_shortpath"
31936  # Check if we need to convert this using DOS-style short mode. If the path
31937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31938  # take no chances and rewrite it.
31939  # Note: m4 eats our [], so we need to use [ and ] instead.
31940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31941  if test "x$has_forbidden_chars" != x; then
31942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31946      # Going to short mode and back again did indeed matter. Since short mode is
31947      # case insensitive, let's make it lowercase to improve readability.
31948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31949      # Now convert it back to Unix-style (cygpath)
31950      input_path=`$CYGPATH -u "$shortmode_path"`
31951      new_path="$input_path"
31952    fi
31953  fi
31954
31955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31956  if test "x$test_cygdrive_prefix" = x; then
31957    # As a simple fix, exclude /usr/bin since it's not a real path.
31958    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31960      # a path prefixed by /cygdrive for fixpath to work.
31961      new_path="$CYGWIN_ROOT_PATH$input_path"
31962    fi
31963  fi
31964
31965  # remove trailing .exe if any
31966  new_path="${new_path/%.exe/}"
31967
31968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31969
31970  # First separate the path from the arguments. This will split at the first
31971  # space.
31972  complete="$CPP"
31973  path="${complete%% *}"
31974  tmp="$complete EOL"
31975  arguments="${tmp#* }"
31976
31977  # Input might be given as Windows format, start by converting to
31978  # unix format.
31979  new_path="$path"
31980
31981  windows_path="$new_path"
31982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31983    unix_path=`$CYGPATH -u "$windows_path"`
31984    new_path="$unix_path"
31985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31987    new_path="$unix_path"
31988  fi
31989
31990
31991  # Now try to locate executable using which
31992  new_path=`$WHICH "$new_path" 2> /dev/null`
31993
31994  if test "x$new_path" = x; then
31995    # Oops. Which didn't find the executable.
31996    # The splitting of arguments from the executable at a space might have been incorrect,
31997    # since paths with space are more likely in Windows. Give it another try with the whole
31998    # argument.
31999    path="$complete"
32000    arguments="EOL"
32001    new_path="$path"
32002
32003  windows_path="$new_path"
32004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32005    unix_path=`$CYGPATH -u "$windows_path"`
32006    new_path="$unix_path"
32007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32009    new_path="$unix_path"
32010  fi
32011
32012
32013    new_path=`$WHICH "$new_path" 2> /dev/null`
32014    # bat and cmd files are not always considered executable in MSYS causing which
32015    # to not find them
32016    if test "x$new_path" = x \
32017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32019      new_path="$path"
32020
32021  windows_path="$new_path"
32022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32023    unix_path=`$CYGPATH -u "$windows_path"`
32024    new_path="$unix_path"
32025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32027    new_path="$unix_path"
32028  fi
32029
32030    fi
32031
32032    if test "x$new_path" = x; then
32033      # It's still not found. Now this is an unrecoverable error.
32034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32035$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32036      has_space=`$ECHO "$complete" | $GREP " "`
32037      if test "x$has_space" != x; then
32038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32040      fi
32041      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32042    fi
32043  fi
32044
32045  # Now new_path has a complete unix path to the binary
32046  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32047    # Keep paths in /bin as-is, but remove trailing .exe if any
32048    new_path="${new_path/%.exe/}"
32049    # Do not save /bin paths to all_fixpath_prefixes!
32050  else
32051    # Not in mixed or Windows style, start by that.
32052    new_path=`cmd //c echo $new_path`
32053
32054  input_path="$new_path"
32055  # Check if we need to convert this using DOS-style short mode. If the path
32056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32057  # take no chances and rewrite it.
32058  # Note: m4 eats our [], so we need to use [ and ] instead.
32059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32060  if test "x$has_forbidden_chars" != x; then
32061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32063  fi
32064
32065    # Output is in $new_path
32066
32067  windows_path="$new_path"
32068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32069    unix_path=`$CYGPATH -u "$windows_path"`
32070    new_path="$unix_path"
32071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32073    new_path="$unix_path"
32074  fi
32075
32076    # remove trailing .exe if any
32077    new_path="${new_path/%.exe/}"
32078
32079    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32080    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32081  fi
32082
32083    else
32084      # We're on a unix platform. Hooray! :)
32085      # First separate the path from the arguments. This will split at the first
32086      # space.
32087      complete="$CPP"
32088      path="${complete%% *}"
32089      tmp="$complete EOL"
32090      arguments="${tmp#* }"
32091
32092      # Cannot rely on the command "which" here since it doesn't always work.
32093      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32094      if test -z "$is_absolute_path"; then
32095        # Path to executable is not absolute. Find it.
32096        IFS_save="$IFS"
32097        IFS=:
32098        for p in $PATH; do
32099          if test -f "$p/$path" && test -x "$p/$path"; then
32100            new_path="$p/$path"
32101            break
32102          fi
32103        done
32104        IFS="$IFS_save"
32105      else
32106        # This is an absolute path, we can use it without further modifications.
32107        new_path="$path"
32108      fi
32109
32110      if test "x$new_path" = x; then
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32112$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32113        has_space=`$ECHO "$complete" | $GREP " "`
32114        if test "x$has_space" != x; then
32115          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32116$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32117        fi
32118        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32119      fi
32120    fi
32121
32122    # Now join together the path and the arguments once again
32123    if test "x$arguments" != xEOL; then
32124      new_complete="$new_path ${arguments% *}"
32125    else
32126      new_complete="$new_path"
32127    fi
32128
32129    if test "x$complete" != "x$new_complete"; then
32130      CPP="$new_complete"
32131      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32132$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32133    fi
32134  fi
32135
32136  ac_ext=cpp
32137ac_cpp='$CXXCPP $CPPFLAGS'
32138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32142$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32143if test -z "$CXXCPP"; then
32144  if ${ac_cv_prog_CXXCPP+:} false; then :
32145  $as_echo_n "(cached) " >&6
32146else
32147      # Double quotes because CXXCPP needs to be expanded
32148    for CXXCPP in "$CXX -E" "/lib/cpp"
32149    do
32150      ac_preproc_ok=false
32151for ac_cxx_preproc_warn_flag in '' yes
32152do
32153  # Use a header file that comes with gcc, so configuring glibc
32154  # with a fresh cross-compiler works.
32155  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32156  # <limits.h> exists even on freestanding compilers.
32157  # On the NeXT, cc -E runs the code through the compiler's parser,
32158  # not just through cpp. "Syntax error" is here to catch this case.
32159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32160/* end confdefs.h.  */
32161#ifdef __STDC__
32162# include <limits.h>
32163#else
32164# include <assert.h>
32165#endif
32166		     Syntax error
32167_ACEOF
32168if ac_fn_cxx_try_cpp "$LINENO"; then :
32169
32170else
32171  # Broken: fails on valid input.
32172continue
32173fi
32174rm -f conftest.err conftest.i conftest.$ac_ext
32175
32176  # OK, works on sane cases.  Now check whether nonexistent headers
32177  # can be detected and how.
32178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32179/* end confdefs.h.  */
32180#include <ac_nonexistent.h>
32181_ACEOF
32182if ac_fn_cxx_try_cpp "$LINENO"; then :
32183  # Broken: success on invalid input.
32184continue
32185else
32186  # Passes both tests.
32187ac_preproc_ok=:
32188break
32189fi
32190rm -f conftest.err conftest.i conftest.$ac_ext
32191
32192done
32193# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32194rm -f conftest.i conftest.err conftest.$ac_ext
32195if $ac_preproc_ok; then :
32196  break
32197fi
32198
32199    done
32200    ac_cv_prog_CXXCPP=$CXXCPP
32201
32202fi
32203  CXXCPP=$ac_cv_prog_CXXCPP
32204else
32205  ac_cv_prog_CXXCPP=$CXXCPP
32206fi
32207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32208$as_echo "$CXXCPP" >&6; }
32209ac_preproc_ok=false
32210for ac_cxx_preproc_warn_flag in '' yes
32211do
32212  # Use a header file that comes with gcc, so configuring glibc
32213  # with a fresh cross-compiler works.
32214  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32215  # <limits.h> exists even on freestanding compilers.
32216  # On the NeXT, cc -E runs the code through the compiler's parser,
32217  # not just through cpp. "Syntax error" is here to catch this case.
32218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32219/* end confdefs.h.  */
32220#ifdef __STDC__
32221# include <limits.h>
32222#else
32223# include <assert.h>
32224#endif
32225		     Syntax error
32226_ACEOF
32227if ac_fn_cxx_try_cpp "$LINENO"; then :
32228
32229else
32230  # Broken: fails on valid input.
32231continue
32232fi
32233rm -f conftest.err conftest.i conftest.$ac_ext
32234
32235  # OK, works on sane cases.  Now check whether nonexistent headers
32236  # can be detected and how.
32237  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32238/* end confdefs.h.  */
32239#include <ac_nonexistent.h>
32240_ACEOF
32241if ac_fn_cxx_try_cpp "$LINENO"; then :
32242  # Broken: success on invalid input.
32243continue
32244else
32245  # Passes both tests.
32246ac_preproc_ok=:
32247break
32248fi
32249rm -f conftest.err conftest.i conftest.$ac_ext
32250
32251done
32252# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32253rm -f conftest.i conftest.err conftest.$ac_ext
32254if $ac_preproc_ok; then :
32255
32256else
32257  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32259as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32260See \`config.log' for more details" "$LINENO" 5; }
32261fi
32262
32263ac_ext=cpp
32264ac_cpp='$CXXCPP $CPPFLAGS'
32265ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32266ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32267ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32268
32269
32270  # Only process if variable expands to non-empty
32271
32272  if test "x$CXXCPP" != x; then
32273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32274
32275  # First separate the path from the arguments. This will split at the first
32276  # space.
32277  complete="$CXXCPP"
32278  path="${complete%% *}"
32279  tmp="$complete EOL"
32280  arguments="${tmp#* }"
32281
32282  # Input might be given as Windows format, start by converting to
32283  # unix format.
32284  new_path=`$CYGPATH -u "$path"`
32285
32286  # Now try to locate executable using which
32287  new_path=`$WHICH "$new_path" 2> /dev/null`
32288  # bat and cmd files are not always considered executable in cygwin causing which
32289  # to not find them
32290  if test "x$new_path" = x \
32291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32293    new_path=`$CYGPATH -u "$path"`
32294  fi
32295  if test "x$new_path" = x; then
32296    # Oops. Which didn't find the executable.
32297    # The splitting of arguments from the executable at a space might have been incorrect,
32298    # since paths with space are more likely in Windows. Give it another try with the whole
32299    # argument.
32300    path="$complete"
32301    arguments="EOL"
32302    new_path=`$CYGPATH -u "$path"`
32303    new_path=`$WHICH "$new_path" 2> /dev/null`
32304    # bat and cmd files are not always considered executable in cygwin causing which
32305    # to not find them
32306    if test "x$new_path" = x \
32307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32309      new_path=`$CYGPATH -u "$path"`
32310    fi
32311    if test "x$new_path" = x; then
32312      # It's still not found. Now this is an unrecoverable error.
32313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32314$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32315      has_space=`$ECHO "$complete" | $GREP " "`
32316      if test "x$has_space" != x; then
32317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32319      fi
32320      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32321    fi
32322  fi
32323
32324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32327  # "foo.exe" is OK but "foo" is an error.
32328  #
32329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32330  # It is also a way to make sure we got the proper file name for the real test later on.
32331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32332  if test "x$test_shortpath" = x; then
32333    # Short path failed, file does not exist as specified.
32334    # Try adding .exe or .cmd
32335    if test -f "${new_path}.exe"; then
32336      input_to_shortpath="${new_path}.exe"
32337    elif test -f "${new_path}.cmd"; then
32338      input_to_shortpath="${new_path}.cmd"
32339    else
32340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32341$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32344      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32345    fi
32346  else
32347    input_to_shortpath="$new_path"
32348  fi
32349
32350  # Call helper function which possibly converts this using DOS-style short mode.
32351  # If so, the updated path is stored in $new_path.
32352  new_path="$input_to_shortpath"
32353
32354  input_path="$input_to_shortpath"
32355  # Check if we need to convert this using DOS-style short mode. If the path
32356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32357  # take no chances and rewrite it.
32358  # Note: m4 eats our [], so we need to use [ and ] instead.
32359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32360  if test "x$has_forbidden_chars" != x; then
32361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32365      # Going to short mode and back again did indeed matter. Since short mode is
32366      # case insensitive, let's make it lowercase to improve readability.
32367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32368      # Now convert it back to Unix-style (cygpath)
32369      input_path=`$CYGPATH -u "$shortmode_path"`
32370      new_path="$input_path"
32371    fi
32372  fi
32373
32374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32375  if test "x$test_cygdrive_prefix" = x; then
32376    # As a simple fix, exclude /usr/bin since it's not a real path.
32377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32379      # a path prefixed by /cygdrive for fixpath to work.
32380      new_path="$CYGWIN_ROOT_PATH$input_path"
32381    fi
32382  fi
32383
32384  # remove trailing .exe if any
32385  new_path="${new_path/%.exe/}"
32386
32387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32388
32389  # First separate the path from the arguments. This will split at the first
32390  # space.
32391  complete="$CXXCPP"
32392  path="${complete%% *}"
32393  tmp="$complete EOL"
32394  arguments="${tmp#* }"
32395
32396  # Input might be given as Windows format, start by converting to
32397  # unix format.
32398  new_path="$path"
32399
32400  windows_path="$new_path"
32401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32402    unix_path=`$CYGPATH -u "$windows_path"`
32403    new_path="$unix_path"
32404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32406    new_path="$unix_path"
32407  fi
32408
32409
32410  # Now try to locate executable using which
32411  new_path=`$WHICH "$new_path" 2> /dev/null`
32412
32413  if test "x$new_path" = x; then
32414    # Oops. Which didn't find the executable.
32415    # The splitting of arguments from the executable at a space might have been incorrect,
32416    # since paths with space are more likely in Windows. Give it another try with the whole
32417    # argument.
32418    path="$complete"
32419    arguments="EOL"
32420    new_path="$path"
32421
32422  windows_path="$new_path"
32423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32424    unix_path=`$CYGPATH -u "$windows_path"`
32425    new_path="$unix_path"
32426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32428    new_path="$unix_path"
32429  fi
32430
32431
32432    new_path=`$WHICH "$new_path" 2> /dev/null`
32433    # bat and cmd files are not always considered executable in MSYS causing which
32434    # to not find them
32435    if test "x$new_path" = x \
32436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32438      new_path="$path"
32439
32440  windows_path="$new_path"
32441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442    unix_path=`$CYGPATH -u "$windows_path"`
32443    new_path="$unix_path"
32444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446    new_path="$unix_path"
32447  fi
32448
32449    fi
32450
32451    if test "x$new_path" = x; then
32452      # It's still not found. Now this is an unrecoverable error.
32453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32454$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32455      has_space=`$ECHO "$complete" | $GREP " "`
32456      if test "x$has_space" != x; then
32457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32459      fi
32460      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32461    fi
32462  fi
32463
32464  # Now new_path has a complete unix path to the binary
32465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32466    # Keep paths in /bin as-is, but remove trailing .exe if any
32467    new_path="${new_path/%.exe/}"
32468    # Do not save /bin paths to all_fixpath_prefixes!
32469  else
32470    # Not in mixed or Windows style, start by that.
32471    new_path=`cmd //c echo $new_path`
32472
32473  input_path="$new_path"
32474  # Check if we need to convert this using DOS-style short mode. If the path
32475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32476  # take no chances and rewrite it.
32477  # Note: m4 eats our [], so we need to use [ and ] instead.
32478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32479  if test "x$has_forbidden_chars" != x; then
32480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32482  fi
32483
32484    # Output is in $new_path
32485
32486  windows_path="$new_path"
32487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32488    unix_path=`$CYGPATH -u "$windows_path"`
32489    new_path="$unix_path"
32490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32492    new_path="$unix_path"
32493  fi
32494
32495    # remove trailing .exe if any
32496    new_path="${new_path/%.exe/}"
32497
32498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32500  fi
32501
32502    else
32503      # We're on a unix platform. Hooray! :)
32504      # First separate the path from the arguments. This will split at the first
32505      # space.
32506      complete="$CXXCPP"
32507      path="${complete%% *}"
32508      tmp="$complete EOL"
32509      arguments="${tmp#* }"
32510
32511      # Cannot rely on the command "which" here since it doesn't always work.
32512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32513      if test -z "$is_absolute_path"; then
32514        # Path to executable is not absolute. Find it.
32515        IFS_save="$IFS"
32516        IFS=:
32517        for p in $PATH; do
32518          if test -f "$p/$path" && test -x "$p/$path"; then
32519            new_path="$p/$path"
32520            break
32521          fi
32522        done
32523        IFS="$IFS_save"
32524      else
32525        # This is an absolute path, we can use it without further modifications.
32526        new_path="$path"
32527      fi
32528
32529      if test "x$new_path" = x; then
32530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32531$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32532        has_space=`$ECHO "$complete" | $GREP " "`
32533        if test "x$has_space" != x; then
32534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32536        fi
32537        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32538      fi
32539    fi
32540
32541    # Now join together the path and the arguments once again
32542    if test "x$arguments" != xEOL; then
32543      new_complete="$new_path ${arguments% *}"
32544    else
32545      new_complete="$new_path"
32546    fi
32547
32548    if test "x$complete" != "x$new_complete"; then
32549      CXXCPP="$new_complete"
32550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32551$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32552    fi
32553  fi
32554
32555
32556  #
32557  # Setup the linker (LD)
32558  #
32559  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32560    # In the Microsoft toolchain we have a separate LD command "link".
32561    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32562    # a cygwin program for something completely different.
32563    # Extract the first word of "link", so it can be a program name with args.
32564set dummy link; ac_word=$2
32565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32566$as_echo_n "checking for $ac_word... " >&6; }
32567if ${ac_cv_prog_LD+:} false; then :
32568  $as_echo_n "(cached) " >&6
32569else
32570  if test -n "$LD"; then
32571  ac_cv_prog_LD="$LD" # Let the user override the test.
32572else
32573  ac_prog_rejected=no
32574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32575for as_dir in $PATH
32576do
32577  IFS=$as_save_IFS
32578  test -z "$as_dir" && as_dir=.
32579    for ac_exec_ext in '' $ac_executable_extensions; do
32580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32581    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32582       ac_prog_rejected=yes
32583       continue
32584     fi
32585    ac_cv_prog_LD="link"
32586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32587    break 2
32588  fi
32589done
32590  done
32591IFS=$as_save_IFS
32592
32593if test $ac_prog_rejected = yes; then
32594  # We found a bogon in the path, so make sure we never use it.
32595  set dummy $ac_cv_prog_LD
32596  shift
32597  if test $# != 0; then
32598    # We chose a different compiler from the bogus one.
32599    # However, it has the same basename, so the bogon will be chosen
32600    # first if we set LD to just the basename; use the full file name.
32601    shift
32602    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32603  fi
32604fi
32605fi
32606fi
32607LD=$ac_cv_prog_LD
32608if test -n "$LD"; then
32609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32610$as_echo "$LD" >&6; }
32611else
32612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32613$as_echo "no" >&6; }
32614fi
32615
32616
32617
32618  # Only process if variable expands to non-empty
32619
32620  if test "x$LD" != x; then
32621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32622
32623  # First separate the path from the arguments. This will split at the first
32624  # space.
32625  complete="$LD"
32626  path="${complete%% *}"
32627  tmp="$complete EOL"
32628  arguments="${tmp#* }"
32629
32630  # Input might be given as Windows format, start by converting to
32631  # unix format.
32632  new_path=`$CYGPATH -u "$path"`
32633
32634  # Now try to locate executable using which
32635  new_path=`$WHICH "$new_path" 2> /dev/null`
32636  # bat and cmd files are not always considered executable in cygwin causing which
32637  # to not find them
32638  if test "x$new_path" = x \
32639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32641    new_path=`$CYGPATH -u "$path"`
32642  fi
32643  if test "x$new_path" = x; then
32644    # Oops. Which didn't find the executable.
32645    # The splitting of arguments from the executable at a space might have been incorrect,
32646    # since paths with space are more likely in Windows. Give it another try with the whole
32647    # argument.
32648    path="$complete"
32649    arguments="EOL"
32650    new_path=`$CYGPATH -u "$path"`
32651    new_path=`$WHICH "$new_path" 2> /dev/null`
32652    # bat and cmd files are not always considered executable in cygwin causing which
32653    # to not find them
32654    if test "x$new_path" = x \
32655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32657      new_path=`$CYGPATH -u "$path"`
32658    fi
32659    if test "x$new_path" = x; then
32660      # It's still not found. Now this is an unrecoverable error.
32661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32662$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32663      has_space=`$ECHO "$complete" | $GREP " "`
32664      if test "x$has_space" != x; then
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32667      fi
32668      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32669    fi
32670  fi
32671
32672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32675  # "foo.exe" is OK but "foo" is an error.
32676  #
32677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32678  # It is also a way to make sure we got the proper file name for the real test later on.
32679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32680  if test "x$test_shortpath" = x; then
32681    # Short path failed, file does not exist as specified.
32682    # Try adding .exe or .cmd
32683    if test -f "${new_path}.exe"; then
32684      input_to_shortpath="${new_path}.exe"
32685    elif test -f "${new_path}.cmd"; then
32686      input_to_shortpath="${new_path}.cmd"
32687    else
32688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32689$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32692      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32693    fi
32694  else
32695    input_to_shortpath="$new_path"
32696  fi
32697
32698  # Call helper function which possibly converts this using DOS-style short mode.
32699  # If so, the updated path is stored in $new_path.
32700  new_path="$input_to_shortpath"
32701
32702  input_path="$input_to_shortpath"
32703  # Check if we need to convert this using DOS-style short mode. If the path
32704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32705  # take no chances and rewrite it.
32706  # Note: m4 eats our [], so we need to use [ and ] instead.
32707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32708  if test "x$has_forbidden_chars" != x; then
32709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32713      # Going to short mode and back again did indeed matter. Since short mode is
32714      # case insensitive, let's make it lowercase to improve readability.
32715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32716      # Now convert it back to Unix-style (cygpath)
32717      input_path=`$CYGPATH -u "$shortmode_path"`
32718      new_path="$input_path"
32719    fi
32720  fi
32721
32722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32723  if test "x$test_cygdrive_prefix" = x; then
32724    # As a simple fix, exclude /usr/bin since it's not a real path.
32725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32727      # a path prefixed by /cygdrive for fixpath to work.
32728      new_path="$CYGWIN_ROOT_PATH$input_path"
32729    fi
32730  fi
32731
32732  # remove trailing .exe if any
32733  new_path="${new_path/%.exe/}"
32734
32735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32736
32737  # First separate the path from the arguments. This will split at the first
32738  # space.
32739  complete="$LD"
32740  path="${complete%% *}"
32741  tmp="$complete EOL"
32742  arguments="${tmp#* }"
32743
32744  # Input might be given as Windows format, start by converting to
32745  # unix format.
32746  new_path="$path"
32747
32748  windows_path="$new_path"
32749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32750    unix_path=`$CYGPATH -u "$windows_path"`
32751    new_path="$unix_path"
32752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32754    new_path="$unix_path"
32755  fi
32756
32757
32758  # Now try to locate executable using which
32759  new_path=`$WHICH "$new_path" 2> /dev/null`
32760
32761  if test "x$new_path" = x; then
32762    # Oops. Which didn't find the executable.
32763    # The splitting of arguments from the executable at a space might have been incorrect,
32764    # since paths with space are more likely in Windows. Give it another try with the whole
32765    # argument.
32766    path="$complete"
32767    arguments="EOL"
32768    new_path="$path"
32769
32770  windows_path="$new_path"
32771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32772    unix_path=`$CYGPATH -u "$windows_path"`
32773    new_path="$unix_path"
32774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32776    new_path="$unix_path"
32777  fi
32778
32779
32780    new_path=`$WHICH "$new_path" 2> /dev/null`
32781    # bat and cmd files are not always considered executable in MSYS causing which
32782    # to not find them
32783    if test "x$new_path" = x \
32784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32786      new_path="$path"
32787
32788  windows_path="$new_path"
32789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32790    unix_path=`$CYGPATH -u "$windows_path"`
32791    new_path="$unix_path"
32792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32794    new_path="$unix_path"
32795  fi
32796
32797    fi
32798
32799    if test "x$new_path" = x; then
32800      # It's still not found. Now this is an unrecoverable error.
32801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32802$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32803      has_space=`$ECHO "$complete" | $GREP " "`
32804      if test "x$has_space" != x; then
32805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32807      fi
32808      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32809    fi
32810  fi
32811
32812  # Now new_path has a complete unix path to the binary
32813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32814    # Keep paths in /bin as-is, but remove trailing .exe if any
32815    new_path="${new_path/%.exe/}"
32816    # Do not save /bin paths to all_fixpath_prefixes!
32817  else
32818    # Not in mixed or Windows style, start by that.
32819    new_path=`cmd //c echo $new_path`
32820
32821  input_path="$new_path"
32822  # Check if we need to convert this using DOS-style short mode. If the path
32823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32824  # take no chances and rewrite it.
32825  # Note: m4 eats our [], so we need to use [ and ] instead.
32826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32827  if test "x$has_forbidden_chars" != x; then
32828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32830  fi
32831
32832    # Output is in $new_path
32833
32834  windows_path="$new_path"
32835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836    unix_path=`$CYGPATH -u "$windows_path"`
32837    new_path="$unix_path"
32838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32840    new_path="$unix_path"
32841  fi
32842
32843    # remove trailing .exe if any
32844    new_path="${new_path/%.exe/}"
32845
32846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32848  fi
32849
32850    else
32851      # We're on a unix platform. Hooray! :)
32852      # First separate the path from the arguments. This will split at the first
32853      # space.
32854      complete="$LD"
32855      path="${complete%% *}"
32856      tmp="$complete EOL"
32857      arguments="${tmp#* }"
32858
32859      # Cannot rely on the command "which" here since it doesn't always work.
32860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32861      if test -z "$is_absolute_path"; then
32862        # Path to executable is not absolute. Find it.
32863        IFS_save="$IFS"
32864        IFS=:
32865        for p in $PATH; do
32866          if test -f "$p/$path" && test -x "$p/$path"; then
32867            new_path="$p/$path"
32868            break
32869          fi
32870        done
32871        IFS="$IFS_save"
32872      else
32873        # This is an absolute path, we can use it without further modifications.
32874        new_path="$path"
32875      fi
32876
32877      if test "x$new_path" = x; then
32878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32879$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32880        has_space=`$ECHO "$complete" | $GREP " "`
32881        if test "x$has_space" != x; then
32882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32884        fi
32885        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32886      fi
32887    fi
32888
32889    # Now join together the path and the arguments once again
32890    if test "x$arguments" != xEOL; then
32891      new_complete="$new_path ${arguments% *}"
32892    else
32893      new_complete="$new_path"
32894    fi
32895
32896    if test "x$complete" != "x$new_complete"; then
32897      LD="$new_complete"
32898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32899$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32900    fi
32901  fi
32902
32903    # Verify that we indeed succeeded with this trick.
32904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32905$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32906    "$LD" --version > /dev/null
32907    if test $? -eq 0 ; then
32908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32909$as_echo "no" >&6; }
32910      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32911    else
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32913$as_echo "yes" >&6; }
32914    fi
32915    LDCXX="$LD"
32916  else
32917    # All other toolchains use the compiler to link.
32918    LD="$CC"
32919    LDCXX="$CXX"
32920  fi
32921
32922  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32923
32924
32925  #
32926  # Setup the assembler (AS)
32927  #
32928  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32929    # FIXME: should this really be solaris, or solstudio?
32930
32931
32932  # Publish this variable in the help.
32933
32934
32935  if test "x$AS" = x; then
32936    # The variable is not set by user, try to locate tool using the code snippet
32937    for ac_prog in as
32938do
32939  # Extract the first word of "$ac_prog", so it can be a program name with args.
32940set dummy $ac_prog; ac_word=$2
32941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32942$as_echo_n "checking for $ac_word... " >&6; }
32943if ${ac_cv_path_AS+:} false; then :
32944  $as_echo_n "(cached) " >&6
32945else
32946  case $AS in
32947  [\\/]* | ?:[\\/]*)
32948  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32949  ;;
32950  *)
32951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32952for as_dir in $PATH
32953do
32954  IFS=$as_save_IFS
32955  test -z "$as_dir" && as_dir=.
32956    for ac_exec_ext in '' $ac_executable_extensions; do
32957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32958    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32960    break 2
32961  fi
32962done
32963  done
32964IFS=$as_save_IFS
32965
32966  ;;
32967esac
32968fi
32969AS=$ac_cv_path_AS
32970if test -n "$AS"; then
32971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32972$as_echo "$AS" >&6; }
32973else
32974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32975$as_echo "no" >&6; }
32976fi
32977
32978
32979  test -n "$AS" && break
32980done
32981
32982  else
32983    # The variable is set, but is it from the command line or the environment?
32984
32985    # Try to remove the string !AS! from our list.
32986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32988      # If it failed, the variable was not from the command line. Ignore it,
32989      # but warn the user (except for BASH, which is always set by the calling BASH).
32990      if test "xAS" != xBASH; then
32991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32992$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32993      fi
32994      # Try to locate tool using the code snippet
32995      for ac_prog in as
32996do
32997  # Extract the first word of "$ac_prog", so it can be a program name with args.
32998set dummy $ac_prog; ac_word=$2
32999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33000$as_echo_n "checking for $ac_word... " >&6; }
33001if ${ac_cv_path_AS+:} false; then :
33002  $as_echo_n "(cached) " >&6
33003else
33004  case $AS in
33005  [\\/]* | ?:[\\/]*)
33006  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33007  ;;
33008  *)
33009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33010for as_dir in $PATH
33011do
33012  IFS=$as_save_IFS
33013  test -z "$as_dir" && as_dir=.
33014    for ac_exec_ext in '' $ac_executable_extensions; do
33015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33016    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33018    break 2
33019  fi
33020done
33021  done
33022IFS=$as_save_IFS
33023
33024  ;;
33025esac
33026fi
33027AS=$ac_cv_path_AS
33028if test -n "$AS"; then
33029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33030$as_echo "$AS" >&6; }
33031else
33032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33033$as_echo "no" >&6; }
33034fi
33035
33036
33037  test -n "$AS" && break
33038done
33039
33040    else
33041      # If it succeeded, then it was overridden by the user. We will use it
33042      # for the tool.
33043
33044      # First remove it from the list of overridden variables, so we can test
33045      # for unknown variables in the end.
33046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33047
33048      # Check if the provided tool contains a complete path.
33049      tool_specified="$AS"
33050      tool_basename="${tool_specified##*/}"
33051      if test "x$tool_basename" = "x$tool_specified"; then
33052        # A command without a complete path is provided, search $PATH.
33053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33054$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33055        # Extract the first word of "$tool_basename", so it can be a program name with args.
33056set dummy $tool_basename; ac_word=$2
33057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33058$as_echo_n "checking for $ac_word... " >&6; }
33059if ${ac_cv_path_AS+:} false; then :
33060  $as_echo_n "(cached) " >&6
33061else
33062  case $AS in
33063  [\\/]* | ?:[\\/]*)
33064  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33065  ;;
33066  *)
33067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33068for as_dir in $PATH
33069do
33070  IFS=$as_save_IFS
33071  test -z "$as_dir" && as_dir=.
33072    for ac_exec_ext in '' $ac_executable_extensions; do
33073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33074    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33076    break 2
33077  fi
33078done
33079  done
33080IFS=$as_save_IFS
33081
33082  ;;
33083esac
33084fi
33085AS=$ac_cv_path_AS
33086if test -n "$AS"; then
33087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33088$as_echo "$AS" >&6; }
33089else
33090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33091$as_echo "no" >&6; }
33092fi
33093
33094
33095        if test "x$AS" = x; then
33096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33097        fi
33098      else
33099        # Otherwise we believe it is a complete path. Use it as it is.
33100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33101$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33103$as_echo_n "checking for AS... " >&6; }
33104        if test ! -x "$tool_specified"; then
33105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33106$as_echo "not found" >&6; }
33107          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33108        fi
33109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33110$as_echo "$tool_specified" >&6; }
33111      fi
33112    fi
33113  fi
33114
33115
33116
33117  # Only process if variable expands to non-empty
33118
33119  if test "x$AS" != x; then
33120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33121
33122  # First separate the path from the arguments. This will split at the first
33123  # space.
33124  complete="$AS"
33125  path="${complete%% *}"
33126  tmp="$complete EOL"
33127  arguments="${tmp#* }"
33128
33129  # Input might be given as Windows format, start by converting to
33130  # unix format.
33131  new_path=`$CYGPATH -u "$path"`
33132
33133  # Now try to locate executable using which
33134  new_path=`$WHICH "$new_path" 2> /dev/null`
33135  # bat and cmd files are not always considered executable in cygwin causing which
33136  # to not find them
33137  if test "x$new_path" = x \
33138      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33139      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33140    new_path=`$CYGPATH -u "$path"`
33141  fi
33142  if test "x$new_path" = x; then
33143    # Oops. Which didn't find the executable.
33144    # The splitting of arguments from the executable at a space might have been incorrect,
33145    # since paths with space are more likely in Windows. Give it another try with the whole
33146    # argument.
33147    path="$complete"
33148    arguments="EOL"
33149    new_path=`$CYGPATH -u "$path"`
33150    new_path=`$WHICH "$new_path" 2> /dev/null`
33151    # bat and cmd files are not always considered executable in cygwin causing which
33152    # to not find them
33153    if test "x$new_path" = x \
33154        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33155        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33156      new_path=`$CYGPATH -u "$path"`
33157    fi
33158    if test "x$new_path" = x; then
33159      # It's still not found. Now this is an unrecoverable error.
33160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33161$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33162      has_space=`$ECHO "$complete" | $GREP " "`
33163      if test "x$has_space" != x; then
33164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33166      fi
33167      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33168    fi
33169  fi
33170
33171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33174  # "foo.exe" is OK but "foo" is an error.
33175  #
33176  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33177  # It is also a way to make sure we got the proper file name for the real test later on.
33178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33179  if test "x$test_shortpath" = x; then
33180    # Short path failed, file does not exist as specified.
33181    # Try adding .exe or .cmd
33182    if test -f "${new_path}.exe"; then
33183      input_to_shortpath="${new_path}.exe"
33184    elif test -f "${new_path}.cmd"; then
33185      input_to_shortpath="${new_path}.cmd"
33186    else
33187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33188$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33189      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33190$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33191      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33192    fi
33193  else
33194    input_to_shortpath="$new_path"
33195  fi
33196
33197  # Call helper function which possibly converts this using DOS-style short mode.
33198  # If so, the updated path is stored in $new_path.
33199  new_path="$input_to_shortpath"
33200
33201  input_path="$input_to_shortpath"
33202  # Check if we need to convert this using DOS-style short mode. If the path
33203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33204  # take no chances and rewrite it.
33205  # Note: m4 eats our [], so we need to use [ and ] instead.
33206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33207  if test "x$has_forbidden_chars" != x; then
33208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33212      # Going to short mode and back again did indeed matter. Since short mode is
33213      # case insensitive, let's make it lowercase to improve readability.
33214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33215      # Now convert it back to Unix-style (cygpath)
33216      input_path=`$CYGPATH -u "$shortmode_path"`
33217      new_path="$input_path"
33218    fi
33219  fi
33220
33221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33222  if test "x$test_cygdrive_prefix" = x; then
33223    # As a simple fix, exclude /usr/bin since it's not a real path.
33224    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33226      # a path prefixed by /cygdrive for fixpath to work.
33227      new_path="$CYGWIN_ROOT_PATH$input_path"
33228    fi
33229  fi
33230
33231  # remove trailing .exe if any
33232  new_path="${new_path/%.exe/}"
33233
33234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33235
33236  # First separate the path from the arguments. This will split at the first
33237  # space.
33238  complete="$AS"
33239  path="${complete%% *}"
33240  tmp="$complete EOL"
33241  arguments="${tmp#* }"
33242
33243  # Input might be given as Windows format, start by converting to
33244  # unix format.
33245  new_path="$path"
33246
33247  windows_path="$new_path"
33248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33249    unix_path=`$CYGPATH -u "$windows_path"`
33250    new_path="$unix_path"
33251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33253    new_path="$unix_path"
33254  fi
33255
33256
33257  # Now try to locate executable using which
33258  new_path=`$WHICH "$new_path" 2> /dev/null`
33259
33260  if test "x$new_path" = x; then
33261    # Oops. Which didn't find the executable.
33262    # The splitting of arguments from the executable at a space might have been incorrect,
33263    # since paths with space are more likely in Windows. Give it another try with the whole
33264    # argument.
33265    path="$complete"
33266    arguments="EOL"
33267    new_path="$path"
33268
33269  windows_path="$new_path"
33270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33271    unix_path=`$CYGPATH -u "$windows_path"`
33272    new_path="$unix_path"
33273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33275    new_path="$unix_path"
33276  fi
33277
33278
33279    new_path=`$WHICH "$new_path" 2> /dev/null`
33280    # bat and cmd files are not always considered executable in MSYS causing which
33281    # to not find them
33282    if test "x$new_path" = x \
33283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33285      new_path="$path"
33286
33287  windows_path="$new_path"
33288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33289    unix_path=`$CYGPATH -u "$windows_path"`
33290    new_path="$unix_path"
33291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33293    new_path="$unix_path"
33294  fi
33295
33296    fi
33297
33298    if test "x$new_path" = x; then
33299      # It's still not found. Now this is an unrecoverable error.
33300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33301$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33302      has_space=`$ECHO "$complete" | $GREP " "`
33303      if test "x$has_space" != x; then
33304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33306      fi
33307      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33308    fi
33309  fi
33310
33311  # Now new_path has a complete unix path to the binary
33312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33313    # Keep paths in /bin as-is, but remove trailing .exe if any
33314    new_path="${new_path/%.exe/}"
33315    # Do not save /bin paths to all_fixpath_prefixes!
33316  else
33317    # Not in mixed or Windows style, start by that.
33318    new_path=`cmd //c echo $new_path`
33319
33320  input_path="$new_path"
33321  # Check if we need to convert this using DOS-style short mode. If the path
33322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33323  # take no chances and rewrite it.
33324  # Note: m4 eats our [], so we need to use [ and ] instead.
33325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33326  if test "x$has_forbidden_chars" != x; then
33327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33329  fi
33330
33331    # Output is in $new_path
33332
33333  windows_path="$new_path"
33334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33335    unix_path=`$CYGPATH -u "$windows_path"`
33336    new_path="$unix_path"
33337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33339    new_path="$unix_path"
33340  fi
33341
33342    # remove trailing .exe if any
33343    new_path="${new_path/%.exe/}"
33344
33345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33347  fi
33348
33349    else
33350      # We're on a unix platform. Hooray! :)
33351      # First separate the path from the arguments. This will split at the first
33352      # space.
33353      complete="$AS"
33354      path="${complete%% *}"
33355      tmp="$complete EOL"
33356      arguments="${tmp#* }"
33357
33358      # Cannot rely on the command "which" here since it doesn't always work.
33359      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33360      if test -z "$is_absolute_path"; then
33361        # Path to executable is not absolute. Find it.
33362        IFS_save="$IFS"
33363        IFS=:
33364        for p in $PATH; do
33365          if test -f "$p/$path" && test -x "$p/$path"; then
33366            new_path="$p/$path"
33367            break
33368          fi
33369        done
33370        IFS="$IFS_save"
33371      else
33372        # This is an absolute path, we can use it without further modifications.
33373        new_path="$path"
33374      fi
33375
33376      if test "x$new_path" = x; then
33377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33378$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33379        has_space=`$ECHO "$complete" | $GREP " "`
33380        if test "x$has_space" != x; then
33381          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33382$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33383        fi
33384        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33385      fi
33386    fi
33387
33388    # Now join together the path and the arguments once again
33389    if test "x$arguments" != xEOL; then
33390      new_complete="$new_path ${arguments% *}"
33391    else
33392      new_complete="$new_path"
33393    fi
33394
33395    if test "x$complete" != "x$new_complete"; then
33396      AS="$new_complete"
33397      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33398$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33399    fi
33400  fi
33401
33402  else
33403    # FIXME: is this correct for microsoft?
33404    AS="$CC -c"
33405  fi
33406
33407
33408  #
33409  # Setup the archiver (AR)
33410  #
33411  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33412    # The corresponding ar tool is lib.exe (used to create static libraries)
33413    # Extract the first word of "lib", so it can be a program name with args.
33414set dummy lib; ac_word=$2
33415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33416$as_echo_n "checking for $ac_word... " >&6; }
33417if ${ac_cv_prog_AR+:} false; then :
33418  $as_echo_n "(cached) " >&6
33419else
33420  if test -n "$AR"; then
33421  ac_cv_prog_AR="$AR" # Let the user override the test.
33422else
33423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33424for as_dir in $PATH
33425do
33426  IFS=$as_save_IFS
33427  test -z "$as_dir" && as_dir=.
33428    for ac_exec_ext in '' $ac_executable_extensions; do
33429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33430    ac_cv_prog_AR="lib"
33431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33432    break 2
33433  fi
33434done
33435  done
33436IFS=$as_save_IFS
33437
33438fi
33439fi
33440AR=$ac_cv_prog_AR
33441if test -n "$AR"; then
33442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33443$as_echo "$AR" >&6; }
33444else
33445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33446$as_echo "no" >&6; }
33447fi
33448
33449
33450  else
33451
33452
33453  # Publish this variable in the help.
33454
33455
33456  if test "x$AR" = x; then
33457    # The variable is not set by user, try to locate tool using the code snippet
33458    if test -n "$ac_tool_prefix"; then
33459  for ac_prog in ar
33460  do
33461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33464$as_echo_n "checking for $ac_word... " >&6; }
33465if ${ac_cv_prog_AR+:} false; then :
33466  $as_echo_n "(cached) " >&6
33467else
33468  if test -n "$AR"; then
33469  ac_cv_prog_AR="$AR" # Let the user override the test.
33470else
33471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33472for as_dir in $PATH
33473do
33474  IFS=$as_save_IFS
33475  test -z "$as_dir" && as_dir=.
33476    for ac_exec_ext in '' $ac_executable_extensions; do
33477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33478    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33480    break 2
33481  fi
33482done
33483  done
33484IFS=$as_save_IFS
33485
33486fi
33487fi
33488AR=$ac_cv_prog_AR
33489if test -n "$AR"; then
33490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33491$as_echo "$AR" >&6; }
33492else
33493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33494$as_echo "no" >&6; }
33495fi
33496
33497
33498    test -n "$AR" && break
33499  done
33500fi
33501if test -z "$AR"; then
33502  ac_ct_AR=$AR
33503  for ac_prog in ar
33504do
33505  # Extract the first word of "$ac_prog", so it can be a program name with args.
33506set dummy $ac_prog; ac_word=$2
33507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33508$as_echo_n "checking for $ac_word... " >&6; }
33509if ${ac_cv_prog_ac_ct_AR+:} false; then :
33510  $as_echo_n "(cached) " >&6
33511else
33512  if test -n "$ac_ct_AR"; then
33513  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33514else
33515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33516for as_dir in $PATH
33517do
33518  IFS=$as_save_IFS
33519  test -z "$as_dir" && as_dir=.
33520    for ac_exec_ext in '' $ac_executable_extensions; do
33521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33522    ac_cv_prog_ac_ct_AR="$ac_prog"
33523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33524    break 2
33525  fi
33526done
33527  done
33528IFS=$as_save_IFS
33529
33530fi
33531fi
33532ac_ct_AR=$ac_cv_prog_ac_ct_AR
33533if test -n "$ac_ct_AR"; then
33534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33535$as_echo "$ac_ct_AR" >&6; }
33536else
33537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33538$as_echo "no" >&6; }
33539fi
33540
33541
33542  test -n "$ac_ct_AR" && break
33543done
33544
33545  if test "x$ac_ct_AR" = x; then
33546    AR=""
33547  else
33548    case $cross_compiling:$ac_tool_warned in
33549yes:)
33550{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33551$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33552ac_tool_warned=yes ;;
33553esac
33554    AR=$ac_ct_AR
33555  fi
33556fi
33557
33558  else
33559    # The variable is set, but is it from the command line or the environment?
33560
33561    # Try to remove the string !AR! from our list.
33562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33564      # If it failed, the variable was not from the command line. Ignore it,
33565      # but warn the user (except for BASH, which is always set by the calling BASH).
33566      if test "xAR" != xBASH; then
33567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33568$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33569      fi
33570      # Try to locate tool using the code snippet
33571      if test -n "$ac_tool_prefix"; then
33572  for ac_prog in ar
33573  do
33574    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33577$as_echo_n "checking for $ac_word... " >&6; }
33578if ${ac_cv_prog_AR+:} false; then :
33579  $as_echo_n "(cached) " >&6
33580else
33581  if test -n "$AR"; then
33582  ac_cv_prog_AR="$AR" # Let the user override the test.
33583else
33584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33585for as_dir in $PATH
33586do
33587  IFS=$as_save_IFS
33588  test -z "$as_dir" && as_dir=.
33589    for ac_exec_ext in '' $ac_executable_extensions; do
33590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33591    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33593    break 2
33594  fi
33595done
33596  done
33597IFS=$as_save_IFS
33598
33599fi
33600fi
33601AR=$ac_cv_prog_AR
33602if test -n "$AR"; then
33603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33604$as_echo "$AR" >&6; }
33605else
33606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33607$as_echo "no" >&6; }
33608fi
33609
33610
33611    test -n "$AR" && break
33612  done
33613fi
33614if test -z "$AR"; then
33615  ac_ct_AR=$AR
33616  for ac_prog in ar
33617do
33618  # Extract the first word of "$ac_prog", so it can be a program name with args.
33619set dummy $ac_prog; ac_word=$2
33620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33621$as_echo_n "checking for $ac_word... " >&6; }
33622if ${ac_cv_prog_ac_ct_AR+:} false; then :
33623  $as_echo_n "(cached) " >&6
33624else
33625  if test -n "$ac_ct_AR"; then
33626  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33627else
33628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33629for as_dir in $PATH
33630do
33631  IFS=$as_save_IFS
33632  test -z "$as_dir" && as_dir=.
33633    for ac_exec_ext in '' $ac_executable_extensions; do
33634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33635    ac_cv_prog_ac_ct_AR="$ac_prog"
33636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33637    break 2
33638  fi
33639done
33640  done
33641IFS=$as_save_IFS
33642
33643fi
33644fi
33645ac_ct_AR=$ac_cv_prog_ac_ct_AR
33646if test -n "$ac_ct_AR"; then
33647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33648$as_echo "$ac_ct_AR" >&6; }
33649else
33650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33651$as_echo "no" >&6; }
33652fi
33653
33654
33655  test -n "$ac_ct_AR" && break
33656done
33657
33658  if test "x$ac_ct_AR" = x; then
33659    AR=""
33660  else
33661    case $cross_compiling:$ac_tool_warned in
33662yes:)
33663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33665ac_tool_warned=yes ;;
33666esac
33667    AR=$ac_ct_AR
33668  fi
33669fi
33670
33671    else
33672      # If it succeeded, then it was overridden by the user. We will use it
33673      # for the tool.
33674
33675      # First remove it from the list of overridden variables, so we can test
33676      # for unknown variables in the end.
33677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33678
33679      # Check if the provided tool contains a complete path.
33680      tool_specified="$AR"
33681      tool_basename="${tool_specified##*/}"
33682      if test "x$tool_basename" = "x$tool_specified"; then
33683        # A command without a complete path is provided, search $PATH.
33684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33685$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33686        # Extract the first word of "$tool_basename", so it can be a program name with args.
33687set dummy $tool_basename; ac_word=$2
33688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33689$as_echo_n "checking for $ac_word... " >&6; }
33690if ${ac_cv_path_AR+:} false; then :
33691  $as_echo_n "(cached) " >&6
33692else
33693  case $AR in
33694  [\\/]* | ?:[\\/]*)
33695  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33696  ;;
33697  *)
33698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33699for as_dir in $PATH
33700do
33701  IFS=$as_save_IFS
33702  test -z "$as_dir" && as_dir=.
33703    for ac_exec_ext in '' $ac_executable_extensions; do
33704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33705    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33707    break 2
33708  fi
33709done
33710  done
33711IFS=$as_save_IFS
33712
33713  ;;
33714esac
33715fi
33716AR=$ac_cv_path_AR
33717if test -n "$AR"; then
33718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33719$as_echo "$AR" >&6; }
33720else
33721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33722$as_echo "no" >&6; }
33723fi
33724
33725
33726        if test "x$AR" = x; then
33727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33728        fi
33729      else
33730        # Otherwise we believe it is a complete path. Use it as it is.
33731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33732$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33734$as_echo_n "checking for AR... " >&6; }
33735        if test ! -x "$tool_specified"; then
33736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33737$as_echo "not found" >&6; }
33738          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33739        fi
33740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33741$as_echo "$tool_specified" >&6; }
33742      fi
33743    fi
33744  fi
33745
33746
33747  fi
33748
33749  # Only process if variable expands to non-empty
33750
33751  if test "x$AR" != x; then
33752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33753
33754  # First separate the path from the arguments. This will split at the first
33755  # space.
33756  complete="$AR"
33757  path="${complete%% *}"
33758  tmp="$complete EOL"
33759  arguments="${tmp#* }"
33760
33761  # Input might be given as Windows format, start by converting to
33762  # unix format.
33763  new_path=`$CYGPATH -u "$path"`
33764
33765  # Now try to locate executable using which
33766  new_path=`$WHICH "$new_path" 2> /dev/null`
33767  # bat and cmd files are not always considered executable in cygwin causing which
33768  # to not find them
33769  if test "x$new_path" = x \
33770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33772    new_path=`$CYGPATH -u "$path"`
33773  fi
33774  if test "x$new_path" = x; then
33775    # Oops. Which didn't find the executable.
33776    # The splitting of arguments from the executable at a space might have been incorrect,
33777    # since paths with space are more likely in Windows. Give it another try with the whole
33778    # argument.
33779    path="$complete"
33780    arguments="EOL"
33781    new_path=`$CYGPATH -u "$path"`
33782    new_path=`$WHICH "$new_path" 2> /dev/null`
33783    # bat and cmd files are not always considered executable in cygwin causing which
33784    # to not find them
33785    if test "x$new_path" = x \
33786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33788      new_path=`$CYGPATH -u "$path"`
33789    fi
33790    if test "x$new_path" = x; then
33791      # It's still not found. Now this is an unrecoverable error.
33792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33793$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33794      has_space=`$ECHO "$complete" | $GREP " "`
33795      if test "x$has_space" != x; then
33796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33798      fi
33799      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33800    fi
33801  fi
33802
33803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33806  # "foo.exe" is OK but "foo" is an error.
33807  #
33808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33809  # It is also a way to make sure we got the proper file name for the real test later on.
33810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33811  if test "x$test_shortpath" = x; then
33812    # Short path failed, file does not exist as specified.
33813    # Try adding .exe or .cmd
33814    if test -f "${new_path}.exe"; then
33815      input_to_shortpath="${new_path}.exe"
33816    elif test -f "${new_path}.cmd"; then
33817      input_to_shortpath="${new_path}.cmd"
33818    else
33819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33820$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33823      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33824    fi
33825  else
33826    input_to_shortpath="$new_path"
33827  fi
33828
33829  # Call helper function which possibly converts this using DOS-style short mode.
33830  # If so, the updated path is stored in $new_path.
33831  new_path="$input_to_shortpath"
33832
33833  input_path="$input_to_shortpath"
33834  # Check if we need to convert this using DOS-style short mode. If the path
33835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33836  # take no chances and rewrite it.
33837  # Note: m4 eats our [], so we need to use [ and ] instead.
33838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33839  if test "x$has_forbidden_chars" != x; then
33840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33844      # Going to short mode and back again did indeed matter. Since short mode is
33845      # case insensitive, let's make it lowercase to improve readability.
33846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33847      # Now convert it back to Unix-style (cygpath)
33848      input_path=`$CYGPATH -u "$shortmode_path"`
33849      new_path="$input_path"
33850    fi
33851  fi
33852
33853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33854  if test "x$test_cygdrive_prefix" = x; then
33855    # As a simple fix, exclude /usr/bin since it's not a real path.
33856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33858      # a path prefixed by /cygdrive for fixpath to work.
33859      new_path="$CYGWIN_ROOT_PATH$input_path"
33860    fi
33861  fi
33862
33863  # remove trailing .exe if any
33864  new_path="${new_path/%.exe/}"
33865
33866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33867
33868  # First separate the path from the arguments. This will split at the first
33869  # space.
33870  complete="$AR"
33871  path="${complete%% *}"
33872  tmp="$complete EOL"
33873  arguments="${tmp#* }"
33874
33875  # Input might be given as Windows format, start by converting to
33876  # unix format.
33877  new_path="$path"
33878
33879  windows_path="$new_path"
33880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33881    unix_path=`$CYGPATH -u "$windows_path"`
33882    new_path="$unix_path"
33883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33885    new_path="$unix_path"
33886  fi
33887
33888
33889  # Now try to locate executable using which
33890  new_path=`$WHICH "$new_path" 2> /dev/null`
33891
33892  if test "x$new_path" = x; then
33893    # Oops. Which didn't find the executable.
33894    # The splitting of arguments from the executable at a space might have been incorrect,
33895    # since paths with space are more likely in Windows. Give it another try with the whole
33896    # argument.
33897    path="$complete"
33898    arguments="EOL"
33899    new_path="$path"
33900
33901  windows_path="$new_path"
33902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33903    unix_path=`$CYGPATH -u "$windows_path"`
33904    new_path="$unix_path"
33905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33907    new_path="$unix_path"
33908  fi
33909
33910
33911    new_path=`$WHICH "$new_path" 2> /dev/null`
33912    # bat and cmd files are not always considered executable in MSYS causing which
33913    # to not find them
33914    if test "x$new_path" = x \
33915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33917      new_path="$path"
33918
33919  windows_path="$new_path"
33920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33921    unix_path=`$CYGPATH -u "$windows_path"`
33922    new_path="$unix_path"
33923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33925    new_path="$unix_path"
33926  fi
33927
33928    fi
33929
33930    if test "x$new_path" = x; then
33931      # It's still not found. Now this is an unrecoverable error.
33932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33933$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33934      has_space=`$ECHO "$complete" | $GREP " "`
33935      if test "x$has_space" != x; then
33936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33938      fi
33939      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33940    fi
33941  fi
33942
33943  # Now new_path has a complete unix path to the binary
33944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33945    # Keep paths in /bin as-is, but remove trailing .exe if any
33946    new_path="${new_path/%.exe/}"
33947    # Do not save /bin paths to all_fixpath_prefixes!
33948  else
33949    # Not in mixed or Windows style, start by that.
33950    new_path=`cmd //c echo $new_path`
33951
33952  input_path="$new_path"
33953  # Check if we need to convert this using DOS-style short mode. If the path
33954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33955  # take no chances and rewrite it.
33956  # Note: m4 eats our [], so we need to use [ and ] instead.
33957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33958  if test "x$has_forbidden_chars" != x; then
33959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33961  fi
33962
33963    # Output is in $new_path
33964
33965  windows_path="$new_path"
33966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33967    unix_path=`$CYGPATH -u "$windows_path"`
33968    new_path="$unix_path"
33969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33971    new_path="$unix_path"
33972  fi
33973
33974    # remove trailing .exe if any
33975    new_path="${new_path/%.exe/}"
33976
33977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33979  fi
33980
33981    else
33982      # We're on a unix platform. Hooray! :)
33983      # First separate the path from the arguments. This will split at the first
33984      # space.
33985      complete="$AR"
33986      path="${complete%% *}"
33987      tmp="$complete EOL"
33988      arguments="${tmp#* }"
33989
33990      # Cannot rely on the command "which" here since it doesn't always work.
33991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33992      if test -z "$is_absolute_path"; then
33993        # Path to executable is not absolute. Find it.
33994        IFS_save="$IFS"
33995        IFS=:
33996        for p in $PATH; do
33997          if test -f "$p/$path" && test -x "$p/$path"; then
33998            new_path="$p/$path"
33999            break
34000          fi
34001        done
34002        IFS="$IFS_save"
34003      else
34004        # This is an absolute path, we can use it without further modifications.
34005        new_path="$path"
34006      fi
34007
34008      if test "x$new_path" = x; then
34009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34010$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34011        has_space=`$ECHO "$complete" | $GREP " "`
34012        if test "x$has_space" != x; then
34013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34015        fi
34016        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34017      fi
34018    fi
34019
34020    # Now join together the path and the arguments once again
34021    if test "x$arguments" != xEOL; then
34022      new_complete="$new_path ${arguments% *}"
34023    else
34024      new_complete="$new_path"
34025    fi
34026
34027    if test "x$complete" != "x$new_complete"; then
34028      AR="$new_complete"
34029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34030$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34031    fi
34032  fi
34033
34034
34035
34036  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34037
34038
34039  # Publish this variable in the help.
34040
34041
34042  if test "x$LIPO" = x; then
34043    # The variable is not set by user, try to locate tool using the code snippet
34044    for ac_prog in lipo
34045do
34046  # Extract the first word of "$ac_prog", so it can be a program name with args.
34047set dummy $ac_prog; ac_word=$2
34048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34049$as_echo_n "checking for $ac_word... " >&6; }
34050if ${ac_cv_path_LIPO+:} false; then :
34051  $as_echo_n "(cached) " >&6
34052else
34053  case $LIPO in
34054  [\\/]* | ?:[\\/]*)
34055  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34056  ;;
34057  *)
34058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34059for as_dir in $PATH
34060do
34061  IFS=$as_save_IFS
34062  test -z "$as_dir" && as_dir=.
34063    for ac_exec_ext in '' $ac_executable_extensions; do
34064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34065    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34067    break 2
34068  fi
34069done
34070  done
34071IFS=$as_save_IFS
34072
34073  ;;
34074esac
34075fi
34076LIPO=$ac_cv_path_LIPO
34077if test -n "$LIPO"; then
34078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34079$as_echo "$LIPO" >&6; }
34080else
34081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34082$as_echo "no" >&6; }
34083fi
34084
34085
34086  test -n "$LIPO" && break
34087done
34088
34089  else
34090    # The variable is set, but is it from the command line or the environment?
34091
34092    # Try to remove the string !LIPO! from our list.
34093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34095      # If it failed, the variable was not from the command line. Ignore it,
34096      # but warn the user (except for BASH, which is always set by the calling BASH).
34097      if test "xLIPO" != xBASH; then
34098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34099$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34100      fi
34101      # Try to locate tool using the code snippet
34102      for ac_prog in lipo
34103do
34104  # Extract the first word of "$ac_prog", so it can be a program name with args.
34105set dummy $ac_prog; ac_word=$2
34106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34107$as_echo_n "checking for $ac_word... " >&6; }
34108if ${ac_cv_path_LIPO+:} false; then :
34109  $as_echo_n "(cached) " >&6
34110else
34111  case $LIPO in
34112  [\\/]* | ?:[\\/]*)
34113  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34114  ;;
34115  *)
34116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34117for as_dir in $PATH
34118do
34119  IFS=$as_save_IFS
34120  test -z "$as_dir" && as_dir=.
34121    for ac_exec_ext in '' $ac_executable_extensions; do
34122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34123    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34125    break 2
34126  fi
34127done
34128  done
34129IFS=$as_save_IFS
34130
34131  ;;
34132esac
34133fi
34134LIPO=$ac_cv_path_LIPO
34135if test -n "$LIPO"; then
34136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34137$as_echo "$LIPO" >&6; }
34138else
34139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34140$as_echo "no" >&6; }
34141fi
34142
34143
34144  test -n "$LIPO" && break
34145done
34146
34147    else
34148      # If it succeeded, then it was overridden by the user. We will use it
34149      # for the tool.
34150
34151      # First remove it from the list of overridden variables, so we can test
34152      # for unknown variables in the end.
34153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34154
34155      # Check if the provided tool contains a complete path.
34156      tool_specified="$LIPO"
34157      tool_basename="${tool_specified##*/}"
34158      if test "x$tool_basename" = "x$tool_specified"; then
34159        # A command without a complete path is provided, search $PATH.
34160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34161$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34162        # Extract the first word of "$tool_basename", so it can be a program name with args.
34163set dummy $tool_basename; ac_word=$2
34164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34165$as_echo_n "checking for $ac_word... " >&6; }
34166if ${ac_cv_path_LIPO+:} false; then :
34167  $as_echo_n "(cached) " >&6
34168else
34169  case $LIPO in
34170  [\\/]* | ?:[\\/]*)
34171  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34172  ;;
34173  *)
34174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34175for as_dir in $PATH
34176do
34177  IFS=$as_save_IFS
34178  test -z "$as_dir" && as_dir=.
34179    for ac_exec_ext in '' $ac_executable_extensions; do
34180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34181    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34183    break 2
34184  fi
34185done
34186  done
34187IFS=$as_save_IFS
34188
34189  ;;
34190esac
34191fi
34192LIPO=$ac_cv_path_LIPO
34193if test -n "$LIPO"; then
34194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34195$as_echo "$LIPO" >&6; }
34196else
34197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34198$as_echo "no" >&6; }
34199fi
34200
34201
34202        if test "x$LIPO" = x; then
34203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34204        fi
34205      else
34206        # Otherwise we believe it is a complete path. Use it as it is.
34207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34208$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34210$as_echo_n "checking for LIPO... " >&6; }
34211        if test ! -x "$tool_specified"; then
34212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34213$as_echo "not found" >&6; }
34214          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34215        fi
34216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34217$as_echo "$tool_specified" >&6; }
34218      fi
34219    fi
34220  fi
34221
34222
34223
34224  # Only process if variable expands to non-empty
34225
34226  if test "x$LIPO" != x; then
34227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34228
34229  # First separate the path from the arguments. This will split at the first
34230  # space.
34231  complete="$LIPO"
34232  path="${complete%% *}"
34233  tmp="$complete EOL"
34234  arguments="${tmp#* }"
34235
34236  # Input might be given as Windows format, start by converting to
34237  # unix format.
34238  new_path=`$CYGPATH -u "$path"`
34239
34240  # Now try to locate executable using which
34241  new_path=`$WHICH "$new_path" 2> /dev/null`
34242  # bat and cmd files are not always considered executable in cygwin causing which
34243  # to not find them
34244  if test "x$new_path" = x \
34245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34247    new_path=`$CYGPATH -u "$path"`
34248  fi
34249  if test "x$new_path" = x; then
34250    # Oops. Which didn't find the executable.
34251    # The splitting of arguments from the executable at a space might have been incorrect,
34252    # since paths with space are more likely in Windows. Give it another try with the whole
34253    # argument.
34254    path="$complete"
34255    arguments="EOL"
34256    new_path=`$CYGPATH -u "$path"`
34257    new_path=`$WHICH "$new_path" 2> /dev/null`
34258    # bat and cmd files are not always considered executable in cygwin causing which
34259    # to not find them
34260    if test "x$new_path" = x \
34261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34263      new_path=`$CYGPATH -u "$path"`
34264    fi
34265    if test "x$new_path" = x; then
34266      # It's still not found. Now this is an unrecoverable error.
34267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34268$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34269      has_space=`$ECHO "$complete" | $GREP " "`
34270      if test "x$has_space" != x; then
34271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34273      fi
34274      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34275    fi
34276  fi
34277
34278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34281  # "foo.exe" is OK but "foo" is an error.
34282  #
34283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34284  # It is also a way to make sure we got the proper file name for the real test later on.
34285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34286  if test "x$test_shortpath" = x; then
34287    # Short path failed, file does not exist as specified.
34288    # Try adding .exe or .cmd
34289    if test -f "${new_path}.exe"; then
34290      input_to_shortpath="${new_path}.exe"
34291    elif test -f "${new_path}.cmd"; then
34292      input_to_shortpath="${new_path}.cmd"
34293    else
34294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34295$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34298      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34299    fi
34300  else
34301    input_to_shortpath="$new_path"
34302  fi
34303
34304  # Call helper function which possibly converts this using DOS-style short mode.
34305  # If so, the updated path is stored in $new_path.
34306  new_path="$input_to_shortpath"
34307
34308  input_path="$input_to_shortpath"
34309  # Check if we need to convert this using DOS-style short mode. If the path
34310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34311  # take no chances and rewrite it.
34312  # Note: m4 eats our [], so we need to use [ and ] instead.
34313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34314  if test "x$has_forbidden_chars" != x; then
34315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34319      # Going to short mode and back again did indeed matter. Since short mode is
34320      # case insensitive, let's make it lowercase to improve readability.
34321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34322      # Now convert it back to Unix-style (cygpath)
34323      input_path=`$CYGPATH -u "$shortmode_path"`
34324      new_path="$input_path"
34325    fi
34326  fi
34327
34328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34329  if test "x$test_cygdrive_prefix" = x; then
34330    # As a simple fix, exclude /usr/bin since it's not a real path.
34331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34333      # a path prefixed by /cygdrive for fixpath to work.
34334      new_path="$CYGWIN_ROOT_PATH$input_path"
34335    fi
34336  fi
34337
34338  # remove trailing .exe if any
34339  new_path="${new_path/%.exe/}"
34340
34341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34342
34343  # First separate the path from the arguments. This will split at the first
34344  # space.
34345  complete="$LIPO"
34346  path="${complete%% *}"
34347  tmp="$complete EOL"
34348  arguments="${tmp#* }"
34349
34350  # Input might be given as Windows format, start by converting to
34351  # unix format.
34352  new_path="$path"
34353
34354  windows_path="$new_path"
34355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34356    unix_path=`$CYGPATH -u "$windows_path"`
34357    new_path="$unix_path"
34358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34360    new_path="$unix_path"
34361  fi
34362
34363
34364  # Now try to locate executable using which
34365  new_path=`$WHICH "$new_path" 2> /dev/null`
34366
34367  if test "x$new_path" = x; then
34368    # Oops. Which didn't find the executable.
34369    # The splitting of arguments from the executable at a space might have been incorrect,
34370    # since paths with space are more likely in Windows. Give it another try with the whole
34371    # argument.
34372    path="$complete"
34373    arguments="EOL"
34374    new_path="$path"
34375
34376  windows_path="$new_path"
34377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34378    unix_path=`$CYGPATH -u "$windows_path"`
34379    new_path="$unix_path"
34380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34382    new_path="$unix_path"
34383  fi
34384
34385
34386    new_path=`$WHICH "$new_path" 2> /dev/null`
34387    # bat and cmd files are not always considered executable in MSYS causing which
34388    # to not find them
34389    if test "x$new_path" = x \
34390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34392      new_path="$path"
34393
34394  windows_path="$new_path"
34395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34396    unix_path=`$CYGPATH -u "$windows_path"`
34397    new_path="$unix_path"
34398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34400    new_path="$unix_path"
34401  fi
34402
34403    fi
34404
34405    if test "x$new_path" = x; then
34406      # It's still not found. Now this is an unrecoverable error.
34407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34408$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34409      has_space=`$ECHO "$complete" | $GREP " "`
34410      if test "x$has_space" != x; then
34411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34413      fi
34414      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34415    fi
34416  fi
34417
34418  # Now new_path has a complete unix path to the binary
34419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34420    # Keep paths in /bin as-is, but remove trailing .exe if any
34421    new_path="${new_path/%.exe/}"
34422    # Do not save /bin paths to all_fixpath_prefixes!
34423  else
34424    # Not in mixed or Windows style, start by that.
34425    new_path=`cmd //c echo $new_path`
34426
34427  input_path="$new_path"
34428  # Check if we need to convert this using DOS-style short mode. If the path
34429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34430  # take no chances and rewrite it.
34431  # Note: m4 eats our [], so we need to use [ and ] instead.
34432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34433  if test "x$has_forbidden_chars" != x; then
34434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34436  fi
34437
34438    # Output is in $new_path
34439
34440  windows_path="$new_path"
34441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34442    unix_path=`$CYGPATH -u "$windows_path"`
34443    new_path="$unix_path"
34444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34446    new_path="$unix_path"
34447  fi
34448
34449    # remove trailing .exe if any
34450    new_path="${new_path/%.exe/}"
34451
34452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34454  fi
34455
34456    else
34457      # We're on a unix platform. Hooray! :)
34458      # First separate the path from the arguments. This will split at the first
34459      # space.
34460      complete="$LIPO"
34461      path="${complete%% *}"
34462      tmp="$complete EOL"
34463      arguments="${tmp#* }"
34464
34465      # Cannot rely on the command "which" here since it doesn't always work.
34466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34467      if test -z "$is_absolute_path"; then
34468        # Path to executable is not absolute. Find it.
34469        IFS_save="$IFS"
34470        IFS=:
34471        for p in $PATH; do
34472          if test -f "$p/$path" && test -x "$p/$path"; then
34473            new_path="$p/$path"
34474            break
34475          fi
34476        done
34477        IFS="$IFS_save"
34478      else
34479        # This is an absolute path, we can use it without further modifications.
34480        new_path="$path"
34481      fi
34482
34483      if test "x$new_path" = x; then
34484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34485$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34486        has_space=`$ECHO "$complete" | $GREP " "`
34487        if test "x$has_space" != x; then
34488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34490        fi
34491        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34492      fi
34493    fi
34494
34495    # Now join together the path and the arguments once again
34496    if test "x$arguments" != xEOL; then
34497      new_complete="$new_path ${arguments% *}"
34498    else
34499      new_complete="$new_path"
34500    fi
34501
34502    if test "x$complete" != "x$new_complete"; then
34503      LIPO="$new_complete"
34504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34505$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34506    fi
34507  fi
34508
34509  fi
34510
34511  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34512    # Extract the first word of "mt", so it can be a program name with args.
34513set dummy mt; ac_word=$2
34514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34515$as_echo_n "checking for $ac_word... " >&6; }
34516if ${ac_cv_prog_MT+:} false; then :
34517  $as_echo_n "(cached) " >&6
34518else
34519  if test -n "$MT"; then
34520  ac_cv_prog_MT="$MT" # Let the user override the test.
34521else
34522  ac_prog_rejected=no
34523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34524for as_dir in $PATH
34525do
34526  IFS=$as_save_IFS
34527  test -z "$as_dir" && as_dir=.
34528    for ac_exec_ext in '' $ac_executable_extensions; do
34529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34530    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34531       ac_prog_rejected=yes
34532       continue
34533     fi
34534    ac_cv_prog_MT="mt"
34535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34536    break 2
34537  fi
34538done
34539  done
34540IFS=$as_save_IFS
34541
34542if test $ac_prog_rejected = yes; then
34543  # We found a bogon in the path, so make sure we never use it.
34544  set dummy $ac_cv_prog_MT
34545  shift
34546  if test $# != 0; then
34547    # We chose a different compiler from the bogus one.
34548    # However, it has the same basename, so the bogon will be chosen
34549    # first if we set MT to just the basename; use the full file name.
34550    shift
34551    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34552  fi
34553fi
34554fi
34555fi
34556MT=$ac_cv_prog_MT
34557if test -n "$MT"; then
34558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34559$as_echo "$MT" >&6; }
34560else
34561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34562$as_echo "no" >&6; }
34563fi
34564
34565
34566
34567  # Only process if variable expands to non-empty
34568
34569  if test "x$MT" != x; then
34570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34571
34572  # First separate the path from the arguments. This will split at the first
34573  # space.
34574  complete="$MT"
34575  path="${complete%% *}"
34576  tmp="$complete EOL"
34577  arguments="${tmp#* }"
34578
34579  # Input might be given as Windows format, start by converting to
34580  # unix format.
34581  new_path=`$CYGPATH -u "$path"`
34582
34583  # Now try to locate executable using which
34584  new_path=`$WHICH "$new_path" 2> /dev/null`
34585  # bat and cmd files are not always considered executable in cygwin causing which
34586  # to not find them
34587  if test "x$new_path" = x \
34588      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34589      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34590    new_path=`$CYGPATH -u "$path"`
34591  fi
34592  if test "x$new_path" = x; then
34593    # Oops. Which didn't find the executable.
34594    # The splitting of arguments from the executable at a space might have been incorrect,
34595    # since paths with space are more likely in Windows. Give it another try with the whole
34596    # argument.
34597    path="$complete"
34598    arguments="EOL"
34599    new_path=`$CYGPATH -u "$path"`
34600    new_path=`$WHICH "$new_path" 2> /dev/null`
34601    # bat and cmd files are not always considered executable in cygwin causing which
34602    # to not find them
34603    if test "x$new_path" = x \
34604        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34605        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34606      new_path=`$CYGPATH -u "$path"`
34607    fi
34608    if test "x$new_path" = x; then
34609      # It's still not found. Now this is an unrecoverable error.
34610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34611$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34612      has_space=`$ECHO "$complete" | $GREP " "`
34613      if test "x$has_space" != x; then
34614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34616      fi
34617      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34618    fi
34619  fi
34620
34621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34624  # "foo.exe" is OK but "foo" is an error.
34625  #
34626  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34627  # It is also a way to make sure we got the proper file name for the real test later on.
34628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34629  if test "x$test_shortpath" = x; then
34630    # Short path failed, file does not exist as specified.
34631    # Try adding .exe or .cmd
34632    if test -f "${new_path}.exe"; then
34633      input_to_shortpath="${new_path}.exe"
34634    elif test -f "${new_path}.cmd"; then
34635      input_to_shortpath="${new_path}.cmd"
34636    else
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34638$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34639      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34640$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34641      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34642    fi
34643  else
34644    input_to_shortpath="$new_path"
34645  fi
34646
34647  # Call helper function which possibly converts this using DOS-style short mode.
34648  # If so, the updated path is stored in $new_path.
34649  new_path="$input_to_shortpath"
34650
34651  input_path="$input_to_shortpath"
34652  # Check if we need to convert this using DOS-style short mode. If the path
34653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34654  # take no chances and rewrite it.
34655  # Note: m4 eats our [], so we need to use [ and ] instead.
34656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34657  if test "x$has_forbidden_chars" != x; then
34658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34662      # Going to short mode and back again did indeed matter. Since short mode is
34663      # case insensitive, let's make it lowercase to improve readability.
34664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34665      # Now convert it back to Unix-style (cygpath)
34666      input_path=`$CYGPATH -u "$shortmode_path"`
34667      new_path="$input_path"
34668    fi
34669  fi
34670
34671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34672  if test "x$test_cygdrive_prefix" = x; then
34673    # As a simple fix, exclude /usr/bin since it's not a real path.
34674    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34676      # a path prefixed by /cygdrive for fixpath to work.
34677      new_path="$CYGWIN_ROOT_PATH$input_path"
34678    fi
34679  fi
34680
34681  # remove trailing .exe if any
34682  new_path="${new_path/%.exe/}"
34683
34684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34685
34686  # First separate the path from the arguments. This will split at the first
34687  # space.
34688  complete="$MT"
34689  path="${complete%% *}"
34690  tmp="$complete EOL"
34691  arguments="${tmp#* }"
34692
34693  # Input might be given as Windows format, start by converting to
34694  # unix format.
34695  new_path="$path"
34696
34697  windows_path="$new_path"
34698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34699    unix_path=`$CYGPATH -u "$windows_path"`
34700    new_path="$unix_path"
34701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34703    new_path="$unix_path"
34704  fi
34705
34706
34707  # Now try to locate executable using which
34708  new_path=`$WHICH "$new_path" 2> /dev/null`
34709
34710  if test "x$new_path" = x; then
34711    # Oops. Which didn't find the executable.
34712    # The splitting of arguments from the executable at a space might have been incorrect,
34713    # since paths with space are more likely in Windows. Give it another try with the whole
34714    # argument.
34715    path="$complete"
34716    arguments="EOL"
34717    new_path="$path"
34718
34719  windows_path="$new_path"
34720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34721    unix_path=`$CYGPATH -u "$windows_path"`
34722    new_path="$unix_path"
34723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34725    new_path="$unix_path"
34726  fi
34727
34728
34729    new_path=`$WHICH "$new_path" 2> /dev/null`
34730    # bat and cmd files are not always considered executable in MSYS causing which
34731    # to not find them
34732    if test "x$new_path" = x \
34733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34735      new_path="$path"
34736
34737  windows_path="$new_path"
34738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34739    unix_path=`$CYGPATH -u "$windows_path"`
34740    new_path="$unix_path"
34741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34743    new_path="$unix_path"
34744  fi
34745
34746    fi
34747
34748    if test "x$new_path" = x; then
34749      # It's still not found. Now this is an unrecoverable error.
34750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34751$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34752      has_space=`$ECHO "$complete" | $GREP " "`
34753      if test "x$has_space" != x; then
34754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34756      fi
34757      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34758    fi
34759  fi
34760
34761  # Now new_path has a complete unix path to the binary
34762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34763    # Keep paths in /bin as-is, but remove trailing .exe if any
34764    new_path="${new_path/%.exe/}"
34765    # Do not save /bin paths to all_fixpath_prefixes!
34766  else
34767    # Not in mixed or Windows style, start by that.
34768    new_path=`cmd //c echo $new_path`
34769
34770  input_path="$new_path"
34771  # Check if we need to convert this using DOS-style short mode. If the path
34772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34773  # take no chances and rewrite it.
34774  # Note: m4 eats our [], so we need to use [ and ] instead.
34775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34776  if test "x$has_forbidden_chars" != x; then
34777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34779  fi
34780
34781    # Output is in $new_path
34782
34783  windows_path="$new_path"
34784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34785    unix_path=`$CYGPATH -u "$windows_path"`
34786    new_path="$unix_path"
34787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34789    new_path="$unix_path"
34790  fi
34791
34792    # remove trailing .exe if any
34793    new_path="${new_path/%.exe/}"
34794
34795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34797  fi
34798
34799    else
34800      # We're on a unix platform. Hooray! :)
34801      # First separate the path from the arguments. This will split at the first
34802      # space.
34803      complete="$MT"
34804      path="${complete%% *}"
34805      tmp="$complete EOL"
34806      arguments="${tmp#* }"
34807
34808      # Cannot rely on the command "which" here since it doesn't always work.
34809      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34810      if test -z "$is_absolute_path"; then
34811        # Path to executable is not absolute. Find it.
34812        IFS_save="$IFS"
34813        IFS=:
34814        for p in $PATH; do
34815          if test -f "$p/$path" && test -x "$p/$path"; then
34816            new_path="$p/$path"
34817            break
34818          fi
34819        done
34820        IFS="$IFS_save"
34821      else
34822        # This is an absolute path, we can use it without further modifications.
34823        new_path="$path"
34824      fi
34825
34826      if test "x$new_path" = x; then
34827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34828$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34829        has_space=`$ECHO "$complete" | $GREP " "`
34830        if test "x$has_space" != x; then
34831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34833        fi
34834        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34835      fi
34836    fi
34837
34838    # Now join together the path and the arguments once again
34839    if test "x$arguments" != xEOL; then
34840      new_complete="$new_path ${arguments% *}"
34841    else
34842      new_complete="$new_path"
34843    fi
34844
34845    if test "x$complete" != "x$new_complete"; then
34846      MT="$new_complete"
34847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34848$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34849    fi
34850  fi
34851
34852    # Setup the resource compiler (RC)
34853    # Extract the first word of "rc", so it can be a program name with args.
34854set dummy rc; ac_word=$2
34855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34856$as_echo_n "checking for $ac_word... " >&6; }
34857if ${ac_cv_prog_RC+:} false; then :
34858  $as_echo_n "(cached) " >&6
34859else
34860  if test -n "$RC"; then
34861  ac_cv_prog_RC="$RC" # Let the user override the test.
34862else
34863  ac_prog_rejected=no
34864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34865for as_dir in $PATH
34866do
34867  IFS=$as_save_IFS
34868  test -z "$as_dir" && as_dir=.
34869    for ac_exec_ext in '' $ac_executable_extensions; do
34870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34871    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34872       ac_prog_rejected=yes
34873       continue
34874     fi
34875    ac_cv_prog_RC="rc"
34876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34877    break 2
34878  fi
34879done
34880  done
34881IFS=$as_save_IFS
34882
34883if test $ac_prog_rejected = yes; then
34884  # We found a bogon in the path, so make sure we never use it.
34885  set dummy $ac_cv_prog_RC
34886  shift
34887  if test $# != 0; then
34888    # We chose a different compiler from the bogus one.
34889    # However, it has the same basename, so the bogon will be chosen
34890    # first if we set RC to just the basename; use the full file name.
34891    shift
34892    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34893  fi
34894fi
34895fi
34896fi
34897RC=$ac_cv_prog_RC
34898if test -n "$RC"; then
34899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34900$as_echo "$RC" >&6; }
34901else
34902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34903$as_echo "no" >&6; }
34904fi
34905
34906
34907
34908  # Only process if variable expands to non-empty
34909
34910  if test "x$RC" != x; then
34911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34912
34913  # First separate the path from the arguments. This will split at the first
34914  # space.
34915  complete="$RC"
34916  path="${complete%% *}"
34917  tmp="$complete EOL"
34918  arguments="${tmp#* }"
34919
34920  # Input might be given as Windows format, start by converting to
34921  # unix format.
34922  new_path=`$CYGPATH -u "$path"`
34923
34924  # Now try to locate executable using which
34925  new_path=`$WHICH "$new_path" 2> /dev/null`
34926  # bat and cmd files are not always considered executable in cygwin causing which
34927  # to not find them
34928  if test "x$new_path" = x \
34929      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34930      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34931    new_path=`$CYGPATH -u "$path"`
34932  fi
34933  if test "x$new_path" = x; then
34934    # Oops. Which didn't find the executable.
34935    # The splitting of arguments from the executable at a space might have been incorrect,
34936    # since paths with space are more likely in Windows. Give it another try with the whole
34937    # argument.
34938    path="$complete"
34939    arguments="EOL"
34940    new_path=`$CYGPATH -u "$path"`
34941    new_path=`$WHICH "$new_path" 2> /dev/null`
34942    # bat and cmd files are not always considered executable in cygwin causing which
34943    # to not find them
34944    if test "x$new_path" = x \
34945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34947      new_path=`$CYGPATH -u "$path"`
34948    fi
34949    if test "x$new_path" = x; then
34950      # It's still not found. Now this is an unrecoverable error.
34951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34952$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34953      has_space=`$ECHO "$complete" | $GREP " "`
34954      if test "x$has_space" != x; then
34955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34957      fi
34958      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34959    fi
34960  fi
34961
34962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34965  # "foo.exe" is OK but "foo" is an error.
34966  #
34967  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34968  # It is also a way to make sure we got the proper file name for the real test later on.
34969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34970  if test "x$test_shortpath" = x; then
34971    # Short path failed, file does not exist as specified.
34972    # Try adding .exe or .cmd
34973    if test -f "${new_path}.exe"; then
34974      input_to_shortpath="${new_path}.exe"
34975    elif test -f "${new_path}.cmd"; then
34976      input_to_shortpath="${new_path}.cmd"
34977    else
34978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34979$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34980      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34981$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34982      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34983    fi
34984  else
34985    input_to_shortpath="$new_path"
34986  fi
34987
34988  # Call helper function which possibly converts this using DOS-style short mode.
34989  # If so, the updated path is stored in $new_path.
34990  new_path="$input_to_shortpath"
34991
34992  input_path="$input_to_shortpath"
34993  # Check if we need to convert this using DOS-style short mode. If the path
34994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34995  # take no chances and rewrite it.
34996  # Note: m4 eats our [], so we need to use [ and ] instead.
34997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34998  if test "x$has_forbidden_chars" != x; then
34999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35003      # Going to short mode and back again did indeed matter. Since short mode is
35004      # case insensitive, let's make it lowercase to improve readability.
35005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35006      # Now convert it back to Unix-style (cygpath)
35007      input_path=`$CYGPATH -u "$shortmode_path"`
35008      new_path="$input_path"
35009    fi
35010  fi
35011
35012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35013  if test "x$test_cygdrive_prefix" = x; then
35014    # As a simple fix, exclude /usr/bin since it's not a real path.
35015    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35017      # a path prefixed by /cygdrive for fixpath to work.
35018      new_path="$CYGWIN_ROOT_PATH$input_path"
35019    fi
35020  fi
35021
35022  # remove trailing .exe if any
35023  new_path="${new_path/%.exe/}"
35024
35025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35026
35027  # First separate the path from the arguments. This will split at the first
35028  # space.
35029  complete="$RC"
35030  path="${complete%% *}"
35031  tmp="$complete EOL"
35032  arguments="${tmp#* }"
35033
35034  # Input might be given as Windows format, start by converting to
35035  # unix format.
35036  new_path="$path"
35037
35038  windows_path="$new_path"
35039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35040    unix_path=`$CYGPATH -u "$windows_path"`
35041    new_path="$unix_path"
35042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35044    new_path="$unix_path"
35045  fi
35046
35047
35048  # Now try to locate executable using which
35049  new_path=`$WHICH "$new_path" 2> /dev/null`
35050
35051  if test "x$new_path" = x; then
35052    # Oops. Which didn't find the executable.
35053    # The splitting of arguments from the executable at a space might have been incorrect,
35054    # since paths with space are more likely in Windows. Give it another try with the whole
35055    # argument.
35056    path="$complete"
35057    arguments="EOL"
35058    new_path="$path"
35059
35060  windows_path="$new_path"
35061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35062    unix_path=`$CYGPATH -u "$windows_path"`
35063    new_path="$unix_path"
35064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35066    new_path="$unix_path"
35067  fi
35068
35069
35070    new_path=`$WHICH "$new_path" 2> /dev/null`
35071    # bat and cmd files are not always considered executable in MSYS causing which
35072    # to not find them
35073    if test "x$new_path" = x \
35074        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35075        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35076      new_path="$path"
35077
35078  windows_path="$new_path"
35079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35080    unix_path=`$CYGPATH -u "$windows_path"`
35081    new_path="$unix_path"
35082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35084    new_path="$unix_path"
35085  fi
35086
35087    fi
35088
35089    if test "x$new_path" = x; then
35090      # It's still not found. Now this is an unrecoverable error.
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35092$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35093      has_space=`$ECHO "$complete" | $GREP " "`
35094      if test "x$has_space" != x; then
35095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35097      fi
35098      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35099    fi
35100  fi
35101
35102  # Now new_path has a complete unix path to the binary
35103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35104    # Keep paths in /bin as-is, but remove trailing .exe if any
35105    new_path="${new_path/%.exe/}"
35106    # Do not save /bin paths to all_fixpath_prefixes!
35107  else
35108    # Not in mixed or Windows style, start by that.
35109    new_path=`cmd //c echo $new_path`
35110
35111  input_path="$new_path"
35112  # Check if we need to convert this using DOS-style short mode. If the path
35113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35114  # take no chances and rewrite it.
35115  # Note: m4 eats our [], so we need to use [ and ] instead.
35116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35117  if test "x$has_forbidden_chars" != x; then
35118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35120  fi
35121
35122    # Output is in $new_path
35123
35124  windows_path="$new_path"
35125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35126    unix_path=`$CYGPATH -u "$windows_path"`
35127    new_path="$unix_path"
35128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35130    new_path="$unix_path"
35131  fi
35132
35133    # remove trailing .exe if any
35134    new_path="${new_path/%.exe/}"
35135
35136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35138  fi
35139
35140    else
35141      # We're on a unix platform. Hooray! :)
35142      # First separate the path from the arguments. This will split at the first
35143      # space.
35144      complete="$RC"
35145      path="${complete%% *}"
35146      tmp="$complete EOL"
35147      arguments="${tmp#* }"
35148
35149      # Cannot rely on the command "which" here since it doesn't always work.
35150      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35151      if test -z "$is_absolute_path"; then
35152        # Path to executable is not absolute. Find it.
35153        IFS_save="$IFS"
35154        IFS=:
35155        for p in $PATH; do
35156          if test -f "$p/$path" && test -x "$p/$path"; then
35157            new_path="$p/$path"
35158            break
35159          fi
35160        done
35161        IFS="$IFS_save"
35162      else
35163        # This is an absolute path, we can use it without further modifications.
35164        new_path="$path"
35165      fi
35166
35167      if test "x$new_path" = x; then
35168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35169$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35170        has_space=`$ECHO "$complete" | $GREP " "`
35171        if test "x$has_space" != x; then
35172          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35173$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35174        fi
35175        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35176      fi
35177    fi
35178
35179    # Now join together the path and the arguments once again
35180    if test "x$arguments" != xEOL; then
35181      new_complete="$new_path ${arguments% *}"
35182    else
35183      new_complete="$new_path"
35184    fi
35185
35186    if test "x$complete" != "x$new_complete"; then
35187      RC="$new_complete"
35188      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35189$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35190    fi
35191  fi
35192
35193    # Extract the first word of "dumpbin", so it can be a program name with args.
35194set dummy dumpbin; ac_word=$2
35195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35196$as_echo_n "checking for $ac_word... " >&6; }
35197if ${ac_cv_prog_DUMPBIN+:} false; then :
35198  $as_echo_n "(cached) " >&6
35199else
35200  if test -n "$DUMPBIN"; then
35201  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35202else
35203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35204for as_dir in $PATH
35205do
35206  IFS=$as_save_IFS
35207  test -z "$as_dir" && as_dir=.
35208    for ac_exec_ext in '' $ac_executable_extensions; do
35209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35210    ac_cv_prog_DUMPBIN="dumpbin"
35211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35212    break 2
35213  fi
35214done
35215  done
35216IFS=$as_save_IFS
35217
35218fi
35219fi
35220DUMPBIN=$ac_cv_prog_DUMPBIN
35221if test -n "$DUMPBIN"; then
35222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35223$as_echo "$DUMPBIN" >&6; }
35224else
35225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35226$as_echo "no" >&6; }
35227fi
35228
35229
35230
35231  # Only process if variable expands to non-empty
35232
35233  if test "x$DUMPBIN" != x; then
35234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35235
35236  # First separate the path from the arguments. This will split at the first
35237  # space.
35238  complete="$DUMPBIN"
35239  path="${complete%% *}"
35240  tmp="$complete EOL"
35241  arguments="${tmp#* }"
35242
35243  # Input might be given as Windows format, start by converting to
35244  # unix format.
35245  new_path=`$CYGPATH -u "$path"`
35246
35247  # Now try to locate executable using which
35248  new_path=`$WHICH "$new_path" 2> /dev/null`
35249  # bat and cmd files are not always considered executable in cygwin causing which
35250  # to not find them
35251  if test "x$new_path" = x \
35252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35254    new_path=`$CYGPATH -u "$path"`
35255  fi
35256  if test "x$new_path" = x; then
35257    # Oops. Which didn't find the executable.
35258    # The splitting of arguments from the executable at a space might have been incorrect,
35259    # since paths with space are more likely in Windows. Give it another try with the whole
35260    # argument.
35261    path="$complete"
35262    arguments="EOL"
35263    new_path=`$CYGPATH -u "$path"`
35264    new_path=`$WHICH "$new_path" 2> /dev/null`
35265    # bat and cmd files are not always considered executable in cygwin causing which
35266    # to not find them
35267    if test "x$new_path" = x \
35268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35270      new_path=`$CYGPATH -u "$path"`
35271    fi
35272    if test "x$new_path" = x; then
35273      # It's still not found. Now this is an unrecoverable error.
35274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35275$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35276      has_space=`$ECHO "$complete" | $GREP " "`
35277      if test "x$has_space" != x; then
35278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35280      fi
35281      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35282    fi
35283  fi
35284
35285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35288  # "foo.exe" is OK but "foo" is an error.
35289  #
35290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35291  # It is also a way to make sure we got the proper file name for the real test later on.
35292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35293  if test "x$test_shortpath" = x; then
35294    # Short path failed, file does not exist as specified.
35295    # Try adding .exe or .cmd
35296    if test -f "${new_path}.exe"; then
35297      input_to_shortpath="${new_path}.exe"
35298    elif test -f "${new_path}.cmd"; then
35299      input_to_shortpath="${new_path}.cmd"
35300    else
35301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35302$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35305      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35306    fi
35307  else
35308    input_to_shortpath="$new_path"
35309  fi
35310
35311  # Call helper function which possibly converts this using DOS-style short mode.
35312  # If so, the updated path is stored in $new_path.
35313  new_path="$input_to_shortpath"
35314
35315  input_path="$input_to_shortpath"
35316  # Check if we need to convert this using DOS-style short mode. If the path
35317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35318  # take no chances and rewrite it.
35319  # Note: m4 eats our [], so we need to use [ and ] instead.
35320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35321  if test "x$has_forbidden_chars" != x; then
35322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35326      # Going to short mode and back again did indeed matter. Since short mode is
35327      # case insensitive, let's make it lowercase to improve readability.
35328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35329      # Now convert it back to Unix-style (cygpath)
35330      input_path=`$CYGPATH -u "$shortmode_path"`
35331      new_path="$input_path"
35332    fi
35333  fi
35334
35335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35336  if test "x$test_cygdrive_prefix" = x; then
35337    # As a simple fix, exclude /usr/bin since it's not a real path.
35338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35340      # a path prefixed by /cygdrive for fixpath to work.
35341      new_path="$CYGWIN_ROOT_PATH$input_path"
35342    fi
35343  fi
35344
35345  # remove trailing .exe if any
35346  new_path="${new_path/%.exe/}"
35347
35348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35349
35350  # First separate the path from the arguments. This will split at the first
35351  # space.
35352  complete="$DUMPBIN"
35353  path="${complete%% *}"
35354  tmp="$complete EOL"
35355  arguments="${tmp#* }"
35356
35357  # Input might be given as Windows format, start by converting to
35358  # unix format.
35359  new_path="$path"
35360
35361  windows_path="$new_path"
35362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35363    unix_path=`$CYGPATH -u "$windows_path"`
35364    new_path="$unix_path"
35365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35367    new_path="$unix_path"
35368  fi
35369
35370
35371  # Now try to locate executable using which
35372  new_path=`$WHICH "$new_path" 2> /dev/null`
35373
35374  if test "x$new_path" = x; then
35375    # Oops. Which didn't find the executable.
35376    # The splitting of arguments from the executable at a space might have been incorrect,
35377    # since paths with space are more likely in Windows. Give it another try with the whole
35378    # argument.
35379    path="$complete"
35380    arguments="EOL"
35381    new_path="$path"
35382
35383  windows_path="$new_path"
35384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35385    unix_path=`$CYGPATH -u "$windows_path"`
35386    new_path="$unix_path"
35387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35389    new_path="$unix_path"
35390  fi
35391
35392
35393    new_path=`$WHICH "$new_path" 2> /dev/null`
35394    # bat and cmd files are not always considered executable in MSYS causing which
35395    # to not find them
35396    if test "x$new_path" = x \
35397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35399      new_path="$path"
35400
35401  windows_path="$new_path"
35402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35403    unix_path=`$CYGPATH -u "$windows_path"`
35404    new_path="$unix_path"
35405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35407    new_path="$unix_path"
35408  fi
35409
35410    fi
35411
35412    if test "x$new_path" = x; then
35413      # It's still not found. Now this is an unrecoverable error.
35414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35415$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35416      has_space=`$ECHO "$complete" | $GREP " "`
35417      if test "x$has_space" != x; then
35418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35420      fi
35421      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35422    fi
35423  fi
35424
35425  # Now new_path has a complete unix path to the binary
35426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35427    # Keep paths in /bin as-is, but remove trailing .exe if any
35428    new_path="${new_path/%.exe/}"
35429    # Do not save /bin paths to all_fixpath_prefixes!
35430  else
35431    # Not in mixed or Windows style, start by that.
35432    new_path=`cmd //c echo $new_path`
35433
35434  input_path="$new_path"
35435  # Check if we need to convert this using DOS-style short mode. If the path
35436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35437  # take no chances and rewrite it.
35438  # Note: m4 eats our [], so we need to use [ and ] instead.
35439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35440  if test "x$has_forbidden_chars" != x; then
35441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35443  fi
35444
35445    # Output is in $new_path
35446
35447  windows_path="$new_path"
35448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35449    unix_path=`$CYGPATH -u "$windows_path"`
35450    new_path="$unix_path"
35451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35453    new_path="$unix_path"
35454  fi
35455
35456    # remove trailing .exe if any
35457    new_path="${new_path/%.exe/}"
35458
35459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35461  fi
35462
35463    else
35464      # We're on a unix platform. Hooray! :)
35465      # First separate the path from the arguments. This will split at the first
35466      # space.
35467      complete="$DUMPBIN"
35468      path="${complete%% *}"
35469      tmp="$complete EOL"
35470      arguments="${tmp#* }"
35471
35472      # Cannot rely on the command "which" here since it doesn't always work.
35473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35474      if test -z "$is_absolute_path"; then
35475        # Path to executable is not absolute. Find it.
35476        IFS_save="$IFS"
35477        IFS=:
35478        for p in $PATH; do
35479          if test -f "$p/$path" && test -x "$p/$path"; then
35480            new_path="$p/$path"
35481            break
35482          fi
35483        done
35484        IFS="$IFS_save"
35485      else
35486        # This is an absolute path, we can use it without further modifications.
35487        new_path="$path"
35488      fi
35489
35490      if test "x$new_path" = x; then
35491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35492$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35493        has_space=`$ECHO "$complete" | $GREP " "`
35494        if test "x$has_space" != x; then
35495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35497        fi
35498        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35499      fi
35500    fi
35501
35502    # Now join together the path and the arguments once again
35503    if test "x$arguments" != xEOL; then
35504      new_complete="$new_path ${arguments% *}"
35505    else
35506      new_complete="$new_path"
35507    fi
35508
35509    if test "x$complete" != "x$new_complete"; then
35510      DUMPBIN="$new_complete"
35511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35512$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35513    fi
35514  fi
35515
35516    # We need to check for 'msbuild.exe' because at the place where we expect to
35517    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35518    # won't find the 'msbuild.exe' executable in that case (and the
35519    # 'ac_executable_extensions' is unusable due to performance reasons).
35520    # Notice that we intentionally don't fix up the path to MSBUILD because we
35521    # will call it in a DOS shell during freetype detection on Windows (see
35522    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35523    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35524set dummy msbuild.exe; ac_word=$2
35525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35526$as_echo_n "checking for $ac_word... " >&6; }
35527if ${ac_cv_prog_MSBUILD+:} false; then :
35528  $as_echo_n "(cached) " >&6
35529else
35530  if test -n "$MSBUILD"; then
35531  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35532else
35533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35534for as_dir in $PATH
35535do
35536  IFS=$as_save_IFS
35537  test -z "$as_dir" && as_dir=.
35538    for ac_exec_ext in '' $ac_executable_extensions; do
35539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35540    ac_cv_prog_MSBUILD="msbuild.exe"
35541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35542    break 2
35543  fi
35544done
35545  done
35546IFS=$as_save_IFS
35547
35548fi
35549fi
35550MSBUILD=$ac_cv_prog_MSBUILD
35551if test -n "$MSBUILD"; then
35552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35553$as_echo "$MSBUILD" >&6; }
35554else
35555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35556$as_echo "no" >&6; }
35557fi
35558
35559
35560  fi
35561
35562  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35563
35564
35565  # Publish this variable in the help.
35566
35567
35568  if test "x$STRIP" = x; then
35569    # The variable is not set by user, try to locate tool using the code snippet
35570    for ac_prog in strip
35571do
35572  # Extract the first word of "$ac_prog", so it can be a program name with args.
35573set dummy $ac_prog; ac_word=$2
35574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35575$as_echo_n "checking for $ac_word... " >&6; }
35576if ${ac_cv_path_STRIP+:} false; then :
35577  $as_echo_n "(cached) " >&6
35578else
35579  case $STRIP in
35580  [\\/]* | ?:[\\/]*)
35581  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35582  ;;
35583  *)
35584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35585for as_dir in $PATH
35586do
35587  IFS=$as_save_IFS
35588  test -z "$as_dir" && as_dir=.
35589    for ac_exec_ext in '' $ac_executable_extensions; do
35590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35591    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35593    break 2
35594  fi
35595done
35596  done
35597IFS=$as_save_IFS
35598
35599  ;;
35600esac
35601fi
35602STRIP=$ac_cv_path_STRIP
35603if test -n "$STRIP"; then
35604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35605$as_echo "$STRIP" >&6; }
35606else
35607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35608$as_echo "no" >&6; }
35609fi
35610
35611
35612  test -n "$STRIP" && break
35613done
35614
35615  else
35616    # The variable is set, but is it from the command line or the environment?
35617
35618    # Try to remove the string !STRIP! from our list.
35619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35621      # If it failed, the variable was not from the command line. Ignore it,
35622      # but warn the user (except for BASH, which is always set by the calling BASH).
35623      if test "xSTRIP" != xBASH; then
35624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35625$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35626      fi
35627      # Try to locate tool using the code snippet
35628      for ac_prog in strip
35629do
35630  # Extract the first word of "$ac_prog", so it can be a program name with args.
35631set dummy $ac_prog; ac_word=$2
35632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35633$as_echo_n "checking for $ac_word... " >&6; }
35634if ${ac_cv_path_STRIP+:} false; then :
35635  $as_echo_n "(cached) " >&6
35636else
35637  case $STRIP in
35638  [\\/]* | ?:[\\/]*)
35639  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35640  ;;
35641  *)
35642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35643for as_dir in $PATH
35644do
35645  IFS=$as_save_IFS
35646  test -z "$as_dir" && as_dir=.
35647    for ac_exec_ext in '' $ac_executable_extensions; do
35648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35649    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35651    break 2
35652  fi
35653done
35654  done
35655IFS=$as_save_IFS
35656
35657  ;;
35658esac
35659fi
35660STRIP=$ac_cv_path_STRIP
35661if test -n "$STRIP"; then
35662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35663$as_echo "$STRIP" >&6; }
35664else
35665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35666$as_echo "no" >&6; }
35667fi
35668
35669
35670  test -n "$STRIP" && break
35671done
35672
35673    else
35674      # If it succeeded, then it was overridden by the user. We will use it
35675      # for the tool.
35676
35677      # First remove it from the list of overridden variables, so we can test
35678      # for unknown variables in the end.
35679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35680
35681      # Check if the provided tool contains a complete path.
35682      tool_specified="$STRIP"
35683      tool_basename="${tool_specified##*/}"
35684      if test "x$tool_basename" = "x$tool_specified"; then
35685        # A command without a complete path is provided, search $PATH.
35686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35687$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35688        # Extract the first word of "$tool_basename", so it can be a program name with args.
35689set dummy $tool_basename; ac_word=$2
35690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35691$as_echo_n "checking for $ac_word... " >&6; }
35692if ${ac_cv_path_STRIP+:} false; then :
35693  $as_echo_n "(cached) " >&6
35694else
35695  case $STRIP in
35696  [\\/]* | ?:[\\/]*)
35697  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35698  ;;
35699  *)
35700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35701for as_dir in $PATH
35702do
35703  IFS=$as_save_IFS
35704  test -z "$as_dir" && as_dir=.
35705    for ac_exec_ext in '' $ac_executable_extensions; do
35706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35707    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35709    break 2
35710  fi
35711done
35712  done
35713IFS=$as_save_IFS
35714
35715  ;;
35716esac
35717fi
35718STRIP=$ac_cv_path_STRIP
35719if test -n "$STRIP"; then
35720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35721$as_echo "$STRIP" >&6; }
35722else
35723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35724$as_echo "no" >&6; }
35725fi
35726
35727
35728        if test "x$STRIP" = x; then
35729          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35730        fi
35731      else
35732        # Otherwise we believe it is a complete path. Use it as it is.
35733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35734$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35735        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35736$as_echo_n "checking for STRIP... " >&6; }
35737        if test ! -x "$tool_specified"; then
35738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35739$as_echo "not found" >&6; }
35740          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35741        fi
35742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35743$as_echo "$tool_specified" >&6; }
35744      fi
35745    fi
35746  fi
35747
35748
35749
35750  # Only process if variable expands to non-empty
35751
35752  if test "x$STRIP" != x; then
35753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35754
35755  # First separate the path from the arguments. This will split at the first
35756  # space.
35757  complete="$STRIP"
35758  path="${complete%% *}"
35759  tmp="$complete EOL"
35760  arguments="${tmp#* }"
35761
35762  # Input might be given as Windows format, start by converting to
35763  # unix format.
35764  new_path=`$CYGPATH -u "$path"`
35765
35766  # Now try to locate executable using which
35767  new_path=`$WHICH "$new_path" 2> /dev/null`
35768  # bat and cmd files are not always considered executable in cygwin causing which
35769  # to not find them
35770  if test "x$new_path" = x \
35771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35773    new_path=`$CYGPATH -u "$path"`
35774  fi
35775  if test "x$new_path" = x; then
35776    # Oops. Which didn't find the executable.
35777    # The splitting of arguments from the executable at a space might have been incorrect,
35778    # since paths with space are more likely in Windows. Give it another try with the whole
35779    # argument.
35780    path="$complete"
35781    arguments="EOL"
35782    new_path=`$CYGPATH -u "$path"`
35783    new_path=`$WHICH "$new_path" 2> /dev/null`
35784    # bat and cmd files are not always considered executable in cygwin causing which
35785    # to not find them
35786    if test "x$new_path" = x \
35787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35789      new_path=`$CYGPATH -u "$path"`
35790    fi
35791    if test "x$new_path" = x; then
35792      # It's still not found. Now this is an unrecoverable error.
35793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35794$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35795      has_space=`$ECHO "$complete" | $GREP " "`
35796      if test "x$has_space" != x; then
35797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35799      fi
35800      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35801    fi
35802  fi
35803
35804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35807  # "foo.exe" is OK but "foo" is an error.
35808  #
35809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35810  # It is also a way to make sure we got the proper file name for the real test later on.
35811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35812  if test "x$test_shortpath" = x; then
35813    # Short path failed, file does not exist as specified.
35814    # Try adding .exe or .cmd
35815    if test -f "${new_path}.exe"; then
35816      input_to_shortpath="${new_path}.exe"
35817    elif test -f "${new_path}.cmd"; then
35818      input_to_shortpath="${new_path}.cmd"
35819    else
35820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35821$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35824      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35825    fi
35826  else
35827    input_to_shortpath="$new_path"
35828  fi
35829
35830  # Call helper function which possibly converts this using DOS-style short mode.
35831  # If so, the updated path is stored in $new_path.
35832  new_path="$input_to_shortpath"
35833
35834  input_path="$input_to_shortpath"
35835  # Check if we need to convert this using DOS-style short mode. If the path
35836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35837  # take no chances and rewrite it.
35838  # Note: m4 eats our [], so we need to use [ and ] instead.
35839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35840  if test "x$has_forbidden_chars" != x; then
35841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35845      # Going to short mode and back again did indeed matter. Since short mode is
35846      # case insensitive, let's make it lowercase to improve readability.
35847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35848      # Now convert it back to Unix-style (cygpath)
35849      input_path=`$CYGPATH -u "$shortmode_path"`
35850      new_path="$input_path"
35851    fi
35852  fi
35853
35854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35855  if test "x$test_cygdrive_prefix" = x; then
35856    # As a simple fix, exclude /usr/bin since it's not a real path.
35857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35859      # a path prefixed by /cygdrive for fixpath to work.
35860      new_path="$CYGWIN_ROOT_PATH$input_path"
35861    fi
35862  fi
35863
35864  # remove trailing .exe if any
35865  new_path="${new_path/%.exe/}"
35866
35867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35868
35869  # First separate the path from the arguments. This will split at the first
35870  # space.
35871  complete="$STRIP"
35872  path="${complete%% *}"
35873  tmp="$complete EOL"
35874  arguments="${tmp#* }"
35875
35876  # Input might be given as Windows format, start by converting to
35877  # unix format.
35878  new_path="$path"
35879
35880  windows_path="$new_path"
35881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35882    unix_path=`$CYGPATH -u "$windows_path"`
35883    new_path="$unix_path"
35884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35886    new_path="$unix_path"
35887  fi
35888
35889
35890  # Now try to locate executable using which
35891  new_path=`$WHICH "$new_path" 2> /dev/null`
35892
35893  if test "x$new_path" = x; then
35894    # Oops. Which didn't find the executable.
35895    # The splitting of arguments from the executable at a space might have been incorrect,
35896    # since paths with space are more likely in Windows. Give it another try with the whole
35897    # argument.
35898    path="$complete"
35899    arguments="EOL"
35900    new_path="$path"
35901
35902  windows_path="$new_path"
35903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35904    unix_path=`$CYGPATH -u "$windows_path"`
35905    new_path="$unix_path"
35906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35908    new_path="$unix_path"
35909  fi
35910
35911
35912    new_path=`$WHICH "$new_path" 2> /dev/null`
35913    # bat and cmd files are not always considered executable in MSYS causing which
35914    # to not find them
35915    if test "x$new_path" = x \
35916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35918      new_path="$path"
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929    fi
35930
35931    if test "x$new_path" = x; then
35932      # It's still not found. Now this is an unrecoverable error.
35933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35934$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35935      has_space=`$ECHO "$complete" | $GREP " "`
35936      if test "x$has_space" != x; then
35937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35939      fi
35940      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35941    fi
35942  fi
35943
35944  # Now new_path has a complete unix path to the binary
35945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35946    # Keep paths in /bin as-is, but remove trailing .exe if any
35947    new_path="${new_path/%.exe/}"
35948    # Do not save /bin paths to all_fixpath_prefixes!
35949  else
35950    # Not in mixed or Windows style, start by that.
35951    new_path=`cmd //c echo $new_path`
35952
35953  input_path="$new_path"
35954  # Check if we need to convert this using DOS-style short mode. If the path
35955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35956  # take no chances and rewrite it.
35957  # Note: m4 eats our [], so we need to use [ and ] instead.
35958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35959  if test "x$has_forbidden_chars" != x; then
35960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35962  fi
35963
35964    # Output is in $new_path
35965
35966  windows_path="$new_path"
35967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35968    unix_path=`$CYGPATH -u "$windows_path"`
35969    new_path="$unix_path"
35970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35972    new_path="$unix_path"
35973  fi
35974
35975    # remove trailing .exe if any
35976    new_path="${new_path/%.exe/}"
35977
35978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35980  fi
35981
35982    else
35983      # We're on a unix platform. Hooray! :)
35984      # First separate the path from the arguments. This will split at the first
35985      # space.
35986      complete="$STRIP"
35987      path="${complete%% *}"
35988      tmp="$complete EOL"
35989      arguments="${tmp#* }"
35990
35991      # Cannot rely on the command "which" here since it doesn't always work.
35992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35993      if test -z "$is_absolute_path"; then
35994        # Path to executable is not absolute. Find it.
35995        IFS_save="$IFS"
35996        IFS=:
35997        for p in $PATH; do
35998          if test -f "$p/$path" && test -x "$p/$path"; then
35999            new_path="$p/$path"
36000            break
36001          fi
36002        done
36003        IFS="$IFS_save"
36004      else
36005        # This is an absolute path, we can use it without further modifications.
36006        new_path="$path"
36007      fi
36008
36009      if test "x$new_path" = x; then
36010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36011$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36012        has_space=`$ECHO "$complete" | $GREP " "`
36013        if test "x$has_space" != x; then
36014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36016        fi
36017        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36018      fi
36019    fi
36020
36021    # Now join together the path and the arguments once again
36022    if test "x$arguments" != xEOL; then
36023      new_complete="$new_path ${arguments% *}"
36024    else
36025      new_complete="$new_path"
36026    fi
36027
36028    if test "x$complete" != "x$new_complete"; then
36029      STRIP="$new_complete"
36030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36031$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36032    fi
36033  fi
36034
36035
36036
36037  # Publish this variable in the help.
36038
36039
36040  if test "x$NM" = x; then
36041    # The variable is not set by user, try to locate tool using the code snippet
36042    for ac_prog in nm
36043do
36044  # Extract the first word of "$ac_prog", so it can be a program name with args.
36045set dummy $ac_prog; ac_word=$2
36046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36047$as_echo_n "checking for $ac_word... " >&6; }
36048if ${ac_cv_path_NM+:} false; then :
36049  $as_echo_n "(cached) " >&6
36050else
36051  case $NM in
36052  [\\/]* | ?:[\\/]*)
36053  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36054  ;;
36055  *)
36056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36057for as_dir in $PATH
36058do
36059  IFS=$as_save_IFS
36060  test -z "$as_dir" && as_dir=.
36061    for ac_exec_ext in '' $ac_executable_extensions; do
36062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36063    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36065    break 2
36066  fi
36067done
36068  done
36069IFS=$as_save_IFS
36070
36071  ;;
36072esac
36073fi
36074NM=$ac_cv_path_NM
36075if test -n "$NM"; then
36076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36077$as_echo "$NM" >&6; }
36078else
36079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36080$as_echo "no" >&6; }
36081fi
36082
36083
36084  test -n "$NM" && break
36085done
36086
36087  else
36088    # The variable is set, but is it from the command line or the environment?
36089
36090    # Try to remove the string !NM! from our list.
36091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36093      # If it failed, the variable was not from the command line. Ignore it,
36094      # but warn the user (except for BASH, which is always set by the calling BASH).
36095      if test "xNM" != xBASH; then
36096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36097$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36098      fi
36099      # Try to locate tool using the code snippet
36100      for ac_prog in nm
36101do
36102  # Extract the first word of "$ac_prog", so it can be a program name with args.
36103set dummy $ac_prog; ac_word=$2
36104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36105$as_echo_n "checking for $ac_word... " >&6; }
36106if ${ac_cv_path_NM+:} false; then :
36107  $as_echo_n "(cached) " >&6
36108else
36109  case $NM in
36110  [\\/]* | ?:[\\/]*)
36111  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36112  ;;
36113  *)
36114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36115for as_dir in $PATH
36116do
36117  IFS=$as_save_IFS
36118  test -z "$as_dir" && as_dir=.
36119    for ac_exec_ext in '' $ac_executable_extensions; do
36120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36121    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36123    break 2
36124  fi
36125done
36126  done
36127IFS=$as_save_IFS
36128
36129  ;;
36130esac
36131fi
36132NM=$ac_cv_path_NM
36133if test -n "$NM"; then
36134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36135$as_echo "$NM" >&6; }
36136else
36137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36138$as_echo "no" >&6; }
36139fi
36140
36141
36142  test -n "$NM" && break
36143done
36144
36145    else
36146      # If it succeeded, then it was overridden by the user. We will use it
36147      # for the tool.
36148
36149      # First remove it from the list of overridden variables, so we can test
36150      # for unknown variables in the end.
36151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36152
36153      # Check if the provided tool contains a complete path.
36154      tool_specified="$NM"
36155      tool_basename="${tool_specified##*/}"
36156      if test "x$tool_basename" = "x$tool_specified"; then
36157        # A command without a complete path is provided, search $PATH.
36158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36159$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36160        # Extract the first word of "$tool_basename", so it can be a program name with args.
36161set dummy $tool_basename; ac_word=$2
36162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36163$as_echo_n "checking for $ac_word... " >&6; }
36164if ${ac_cv_path_NM+:} false; then :
36165  $as_echo_n "(cached) " >&6
36166else
36167  case $NM in
36168  [\\/]* | ?:[\\/]*)
36169  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36170  ;;
36171  *)
36172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36173for as_dir in $PATH
36174do
36175  IFS=$as_save_IFS
36176  test -z "$as_dir" && as_dir=.
36177    for ac_exec_ext in '' $ac_executable_extensions; do
36178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36179    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36181    break 2
36182  fi
36183done
36184  done
36185IFS=$as_save_IFS
36186
36187  ;;
36188esac
36189fi
36190NM=$ac_cv_path_NM
36191if test -n "$NM"; then
36192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36193$as_echo "$NM" >&6; }
36194else
36195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36196$as_echo "no" >&6; }
36197fi
36198
36199
36200        if test "x$NM" = x; then
36201          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36202        fi
36203      else
36204        # Otherwise we believe it is a complete path. Use it as it is.
36205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36206$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36208$as_echo_n "checking for NM... " >&6; }
36209        if test ! -x "$tool_specified"; then
36210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36211$as_echo "not found" >&6; }
36212          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36213        fi
36214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36215$as_echo "$tool_specified" >&6; }
36216      fi
36217    fi
36218  fi
36219
36220
36221
36222  # Only process if variable expands to non-empty
36223
36224  if test "x$NM" != x; then
36225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36226
36227  # First separate the path from the arguments. This will split at the first
36228  # space.
36229  complete="$NM"
36230  path="${complete%% *}"
36231  tmp="$complete EOL"
36232  arguments="${tmp#* }"
36233
36234  # Input might be given as Windows format, start by converting to
36235  # unix format.
36236  new_path=`$CYGPATH -u "$path"`
36237
36238  # Now try to locate executable using which
36239  new_path=`$WHICH "$new_path" 2> /dev/null`
36240  # bat and cmd files are not always considered executable in cygwin causing which
36241  # to not find them
36242  if test "x$new_path" = x \
36243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36245    new_path=`$CYGPATH -u "$path"`
36246  fi
36247  if test "x$new_path" = x; then
36248    # Oops. Which didn't find the executable.
36249    # The splitting of arguments from the executable at a space might have been incorrect,
36250    # since paths with space are more likely in Windows. Give it another try with the whole
36251    # argument.
36252    path="$complete"
36253    arguments="EOL"
36254    new_path=`$CYGPATH -u "$path"`
36255    new_path=`$WHICH "$new_path" 2> /dev/null`
36256    # bat and cmd files are not always considered executable in cygwin causing which
36257    # to not find them
36258    if test "x$new_path" = x \
36259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36261      new_path=`$CYGPATH -u "$path"`
36262    fi
36263    if test "x$new_path" = x; then
36264      # It's still not found. Now this is an unrecoverable error.
36265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36266$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36267      has_space=`$ECHO "$complete" | $GREP " "`
36268      if test "x$has_space" != x; then
36269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36271      fi
36272      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36273    fi
36274  fi
36275
36276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36279  # "foo.exe" is OK but "foo" is an error.
36280  #
36281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36282  # It is also a way to make sure we got the proper file name for the real test later on.
36283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36284  if test "x$test_shortpath" = x; then
36285    # Short path failed, file does not exist as specified.
36286    # Try adding .exe or .cmd
36287    if test -f "${new_path}.exe"; then
36288      input_to_shortpath="${new_path}.exe"
36289    elif test -f "${new_path}.cmd"; then
36290      input_to_shortpath="${new_path}.cmd"
36291    else
36292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36293$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36296      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36297    fi
36298  else
36299    input_to_shortpath="$new_path"
36300  fi
36301
36302  # Call helper function which possibly converts this using DOS-style short mode.
36303  # If so, the updated path is stored in $new_path.
36304  new_path="$input_to_shortpath"
36305
36306  input_path="$input_to_shortpath"
36307  # Check if we need to convert this using DOS-style short mode. If the path
36308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36309  # take no chances and rewrite it.
36310  # Note: m4 eats our [], so we need to use [ and ] instead.
36311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36312  if test "x$has_forbidden_chars" != x; then
36313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36317      # Going to short mode and back again did indeed matter. Since short mode is
36318      # case insensitive, let's make it lowercase to improve readability.
36319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36320      # Now convert it back to Unix-style (cygpath)
36321      input_path=`$CYGPATH -u "$shortmode_path"`
36322      new_path="$input_path"
36323    fi
36324  fi
36325
36326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36327  if test "x$test_cygdrive_prefix" = x; then
36328    # As a simple fix, exclude /usr/bin since it's not a real path.
36329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36331      # a path prefixed by /cygdrive for fixpath to work.
36332      new_path="$CYGWIN_ROOT_PATH$input_path"
36333    fi
36334  fi
36335
36336  # remove trailing .exe if any
36337  new_path="${new_path/%.exe/}"
36338
36339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36340
36341  # First separate the path from the arguments. This will split at the first
36342  # space.
36343  complete="$NM"
36344  path="${complete%% *}"
36345  tmp="$complete EOL"
36346  arguments="${tmp#* }"
36347
36348  # Input might be given as Windows format, start by converting to
36349  # unix format.
36350  new_path="$path"
36351
36352  windows_path="$new_path"
36353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36354    unix_path=`$CYGPATH -u "$windows_path"`
36355    new_path="$unix_path"
36356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36358    new_path="$unix_path"
36359  fi
36360
36361
36362  # Now try to locate executable using which
36363  new_path=`$WHICH "$new_path" 2> /dev/null`
36364
36365  if test "x$new_path" = x; then
36366    # Oops. Which didn't find the executable.
36367    # The splitting of arguments from the executable at a space might have been incorrect,
36368    # since paths with space are more likely in Windows. Give it another try with the whole
36369    # argument.
36370    path="$complete"
36371    arguments="EOL"
36372    new_path="$path"
36373
36374  windows_path="$new_path"
36375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36376    unix_path=`$CYGPATH -u "$windows_path"`
36377    new_path="$unix_path"
36378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36380    new_path="$unix_path"
36381  fi
36382
36383
36384    new_path=`$WHICH "$new_path" 2> /dev/null`
36385    # bat and cmd files are not always considered executable in MSYS causing which
36386    # to not find them
36387    if test "x$new_path" = x \
36388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36390      new_path="$path"
36391
36392  windows_path="$new_path"
36393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36394    unix_path=`$CYGPATH -u "$windows_path"`
36395    new_path="$unix_path"
36396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36398    new_path="$unix_path"
36399  fi
36400
36401    fi
36402
36403    if test "x$new_path" = x; then
36404      # It's still not found. Now this is an unrecoverable error.
36405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36406$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36407      has_space=`$ECHO "$complete" | $GREP " "`
36408      if test "x$has_space" != x; then
36409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36411      fi
36412      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36413    fi
36414  fi
36415
36416  # Now new_path has a complete unix path to the binary
36417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36418    # Keep paths in /bin as-is, but remove trailing .exe if any
36419    new_path="${new_path/%.exe/}"
36420    # Do not save /bin paths to all_fixpath_prefixes!
36421  else
36422    # Not in mixed or Windows style, start by that.
36423    new_path=`cmd //c echo $new_path`
36424
36425  input_path="$new_path"
36426  # Check if we need to convert this using DOS-style short mode. If the path
36427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36428  # take no chances and rewrite it.
36429  # Note: m4 eats our [], so we need to use [ and ] instead.
36430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36431  if test "x$has_forbidden_chars" != x; then
36432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36434  fi
36435
36436    # Output is in $new_path
36437
36438  windows_path="$new_path"
36439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36440    unix_path=`$CYGPATH -u "$windows_path"`
36441    new_path="$unix_path"
36442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36444    new_path="$unix_path"
36445  fi
36446
36447    # remove trailing .exe if any
36448    new_path="${new_path/%.exe/}"
36449
36450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36452  fi
36453
36454    else
36455      # We're on a unix platform. Hooray! :)
36456      # First separate the path from the arguments. This will split at the first
36457      # space.
36458      complete="$NM"
36459      path="${complete%% *}"
36460      tmp="$complete EOL"
36461      arguments="${tmp#* }"
36462
36463      # Cannot rely on the command "which" here since it doesn't always work.
36464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36465      if test -z "$is_absolute_path"; then
36466        # Path to executable is not absolute. Find it.
36467        IFS_save="$IFS"
36468        IFS=:
36469        for p in $PATH; do
36470          if test -f "$p/$path" && test -x "$p/$path"; then
36471            new_path="$p/$path"
36472            break
36473          fi
36474        done
36475        IFS="$IFS_save"
36476      else
36477        # This is an absolute path, we can use it without further modifications.
36478        new_path="$path"
36479      fi
36480
36481      if test "x$new_path" = x; then
36482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36483$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36484        has_space=`$ECHO "$complete" | $GREP " "`
36485        if test "x$has_space" != x; then
36486          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36488        fi
36489        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36490      fi
36491    fi
36492
36493    # Now join together the path and the arguments once again
36494    if test "x$arguments" != xEOL; then
36495      new_complete="$new_path ${arguments% *}"
36496    else
36497      new_complete="$new_path"
36498    fi
36499
36500    if test "x$complete" != "x$new_complete"; then
36501      NM="$new_complete"
36502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36503$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36504    fi
36505  fi
36506
36507
36508
36509  # Publish this variable in the help.
36510
36511
36512  if test "x$GNM" = x; then
36513    # The variable is not set by user, try to locate tool using the code snippet
36514    for ac_prog in gnm
36515do
36516  # Extract the first word of "$ac_prog", so it can be a program name with args.
36517set dummy $ac_prog; ac_word=$2
36518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36519$as_echo_n "checking for $ac_word... " >&6; }
36520if ${ac_cv_path_GNM+:} false; then :
36521  $as_echo_n "(cached) " >&6
36522else
36523  case $GNM in
36524  [\\/]* | ?:[\\/]*)
36525  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36526  ;;
36527  *)
36528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36529for as_dir in $PATH
36530do
36531  IFS=$as_save_IFS
36532  test -z "$as_dir" && as_dir=.
36533    for ac_exec_ext in '' $ac_executable_extensions; do
36534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36535    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36537    break 2
36538  fi
36539done
36540  done
36541IFS=$as_save_IFS
36542
36543  ;;
36544esac
36545fi
36546GNM=$ac_cv_path_GNM
36547if test -n "$GNM"; then
36548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36549$as_echo "$GNM" >&6; }
36550else
36551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36552$as_echo "no" >&6; }
36553fi
36554
36555
36556  test -n "$GNM" && break
36557done
36558
36559  else
36560    # The variable is set, but is it from the command line or the environment?
36561
36562    # Try to remove the string !GNM! from our list.
36563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36565      # If it failed, the variable was not from the command line. Ignore it,
36566      # but warn the user (except for BASH, which is always set by the calling BASH).
36567      if test "xGNM" != xBASH; then
36568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36569$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36570      fi
36571      # Try to locate tool using the code snippet
36572      for ac_prog in gnm
36573do
36574  # Extract the first word of "$ac_prog", so it can be a program name with args.
36575set dummy $ac_prog; ac_word=$2
36576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36577$as_echo_n "checking for $ac_word... " >&6; }
36578if ${ac_cv_path_GNM+:} false; then :
36579  $as_echo_n "(cached) " >&6
36580else
36581  case $GNM in
36582  [\\/]* | ?:[\\/]*)
36583  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36584  ;;
36585  *)
36586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36587for as_dir in $PATH
36588do
36589  IFS=$as_save_IFS
36590  test -z "$as_dir" && as_dir=.
36591    for ac_exec_ext in '' $ac_executable_extensions; do
36592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36593    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36595    break 2
36596  fi
36597done
36598  done
36599IFS=$as_save_IFS
36600
36601  ;;
36602esac
36603fi
36604GNM=$ac_cv_path_GNM
36605if test -n "$GNM"; then
36606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36607$as_echo "$GNM" >&6; }
36608else
36609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36610$as_echo "no" >&6; }
36611fi
36612
36613
36614  test -n "$GNM" && break
36615done
36616
36617    else
36618      # If it succeeded, then it was overridden by the user. We will use it
36619      # for the tool.
36620
36621      # First remove it from the list of overridden variables, so we can test
36622      # for unknown variables in the end.
36623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36624
36625      # Check if the provided tool contains a complete path.
36626      tool_specified="$GNM"
36627      tool_basename="${tool_specified##*/}"
36628      if test "x$tool_basename" = "x$tool_specified"; then
36629        # A command without a complete path is provided, search $PATH.
36630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36631$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36632        # Extract the first word of "$tool_basename", so it can be a program name with args.
36633set dummy $tool_basename; ac_word=$2
36634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36635$as_echo_n "checking for $ac_word... " >&6; }
36636if ${ac_cv_path_GNM+:} false; then :
36637  $as_echo_n "(cached) " >&6
36638else
36639  case $GNM in
36640  [\\/]* | ?:[\\/]*)
36641  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36642  ;;
36643  *)
36644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36645for as_dir in $PATH
36646do
36647  IFS=$as_save_IFS
36648  test -z "$as_dir" && as_dir=.
36649    for ac_exec_ext in '' $ac_executable_extensions; do
36650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36651    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36653    break 2
36654  fi
36655done
36656  done
36657IFS=$as_save_IFS
36658
36659  ;;
36660esac
36661fi
36662GNM=$ac_cv_path_GNM
36663if test -n "$GNM"; then
36664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36665$as_echo "$GNM" >&6; }
36666else
36667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36668$as_echo "no" >&6; }
36669fi
36670
36671
36672        if test "x$GNM" = x; then
36673          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36674        fi
36675      else
36676        # Otherwise we believe it is a complete path. Use it as it is.
36677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36678$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36680$as_echo_n "checking for GNM... " >&6; }
36681        if test ! -x "$tool_specified"; then
36682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36683$as_echo "not found" >&6; }
36684          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36685        fi
36686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36687$as_echo "$tool_specified" >&6; }
36688      fi
36689    fi
36690  fi
36691
36692
36693
36694  # Only process if variable expands to non-empty
36695
36696  if test "x$GNM" != x; then
36697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36698
36699  # First separate the path from the arguments. This will split at the first
36700  # space.
36701  complete="$GNM"
36702  path="${complete%% *}"
36703  tmp="$complete EOL"
36704  arguments="${tmp#* }"
36705
36706  # Input might be given as Windows format, start by converting to
36707  # unix format.
36708  new_path=`$CYGPATH -u "$path"`
36709
36710  # Now try to locate executable using which
36711  new_path=`$WHICH "$new_path" 2> /dev/null`
36712  # bat and cmd files are not always considered executable in cygwin causing which
36713  # to not find them
36714  if test "x$new_path" = x \
36715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36717    new_path=`$CYGPATH -u "$path"`
36718  fi
36719  if test "x$new_path" = x; then
36720    # Oops. Which didn't find the executable.
36721    # The splitting of arguments from the executable at a space might have been incorrect,
36722    # since paths with space are more likely in Windows. Give it another try with the whole
36723    # argument.
36724    path="$complete"
36725    arguments="EOL"
36726    new_path=`$CYGPATH -u "$path"`
36727    new_path=`$WHICH "$new_path" 2> /dev/null`
36728    # bat and cmd files are not always considered executable in cygwin causing which
36729    # to not find them
36730    if test "x$new_path" = x \
36731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36733      new_path=`$CYGPATH -u "$path"`
36734    fi
36735    if test "x$new_path" = x; then
36736      # It's still not found. Now this is an unrecoverable error.
36737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36738$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36739      has_space=`$ECHO "$complete" | $GREP " "`
36740      if test "x$has_space" != x; then
36741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36743      fi
36744      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36745    fi
36746  fi
36747
36748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36751  # "foo.exe" is OK but "foo" is an error.
36752  #
36753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36754  # It is also a way to make sure we got the proper file name for the real test later on.
36755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36756  if test "x$test_shortpath" = x; then
36757    # Short path failed, file does not exist as specified.
36758    # Try adding .exe or .cmd
36759    if test -f "${new_path}.exe"; then
36760      input_to_shortpath="${new_path}.exe"
36761    elif test -f "${new_path}.cmd"; then
36762      input_to_shortpath="${new_path}.cmd"
36763    else
36764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36765$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36768      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36769    fi
36770  else
36771    input_to_shortpath="$new_path"
36772  fi
36773
36774  # Call helper function which possibly converts this using DOS-style short mode.
36775  # If so, the updated path is stored in $new_path.
36776  new_path="$input_to_shortpath"
36777
36778  input_path="$input_to_shortpath"
36779  # Check if we need to convert this using DOS-style short mode. If the path
36780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36781  # take no chances and rewrite it.
36782  # Note: m4 eats our [], so we need to use [ and ] instead.
36783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36784  if test "x$has_forbidden_chars" != x; then
36785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36789      # Going to short mode and back again did indeed matter. Since short mode is
36790      # case insensitive, let's make it lowercase to improve readability.
36791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36792      # Now convert it back to Unix-style (cygpath)
36793      input_path=`$CYGPATH -u "$shortmode_path"`
36794      new_path="$input_path"
36795    fi
36796  fi
36797
36798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36799  if test "x$test_cygdrive_prefix" = x; then
36800    # As a simple fix, exclude /usr/bin since it's not a real path.
36801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36803      # a path prefixed by /cygdrive for fixpath to work.
36804      new_path="$CYGWIN_ROOT_PATH$input_path"
36805    fi
36806  fi
36807
36808  # remove trailing .exe if any
36809  new_path="${new_path/%.exe/}"
36810
36811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36812
36813  # First separate the path from the arguments. This will split at the first
36814  # space.
36815  complete="$GNM"
36816  path="${complete%% *}"
36817  tmp="$complete EOL"
36818  arguments="${tmp#* }"
36819
36820  # Input might be given as Windows format, start by converting to
36821  # unix format.
36822  new_path="$path"
36823
36824  windows_path="$new_path"
36825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36826    unix_path=`$CYGPATH -u "$windows_path"`
36827    new_path="$unix_path"
36828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36830    new_path="$unix_path"
36831  fi
36832
36833
36834  # Now try to locate executable using which
36835  new_path=`$WHICH "$new_path" 2> /dev/null`
36836
36837  if test "x$new_path" = x; then
36838    # Oops. Which didn't find the executable.
36839    # The splitting of arguments from the executable at a space might have been incorrect,
36840    # since paths with space are more likely in Windows. Give it another try with the whole
36841    # argument.
36842    path="$complete"
36843    arguments="EOL"
36844    new_path="$path"
36845
36846  windows_path="$new_path"
36847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36848    unix_path=`$CYGPATH -u "$windows_path"`
36849    new_path="$unix_path"
36850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36852    new_path="$unix_path"
36853  fi
36854
36855
36856    new_path=`$WHICH "$new_path" 2> /dev/null`
36857    # bat and cmd files are not always considered executable in MSYS causing which
36858    # to not find them
36859    if test "x$new_path" = x \
36860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36862      new_path="$path"
36863
36864  windows_path="$new_path"
36865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36866    unix_path=`$CYGPATH -u "$windows_path"`
36867    new_path="$unix_path"
36868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36870    new_path="$unix_path"
36871  fi
36872
36873    fi
36874
36875    if test "x$new_path" = x; then
36876      # It's still not found. Now this is an unrecoverable error.
36877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36878$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36879      has_space=`$ECHO "$complete" | $GREP " "`
36880      if test "x$has_space" != x; then
36881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36883      fi
36884      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36885    fi
36886  fi
36887
36888  # Now new_path has a complete unix path to the binary
36889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36890    # Keep paths in /bin as-is, but remove trailing .exe if any
36891    new_path="${new_path/%.exe/}"
36892    # Do not save /bin paths to all_fixpath_prefixes!
36893  else
36894    # Not in mixed or Windows style, start by that.
36895    new_path=`cmd //c echo $new_path`
36896
36897  input_path="$new_path"
36898  # Check if we need to convert this using DOS-style short mode. If the path
36899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36900  # take no chances and rewrite it.
36901  # Note: m4 eats our [], so we need to use [ and ] instead.
36902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36903  if test "x$has_forbidden_chars" != x; then
36904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36906  fi
36907
36908    # Output is in $new_path
36909
36910  windows_path="$new_path"
36911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36912    unix_path=`$CYGPATH -u "$windows_path"`
36913    new_path="$unix_path"
36914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36916    new_path="$unix_path"
36917  fi
36918
36919    # remove trailing .exe if any
36920    new_path="${new_path/%.exe/}"
36921
36922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36924  fi
36925
36926    else
36927      # We're on a unix platform. Hooray! :)
36928      # First separate the path from the arguments. This will split at the first
36929      # space.
36930      complete="$GNM"
36931      path="${complete%% *}"
36932      tmp="$complete EOL"
36933      arguments="${tmp#* }"
36934
36935      # Cannot rely on the command "which" here since it doesn't always work.
36936      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36937      if test -z "$is_absolute_path"; then
36938        # Path to executable is not absolute. Find it.
36939        IFS_save="$IFS"
36940        IFS=:
36941        for p in $PATH; do
36942          if test -f "$p/$path" && test -x "$p/$path"; then
36943            new_path="$p/$path"
36944            break
36945          fi
36946        done
36947        IFS="$IFS_save"
36948      else
36949        # This is an absolute path, we can use it without further modifications.
36950        new_path="$path"
36951      fi
36952
36953      if test "x$new_path" = x; then
36954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36955$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36956        has_space=`$ECHO "$complete" | $GREP " "`
36957        if test "x$has_space" != x; then
36958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36960        fi
36961        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36962      fi
36963    fi
36964
36965    # Now join together the path and the arguments once again
36966    if test "x$arguments" != xEOL; then
36967      new_complete="$new_path ${arguments% *}"
36968    else
36969      new_complete="$new_path"
36970    fi
36971
36972    if test "x$complete" != "x$new_complete"; then
36973      GNM="$new_complete"
36974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36975$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36976    fi
36977  fi
36978
36979  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36980    # FIXME: we should unify this with the solaris case above.
36981
36982
36983  # Publish this variable in the help.
36984
36985
36986  if test "x$STRIP" = x; then
36987    # The variable is not set by user, try to locate tool using the code snippet
36988    if test -n "$ac_tool_prefix"; then
36989  for ac_prog in strip
36990  do
36991    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36992set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36994$as_echo_n "checking for $ac_word... " >&6; }
36995if ${ac_cv_prog_STRIP+:} false; then :
36996  $as_echo_n "(cached) " >&6
36997else
36998  if test -n "$STRIP"; then
36999  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37000else
37001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37002for as_dir in $PATH
37003do
37004  IFS=$as_save_IFS
37005  test -z "$as_dir" && as_dir=.
37006    for ac_exec_ext in '' $ac_executable_extensions; do
37007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37008    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37010    break 2
37011  fi
37012done
37013  done
37014IFS=$as_save_IFS
37015
37016fi
37017fi
37018STRIP=$ac_cv_prog_STRIP
37019if test -n "$STRIP"; then
37020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37021$as_echo "$STRIP" >&6; }
37022else
37023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37024$as_echo "no" >&6; }
37025fi
37026
37027
37028    test -n "$STRIP" && break
37029  done
37030fi
37031if test -z "$STRIP"; then
37032  ac_ct_STRIP=$STRIP
37033  for ac_prog in strip
37034do
37035  # Extract the first word of "$ac_prog", so it can be a program name with args.
37036set dummy $ac_prog; ac_word=$2
37037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37038$as_echo_n "checking for $ac_word... " >&6; }
37039if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37040  $as_echo_n "(cached) " >&6
37041else
37042  if test -n "$ac_ct_STRIP"; then
37043  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37044else
37045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37046for as_dir in $PATH
37047do
37048  IFS=$as_save_IFS
37049  test -z "$as_dir" && as_dir=.
37050    for ac_exec_ext in '' $ac_executable_extensions; do
37051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37052    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37054    break 2
37055  fi
37056done
37057  done
37058IFS=$as_save_IFS
37059
37060fi
37061fi
37062ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37063if test -n "$ac_ct_STRIP"; then
37064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37065$as_echo "$ac_ct_STRIP" >&6; }
37066else
37067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37068$as_echo "no" >&6; }
37069fi
37070
37071
37072  test -n "$ac_ct_STRIP" && break
37073done
37074
37075  if test "x$ac_ct_STRIP" = x; then
37076    STRIP=""
37077  else
37078    case $cross_compiling:$ac_tool_warned in
37079yes:)
37080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37082ac_tool_warned=yes ;;
37083esac
37084    STRIP=$ac_ct_STRIP
37085  fi
37086fi
37087
37088  else
37089    # The variable is set, but is it from the command line or the environment?
37090
37091    # Try to remove the string !STRIP! from our list.
37092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37094      # If it failed, the variable was not from the command line. Ignore it,
37095      # but warn the user (except for BASH, which is always set by the calling BASH).
37096      if test "xSTRIP" != xBASH; then
37097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37098$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37099      fi
37100      # Try to locate tool using the code snippet
37101      if test -n "$ac_tool_prefix"; then
37102  for ac_prog in strip
37103  do
37104    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37107$as_echo_n "checking for $ac_word... " >&6; }
37108if ${ac_cv_prog_STRIP+:} false; then :
37109  $as_echo_n "(cached) " >&6
37110else
37111  if test -n "$STRIP"; then
37112  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37113else
37114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37115for as_dir in $PATH
37116do
37117  IFS=$as_save_IFS
37118  test -z "$as_dir" && as_dir=.
37119    for ac_exec_ext in '' $ac_executable_extensions; do
37120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37121    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37123    break 2
37124  fi
37125done
37126  done
37127IFS=$as_save_IFS
37128
37129fi
37130fi
37131STRIP=$ac_cv_prog_STRIP
37132if test -n "$STRIP"; then
37133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37134$as_echo "$STRIP" >&6; }
37135else
37136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37137$as_echo "no" >&6; }
37138fi
37139
37140
37141    test -n "$STRIP" && break
37142  done
37143fi
37144if test -z "$STRIP"; then
37145  ac_ct_STRIP=$STRIP
37146  for ac_prog in strip
37147do
37148  # Extract the first word of "$ac_prog", so it can be a program name with args.
37149set dummy $ac_prog; ac_word=$2
37150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37151$as_echo_n "checking for $ac_word... " >&6; }
37152if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37153  $as_echo_n "(cached) " >&6
37154else
37155  if test -n "$ac_ct_STRIP"; then
37156  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37157else
37158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37159for as_dir in $PATH
37160do
37161  IFS=$as_save_IFS
37162  test -z "$as_dir" && as_dir=.
37163    for ac_exec_ext in '' $ac_executable_extensions; do
37164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37165    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37167    break 2
37168  fi
37169done
37170  done
37171IFS=$as_save_IFS
37172
37173fi
37174fi
37175ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37176if test -n "$ac_ct_STRIP"; then
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37178$as_echo "$ac_ct_STRIP" >&6; }
37179else
37180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37181$as_echo "no" >&6; }
37182fi
37183
37184
37185  test -n "$ac_ct_STRIP" && break
37186done
37187
37188  if test "x$ac_ct_STRIP" = x; then
37189    STRIP=""
37190  else
37191    case $cross_compiling:$ac_tool_warned in
37192yes:)
37193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37195ac_tool_warned=yes ;;
37196esac
37197    STRIP=$ac_ct_STRIP
37198  fi
37199fi
37200
37201    else
37202      # If it succeeded, then it was overridden by the user. We will use it
37203      # for the tool.
37204
37205      # First remove it from the list of overridden variables, so we can test
37206      # for unknown variables in the end.
37207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37208
37209      # Check if the provided tool contains a complete path.
37210      tool_specified="$STRIP"
37211      tool_basename="${tool_specified##*/}"
37212      if test "x$tool_basename" = "x$tool_specified"; then
37213        # A command without a complete path is provided, search $PATH.
37214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37215$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37216        # Extract the first word of "$tool_basename", so it can be a program name with args.
37217set dummy $tool_basename; ac_word=$2
37218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37219$as_echo_n "checking for $ac_word... " >&6; }
37220if ${ac_cv_path_STRIP+:} false; then :
37221  $as_echo_n "(cached) " >&6
37222else
37223  case $STRIP in
37224  [\\/]* | ?:[\\/]*)
37225  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37226  ;;
37227  *)
37228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37229for as_dir in $PATH
37230do
37231  IFS=$as_save_IFS
37232  test -z "$as_dir" && as_dir=.
37233    for ac_exec_ext in '' $ac_executable_extensions; do
37234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37235    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37237    break 2
37238  fi
37239done
37240  done
37241IFS=$as_save_IFS
37242
37243  ;;
37244esac
37245fi
37246STRIP=$ac_cv_path_STRIP
37247if test -n "$STRIP"; then
37248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37249$as_echo "$STRIP" >&6; }
37250else
37251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37252$as_echo "no" >&6; }
37253fi
37254
37255
37256        if test "x$STRIP" = x; then
37257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37258        fi
37259      else
37260        # Otherwise we believe it is a complete path. Use it as it is.
37261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37262$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37264$as_echo_n "checking for STRIP... " >&6; }
37265        if test ! -x "$tool_specified"; then
37266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37267$as_echo "not found" >&6; }
37268          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37269        fi
37270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37271$as_echo "$tool_specified" >&6; }
37272      fi
37273    fi
37274  fi
37275
37276
37277
37278  # Only process if variable expands to non-empty
37279
37280  if test "x$STRIP" != x; then
37281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37282
37283  # First separate the path from the arguments. This will split at the first
37284  # space.
37285  complete="$STRIP"
37286  path="${complete%% *}"
37287  tmp="$complete EOL"
37288  arguments="${tmp#* }"
37289
37290  # Input might be given as Windows format, start by converting to
37291  # unix format.
37292  new_path=`$CYGPATH -u "$path"`
37293
37294  # Now try to locate executable using which
37295  new_path=`$WHICH "$new_path" 2> /dev/null`
37296  # bat and cmd files are not always considered executable in cygwin causing which
37297  # to not find them
37298  if test "x$new_path" = x \
37299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37301    new_path=`$CYGPATH -u "$path"`
37302  fi
37303  if test "x$new_path" = x; then
37304    # Oops. Which didn't find the executable.
37305    # The splitting of arguments from the executable at a space might have been incorrect,
37306    # since paths with space are more likely in Windows. Give it another try with the whole
37307    # argument.
37308    path="$complete"
37309    arguments="EOL"
37310    new_path=`$CYGPATH -u "$path"`
37311    new_path=`$WHICH "$new_path" 2> /dev/null`
37312    # bat and cmd files are not always considered executable in cygwin causing which
37313    # to not find them
37314    if test "x$new_path" = x \
37315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37317      new_path=`$CYGPATH -u "$path"`
37318    fi
37319    if test "x$new_path" = x; then
37320      # It's still not found. Now this is an unrecoverable error.
37321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37322$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37323      has_space=`$ECHO "$complete" | $GREP " "`
37324      if test "x$has_space" != x; then
37325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37327      fi
37328      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37329    fi
37330  fi
37331
37332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37335  # "foo.exe" is OK but "foo" is an error.
37336  #
37337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37338  # It is also a way to make sure we got the proper file name for the real test later on.
37339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37340  if test "x$test_shortpath" = x; then
37341    # Short path failed, file does not exist as specified.
37342    # Try adding .exe or .cmd
37343    if test -f "${new_path}.exe"; then
37344      input_to_shortpath="${new_path}.exe"
37345    elif test -f "${new_path}.cmd"; then
37346      input_to_shortpath="${new_path}.cmd"
37347    else
37348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37349$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37352      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37353    fi
37354  else
37355    input_to_shortpath="$new_path"
37356  fi
37357
37358  # Call helper function which possibly converts this using DOS-style short mode.
37359  # If so, the updated path is stored in $new_path.
37360  new_path="$input_to_shortpath"
37361
37362  input_path="$input_to_shortpath"
37363  # Check if we need to convert this using DOS-style short mode. If the path
37364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37365  # take no chances and rewrite it.
37366  # Note: m4 eats our [], so we need to use [ and ] instead.
37367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37368  if test "x$has_forbidden_chars" != x; then
37369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37373      # Going to short mode and back again did indeed matter. Since short mode is
37374      # case insensitive, let's make it lowercase to improve readability.
37375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37376      # Now convert it back to Unix-style (cygpath)
37377      input_path=`$CYGPATH -u "$shortmode_path"`
37378      new_path="$input_path"
37379    fi
37380  fi
37381
37382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37383  if test "x$test_cygdrive_prefix" = x; then
37384    # As a simple fix, exclude /usr/bin since it's not a real path.
37385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37387      # a path prefixed by /cygdrive for fixpath to work.
37388      new_path="$CYGWIN_ROOT_PATH$input_path"
37389    fi
37390  fi
37391
37392  # remove trailing .exe if any
37393  new_path="${new_path/%.exe/}"
37394
37395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37396
37397  # First separate the path from the arguments. This will split at the first
37398  # space.
37399  complete="$STRIP"
37400  path="${complete%% *}"
37401  tmp="$complete EOL"
37402  arguments="${tmp#* }"
37403
37404  # Input might be given as Windows format, start by converting to
37405  # unix format.
37406  new_path="$path"
37407
37408  windows_path="$new_path"
37409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37410    unix_path=`$CYGPATH -u "$windows_path"`
37411    new_path="$unix_path"
37412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37414    new_path="$unix_path"
37415  fi
37416
37417
37418  # Now try to locate executable using which
37419  new_path=`$WHICH "$new_path" 2> /dev/null`
37420
37421  if test "x$new_path" = x; then
37422    # Oops. Which didn't find the executable.
37423    # The splitting of arguments from the executable at a space might have been incorrect,
37424    # since paths with space are more likely in Windows. Give it another try with the whole
37425    # argument.
37426    path="$complete"
37427    arguments="EOL"
37428    new_path="$path"
37429
37430  windows_path="$new_path"
37431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37432    unix_path=`$CYGPATH -u "$windows_path"`
37433    new_path="$unix_path"
37434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37436    new_path="$unix_path"
37437  fi
37438
37439
37440    new_path=`$WHICH "$new_path" 2> /dev/null`
37441    # bat and cmd files are not always considered executable in MSYS causing which
37442    # to not find them
37443    if test "x$new_path" = x \
37444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37446      new_path="$path"
37447
37448  windows_path="$new_path"
37449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37450    unix_path=`$CYGPATH -u "$windows_path"`
37451    new_path="$unix_path"
37452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37454    new_path="$unix_path"
37455  fi
37456
37457    fi
37458
37459    if test "x$new_path" = x; then
37460      # It's still not found. Now this is an unrecoverable error.
37461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37462$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37463      has_space=`$ECHO "$complete" | $GREP " "`
37464      if test "x$has_space" != x; then
37465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37467      fi
37468      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37469    fi
37470  fi
37471
37472  # Now new_path has a complete unix path to the binary
37473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37474    # Keep paths in /bin as-is, but remove trailing .exe if any
37475    new_path="${new_path/%.exe/}"
37476    # Do not save /bin paths to all_fixpath_prefixes!
37477  else
37478    # Not in mixed or Windows style, start by that.
37479    new_path=`cmd //c echo $new_path`
37480
37481  input_path="$new_path"
37482  # Check if we need to convert this using DOS-style short mode. If the path
37483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37484  # take no chances and rewrite it.
37485  # Note: m4 eats our [], so we need to use [ and ] instead.
37486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37487  if test "x$has_forbidden_chars" != x; then
37488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37490  fi
37491
37492    # Output is in $new_path
37493
37494  windows_path="$new_path"
37495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37496    unix_path=`$CYGPATH -u "$windows_path"`
37497    new_path="$unix_path"
37498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37500    new_path="$unix_path"
37501  fi
37502
37503    # remove trailing .exe if any
37504    new_path="${new_path/%.exe/}"
37505
37506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37508  fi
37509
37510    else
37511      # We're on a unix platform. Hooray! :)
37512      # First separate the path from the arguments. This will split at the first
37513      # space.
37514      complete="$STRIP"
37515      path="${complete%% *}"
37516      tmp="$complete EOL"
37517      arguments="${tmp#* }"
37518
37519      # Cannot rely on the command "which" here since it doesn't always work.
37520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37521      if test -z "$is_absolute_path"; then
37522        # Path to executable is not absolute. Find it.
37523        IFS_save="$IFS"
37524        IFS=:
37525        for p in $PATH; do
37526          if test -f "$p/$path" && test -x "$p/$path"; then
37527            new_path="$p/$path"
37528            break
37529          fi
37530        done
37531        IFS="$IFS_save"
37532      else
37533        # This is an absolute path, we can use it without further modifications.
37534        new_path="$path"
37535      fi
37536
37537      if test "x$new_path" = x; then
37538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37539$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37540        has_space=`$ECHO "$complete" | $GREP " "`
37541        if test "x$has_space" != x; then
37542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37544        fi
37545        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37546      fi
37547    fi
37548
37549    # Now join together the path and the arguments once again
37550    if test "x$arguments" != xEOL; then
37551      new_complete="$new_path ${arguments% *}"
37552    else
37553      new_complete="$new_path"
37554    fi
37555
37556    if test "x$complete" != "x$new_complete"; then
37557      STRIP="$new_complete"
37558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37559$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37560    fi
37561  fi
37562
37563
37564
37565  # Publish this variable in the help.
37566
37567
37568  if test "x$NM" = x; then
37569    # The variable is not set by user, try to locate tool using the code snippet
37570    if test -n "$ac_tool_prefix"; then
37571  for ac_prog in nm
37572  do
37573    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37574set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37576$as_echo_n "checking for $ac_word... " >&6; }
37577if ${ac_cv_prog_NM+:} false; then :
37578  $as_echo_n "(cached) " >&6
37579else
37580  if test -n "$NM"; then
37581  ac_cv_prog_NM="$NM" # Let the user override the test.
37582else
37583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37584for as_dir in $PATH
37585do
37586  IFS=$as_save_IFS
37587  test -z "$as_dir" && as_dir=.
37588    for ac_exec_ext in '' $ac_executable_extensions; do
37589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37590    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37592    break 2
37593  fi
37594done
37595  done
37596IFS=$as_save_IFS
37597
37598fi
37599fi
37600NM=$ac_cv_prog_NM
37601if test -n "$NM"; then
37602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37603$as_echo "$NM" >&6; }
37604else
37605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37606$as_echo "no" >&6; }
37607fi
37608
37609
37610    test -n "$NM" && break
37611  done
37612fi
37613if test -z "$NM"; then
37614  ac_ct_NM=$NM
37615  for ac_prog in nm
37616do
37617  # Extract the first word of "$ac_prog", so it can be a program name with args.
37618set dummy $ac_prog; ac_word=$2
37619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37620$as_echo_n "checking for $ac_word... " >&6; }
37621if ${ac_cv_prog_ac_ct_NM+:} false; then :
37622  $as_echo_n "(cached) " >&6
37623else
37624  if test -n "$ac_ct_NM"; then
37625  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37626else
37627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37628for as_dir in $PATH
37629do
37630  IFS=$as_save_IFS
37631  test -z "$as_dir" && as_dir=.
37632    for ac_exec_ext in '' $ac_executable_extensions; do
37633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37634    ac_cv_prog_ac_ct_NM="$ac_prog"
37635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37636    break 2
37637  fi
37638done
37639  done
37640IFS=$as_save_IFS
37641
37642fi
37643fi
37644ac_ct_NM=$ac_cv_prog_ac_ct_NM
37645if test -n "$ac_ct_NM"; then
37646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37647$as_echo "$ac_ct_NM" >&6; }
37648else
37649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37650$as_echo "no" >&6; }
37651fi
37652
37653
37654  test -n "$ac_ct_NM" && break
37655done
37656
37657  if test "x$ac_ct_NM" = x; then
37658    NM=""
37659  else
37660    case $cross_compiling:$ac_tool_warned in
37661yes:)
37662{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37663$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37664ac_tool_warned=yes ;;
37665esac
37666    NM=$ac_ct_NM
37667  fi
37668fi
37669
37670  else
37671    # The variable is set, but is it from the command line or the environment?
37672
37673    # Try to remove the string !NM! from our list.
37674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37676      # If it failed, the variable was not from the command line. Ignore it,
37677      # but warn the user (except for BASH, which is always set by the calling BASH).
37678      if test "xNM" != xBASH; then
37679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37680$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37681      fi
37682      # Try to locate tool using the code snippet
37683      if test -n "$ac_tool_prefix"; then
37684  for ac_prog in nm
37685  do
37686    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37689$as_echo_n "checking for $ac_word... " >&6; }
37690if ${ac_cv_prog_NM+:} false; then :
37691  $as_echo_n "(cached) " >&6
37692else
37693  if test -n "$NM"; then
37694  ac_cv_prog_NM="$NM" # Let the user override the test.
37695else
37696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37697for as_dir in $PATH
37698do
37699  IFS=$as_save_IFS
37700  test -z "$as_dir" && as_dir=.
37701    for ac_exec_ext in '' $ac_executable_extensions; do
37702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37703    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37705    break 2
37706  fi
37707done
37708  done
37709IFS=$as_save_IFS
37710
37711fi
37712fi
37713NM=$ac_cv_prog_NM
37714if test -n "$NM"; then
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37716$as_echo "$NM" >&6; }
37717else
37718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37719$as_echo "no" >&6; }
37720fi
37721
37722
37723    test -n "$NM" && break
37724  done
37725fi
37726if test -z "$NM"; then
37727  ac_ct_NM=$NM
37728  for ac_prog in nm
37729do
37730  # Extract the first word of "$ac_prog", so it can be a program name with args.
37731set dummy $ac_prog; ac_word=$2
37732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37733$as_echo_n "checking for $ac_word... " >&6; }
37734if ${ac_cv_prog_ac_ct_NM+:} false; then :
37735  $as_echo_n "(cached) " >&6
37736else
37737  if test -n "$ac_ct_NM"; then
37738  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37739else
37740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37741for as_dir in $PATH
37742do
37743  IFS=$as_save_IFS
37744  test -z "$as_dir" && as_dir=.
37745    for ac_exec_ext in '' $ac_executable_extensions; do
37746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37747    ac_cv_prog_ac_ct_NM="$ac_prog"
37748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37749    break 2
37750  fi
37751done
37752  done
37753IFS=$as_save_IFS
37754
37755fi
37756fi
37757ac_ct_NM=$ac_cv_prog_ac_ct_NM
37758if test -n "$ac_ct_NM"; then
37759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37760$as_echo "$ac_ct_NM" >&6; }
37761else
37762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37763$as_echo "no" >&6; }
37764fi
37765
37766
37767  test -n "$ac_ct_NM" && break
37768done
37769
37770  if test "x$ac_ct_NM" = x; then
37771    NM=""
37772  else
37773    case $cross_compiling:$ac_tool_warned in
37774yes:)
37775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37777ac_tool_warned=yes ;;
37778esac
37779    NM=$ac_ct_NM
37780  fi
37781fi
37782
37783    else
37784      # If it succeeded, then it was overridden by the user. We will use it
37785      # for the tool.
37786
37787      # First remove it from the list of overridden variables, so we can test
37788      # for unknown variables in the end.
37789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37790
37791      # Check if the provided tool contains a complete path.
37792      tool_specified="$NM"
37793      tool_basename="${tool_specified##*/}"
37794      if test "x$tool_basename" = "x$tool_specified"; then
37795        # A command without a complete path is provided, search $PATH.
37796        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37797$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37798        # Extract the first word of "$tool_basename", so it can be a program name with args.
37799set dummy $tool_basename; ac_word=$2
37800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37801$as_echo_n "checking for $ac_word... " >&6; }
37802if ${ac_cv_path_NM+:} false; then :
37803  $as_echo_n "(cached) " >&6
37804else
37805  case $NM in
37806  [\\/]* | ?:[\\/]*)
37807  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37808  ;;
37809  *)
37810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37811for as_dir in $PATH
37812do
37813  IFS=$as_save_IFS
37814  test -z "$as_dir" && as_dir=.
37815    for ac_exec_ext in '' $ac_executable_extensions; do
37816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37817    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37819    break 2
37820  fi
37821done
37822  done
37823IFS=$as_save_IFS
37824
37825  ;;
37826esac
37827fi
37828NM=$ac_cv_path_NM
37829if test -n "$NM"; then
37830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37831$as_echo "$NM" >&6; }
37832else
37833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37834$as_echo "no" >&6; }
37835fi
37836
37837
37838        if test "x$NM" = x; then
37839          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37840        fi
37841      else
37842        # Otherwise we believe it is a complete path. Use it as it is.
37843        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37844$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37846$as_echo_n "checking for NM... " >&6; }
37847        if test ! -x "$tool_specified"; then
37848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37849$as_echo "not found" >&6; }
37850          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37851        fi
37852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37853$as_echo "$tool_specified" >&6; }
37854      fi
37855    fi
37856  fi
37857
37858
37859
37860  # Only process if variable expands to non-empty
37861
37862  if test "x$NM" != x; then
37863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37864
37865  # First separate the path from the arguments. This will split at the first
37866  # space.
37867  complete="$NM"
37868  path="${complete%% *}"
37869  tmp="$complete EOL"
37870  arguments="${tmp#* }"
37871
37872  # Input might be given as Windows format, start by converting to
37873  # unix format.
37874  new_path=`$CYGPATH -u "$path"`
37875
37876  # Now try to locate executable using which
37877  new_path=`$WHICH "$new_path" 2> /dev/null`
37878  # bat and cmd files are not always considered executable in cygwin causing which
37879  # to not find them
37880  if test "x$new_path" = x \
37881      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37882      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37883    new_path=`$CYGPATH -u "$path"`
37884  fi
37885  if test "x$new_path" = x; then
37886    # Oops. Which didn't find the executable.
37887    # The splitting of arguments from the executable at a space might have been incorrect,
37888    # since paths with space are more likely in Windows. Give it another try with the whole
37889    # argument.
37890    path="$complete"
37891    arguments="EOL"
37892    new_path=`$CYGPATH -u "$path"`
37893    new_path=`$WHICH "$new_path" 2> /dev/null`
37894    # bat and cmd files are not always considered executable in cygwin causing which
37895    # to not find them
37896    if test "x$new_path" = x \
37897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37899      new_path=`$CYGPATH -u "$path"`
37900    fi
37901    if test "x$new_path" = x; then
37902      # It's still not found. Now this is an unrecoverable error.
37903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37904$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37905      has_space=`$ECHO "$complete" | $GREP " "`
37906      if test "x$has_space" != x; then
37907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37909      fi
37910      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37911    fi
37912  fi
37913
37914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37917  # "foo.exe" is OK but "foo" is an error.
37918  #
37919  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37920  # It is also a way to make sure we got the proper file name for the real test later on.
37921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37922  if test "x$test_shortpath" = x; then
37923    # Short path failed, file does not exist as specified.
37924    # Try adding .exe or .cmd
37925    if test -f "${new_path}.exe"; then
37926      input_to_shortpath="${new_path}.exe"
37927    elif test -f "${new_path}.cmd"; then
37928      input_to_shortpath="${new_path}.cmd"
37929    else
37930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37931$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37932      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37933$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37934      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37935    fi
37936  else
37937    input_to_shortpath="$new_path"
37938  fi
37939
37940  # Call helper function which possibly converts this using DOS-style short mode.
37941  # If so, the updated path is stored in $new_path.
37942  new_path="$input_to_shortpath"
37943
37944  input_path="$input_to_shortpath"
37945  # Check if we need to convert this using DOS-style short mode. If the path
37946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37947  # take no chances and rewrite it.
37948  # Note: m4 eats our [], so we need to use [ and ] instead.
37949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37950  if test "x$has_forbidden_chars" != x; then
37951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37955      # Going to short mode and back again did indeed matter. Since short mode is
37956      # case insensitive, let's make it lowercase to improve readability.
37957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37958      # Now convert it back to Unix-style (cygpath)
37959      input_path=`$CYGPATH -u "$shortmode_path"`
37960      new_path="$input_path"
37961    fi
37962  fi
37963
37964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37965  if test "x$test_cygdrive_prefix" = x; then
37966    # As a simple fix, exclude /usr/bin since it's not a real path.
37967    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37969      # a path prefixed by /cygdrive for fixpath to work.
37970      new_path="$CYGWIN_ROOT_PATH$input_path"
37971    fi
37972  fi
37973
37974  # remove trailing .exe if any
37975  new_path="${new_path/%.exe/}"
37976
37977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37978
37979  # First separate the path from the arguments. This will split at the first
37980  # space.
37981  complete="$NM"
37982  path="${complete%% *}"
37983  tmp="$complete EOL"
37984  arguments="${tmp#* }"
37985
37986  # Input might be given as Windows format, start by converting to
37987  # unix format.
37988  new_path="$path"
37989
37990  windows_path="$new_path"
37991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37992    unix_path=`$CYGPATH -u "$windows_path"`
37993    new_path="$unix_path"
37994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37996    new_path="$unix_path"
37997  fi
37998
37999
38000  # Now try to locate executable using which
38001  new_path=`$WHICH "$new_path" 2> /dev/null`
38002
38003  if test "x$new_path" = x; then
38004    # Oops. Which didn't find the executable.
38005    # The splitting of arguments from the executable at a space might have been incorrect,
38006    # since paths with space are more likely in Windows. Give it another try with the whole
38007    # argument.
38008    path="$complete"
38009    arguments="EOL"
38010    new_path="$path"
38011
38012  windows_path="$new_path"
38013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38014    unix_path=`$CYGPATH -u "$windows_path"`
38015    new_path="$unix_path"
38016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38018    new_path="$unix_path"
38019  fi
38020
38021
38022    new_path=`$WHICH "$new_path" 2> /dev/null`
38023    # bat and cmd files are not always considered executable in MSYS causing which
38024    # to not find them
38025    if test "x$new_path" = x \
38026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38028      new_path="$path"
38029
38030  windows_path="$new_path"
38031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38032    unix_path=`$CYGPATH -u "$windows_path"`
38033    new_path="$unix_path"
38034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38036    new_path="$unix_path"
38037  fi
38038
38039    fi
38040
38041    if test "x$new_path" = x; then
38042      # It's still not found. Now this is an unrecoverable error.
38043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38045      has_space=`$ECHO "$complete" | $GREP " "`
38046      if test "x$has_space" != x; then
38047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38049      fi
38050      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38051    fi
38052  fi
38053
38054  # Now new_path has a complete unix path to the binary
38055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38056    # Keep paths in /bin as-is, but remove trailing .exe if any
38057    new_path="${new_path/%.exe/}"
38058    # Do not save /bin paths to all_fixpath_prefixes!
38059  else
38060    # Not in mixed or Windows style, start by that.
38061    new_path=`cmd //c echo $new_path`
38062
38063  input_path="$new_path"
38064  # Check if we need to convert this using DOS-style short mode. If the path
38065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38066  # take no chances and rewrite it.
38067  # Note: m4 eats our [], so we need to use [ and ] instead.
38068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38069  if test "x$has_forbidden_chars" != x; then
38070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38072  fi
38073
38074    # Output is in $new_path
38075
38076  windows_path="$new_path"
38077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38078    unix_path=`$CYGPATH -u "$windows_path"`
38079    new_path="$unix_path"
38080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38082    new_path="$unix_path"
38083  fi
38084
38085    # remove trailing .exe if any
38086    new_path="${new_path/%.exe/}"
38087
38088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38090  fi
38091
38092    else
38093      # We're on a unix platform. Hooray! :)
38094      # First separate the path from the arguments. This will split at the first
38095      # space.
38096      complete="$NM"
38097      path="${complete%% *}"
38098      tmp="$complete EOL"
38099      arguments="${tmp#* }"
38100
38101      # Cannot rely on the command "which" here since it doesn't always work.
38102      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38103      if test -z "$is_absolute_path"; then
38104        # Path to executable is not absolute. Find it.
38105        IFS_save="$IFS"
38106        IFS=:
38107        for p in $PATH; do
38108          if test -f "$p/$path" && test -x "$p/$path"; then
38109            new_path="$p/$path"
38110            break
38111          fi
38112        done
38113        IFS="$IFS_save"
38114      else
38115        # This is an absolute path, we can use it without further modifications.
38116        new_path="$path"
38117      fi
38118
38119      if test "x$new_path" = x; then
38120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38121$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38122        has_space=`$ECHO "$complete" | $GREP " "`
38123        if test "x$has_space" != x; then
38124          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38126        fi
38127        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38128      fi
38129    fi
38130
38131    # Now join together the path and the arguments once again
38132    if test "x$arguments" != xEOL; then
38133      new_complete="$new_path ${arguments% *}"
38134    else
38135      new_complete="$new_path"
38136    fi
38137
38138    if test "x$complete" != "x$new_complete"; then
38139      NM="$new_complete"
38140      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38141$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38142    fi
38143  fi
38144
38145    GNM="$NM"
38146
38147  fi
38148
38149  # objcopy is used for moving debug symbols to separate files when
38150  # full debug symbols are enabled.
38151  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38152
38153
38154  # Publish this variable in the help.
38155
38156
38157  if test "x$OBJCOPY" = x; then
38158    # The variable is not set by user, try to locate tool using the code snippet
38159    if test -n "$ac_tool_prefix"; then
38160  for ac_prog in gobjcopy objcopy
38161  do
38162    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38163set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38165$as_echo_n "checking for $ac_word... " >&6; }
38166if ${ac_cv_prog_OBJCOPY+:} false; then :
38167  $as_echo_n "(cached) " >&6
38168else
38169  if test -n "$OBJCOPY"; then
38170  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38171else
38172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38173for as_dir in $PATH
38174do
38175  IFS=$as_save_IFS
38176  test -z "$as_dir" && as_dir=.
38177    for ac_exec_ext in '' $ac_executable_extensions; do
38178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38179    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38181    break 2
38182  fi
38183done
38184  done
38185IFS=$as_save_IFS
38186
38187fi
38188fi
38189OBJCOPY=$ac_cv_prog_OBJCOPY
38190if test -n "$OBJCOPY"; then
38191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38192$as_echo "$OBJCOPY" >&6; }
38193else
38194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38195$as_echo "no" >&6; }
38196fi
38197
38198
38199    test -n "$OBJCOPY" && break
38200  done
38201fi
38202if test -z "$OBJCOPY"; then
38203  ac_ct_OBJCOPY=$OBJCOPY
38204  for ac_prog in gobjcopy objcopy
38205do
38206  # Extract the first word of "$ac_prog", so it can be a program name with args.
38207set dummy $ac_prog; ac_word=$2
38208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38209$as_echo_n "checking for $ac_word... " >&6; }
38210if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38211  $as_echo_n "(cached) " >&6
38212else
38213  if test -n "$ac_ct_OBJCOPY"; then
38214  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38215else
38216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38217for as_dir in $PATH
38218do
38219  IFS=$as_save_IFS
38220  test -z "$as_dir" && as_dir=.
38221    for ac_exec_ext in '' $ac_executable_extensions; do
38222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38223    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38225    break 2
38226  fi
38227done
38228  done
38229IFS=$as_save_IFS
38230
38231fi
38232fi
38233ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38234if test -n "$ac_ct_OBJCOPY"; then
38235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38236$as_echo "$ac_ct_OBJCOPY" >&6; }
38237else
38238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38239$as_echo "no" >&6; }
38240fi
38241
38242
38243  test -n "$ac_ct_OBJCOPY" && break
38244done
38245
38246  if test "x$ac_ct_OBJCOPY" = x; then
38247    OBJCOPY=""
38248  else
38249    case $cross_compiling:$ac_tool_warned in
38250yes:)
38251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38253ac_tool_warned=yes ;;
38254esac
38255    OBJCOPY=$ac_ct_OBJCOPY
38256  fi
38257fi
38258
38259  else
38260    # The variable is set, but is it from the command line or the environment?
38261
38262    # Try to remove the string !OBJCOPY! from our list.
38263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38265      # If it failed, the variable was not from the command line. Ignore it,
38266      # but warn the user (except for BASH, which is always set by the calling BASH).
38267      if test "xOBJCOPY" != xBASH; then
38268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38269$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38270      fi
38271      # Try to locate tool using the code snippet
38272      if test -n "$ac_tool_prefix"; then
38273  for ac_prog in gobjcopy objcopy
38274  do
38275    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38276set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38278$as_echo_n "checking for $ac_word... " >&6; }
38279if ${ac_cv_prog_OBJCOPY+:} false; then :
38280  $as_echo_n "(cached) " >&6
38281else
38282  if test -n "$OBJCOPY"; then
38283  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38284else
38285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38286for as_dir in $PATH
38287do
38288  IFS=$as_save_IFS
38289  test -z "$as_dir" && as_dir=.
38290    for ac_exec_ext in '' $ac_executable_extensions; do
38291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38292    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38294    break 2
38295  fi
38296done
38297  done
38298IFS=$as_save_IFS
38299
38300fi
38301fi
38302OBJCOPY=$ac_cv_prog_OBJCOPY
38303if test -n "$OBJCOPY"; then
38304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38305$as_echo "$OBJCOPY" >&6; }
38306else
38307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38308$as_echo "no" >&6; }
38309fi
38310
38311
38312    test -n "$OBJCOPY" && break
38313  done
38314fi
38315if test -z "$OBJCOPY"; then
38316  ac_ct_OBJCOPY=$OBJCOPY
38317  for ac_prog in gobjcopy objcopy
38318do
38319  # Extract the first word of "$ac_prog", so it can be a program name with args.
38320set dummy $ac_prog; ac_word=$2
38321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38322$as_echo_n "checking for $ac_word... " >&6; }
38323if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  if test -n "$ac_ct_OBJCOPY"; then
38327  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38328else
38329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38330for as_dir in $PATH
38331do
38332  IFS=$as_save_IFS
38333  test -z "$as_dir" && as_dir=.
38334    for ac_exec_ext in '' $ac_executable_extensions; do
38335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38336    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38338    break 2
38339  fi
38340done
38341  done
38342IFS=$as_save_IFS
38343
38344fi
38345fi
38346ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38347if test -n "$ac_ct_OBJCOPY"; then
38348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38349$as_echo "$ac_ct_OBJCOPY" >&6; }
38350else
38351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38352$as_echo "no" >&6; }
38353fi
38354
38355
38356  test -n "$ac_ct_OBJCOPY" && break
38357done
38358
38359  if test "x$ac_ct_OBJCOPY" = x; then
38360    OBJCOPY=""
38361  else
38362    case $cross_compiling:$ac_tool_warned in
38363yes:)
38364{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38365$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38366ac_tool_warned=yes ;;
38367esac
38368    OBJCOPY=$ac_ct_OBJCOPY
38369  fi
38370fi
38371
38372    else
38373      # If it succeeded, then it was overridden by the user. We will use it
38374      # for the tool.
38375
38376      # First remove it from the list of overridden variables, so we can test
38377      # for unknown variables in the end.
38378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38379
38380      # Check if the provided tool contains a complete path.
38381      tool_specified="$OBJCOPY"
38382      tool_basename="${tool_specified##*/}"
38383      if test "x$tool_basename" = "x$tool_specified"; then
38384        # A command without a complete path is provided, search $PATH.
38385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38386$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38387        # Extract the first word of "$tool_basename", so it can be a program name with args.
38388set dummy $tool_basename; ac_word=$2
38389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38390$as_echo_n "checking for $ac_word... " >&6; }
38391if ${ac_cv_path_OBJCOPY+:} false; then :
38392  $as_echo_n "(cached) " >&6
38393else
38394  case $OBJCOPY in
38395  [\\/]* | ?:[\\/]*)
38396  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38397  ;;
38398  *)
38399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38400for as_dir in $PATH
38401do
38402  IFS=$as_save_IFS
38403  test -z "$as_dir" && as_dir=.
38404    for ac_exec_ext in '' $ac_executable_extensions; do
38405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38406    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38408    break 2
38409  fi
38410done
38411  done
38412IFS=$as_save_IFS
38413
38414  ;;
38415esac
38416fi
38417OBJCOPY=$ac_cv_path_OBJCOPY
38418if test -n "$OBJCOPY"; then
38419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38420$as_echo "$OBJCOPY" >&6; }
38421else
38422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38423$as_echo "no" >&6; }
38424fi
38425
38426
38427        if test "x$OBJCOPY" = x; then
38428          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38429        fi
38430      else
38431        # Otherwise we believe it is a complete path. Use it as it is.
38432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38433$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38435$as_echo_n "checking for OBJCOPY... " >&6; }
38436        if test ! -x "$tool_specified"; then
38437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38438$as_echo "not found" >&6; }
38439          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38440        fi
38441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38442$as_echo "$tool_specified" >&6; }
38443      fi
38444    fi
38445  fi
38446
38447
38448    # Only call fixup if objcopy was found.
38449    if test -n "$OBJCOPY"; then
38450
38451  # Only process if variable expands to non-empty
38452
38453  if test "x$OBJCOPY" != x; then
38454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38455
38456  # First separate the path from the arguments. This will split at the first
38457  # space.
38458  complete="$OBJCOPY"
38459  path="${complete%% *}"
38460  tmp="$complete EOL"
38461  arguments="${tmp#* }"
38462
38463  # Input might be given as Windows format, start by converting to
38464  # unix format.
38465  new_path=`$CYGPATH -u "$path"`
38466
38467  # Now try to locate executable using which
38468  new_path=`$WHICH "$new_path" 2> /dev/null`
38469  # bat and cmd files are not always considered executable in cygwin causing which
38470  # to not find them
38471  if test "x$new_path" = x \
38472      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38473      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38474    new_path=`$CYGPATH -u "$path"`
38475  fi
38476  if test "x$new_path" = x; then
38477    # Oops. Which didn't find the executable.
38478    # The splitting of arguments from the executable at a space might have been incorrect,
38479    # since paths with space are more likely in Windows. Give it another try with the whole
38480    # argument.
38481    path="$complete"
38482    arguments="EOL"
38483    new_path=`$CYGPATH -u "$path"`
38484    new_path=`$WHICH "$new_path" 2> /dev/null`
38485    # bat and cmd files are not always considered executable in cygwin causing which
38486    # to not find them
38487    if test "x$new_path" = x \
38488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38490      new_path=`$CYGPATH -u "$path"`
38491    fi
38492    if test "x$new_path" = x; then
38493      # It's still not found. Now this is an unrecoverable error.
38494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38495$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38496      has_space=`$ECHO "$complete" | $GREP " "`
38497      if test "x$has_space" != x; then
38498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38500      fi
38501      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38502    fi
38503  fi
38504
38505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38508  # "foo.exe" is OK but "foo" is an error.
38509  #
38510  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38511  # It is also a way to make sure we got the proper file name for the real test later on.
38512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38513  if test "x$test_shortpath" = x; then
38514    # Short path failed, file does not exist as specified.
38515    # Try adding .exe or .cmd
38516    if test -f "${new_path}.exe"; then
38517      input_to_shortpath="${new_path}.exe"
38518    elif test -f "${new_path}.cmd"; then
38519      input_to_shortpath="${new_path}.cmd"
38520    else
38521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38522$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38525      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38526    fi
38527  else
38528    input_to_shortpath="$new_path"
38529  fi
38530
38531  # Call helper function which possibly converts this using DOS-style short mode.
38532  # If so, the updated path is stored in $new_path.
38533  new_path="$input_to_shortpath"
38534
38535  input_path="$input_to_shortpath"
38536  # Check if we need to convert this using DOS-style short mode. If the path
38537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38538  # take no chances and rewrite it.
38539  # Note: m4 eats our [], so we need to use [ and ] instead.
38540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38541  if test "x$has_forbidden_chars" != x; then
38542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38546      # Going to short mode and back again did indeed matter. Since short mode is
38547      # case insensitive, let's make it lowercase to improve readability.
38548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38549      # Now convert it back to Unix-style (cygpath)
38550      input_path=`$CYGPATH -u "$shortmode_path"`
38551      new_path="$input_path"
38552    fi
38553  fi
38554
38555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38556  if test "x$test_cygdrive_prefix" = x; then
38557    # As a simple fix, exclude /usr/bin since it's not a real path.
38558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38560      # a path prefixed by /cygdrive for fixpath to work.
38561      new_path="$CYGWIN_ROOT_PATH$input_path"
38562    fi
38563  fi
38564
38565  # remove trailing .exe if any
38566  new_path="${new_path/%.exe/}"
38567
38568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38569
38570  # First separate the path from the arguments. This will split at the first
38571  # space.
38572  complete="$OBJCOPY"
38573  path="${complete%% *}"
38574  tmp="$complete EOL"
38575  arguments="${tmp#* }"
38576
38577  # Input might be given as Windows format, start by converting to
38578  # unix format.
38579  new_path="$path"
38580
38581  windows_path="$new_path"
38582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38583    unix_path=`$CYGPATH -u "$windows_path"`
38584    new_path="$unix_path"
38585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38587    new_path="$unix_path"
38588  fi
38589
38590
38591  # Now try to locate executable using which
38592  new_path=`$WHICH "$new_path" 2> /dev/null`
38593
38594  if test "x$new_path" = x; then
38595    # Oops. Which didn't find the executable.
38596    # The splitting of arguments from the executable at a space might have been incorrect,
38597    # since paths with space are more likely in Windows. Give it another try with the whole
38598    # argument.
38599    path="$complete"
38600    arguments="EOL"
38601    new_path="$path"
38602
38603  windows_path="$new_path"
38604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38605    unix_path=`$CYGPATH -u "$windows_path"`
38606    new_path="$unix_path"
38607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38609    new_path="$unix_path"
38610  fi
38611
38612
38613    new_path=`$WHICH "$new_path" 2> /dev/null`
38614    # bat and cmd files are not always considered executable in MSYS causing which
38615    # to not find them
38616    if test "x$new_path" = x \
38617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38619      new_path="$path"
38620
38621  windows_path="$new_path"
38622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38623    unix_path=`$CYGPATH -u "$windows_path"`
38624    new_path="$unix_path"
38625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38627    new_path="$unix_path"
38628  fi
38629
38630    fi
38631
38632    if test "x$new_path" = x; then
38633      # It's still not found. Now this is an unrecoverable error.
38634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38635$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38636      has_space=`$ECHO "$complete" | $GREP " "`
38637      if test "x$has_space" != x; then
38638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38640      fi
38641      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38642    fi
38643  fi
38644
38645  # Now new_path has a complete unix path to the binary
38646  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38647    # Keep paths in /bin as-is, but remove trailing .exe if any
38648    new_path="${new_path/%.exe/}"
38649    # Do not save /bin paths to all_fixpath_prefixes!
38650  else
38651    # Not in mixed or Windows style, start by that.
38652    new_path=`cmd //c echo $new_path`
38653
38654  input_path="$new_path"
38655  # Check if we need to convert this using DOS-style short mode. If the path
38656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38657  # take no chances and rewrite it.
38658  # Note: m4 eats our [], so we need to use [ and ] instead.
38659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38660  if test "x$has_forbidden_chars" != x; then
38661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38663  fi
38664
38665    # Output is in $new_path
38666
38667  windows_path="$new_path"
38668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38669    unix_path=`$CYGPATH -u "$windows_path"`
38670    new_path="$unix_path"
38671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38673    new_path="$unix_path"
38674  fi
38675
38676    # remove trailing .exe if any
38677    new_path="${new_path/%.exe/}"
38678
38679    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38680    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38681  fi
38682
38683    else
38684      # We're on a unix platform. Hooray! :)
38685      # First separate the path from the arguments. This will split at the first
38686      # space.
38687      complete="$OBJCOPY"
38688      path="${complete%% *}"
38689      tmp="$complete EOL"
38690      arguments="${tmp#* }"
38691
38692      # Cannot rely on the command "which" here since it doesn't always work.
38693      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38694      if test -z "$is_absolute_path"; then
38695        # Path to executable is not absolute. Find it.
38696        IFS_save="$IFS"
38697        IFS=:
38698        for p in $PATH; do
38699          if test -f "$p/$path" && test -x "$p/$path"; then
38700            new_path="$p/$path"
38701            break
38702          fi
38703        done
38704        IFS="$IFS_save"
38705      else
38706        # This is an absolute path, we can use it without further modifications.
38707        new_path="$path"
38708      fi
38709
38710      if test "x$new_path" = x; then
38711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38712$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38713        has_space=`$ECHO "$complete" | $GREP " "`
38714        if test "x$has_space" != x; then
38715          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38717        fi
38718        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38719      fi
38720    fi
38721
38722    # Now join together the path and the arguments once again
38723    if test "x$arguments" != xEOL; then
38724      new_complete="$new_path ${arguments% *}"
38725    else
38726      new_complete="$new_path"
38727    fi
38728
38729    if test "x$complete" != "x$new_complete"; then
38730      OBJCOPY="$new_complete"
38731      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38732$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38733    fi
38734  fi
38735
38736      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38737        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38738        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38739        # - version number is last blank separate word on first line
38740        # - version number formats that have been seen:
38741        #   - <major>.<minor>
38742        #   - <major>.<minor>.<micro>
38743        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38744        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38745         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38746              -e 's/.* //' \
38747              -e '/^[01]\./b bad' \
38748              -e '/^2\./{' \
38749              -e '  s/^2\.//' \
38750              -e '  /^[0-9]$/b bad' \
38751              -e '  /^[0-9]\./b bad' \
38752              -e '  /^1[0-9]$/b bad' \
38753              -e '  /^1[0-9]\./b bad' \
38754              -e '  /^20\./b bad' \
38755              -e '  /^21\.0$/b bad' \
38756              -e '  /^21\.0\./b bad' \
38757              -e '}' \
38758              -e ':good' \
38759              -e 's/.*/VALID_VERSION/p' \
38760              -e 'q' \
38761              -e ':bad' \
38762              -e 's/.*/BAD_VERSION/p' \
38763              -e 'q'`
38764        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38765          OBJCOPY=
38766          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
38767$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38768          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38769$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38770          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38771$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38772          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38773$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38774          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38775$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38776        fi
38777      fi
38778    fi
38779  fi
38780
38781
38782
38783  # Publish this variable in the help.
38784
38785
38786  if test "x$OBJDUMP" = x; then
38787    # The variable is not set by user, try to locate tool using the code snippet
38788    if test -n "$ac_tool_prefix"; then
38789  for ac_prog in gobjdump objdump
38790  do
38791    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38792set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38794$as_echo_n "checking for $ac_word... " >&6; }
38795if ${ac_cv_prog_OBJDUMP+:} false; then :
38796  $as_echo_n "(cached) " >&6
38797else
38798  if test -n "$OBJDUMP"; then
38799  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38800else
38801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38802for as_dir in $PATH
38803do
38804  IFS=$as_save_IFS
38805  test -z "$as_dir" && as_dir=.
38806    for ac_exec_ext in '' $ac_executable_extensions; do
38807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38808    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38810    break 2
38811  fi
38812done
38813  done
38814IFS=$as_save_IFS
38815
38816fi
38817fi
38818OBJDUMP=$ac_cv_prog_OBJDUMP
38819if test -n "$OBJDUMP"; then
38820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38821$as_echo "$OBJDUMP" >&6; }
38822else
38823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38824$as_echo "no" >&6; }
38825fi
38826
38827
38828    test -n "$OBJDUMP" && break
38829  done
38830fi
38831if test -z "$OBJDUMP"; then
38832  ac_ct_OBJDUMP=$OBJDUMP
38833  for ac_prog in gobjdump objdump
38834do
38835  # Extract the first word of "$ac_prog", so it can be a program name with args.
38836set dummy $ac_prog; ac_word=$2
38837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38838$as_echo_n "checking for $ac_word... " >&6; }
38839if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38840  $as_echo_n "(cached) " >&6
38841else
38842  if test -n "$ac_ct_OBJDUMP"; then
38843  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38844else
38845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38846for as_dir in $PATH
38847do
38848  IFS=$as_save_IFS
38849  test -z "$as_dir" && as_dir=.
38850    for ac_exec_ext in '' $ac_executable_extensions; do
38851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38852    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38854    break 2
38855  fi
38856done
38857  done
38858IFS=$as_save_IFS
38859
38860fi
38861fi
38862ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38863if test -n "$ac_ct_OBJDUMP"; then
38864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38865$as_echo "$ac_ct_OBJDUMP" >&6; }
38866else
38867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38868$as_echo "no" >&6; }
38869fi
38870
38871
38872  test -n "$ac_ct_OBJDUMP" && break
38873done
38874
38875  if test "x$ac_ct_OBJDUMP" = x; then
38876    OBJDUMP=""
38877  else
38878    case $cross_compiling:$ac_tool_warned in
38879yes:)
38880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38882ac_tool_warned=yes ;;
38883esac
38884    OBJDUMP=$ac_ct_OBJDUMP
38885  fi
38886fi
38887
38888  else
38889    # The variable is set, but is it from the command line or the environment?
38890
38891    # Try to remove the string !OBJDUMP! from our list.
38892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38894      # If it failed, the variable was not from the command line. Ignore it,
38895      # but warn the user (except for BASH, which is always set by the calling BASH).
38896      if test "xOBJDUMP" != xBASH; then
38897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38898$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38899      fi
38900      # Try to locate tool using the code snippet
38901      if test -n "$ac_tool_prefix"; then
38902  for ac_prog in gobjdump objdump
38903  do
38904    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38905set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38907$as_echo_n "checking for $ac_word... " >&6; }
38908if ${ac_cv_prog_OBJDUMP+:} false; then :
38909  $as_echo_n "(cached) " >&6
38910else
38911  if test -n "$OBJDUMP"; then
38912  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38913else
38914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38915for as_dir in $PATH
38916do
38917  IFS=$as_save_IFS
38918  test -z "$as_dir" && as_dir=.
38919    for ac_exec_ext in '' $ac_executable_extensions; do
38920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38921    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38923    break 2
38924  fi
38925done
38926  done
38927IFS=$as_save_IFS
38928
38929fi
38930fi
38931OBJDUMP=$ac_cv_prog_OBJDUMP
38932if test -n "$OBJDUMP"; then
38933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38934$as_echo "$OBJDUMP" >&6; }
38935else
38936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38937$as_echo "no" >&6; }
38938fi
38939
38940
38941    test -n "$OBJDUMP" && break
38942  done
38943fi
38944if test -z "$OBJDUMP"; then
38945  ac_ct_OBJDUMP=$OBJDUMP
38946  for ac_prog in gobjdump objdump
38947do
38948  # Extract the first word of "$ac_prog", so it can be a program name with args.
38949set dummy $ac_prog; ac_word=$2
38950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38951$as_echo_n "checking for $ac_word... " >&6; }
38952if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38953  $as_echo_n "(cached) " >&6
38954else
38955  if test -n "$ac_ct_OBJDUMP"; then
38956  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38957else
38958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38959for as_dir in $PATH
38960do
38961  IFS=$as_save_IFS
38962  test -z "$as_dir" && as_dir=.
38963    for ac_exec_ext in '' $ac_executable_extensions; do
38964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38965    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38967    break 2
38968  fi
38969done
38970  done
38971IFS=$as_save_IFS
38972
38973fi
38974fi
38975ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38976if test -n "$ac_ct_OBJDUMP"; then
38977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38978$as_echo "$ac_ct_OBJDUMP" >&6; }
38979else
38980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38981$as_echo "no" >&6; }
38982fi
38983
38984
38985  test -n "$ac_ct_OBJDUMP" && break
38986done
38987
38988  if test "x$ac_ct_OBJDUMP" = x; then
38989    OBJDUMP=""
38990  else
38991    case $cross_compiling:$ac_tool_warned in
38992yes:)
38993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38995ac_tool_warned=yes ;;
38996esac
38997    OBJDUMP=$ac_ct_OBJDUMP
38998  fi
38999fi
39000
39001    else
39002      # If it succeeded, then it was overridden by the user. We will use it
39003      # for the tool.
39004
39005      # First remove it from the list of overridden variables, so we can test
39006      # for unknown variables in the end.
39007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39008
39009      # Check if the provided tool contains a complete path.
39010      tool_specified="$OBJDUMP"
39011      tool_basename="${tool_specified##*/}"
39012      if test "x$tool_basename" = "x$tool_specified"; then
39013        # A command without a complete path is provided, search $PATH.
39014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39015$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39016        # Extract the first word of "$tool_basename", so it can be a program name with args.
39017set dummy $tool_basename; ac_word=$2
39018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39019$as_echo_n "checking for $ac_word... " >&6; }
39020if ${ac_cv_path_OBJDUMP+:} false; then :
39021  $as_echo_n "(cached) " >&6
39022else
39023  case $OBJDUMP in
39024  [\\/]* | ?:[\\/]*)
39025  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39026  ;;
39027  *)
39028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39029for as_dir in $PATH
39030do
39031  IFS=$as_save_IFS
39032  test -z "$as_dir" && as_dir=.
39033    for ac_exec_ext in '' $ac_executable_extensions; do
39034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39035    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39037    break 2
39038  fi
39039done
39040  done
39041IFS=$as_save_IFS
39042
39043  ;;
39044esac
39045fi
39046OBJDUMP=$ac_cv_path_OBJDUMP
39047if test -n "$OBJDUMP"; then
39048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39049$as_echo "$OBJDUMP" >&6; }
39050else
39051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39052$as_echo "no" >&6; }
39053fi
39054
39055
39056        if test "x$OBJDUMP" = x; then
39057          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39058        fi
39059      else
39060        # Otherwise we believe it is a complete path. Use it as it is.
39061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39062$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39063        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39064$as_echo_n "checking for OBJDUMP... " >&6; }
39065        if test ! -x "$tool_specified"; then
39066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39067$as_echo "not found" >&6; }
39068          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39069        fi
39070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39071$as_echo "$tool_specified" >&6; }
39072      fi
39073    fi
39074  fi
39075
39076
39077  if test "x$OBJDUMP" != x; then
39078    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39079    # bails if argument is missing.
39080
39081  # Only process if variable expands to non-empty
39082
39083  if test "x$OBJDUMP" != x; then
39084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39085
39086  # First separate the path from the arguments. This will split at the first
39087  # space.
39088  complete="$OBJDUMP"
39089  path="${complete%% *}"
39090  tmp="$complete EOL"
39091  arguments="${tmp#* }"
39092
39093  # Input might be given as Windows format, start by converting to
39094  # unix format.
39095  new_path=`$CYGPATH -u "$path"`
39096
39097  # Now try to locate executable using which
39098  new_path=`$WHICH "$new_path" 2> /dev/null`
39099  # bat and cmd files are not always considered executable in cygwin causing which
39100  # to not find them
39101  if test "x$new_path" = x \
39102      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39103      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39104    new_path=`$CYGPATH -u "$path"`
39105  fi
39106  if test "x$new_path" = x; then
39107    # Oops. Which didn't find the executable.
39108    # The splitting of arguments from the executable at a space might have been incorrect,
39109    # since paths with space are more likely in Windows. Give it another try with the whole
39110    # argument.
39111    path="$complete"
39112    arguments="EOL"
39113    new_path=`$CYGPATH -u "$path"`
39114    new_path=`$WHICH "$new_path" 2> /dev/null`
39115    # bat and cmd files are not always considered executable in cygwin causing which
39116    # to not find them
39117    if test "x$new_path" = x \
39118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39120      new_path=`$CYGPATH -u "$path"`
39121    fi
39122    if test "x$new_path" = x; then
39123      # It's still not found. Now this is an unrecoverable error.
39124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39125$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39126      has_space=`$ECHO "$complete" | $GREP " "`
39127      if test "x$has_space" != x; then
39128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39130      fi
39131      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39132    fi
39133  fi
39134
39135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39138  # "foo.exe" is OK but "foo" is an error.
39139  #
39140  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39141  # It is also a way to make sure we got the proper file name for the real test later on.
39142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39143  if test "x$test_shortpath" = x; then
39144    # Short path failed, file does not exist as specified.
39145    # Try adding .exe or .cmd
39146    if test -f "${new_path}.exe"; then
39147      input_to_shortpath="${new_path}.exe"
39148    elif test -f "${new_path}.cmd"; then
39149      input_to_shortpath="${new_path}.cmd"
39150    else
39151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39152$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39155      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39156    fi
39157  else
39158    input_to_shortpath="$new_path"
39159  fi
39160
39161  # Call helper function which possibly converts this using DOS-style short mode.
39162  # If so, the updated path is stored in $new_path.
39163  new_path="$input_to_shortpath"
39164
39165  input_path="$input_to_shortpath"
39166  # Check if we need to convert this using DOS-style short mode. If the path
39167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39168  # take no chances and rewrite it.
39169  # Note: m4 eats our [], so we need to use [ and ] instead.
39170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39171  if test "x$has_forbidden_chars" != x; then
39172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39176      # Going to short mode and back again did indeed matter. Since short mode is
39177      # case insensitive, let's make it lowercase to improve readability.
39178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39179      # Now convert it back to Unix-style (cygpath)
39180      input_path=`$CYGPATH -u "$shortmode_path"`
39181      new_path="$input_path"
39182    fi
39183  fi
39184
39185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39186  if test "x$test_cygdrive_prefix" = x; then
39187    # As a simple fix, exclude /usr/bin since it's not a real path.
39188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39190      # a path prefixed by /cygdrive for fixpath to work.
39191      new_path="$CYGWIN_ROOT_PATH$input_path"
39192    fi
39193  fi
39194
39195  # remove trailing .exe if any
39196  new_path="${new_path/%.exe/}"
39197
39198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39199
39200  # First separate the path from the arguments. This will split at the first
39201  # space.
39202  complete="$OBJDUMP"
39203  path="${complete%% *}"
39204  tmp="$complete EOL"
39205  arguments="${tmp#* }"
39206
39207  # Input might be given as Windows format, start by converting to
39208  # unix format.
39209  new_path="$path"
39210
39211  windows_path="$new_path"
39212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39213    unix_path=`$CYGPATH -u "$windows_path"`
39214    new_path="$unix_path"
39215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39217    new_path="$unix_path"
39218  fi
39219
39220
39221  # Now try to locate executable using which
39222  new_path=`$WHICH "$new_path" 2> /dev/null`
39223
39224  if test "x$new_path" = x; then
39225    # Oops. Which didn't find the executable.
39226    # The splitting of arguments from the executable at a space might have been incorrect,
39227    # since paths with space are more likely in Windows. Give it another try with the whole
39228    # argument.
39229    path="$complete"
39230    arguments="EOL"
39231    new_path="$path"
39232
39233  windows_path="$new_path"
39234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39235    unix_path=`$CYGPATH -u "$windows_path"`
39236    new_path="$unix_path"
39237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39239    new_path="$unix_path"
39240  fi
39241
39242
39243    new_path=`$WHICH "$new_path" 2> /dev/null`
39244    # bat and cmd files are not always considered executable in MSYS causing which
39245    # to not find them
39246    if test "x$new_path" = x \
39247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39249      new_path="$path"
39250
39251  windows_path="$new_path"
39252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39253    unix_path=`$CYGPATH -u "$windows_path"`
39254    new_path="$unix_path"
39255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39257    new_path="$unix_path"
39258  fi
39259
39260    fi
39261
39262    if test "x$new_path" = x; then
39263      # It's still not found. Now this is an unrecoverable error.
39264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39265$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39266      has_space=`$ECHO "$complete" | $GREP " "`
39267      if test "x$has_space" != x; then
39268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39270      fi
39271      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39272    fi
39273  fi
39274
39275  # Now new_path has a complete unix path to the binary
39276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39277    # Keep paths in /bin as-is, but remove trailing .exe if any
39278    new_path="${new_path/%.exe/}"
39279    # Do not save /bin paths to all_fixpath_prefixes!
39280  else
39281    # Not in mixed or Windows style, start by that.
39282    new_path=`cmd //c echo $new_path`
39283
39284  input_path="$new_path"
39285  # Check if we need to convert this using DOS-style short mode. If the path
39286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39287  # take no chances and rewrite it.
39288  # Note: m4 eats our [], so we need to use [ and ] instead.
39289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39290  if test "x$has_forbidden_chars" != x; then
39291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39293  fi
39294
39295    # Output is in $new_path
39296
39297  windows_path="$new_path"
39298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39299    unix_path=`$CYGPATH -u "$windows_path"`
39300    new_path="$unix_path"
39301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39303    new_path="$unix_path"
39304  fi
39305
39306    # remove trailing .exe if any
39307    new_path="${new_path/%.exe/}"
39308
39309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39311  fi
39312
39313    else
39314      # We're on a unix platform. Hooray! :)
39315      # First separate the path from the arguments. This will split at the first
39316      # space.
39317      complete="$OBJDUMP"
39318      path="${complete%% *}"
39319      tmp="$complete EOL"
39320      arguments="${tmp#* }"
39321
39322      # Cannot rely on the command "which" here since it doesn't always work.
39323      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39324      if test -z "$is_absolute_path"; then
39325        # Path to executable is not absolute. Find it.
39326        IFS_save="$IFS"
39327        IFS=:
39328        for p in $PATH; do
39329          if test -f "$p/$path" && test -x "$p/$path"; then
39330            new_path="$p/$path"
39331            break
39332          fi
39333        done
39334        IFS="$IFS_save"
39335      else
39336        # This is an absolute path, we can use it without further modifications.
39337        new_path="$path"
39338      fi
39339
39340      if test "x$new_path" = x; then
39341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39342$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39343        has_space=`$ECHO "$complete" | $GREP " "`
39344        if test "x$has_space" != x; then
39345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39347        fi
39348        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39349      fi
39350    fi
39351
39352    # Now join together the path and the arguments once again
39353    if test "x$arguments" != xEOL; then
39354      new_complete="$new_path ${arguments% *}"
39355    else
39356      new_complete="$new_path"
39357    fi
39358
39359    if test "x$complete" != "x$new_complete"; then
39360      OBJDUMP="$new_complete"
39361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39362$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39363    fi
39364  fi
39365
39366  fi
39367
39368
39369  # Restore old path.
39370  PATH="$OLD_PATH"
39371
39372  # Restore the flags to the user specified values.
39373  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39374  CFLAGS="$ORG_CFLAGS"
39375  CXXFLAGS="$ORG_CXXFLAGS"
39376
39377
39378# Finally do some processing after the detection phase
39379
39380  if test "x$COMPILE_TYPE" = "xcross"; then
39381    # Now we need to find a C/C++ compiler that can build executables for the
39382    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39383    # used once. Also, we need to do this without adding a tools dir to the
39384    # path, otherwise we might pick up cross-compilers which don't use standard
39385    # naming.
39386
39387    # FIXME: we should list the discovered compilers as an exclude pattern!
39388    # If we do that, we can do this detection before POST_DETECTION, and still
39389    # find the build compilers in the tools dir, if needed.
39390
39391
39392  # Publish this variable in the help.
39393
39394
39395  if test "x$BUILD_CC" = x; then
39396    # The variable is not set by user, try to locate tool using the code snippet
39397    for ac_prog in cl cc gcc
39398do
39399  # Extract the first word of "$ac_prog", so it can be a program name with args.
39400set dummy $ac_prog; ac_word=$2
39401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39402$as_echo_n "checking for $ac_word... " >&6; }
39403if ${ac_cv_path_BUILD_CC+:} false; then :
39404  $as_echo_n "(cached) " >&6
39405else
39406  case $BUILD_CC in
39407  [\\/]* | ?:[\\/]*)
39408  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39409  ;;
39410  *)
39411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39412for as_dir in $PATH
39413do
39414  IFS=$as_save_IFS
39415  test -z "$as_dir" && as_dir=.
39416    for ac_exec_ext in '' $ac_executable_extensions; do
39417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39418    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39420    break 2
39421  fi
39422done
39423  done
39424IFS=$as_save_IFS
39425
39426  ;;
39427esac
39428fi
39429BUILD_CC=$ac_cv_path_BUILD_CC
39430if test -n "$BUILD_CC"; then
39431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39432$as_echo "$BUILD_CC" >&6; }
39433else
39434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39435$as_echo "no" >&6; }
39436fi
39437
39438
39439  test -n "$BUILD_CC" && break
39440done
39441
39442  else
39443    # The variable is set, but is it from the command line or the environment?
39444
39445    # Try to remove the string !BUILD_CC! from our list.
39446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39448      # If it failed, the variable was not from the command line. Ignore it,
39449      # but warn the user (except for BASH, which is always set by the calling BASH).
39450      if test "xBUILD_CC" != xBASH; then
39451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39452$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39453      fi
39454      # Try to locate tool using the code snippet
39455      for ac_prog in cl cc gcc
39456do
39457  # Extract the first word of "$ac_prog", so it can be a program name with args.
39458set dummy $ac_prog; ac_word=$2
39459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39460$as_echo_n "checking for $ac_word... " >&6; }
39461if ${ac_cv_path_BUILD_CC+:} false; then :
39462  $as_echo_n "(cached) " >&6
39463else
39464  case $BUILD_CC in
39465  [\\/]* | ?:[\\/]*)
39466  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39467  ;;
39468  *)
39469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39470for as_dir in $PATH
39471do
39472  IFS=$as_save_IFS
39473  test -z "$as_dir" && as_dir=.
39474    for ac_exec_ext in '' $ac_executable_extensions; do
39475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39476    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39478    break 2
39479  fi
39480done
39481  done
39482IFS=$as_save_IFS
39483
39484  ;;
39485esac
39486fi
39487BUILD_CC=$ac_cv_path_BUILD_CC
39488if test -n "$BUILD_CC"; then
39489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39490$as_echo "$BUILD_CC" >&6; }
39491else
39492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39493$as_echo "no" >&6; }
39494fi
39495
39496
39497  test -n "$BUILD_CC" && break
39498done
39499
39500    else
39501      # If it succeeded, then it was overridden by the user. We will use it
39502      # for the tool.
39503
39504      # First remove it from the list of overridden variables, so we can test
39505      # for unknown variables in the end.
39506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39507
39508      # Check if the provided tool contains a complete path.
39509      tool_specified="$BUILD_CC"
39510      tool_basename="${tool_specified##*/}"
39511      if test "x$tool_basename" = "x$tool_specified"; then
39512        # A command without a complete path is provided, search $PATH.
39513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39514$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39515        # Extract the first word of "$tool_basename", so it can be a program name with args.
39516set dummy $tool_basename; ac_word=$2
39517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39518$as_echo_n "checking for $ac_word... " >&6; }
39519if ${ac_cv_path_BUILD_CC+:} false; then :
39520  $as_echo_n "(cached) " >&6
39521else
39522  case $BUILD_CC in
39523  [\\/]* | ?:[\\/]*)
39524  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39525  ;;
39526  *)
39527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39528for as_dir in $PATH
39529do
39530  IFS=$as_save_IFS
39531  test -z "$as_dir" && as_dir=.
39532    for ac_exec_ext in '' $ac_executable_extensions; do
39533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39534    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39536    break 2
39537  fi
39538done
39539  done
39540IFS=$as_save_IFS
39541
39542  ;;
39543esac
39544fi
39545BUILD_CC=$ac_cv_path_BUILD_CC
39546if test -n "$BUILD_CC"; then
39547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39548$as_echo "$BUILD_CC" >&6; }
39549else
39550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39551$as_echo "no" >&6; }
39552fi
39553
39554
39555        if test "x$BUILD_CC" = x; then
39556          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39557        fi
39558      else
39559        # Otherwise we believe it is a complete path. Use it as it is.
39560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39561$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39563$as_echo_n "checking for BUILD_CC... " >&6; }
39564        if test ! -x "$tool_specified"; then
39565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39566$as_echo "not found" >&6; }
39567          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39568        fi
39569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39570$as_echo "$tool_specified" >&6; }
39571      fi
39572    fi
39573  fi
39574
39575
39576
39577  # Only process if variable expands to non-empty
39578
39579  if test "x$BUILD_CC" != x; then
39580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39581
39582  # First separate the path from the arguments. This will split at the first
39583  # space.
39584  complete="$BUILD_CC"
39585  path="${complete%% *}"
39586  tmp="$complete EOL"
39587  arguments="${tmp#* }"
39588
39589  # Input might be given as Windows format, start by converting to
39590  # unix format.
39591  new_path=`$CYGPATH -u "$path"`
39592
39593  # Now try to locate executable using which
39594  new_path=`$WHICH "$new_path" 2> /dev/null`
39595  # bat and cmd files are not always considered executable in cygwin causing which
39596  # to not find them
39597  if test "x$new_path" = x \
39598      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39599      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39600    new_path=`$CYGPATH -u "$path"`
39601  fi
39602  if test "x$new_path" = x; then
39603    # Oops. Which didn't find the executable.
39604    # The splitting of arguments from the executable at a space might have been incorrect,
39605    # since paths with space are more likely in Windows. Give it another try with the whole
39606    # argument.
39607    path="$complete"
39608    arguments="EOL"
39609    new_path=`$CYGPATH -u "$path"`
39610    new_path=`$WHICH "$new_path" 2> /dev/null`
39611    # bat and cmd files are not always considered executable in cygwin causing which
39612    # to not find them
39613    if test "x$new_path" = x \
39614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39616      new_path=`$CYGPATH -u "$path"`
39617    fi
39618    if test "x$new_path" = x; then
39619      # It's still not found. Now this is an unrecoverable error.
39620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39621$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39622      has_space=`$ECHO "$complete" | $GREP " "`
39623      if test "x$has_space" != x; then
39624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39626      fi
39627      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39628    fi
39629  fi
39630
39631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39634  # "foo.exe" is OK but "foo" is an error.
39635  #
39636  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39637  # It is also a way to make sure we got the proper file name for the real test later on.
39638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39639  if test "x$test_shortpath" = x; then
39640    # Short path failed, file does not exist as specified.
39641    # Try adding .exe or .cmd
39642    if test -f "${new_path}.exe"; then
39643      input_to_shortpath="${new_path}.exe"
39644    elif test -f "${new_path}.cmd"; then
39645      input_to_shortpath="${new_path}.cmd"
39646    else
39647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39648$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39651      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39652    fi
39653  else
39654    input_to_shortpath="$new_path"
39655  fi
39656
39657  # Call helper function which possibly converts this using DOS-style short mode.
39658  # If so, the updated path is stored in $new_path.
39659  new_path="$input_to_shortpath"
39660
39661  input_path="$input_to_shortpath"
39662  # Check if we need to convert this using DOS-style short mode. If the path
39663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39664  # take no chances and rewrite it.
39665  # Note: m4 eats our [], so we need to use [ and ] instead.
39666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39667  if test "x$has_forbidden_chars" != x; then
39668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39672      # Going to short mode and back again did indeed matter. Since short mode is
39673      # case insensitive, let's make it lowercase to improve readability.
39674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39675      # Now convert it back to Unix-style (cygpath)
39676      input_path=`$CYGPATH -u "$shortmode_path"`
39677      new_path="$input_path"
39678    fi
39679  fi
39680
39681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39682  if test "x$test_cygdrive_prefix" = x; then
39683    # As a simple fix, exclude /usr/bin since it's not a real path.
39684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39686      # a path prefixed by /cygdrive for fixpath to work.
39687      new_path="$CYGWIN_ROOT_PATH$input_path"
39688    fi
39689  fi
39690
39691  # remove trailing .exe if any
39692  new_path="${new_path/%.exe/}"
39693
39694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39695
39696  # First separate the path from the arguments. This will split at the first
39697  # space.
39698  complete="$BUILD_CC"
39699  path="${complete%% *}"
39700  tmp="$complete EOL"
39701  arguments="${tmp#* }"
39702
39703  # Input might be given as Windows format, start by converting to
39704  # unix format.
39705  new_path="$path"
39706
39707  windows_path="$new_path"
39708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39709    unix_path=`$CYGPATH -u "$windows_path"`
39710    new_path="$unix_path"
39711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39713    new_path="$unix_path"
39714  fi
39715
39716
39717  # Now try to locate executable using which
39718  new_path=`$WHICH "$new_path" 2> /dev/null`
39719
39720  if test "x$new_path" = x; then
39721    # Oops. Which didn't find the executable.
39722    # The splitting of arguments from the executable at a space might have been incorrect,
39723    # since paths with space are more likely in Windows. Give it another try with the whole
39724    # argument.
39725    path="$complete"
39726    arguments="EOL"
39727    new_path="$path"
39728
39729  windows_path="$new_path"
39730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39731    unix_path=`$CYGPATH -u "$windows_path"`
39732    new_path="$unix_path"
39733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39735    new_path="$unix_path"
39736  fi
39737
39738
39739    new_path=`$WHICH "$new_path" 2> /dev/null`
39740    # bat and cmd files are not always considered executable in MSYS causing which
39741    # to not find them
39742    if test "x$new_path" = x \
39743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39745      new_path="$path"
39746
39747  windows_path="$new_path"
39748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39749    unix_path=`$CYGPATH -u "$windows_path"`
39750    new_path="$unix_path"
39751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39753    new_path="$unix_path"
39754  fi
39755
39756    fi
39757
39758    if test "x$new_path" = x; then
39759      # It's still not found. Now this is an unrecoverable error.
39760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39761$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39762      has_space=`$ECHO "$complete" | $GREP " "`
39763      if test "x$has_space" != x; then
39764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39766      fi
39767      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39768    fi
39769  fi
39770
39771  # Now new_path has a complete unix path to the binary
39772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39773    # Keep paths in /bin as-is, but remove trailing .exe if any
39774    new_path="${new_path/%.exe/}"
39775    # Do not save /bin paths to all_fixpath_prefixes!
39776  else
39777    # Not in mixed or Windows style, start by that.
39778    new_path=`cmd //c echo $new_path`
39779
39780  input_path="$new_path"
39781  # Check if we need to convert this using DOS-style short mode. If the path
39782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39783  # take no chances and rewrite it.
39784  # Note: m4 eats our [], so we need to use [ and ] instead.
39785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39786  if test "x$has_forbidden_chars" != x; then
39787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39789  fi
39790
39791    # Output is in $new_path
39792
39793  windows_path="$new_path"
39794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39795    unix_path=`$CYGPATH -u "$windows_path"`
39796    new_path="$unix_path"
39797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39799    new_path="$unix_path"
39800  fi
39801
39802    # remove trailing .exe if any
39803    new_path="${new_path/%.exe/}"
39804
39805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39807  fi
39808
39809    else
39810      # We're on a unix platform. Hooray! :)
39811      # First separate the path from the arguments. This will split at the first
39812      # space.
39813      complete="$BUILD_CC"
39814      path="${complete%% *}"
39815      tmp="$complete EOL"
39816      arguments="${tmp#* }"
39817
39818      # Cannot rely on the command "which" here since it doesn't always work.
39819      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39820      if test -z "$is_absolute_path"; then
39821        # Path to executable is not absolute. Find it.
39822        IFS_save="$IFS"
39823        IFS=:
39824        for p in $PATH; do
39825          if test -f "$p/$path" && test -x "$p/$path"; then
39826            new_path="$p/$path"
39827            break
39828          fi
39829        done
39830        IFS="$IFS_save"
39831      else
39832        # This is an absolute path, we can use it without further modifications.
39833        new_path="$path"
39834      fi
39835
39836      if test "x$new_path" = x; then
39837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39838$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39839        has_space=`$ECHO "$complete" | $GREP " "`
39840        if test "x$has_space" != x; then
39841          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39842$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39843        fi
39844        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39845      fi
39846    fi
39847
39848    # Now join together the path and the arguments once again
39849    if test "x$arguments" != xEOL; then
39850      new_complete="$new_path ${arguments% *}"
39851    else
39852      new_complete="$new_path"
39853    fi
39854
39855    if test "x$complete" != "x$new_complete"; then
39856      BUILD_CC="$new_complete"
39857      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39858$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39859    fi
39860  fi
39861
39862
39863
39864  # Publish this variable in the help.
39865
39866
39867  if test "x$BUILD_CXX" = x; then
39868    # The variable is not set by user, try to locate tool using the code snippet
39869    for ac_prog in cl CC g++
39870do
39871  # Extract the first word of "$ac_prog", so it can be a program name with args.
39872set dummy $ac_prog; ac_word=$2
39873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39874$as_echo_n "checking for $ac_word... " >&6; }
39875if ${ac_cv_path_BUILD_CXX+:} false; then :
39876  $as_echo_n "(cached) " >&6
39877else
39878  case $BUILD_CXX in
39879  [\\/]* | ?:[\\/]*)
39880  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39881  ;;
39882  *)
39883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39884for as_dir in $PATH
39885do
39886  IFS=$as_save_IFS
39887  test -z "$as_dir" && as_dir=.
39888    for ac_exec_ext in '' $ac_executable_extensions; do
39889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39890    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39892    break 2
39893  fi
39894done
39895  done
39896IFS=$as_save_IFS
39897
39898  ;;
39899esac
39900fi
39901BUILD_CXX=$ac_cv_path_BUILD_CXX
39902if test -n "$BUILD_CXX"; then
39903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39904$as_echo "$BUILD_CXX" >&6; }
39905else
39906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39907$as_echo "no" >&6; }
39908fi
39909
39910
39911  test -n "$BUILD_CXX" && break
39912done
39913
39914  else
39915    # The variable is set, but is it from the command line or the environment?
39916
39917    # Try to remove the string !BUILD_CXX! from our list.
39918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39920      # If it failed, the variable was not from the command line. Ignore it,
39921      # but warn the user (except for BASH, which is always set by the calling BASH).
39922      if test "xBUILD_CXX" != xBASH; then
39923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39924$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39925      fi
39926      # Try to locate tool using the code snippet
39927      for ac_prog in cl CC g++
39928do
39929  # Extract the first word of "$ac_prog", so it can be a program name with args.
39930set dummy $ac_prog; ac_word=$2
39931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39932$as_echo_n "checking for $ac_word... " >&6; }
39933if ${ac_cv_path_BUILD_CXX+:} false; then :
39934  $as_echo_n "(cached) " >&6
39935else
39936  case $BUILD_CXX in
39937  [\\/]* | ?:[\\/]*)
39938  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39939  ;;
39940  *)
39941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39942for as_dir in $PATH
39943do
39944  IFS=$as_save_IFS
39945  test -z "$as_dir" && as_dir=.
39946    for ac_exec_ext in '' $ac_executable_extensions; do
39947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39948    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39950    break 2
39951  fi
39952done
39953  done
39954IFS=$as_save_IFS
39955
39956  ;;
39957esac
39958fi
39959BUILD_CXX=$ac_cv_path_BUILD_CXX
39960if test -n "$BUILD_CXX"; then
39961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39962$as_echo "$BUILD_CXX" >&6; }
39963else
39964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39965$as_echo "no" >&6; }
39966fi
39967
39968
39969  test -n "$BUILD_CXX" && break
39970done
39971
39972    else
39973      # If it succeeded, then it was overridden by the user. We will use it
39974      # for the tool.
39975
39976      # First remove it from the list of overridden variables, so we can test
39977      # for unknown variables in the end.
39978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39979
39980      # Check if the provided tool contains a complete path.
39981      tool_specified="$BUILD_CXX"
39982      tool_basename="${tool_specified##*/}"
39983      if test "x$tool_basename" = "x$tool_specified"; then
39984        # A command without a complete path is provided, search $PATH.
39985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39986$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39987        # Extract the first word of "$tool_basename", so it can be a program name with args.
39988set dummy $tool_basename; ac_word=$2
39989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39990$as_echo_n "checking for $ac_word... " >&6; }
39991if ${ac_cv_path_BUILD_CXX+:} false; then :
39992  $as_echo_n "(cached) " >&6
39993else
39994  case $BUILD_CXX in
39995  [\\/]* | ?:[\\/]*)
39996  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39997  ;;
39998  *)
39999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40000for as_dir in $PATH
40001do
40002  IFS=$as_save_IFS
40003  test -z "$as_dir" && as_dir=.
40004    for ac_exec_ext in '' $ac_executable_extensions; do
40005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40006    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40008    break 2
40009  fi
40010done
40011  done
40012IFS=$as_save_IFS
40013
40014  ;;
40015esac
40016fi
40017BUILD_CXX=$ac_cv_path_BUILD_CXX
40018if test -n "$BUILD_CXX"; then
40019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40020$as_echo "$BUILD_CXX" >&6; }
40021else
40022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40023$as_echo "no" >&6; }
40024fi
40025
40026
40027        if test "x$BUILD_CXX" = x; then
40028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40029        fi
40030      else
40031        # Otherwise we believe it is a complete path. Use it as it is.
40032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40033$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40035$as_echo_n "checking for BUILD_CXX... " >&6; }
40036        if test ! -x "$tool_specified"; then
40037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40038$as_echo "not found" >&6; }
40039          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40040        fi
40041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40042$as_echo "$tool_specified" >&6; }
40043      fi
40044    fi
40045  fi
40046
40047
40048
40049  # Only process if variable expands to non-empty
40050
40051  if test "x$BUILD_CXX" != x; then
40052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40053
40054  # First separate the path from the arguments. This will split at the first
40055  # space.
40056  complete="$BUILD_CXX"
40057  path="${complete%% *}"
40058  tmp="$complete EOL"
40059  arguments="${tmp#* }"
40060
40061  # Input might be given as Windows format, start by converting to
40062  # unix format.
40063  new_path=`$CYGPATH -u "$path"`
40064
40065  # Now try to locate executable using which
40066  new_path=`$WHICH "$new_path" 2> /dev/null`
40067  # bat and cmd files are not always considered executable in cygwin causing which
40068  # to not find them
40069  if test "x$new_path" = x \
40070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40072    new_path=`$CYGPATH -u "$path"`
40073  fi
40074  if test "x$new_path" = x; then
40075    # Oops. Which didn't find the executable.
40076    # The splitting of arguments from the executable at a space might have been incorrect,
40077    # since paths with space are more likely in Windows. Give it another try with the whole
40078    # argument.
40079    path="$complete"
40080    arguments="EOL"
40081    new_path=`$CYGPATH -u "$path"`
40082    new_path=`$WHICH "$new_path" 2> /dev/null`
40083    # bat and cmd files are not always considered executable in cygwin causing which
40084    # to not find them
40085    if test "x$new_path" = x \
40086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40088      new_path=`$CYGPATH -u "$path"`
40089    fi
40090    if test "x$new_path" = x; then
40091      # It's still not found. Now this is an unrecoverable error.
40092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40093$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40094      has_space=`$ECHO "$complete" | $GREP " "`
40095      if test "x$has_space" != x; then
40096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40098      fi
40099      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40100    fi
40101  fi
40102
40103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40106  # "foo.exe" is OK but "foo" is an error.
40107  #
40108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40109  # It is also a way to make sure we got the proper file name for the real test later on.
40110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40111  if test "x$test_shortpath" = x; then
40112    # Short path failed, file does not exist as specified.
40113    # Try adding .exe or .cmd
40114    if test -f "${new_path}.exe"; then
40115      input_to_shortpath="${new_path}.exe"
40116    elif test -f "${new_path}.cmd"; then
40117      input_to_shortpath="${new_path}.cmd"
40118    else
40119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40120$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40123      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40124    fi
40125  else
40126    input_to_shortpath="$new_path"
40127  fi
40128
40129  # Call helper function which possibly converts this using DOS-style short mode.
40130  # If so, the updated path is stored in $new_path.
40131  new_path="$input_to_shortpath"
40132
40133  input_path="$input_to_shortpath"
40134  # Check if we need to convert this using DOS-style short mode. If the path
40135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40136  # take no chances and rewrite it.
40137  # Note: m4 eats our [], so we need to use [ and ] instead.
40138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40139  if test "x$has_forbidden_chars" != x; then
40140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40144      # Going to short mode and back again did indeed matter. Since short mode is
40145      # case insensitive, let's make it lowercase to improve readability.
40146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40147      # Now convert it back to Unix-style (cygpath)
40148      input_path=`$CYGPATH -u "$shortmode_path"`
40149      new_path="$input_path"
40150    fi
40151  fi
40152
40153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40154  if test "x$test_cygdrive_prefix" = x; then
40155    # As a simple fix, exclude /usr/bin since it's not a real path.
40156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40158      # a path prefixed by /cygdrive for fixpath to work.
40159      new_path="$CYGWIN_ROOT_PATH$input_path"
40160    fi
40161  fi
40162
40163  # remove trailing .exe if any
40164  new_path="${new_path/%.exe/}"
40165
40166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40167
40168  # First separate the path from the arguments. This will split at the first
40169  # space.
40170  complete="$BUILD_CXX"
40171  path="${complete%% *}"
40172  tmp="$complete EOL"
40173  arguments="${tmp#* }"
40174
40175  # Input might be given as Windows format, start by converting to
40176  # unix format.
40177  new_path="$path"
40178
40179  windows_path="$new_path"
40180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40181    unix_path=`$CYGPATH -u "$windows_path"`
40182    new_path="$unix_path"
40183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40185    new_path="$unix_path"
40186  fi
40187
40188
40189  # Now try to locate executable using which
40190  new_path=`$WHICH "$new_path" 2> /dev/null`
40191
40192  if test "x$new_path" = x; then
40193    # Oops. Which didn't find the executable.
40194    # The splitting of arguments from the executable at a space might have been incorrect,
40195    # since paths with space are more likely in Windows. Give it another try with the whole
40196    # argument.
40197    path="$complete"
40198    arguments="EOL"
40199    new_path="$path"
40200
40201  windows_path="$new_path"
40202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40203    unix_path=`$CYGPATH -u "$windows_path"`
40204    new_path="$unix_path"
40205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40207    new_path="$unix_path"
40208  fi
40209
40210
40211    new_path=`$WHICH "$new_path" 2> /dev/null`
40212    # bat and cmd files are not always considered executable in MSYS causing which
40213    # to not find them
40214    if test "x$new_path" = x \
40215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40217      new_path="$path"
40218
40219  windows_path="$new_path"
40220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40221    unix_path=`$CYGPATH -u "$windows_path"`
40222    new_path="$unix_path"
40223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40225    new_path="$unix_path"
40226  fi
40227
40228    fi
40229
40230    if test "x$new_path" = x; then
40231      # It's still not found. Now this is an unrecoverable error.
40232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40233$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40234      has_space=`$ECHO "$complete" | $GREP " "`
40235      if test "x$has_space" != x; then
40236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40238      fi
40239      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40240    fi
40241  fi
40242
40243  # Now new_path has a complete unix path to the binary
40244  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40245    # Keep paths in /bin as-is, but remove trailing .exe if any
40246    new_path="${new_path/%.exe/}"
40247    # Do not save /bin paths to all_fixpath_prefixes!
40248  else
40249    # Not in mixed or Windows style, start by that.
40250    new_path=`cmd //c echo $new_path`
40251
40252  input_path="$new_path"
40253  # Check if we need to convert this using DOS-style short mode. If the path
40254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40255  # take no chances and rewrite it.
40256  # Note: m4 eats our [], so we need to use [ and ] instead.
40257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40258  if test "x$has_forbidden_chars" != x; then
40259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40261  fi
40262
40263    # Output is in $new_path
40264
40265  windows_path="$new_path"
40266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40267    unix_path=`$CYGPATH -u "$windows_path"`
40268    new_path="$unix_path"
40269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40271    new_path="$unix_path"
40272  fi
40273
40274    # remove trailing .exe if any
40275    new_path="${new_path/%.exe/}"
40276
40277    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40278    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40279  fi
40280
40281    else
40282      # We're on a unix platform. Hooray! :)
40283      # First separate the path from the arguments. This will split at the first
40284      # space.
40285      complete="$BUILD_CXX"
40286      path="${complete%% *}"
40287      tmp="$complete EOL"
40288      arguments="${tmp#* }"
40289
40290      # Cannot rely on the command "which" here since it doesn't always work.
40291      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40292      if test -z "$is_absolute_path"; then
40293        # Path to executable is not absolute. Find it.
40294        IFS_save="$IFS"
40295        IFS=:
40296        for p in $PATH; do
40297          if test -f "$p/$path" && test -x "$p/$path"; then
40298            new_path="$p/$path"
40299            break
40300          fi
40301        done
40302        IFS="$IFS_save"
40303      else
40304        # This is an absolute path, we can use it without further modifications.
40305        new_path="$path"
40306      fi
40307
40308      if test "x$new_path" = x; then
40309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40310$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40311        has_space=`$ECHO "$complete" | $GREP " "`
40312        if test "x$has_space" != x; then
40313          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40314$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40315        fi
40316        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40317      fi
40318    fi
40319
40320    # Now join together the path and the arguments once again
40321    if test "x$arguments" != xEOL; then
40322      new_complete="$new_path ${arguments% *}"
40323    else
40324      new_complete="$new_path"
40325    fi
40326
40327    if test "x$complete" != "x$new_complete"; then
40328      BUILD_CXX="$new_complete"
40329      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40330$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40331    fi
40332  fi
40333
40334
40335
40336  # Publish this variable in the help.
40337
40338
40339  if test "x$BUILD_LD" = x; then
40340    # The variable is not set by user, try to locate tool using the code snippet
40341    for ac_prog in ld
40342do
40343  # Extract the first word of "$ac_prog", so it can be a program name with args.
40344set dummy $ac_prog; ac_word=$2
40345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40346$as_echo_n "checking for $ac_word... " >&6; }
40347if ${ac_cv_path_BUILD_LD+:} false; then :
40348  $as_echo_n "(cached) " >&6
40349else
40350  case $BUILD_LD in
40351  [\\/]* | ?:[\\/]*)
40352  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40353  ;;
40354  *)
40355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40356for as_dir in $PATH
40357do
40358  IFS=$as_save_IFS
40359  test -z "$as_dir" && as_dir=.
40360    for ac_exec_ext in '' $ac_executable_extensions; do
40361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40362    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40364    break 2
40365  fi
40366done
40367  done
40368IFS=$as_save_IFS
40369
40370  ;;
40371esac
40372fi
40373BUILD_LD=$ac_cv_path_BUILD_LD
40374if test -n "$BUILD_LD"; then
40375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40376$as_echo "$BUILD_LD" >&6; }
40377else
40378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40379$as_echo "no" >&6; }
40380fi
40381
40382
40383  test -n "$BUILD_LD" && break
40384done
40385
40386  else
40387    # The variable is set, but is it from the command line or the environment?
40388
40389    # Try to remove the string !BUILD_LD! from our list.
40390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40392      # If it failed, the variable was not from the command line. Ignore it,
40393      # but warn the user (except for BASH, which is always set by the calling BASH).
40394      if test "xBUILD_LD" != xBASH; then
40395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40396$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40397      fi
40398      # Try to locate tool using the code snippet
40399      for ac_prog in ld
40400do
40401  # Extract the first word of "$ac_prog", so it can be a program name with args.
40402set dummy $ac_prog; ac_word=$2
40403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40404$as_echo_n "checking for $ac_word... " >&6; }
40405if ${ac_cv_path_BUILD_LD+:} false; then :
40406  $as_echo_n "(cached) " >&6
40407else
40408  case $BUILD_LD in
40409  [\\/]* | ?:[\\/]*)
40410  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40411  ;;
40412  *)
40413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40414for as_dir in $PATH
40415do
40416  IFS=$as_save_IFS
40417  test -z "$as_dir" && as_dir=.
40418    for ac_exec_ext in '' $ac_executable_extensions; do
40419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40420    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40422    break 2
40423  fi
40424done
40425  done
40426IFS=$as_save_IFS
40427
40428  ;;
40429esac
40430fi
40431BUILD_LD=$ac_cv_path_BUILD_LD
40432if test -n "$BUILD_LD"; then
40433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40434$as_echo "$BUILD_LD" >&6; }
40435else
40436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40437$as_echo "no" >&6; }
40438fi
40439
40440
40441  test -n "$BUILD_LD" && break
40442done
40443
40444    else
40445      # If it succeeded, then it was overridden by the user. We will use it
40446      # for the tool.
40447
40448      # First remove it from the list of overridden variables, so we can test
40449      # for unknown variables in the end.
40450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40451
40452      # Check if the provided tool contains a complete path.
40453      tool_specified="$BUILD_LD"
40454      tool_basename="${tool_specified##*/}"
40455      if test "x$tool_basename" = "x$tool_specified"; then
40456        # A command without a complete path is provided, search $PATH.
40457        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40458$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40459        # Extract the first word of "$tool_basename", so it can be a program name with args.
40460set dummy $tool_basename; ac_word=$2
40461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40462$as_echo_n "checking for $ac_word... " >&6; }
40463if ${ac_cv_path_BUILD_LD+:} false; then :
40464  $as_echo_n "(cached) " >&6
40465else
40466  case $BUILD_LD in
40467  [\\/]* | ?:[\\/]*)
40468  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40469  ;;
40470  *)
40471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40472for as_dir in $PATH
40473do
40474  IFS=$as_save_IFS
40475  test -z "$as_dir" && as_dir=.
40476    for ac_exec_ext in '' $ac_executable_extensions; do
40477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40478    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40480    break 2
40481  fi
40482done
40483  done
40484IFS=$as_save_IFS
40485
40486  ;;
40487esac
40488fi
40489BUILD_LD=$ac_cv_path_BUILD_LD
40490if test -n "$BUILD_LD"; then
40491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40492$as_echo "$BUILD_LD" >&6; }
40493else
40494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40495$as_echo "no" >&6; }
40496fi
40497
40498
40499        if test "x$BUILD_LD" = x; then
40500          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40501        fi
40502      else
40503        # Otherwise we believe it is a complete path. Use it as it is.
40504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40505$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40507$as_echo_n "checking for BUILD_LD... " >&6; }
40508        if test ! -x "$tool_specified"; then
40509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40510$as_echo "not found" >&6; }
40511          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40512        fi
40513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40514$as_echo "$tool_specified" >&6; }
40515      fi
40516    fi
40517  fi
40518
40519
40520
40521  # Only process if variable expands to non-empty
40522
40523  if test "x$BUILD_LD" != x; then
40524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40525
40526  # First separate the path from the arguments. This will split at the first
40527  # space.
40528  complete="$BUILD_LD"
40529  path="${complete%% *}"
40530  tmp="$complete EOL"
40531  arguments="${tmp#* }"
40532
40533  # Input might be given as Windows format, start by converting to
40534  # unix format.
40535  new_path=`$CYGPATH -u "$path"`
40536
40537  # Now try to locate executable using which
40538  new_path=`$WHICH "$new_path" 2> /dev/null`
40539  # bat and cmd files are not always considered executable in cygwin causing which
40540  # to not find them
40541  if test "x$new_path" = x \
40542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40544    new_path=`$CYGPATH -u "$path"`
40545  fi
40546  if test "x$new_path" = x; then
40547    # Oops. Which didn't find the executable.
40548    # The splitting of arguments from the executable at a space might have been incorrect,
40549    # since paths with space are more likely in Windows. Give it another try with the whole
40550    # argument.
40551    path="$complete"
40552    arguments="EOL"
40553    new_path=`$CYGPATH -u "$path"`
40554    new_path=`$WHICH "$new_path" 2> /dev/null`
40555    # bat and cmd files are not always considered executable in cygwin causing which
40556    # to not find them
40557    if test "x$new_path" = x \
40558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40560      new_path=`$CYGPATH -u "$path"`
40561    fi
40562    if test "x$new_path" = x; then
40563      # It's still not found. Now this is an unrecoverable error.
40564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40565$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40566      has_space=`$ECHO "$complete" | $GREP " "`
40567      if test "x$has_space" != x; then
40568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40570      fi
40571      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40572    fi
40573  fi
40574
40575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40578  # "foo.exe" is OK but "foo" is an error.
40579  #
40580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40581  # It is also a way to make sure we got the proper file name for the real test later on.
40582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40583  if test "x$test_shortpath" = x; then
40584    # Short path failed, file does not exist as specified.
40585    # Try adding .exe or .cmd
40586    if test -f "${new_path}.exe"; then
40587      input_to_shortpath="${new_path}.exe"
40588    elif test -f "${new_path}.cmd"; then
40589      input_to_shortpath="${new_path}.cmd"
40590    else
40591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40592$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40595      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40596    fi
40597  else
40598    input_to_shortpath="$new_path"
40599  fi
40600
40601  # Call helper function which possibly converts this using DOS-style short mode.
40602  # If so, the updated path is stored in $new_path.
40603  new_path="$input_to_shortpath"
40604
40605  input_path="$input_to_shortpath"
40606  # Check if we need to convert this using DOS-style short mode. If the path
40607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40608  # take no chances and rewrite it.
40609  # Note: m4 eats our [], so we need to use [ and ] instead.
40610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40611  if test "x$has_forbidden_chars" != x; then
40612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40616      # Going to short mode and back again did indeed matter. Since short mode is
40617      # case insensitive, let's make it lowercase to improve readability.
40618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40619      # Now convert it back to Unix-style (cygpath)
40620      input_path=`$CYGPATH -u "$shortmode_path"`
40621      new_path="$input_path"
40622    fi
40623  fi
40624
40625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40626  if test "x$test_cygdrive_prefix" = x; then
40627    # As a simple fix, exclude /usr/bin since it's not a real path.
40628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40630      # a path prefixed by /cygdrive for fixpath to work.
40631      new_path="$CYGWIN_ROOT_PATH$input_path"
40632    fi
40633  fi
40634
40635  # remove trailing .exe if any
40636  new_path="${new_path/%.exe/}"
40637
40638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40639
40640  # First separate the path from the arguments. This will split at the first
40641  # space.
40642  complete="$BUILD_LD"
40643  path="${complete%% *}"
40644  tmp="$complete EOL"
40645  arguments="${tmp#* }"
40646
40647  # Input might be given as Windows format, start by converting to
40648  # unix format.
40649  new_path="$path"
40650
40651  windows_path="$new_path"
40652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40653    unix_path=`$CYGPATH -u "$windows_path"`
40654    new_path="$unix_path"
40655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40657    new_path="$unix_path"
40658  fi
40659
40660
40661  # Now try to locate executable using which
40662  new_path=`$WHICH "$new_path" 2> /dev/null`
40663
40664  if test "x$new_path" = x; then
40665    # Oops. Which didn't find the executable.
40666    # The splitting of arguments from the executable at a space might have been incorrect,
40667    # since paths with space are more likely in Windows. Give it another try with the whole
40668    # argument.
40669    path="$complete"
40670    arguments="EOL"
40671    new_path="$path"
40672
40673  windows_path="$new_path"
40674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40675    unix_path=`$CYGPATH -u "$windows_path"`
40676    new_path="$unix_path"
40677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40679    new_path="$unix_path"
40680  fi
40681
40682
40683    new_path=`$WHICH "$new_path" 2> /dev/null`
40684    # bat and cmd files are not always considered executable in MSYS causing which
40685    # to not find them
40686    if test "x$new_path" = x \
40687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40689      new_path="$path"
40690
40691  windows_path="$new_path"
40692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40693    unix_path=`$CYGPATH -u "$windows_path"`
40694    new_path="$unix_path"
40695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40697    new_path="$unix_path"
40698  fi
40699
40700    fi
40701
40702    if test "x$new_path" = x; then
40703      # It's still not found. Now this is an unrecoverable error.
40704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40705$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40706      has_space=`$ECHO "$complete" | $GREP " "`
40707      if test "x$has_space" != x; then
40708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40710      fi
40711      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40712    fi
40713  fi
40714
40715  # Now new_path has a complete unix path to the binary
40716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40717    # Keep paths in /bin as-is, but remove trailing .exe if any
40718    new_path="${new_path/%.exe/}"
40719    # Do not save /bin paths to all_fixpath_prefixes!
40720  else
40721    # Not in mixed or Windows style, start by that.
40722    new_path=`cmd //c echo $new_path`
40723
40724  input_path="$new_path"
40725  # Check if we need to convert this using DOS-style short mode. If the path
40726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40727  # take no chances and rewrite it.
40728  # Note: m4 eats our [], so we need to use [ and ] instead.
40729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40730  if test "x$has_forbidden_chars" != x; then
40731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40733  fi
40734
40735    # Output is in $new_path
40736
40737  windows_path="$new_path"
40738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40739    unix_path=`$CYGPATH -u "$windows_path"`
40740    new_path="$unix_path"
40741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40743    new_path="$unix_path"
40744  fi
40745
40746    # remove trailing .exe if any
40747    new_path="${new_path/%.exe/}"
40748
40749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40751  fi
40752
40753    else
40754      # We're on a unix platform. Hooray! :)
40755      # First separate the path from the arguments. This will split at the first
40756      # space.
40757      complete="$BUILD_LD"
40758      path="${complete%% *}"
40759      tmp="$complete EOL"
40760      arguments="${tmp#* }"
40761
40762      # Cannot rely on the command "which" here since it doesn't always work.
40763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40764      if test -z "$is_absolute_path"; then
40765        # Path to executable is not absolute. Find it.
40766        IFS_save="$IFS"
40767        IFS=:
40768        for p in $PATH; do
40769          if test -f "$p/$path" && test -x "$p/$path"; then
40770            new_path="$p/$path"
40771            break
40772          fi
40773        done
40774        IFS="$IFS_save"
40775      else
40776        # This is an absolute path, we can use it without further modifications.
40777        new_path="$path"
40778      fi
40779
40780      if test "x$new_path" = x; then
40781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40782$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40783        has_space=`$ECHO "$complete" | $GREP " "`
40784        if test "x$has_space" != x; then
40785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40787        fi
40788        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40789      fi
40790    fi
40791
40792    # Now join together the path and the arguments once again
40793    if test "x$arguments" != xEOL; then
40794      new_complete="$new_path ${arguments% *}"
40795    else
40796      new_complete="$new_path"
40797    fi
40798
40799    if test "x$complete" != "x$new_complete"; then
40800      BUILD_LD="$new_complete"
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40802$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40803    fi
40804  fi
40805
40806  else
40807    # If we are not cross compiling, use the normal target compilers for
40808    # building the build platform executables.
40809    BUILD_CC="$CC"
40810    BUILD_CXX="$CXX"
40811    BUILD_LD="$LD"
40812  fi
40813
40814
40815
40816
40817
40818
40819  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40820    # For hotspot, we need these in Windows mixed path,
40821    # so rewrite them all. Need added .exe suffix.
40822    HOTSPOT_CXX="$CXX.exe"
40823    HOTSPOT_LD="$LD.exe"
40824    HOTSPOT_MT="$MT.exe"
40825    HOTSPOT_RC="$RC.exe"
40826
40827  unix_path="$HOTSPOT_CXX"
40828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40829    windows_path=`$CYGPATH -m "$unix_path"`
40830    HOTSPOT_CXX="$windows_path"
40831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40832    windows_path=`cmd //c echo $unix_path`
40833    HOTSPOT_CXX="$windows_path"
40834  fi
40835
40836
40837  unix_path="$HOTSPOT_LD"
40838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40839    windows_path=`$CYGPATH -m "$unix_path"`
40840    HOTSPOT_LD="$windows_path"
40841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40842    windows_path=`cmd //c echo $unix_path`
40843    HOTSPOT_LD="$windows_path"
40844  fi
40845
40846
40847  unix_path="$HOTSPOT_MT"
40848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849    windows_path=`$CYGPATH -m "$unix_path"`
40850    HOTSPOT_MT="$windows_path"
40851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852    windows_path=`cmd //c echo $unix_path`
40853    HOTSPOT_MT="$windows_path"
40854  fi
40855
40856
40857  unix_path="$HOTSPOT_RC"
40858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40859    windows_path=`$CYGPATH -m "$unix_path"`
40860    HOTSPOT_RC="$windows_path"
40861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40862    windows_path=`cmd //c echo $unix_path`
40863    HOTSPOT_RC="$windows_path"
40864  fi
40865
40866
40867
40868  else
40869    HOTSPOT_CXX="$CXX"
40870    HOTSPOT_LD="$LD"
40871  fi
40872
40873
40874
40875  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40876    USE_CLANG=true
40877  fi
40878
40879
40880
40881
40882
40883  # The package path is used only on macosx?
40884  # FIXME: clean this up, and/or move it elsewhere.
40885  PACKAGE_PATH=/opt/local
40886
40887
40888  # Check for extra potential brokenness.
40889  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40890    # On Windows, double-check that we got the right compiler.
40891    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40892    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40893    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40894      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40895        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40896      fi
40897    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40898      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40899        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40900      fi
40901    fi
40902  fi
40903
40904  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40905    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40906    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40907    # This is later checked when setting flags.
40908
40909    # "-Og" suppported for GCC 4.8 and later
40910    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40911
40912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40913$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40914  supports=yes
40915
40916  saved_cflags="$CFLAGS"
40917  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40918  ac_ext=c
40919ac_cpp='$CPP $CPPFLAGS'
40920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40922ac_compiler_gnu=$ac_cv_c_compiler_gnu
40923
40924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40925/* end confdefs.h.  */
40926int i;
40927_ACEOF
40928if ac_fn_c_try_compile "$LINENO"; then :
40929
40930else
40931  supports=no
40932fi
40933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40934  ac_ext=cpp
40935ac_cpp='$CXXCPP $CPPFLAGS'
40936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40939
40940  CFLAGS="$saved_cflags"
40941
40942  saved_cxxflags="$CXXFLAGS"
40943  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40944  ac_ext=cpp
40945ac_cpp='$CXXCPP $CPPFLAGS'
40946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40949
40950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40951/* end confdefs.h.  */
40952int i;
40953_ACEOF
40954if ac_fn_cxx_try_compile "$LINENO"; then :
40955
40956else
40957  supports=no
40958fi
40959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40960  ac_ext=cpp
40961ac_cpp='$CXXCPP $CPPFLAGS'
40962ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40963ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40964ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40965
40966  CXXFLAGS="$saved_cxxflags"
40967
40968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40969$as_echo "$supports" >&6; }
40970  if test "x$supports" = "xyes" ; then
40971    HAS_CFLAG_OPTIMIZE_DEBUG=true
40972  else
40973    HAS_CFLAG_OPTIMIZE_DEBUG=false
40974  fi
40975
40976
40977    # "-z relro" supported in GNU binutils 2.17 and later
40978    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40979
40980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40981$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40982  supports=yes
40983
40984  saved_ldflags="$LDFLAGS"
40985  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40986  ac_ext=c
40987ac_cpp='$CPP $CPPFLAGS'
40988ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40989ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40990ac_compiler_gnu=$ac_cv_c_compiler_gnu
40991
40992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40993/* end confdefs.h.  */
40994
40995int
40996main ()
40997{
40998
40999  ;
41000  return 0;
41001}
41002_ACEOF
41003if ac_fn_c_try_link "$LINENO"; then :
41004
41005else
41006  supports=no
41007fi
41008rm -f core conftest.err conftest.$ac_objext \
41009    conftest$ac_exeext conftest.$ac_ext
41010  ac_ext=cpp
41011ac_cpp='$CXXCPP $CPPFLAGS'
41012ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41013ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41014ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41015
41016  LDFLAGS="$saved_ldflags"
41017
41018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41019$as_echo "$supports" >&6; }
41020  if test "x$supports" = "xyes" ; then
41021    HAS_LINKER_RELRO=true
41022  else
41023    HAS_LINKER_RELRO=false
41024  fi
41025
41026
41027    # "-z now" supported in GNU binutils 2.11 and later
41028    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41029
41030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41031$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41032  supports=yes
41033
41034  saved_ldflags="$LDFLAGS"
41035  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41036  ac_ext=c
41037ac_cpp='$CPP $CPPFLAGS'
41038ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41039ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41040ac_compiler_gnu=$ac_cv_c_compiler_gnu
41041
41042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41043/* end confdefs.h.  */
41044
41045int
41046main ()
41047{
41048
41049  ;
41050  return 0;
41051}
41052_ACEOF
41053if ac_fn_c_try_link "$LINENO"; then :
41054
41055else
41056  supports=no
41057fi
41058rm -f core conftest.err conftest.$ac_objext \
41059    conftest$ac_exeext conftest.$ac_ext
41060  ac_ext=cpp
41061ac_cpp='$CXXCPP $CPPFLAGS'
41062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41065
41066  LDFLAGS="$saved_ldflags"
41067
41068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41069$as_echo "$supports" >&6; }
41070  if test "x$supports" = "xyes" ; then
41071    HAS_LINKER_NOW=true
41072  else
41073    HAS_LINKER_NOW=false
41074  fi
41075
41076  fi
41077
41078  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41079  # in executable.'
41080  USING_BROKEN_SUSE_LD=no
41081  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41083$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41084    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41085    $ECHO "int main() { }" > main.c
41086    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41088$as_echo "no" >&6; }
41089      USING_BROKEN_SUSE_LD=no
41090    else
41091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41092$as_echo "yes" >&6; }
41093      USING_BROKEN_SUSE_LD=yes
41094    fi
41095    rm -rf version-script.map main.c a.out
41096  fi
41097
41098
41099
41100# Setup the JTReg Regression Test Harness.
41101
41102
41103# Check whether --with-jtreg was given.
41104if test "${with_jtreg+set}" = set; then :
41105  withval=$with_jtreg;
41106else
41107  with_jtreg=no
41108fi
41109
41110
41111  if test "x$with_jtreg" = xno; then
41112    # jtreg disabled
41113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41114$as_echo_n "checking for jtreg... " >&6; }
41115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41116$as_echo "no" >&6; }
41117  else
41118    if test "x$with_jtreg" != xyes; then
41119      # with path specified.
41120      JT_HOME="$with_jtreg"
41121    fi
41122
41123    if test "x$JT_HOME" != x; then
41124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41125$as_echo_n "checking for jtreg... " >&6; }
41126
41127      # use JT_HOME enviroment var.
41128
41129  # Only process if variable expands to non-empty
41130
41131  if test "x$JT_HOME" != x; then
41132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41133
41134  # Input might be given as Windows format, start by converting to
41135  # unix format.
41136  path="$JT_HOME"
41137  new_path=`$CYGPATH -u "$path"`
41138
41139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41142  # "foo.exe" is OK but "foo" is an error.
41143  #
41144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41145  # It is also a way to make sure we got the proper file name for the real test later on.
41146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41147  if test "x$test_shortpath" = x; then
41148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41149$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41150    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41151  fi
41152
41153  # Call helper function which possibly converts this using DOS-style short mode.
41154  # If so, the updated path is stored in $new_path.
41155
41156  input_path="$new_path"
41157  # Check if we need to convert this using DOS-style short mode. If the path
41158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41159  # take no chances and rewrite it.
41160  # Note: m4 eats our [], so we need to use [ and ] instead.
41161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41162  if test "x$has_forbidden_chars" != x; then
41163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41167      # Going to short mode and back again did indeed matter. Since short mode is
41168      # case insensitive, let's make it lowercase to improve readability.
41169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41170      # Now convert it back to Unix-style (cygpath)
41171      input_path=`$CYGPATH -u "$shortmode_path"`
41172      new_path="$input_path"
41173    fi
41174  fi
41175
41176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41177  if test "x$test_cygdrive_prefix" = x; then
41178    # As a simple fix, exclude /usr/bin since it's not a real path.
41179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41181      # a path prefixed by /cygdrive for fixpath to work.
41182      new_path="$CYGWIN_ROOT_PATH$input_path"
41183    fi
41184  fi
41185
41186
41187  if test "x$path" != "x$new_path"; then
41188    JT_HOME="$new_path"
41189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41190$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41191  fi
41192
41193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41194
41195  path="$JT_HOME"
41196  has_colon=`$ECHO $path | $GREP ^.:`
41197  new_path="$path"
41198  if test "x$has_colon" = x; then
41199    # Not in mixed or Windows style, start by that.
41200    new_path=`cmd //c echo $path`
41201  fi
41202
41203
41204  input_path="$new_path"
41205  # Check if we need to convert this using DOS-style short mode. If the path
41206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41207  # take no chances and rewrite it.
41208  # Note: m4 eats our [], so we need to use [ and ] instead.
41209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41210  if test "x$has_forbidden_chars" != x; then
41211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41213  fi
41214
41215
41216  windows_path="$new_path"
41217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41218    unix_path=`$CYGPATH -u "$windows_path"`
41219    new_path="$unix_path"
41220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41222    new_path="$unix_path"
41223  fi
41224
41225  if test "x$path" != "x$new_path"; then
41226    JT_HOME="$new_path"
41227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41228$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41229  fi
41230
41231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41233
41234    else
41235      # We're on a unix platform. Hooray! :)
41236      path="$JT_HOME"
41237      has_space=`$ECHO "$path" | $GREP " "`
41238      if test "x$has_space" != x; then
41239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41240$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41242      fi
41243
41244      # Use eval to expand a potential ~
41245      eval path="$path"
41246      if test ! -f "$path" && test ! -d "$path"; then
41247        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41248      fi
41249
41250      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41251    fi
41252  fi
41253
41254
41255      # jtreg win32 script works for everybody
41256      JTREGEXE="$JT_HOME/bin/jtreg"
41257
41258      if test ! -f "$JTREGEXE"; then
41259        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41260      fi
41261
41262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41263$as_echo "$JTREGEXE" >&6; }
41264    else
41265      # try to find jtreg on path
41266
41267
41268
41269  # Publish this variable in the help.
41270
41271
41272  if test "x$JTREGEXE" = x; then
41273    # The variable is not set by user, try to locate tool using the code snippet
41274    for ac_prog in jtreg
41275do
41276  # Extract the first word of "$ac_prog", so it can be a program name with args.
41277set dummy $ac_prog; ac_word=$2
41278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41279$as_echo_n "checking for $ac_word... " >&6; }
41280if ${ac_cv_path_JTREGEXE+:} false; then :
41281  $as_echo_n "(cached) " >&6
41282else
41283  case $JTREGEXE in
41284  [\\/]* | ?:[\\/]*)
41285  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41286  ;;
41287  *)
41288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41289for as_dir in $PATH
41290do
41291  IFS=$as_save_IFS
41292  test -z "$as_dir" && as_dir=.
41293    for ac_exec_ext in '' $ac_executable_extensions; do
41294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41295    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41297    break 2
41298  fi
41299done
41300  done
41301IFS=$as_save_IFS
41302
41303  ;;
41304esac
41305fi
41306JTREGEXE=$ac_cv_path_JTREGEXE
41307if test -n "$JTREGEXE"; then
41308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41309$as_echo "$JTREGEXE" >&6; }
41310else
41311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41312$as_echo "no" >&6; }
41313fi
41314
41315
41316  test -n "$JTREGEXE" && break
41317done
41318
41319  else
41320    # The variable is set, but is it from the command line or the environment?
41321
41322    # Try to remove the string !JTREGEXE! from our list.
41323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41325      # If it failed, the variable was not from the command line. Ignore it,
41326      # but warn the user (except for BASH, which is always set by the calling BASH).
41327      if test "xJTREGEXE" != xBASH; then
41328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41329$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41330      fi
41331      # Try to locate tool using the code snippet
41332      for ac_prog in jtreg
41333do
41334  # Extract the first word of "$ac_prog", so it can be a program name with args.
41335set dummy $ac_prog; ac_word=$2
41336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41337$as_echo_n "checking for $ac_word... " >&6; }
41338if ${ac_cv_path_JTREGEXE+:} false; then :
41339  $as_echo_n "(cached) " >&6
41340else
41341  case $JTREGEXE in
41342  [\\/]* | ?:[\\/]*)
41343  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41344  ;;
41345  *)
41346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41347for as_dir in $PATH
41348do
41349  IFS=$as_save_IFS
41350  test -z "$as_dir" && as_dir=.
41351    for ac_exec_ext in '' $ac_executable_extensions; do
41352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41353    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41355    break 2
41356  fi
41357done
41358  done
41359IFS=$as_save_IFS
41360
41361  ;;
41362esac
41363fi
41364JTREGEXE=$ac_cv_path_JTREGEXE
41365if test -n "$JTREGEXE"; then
41366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41367$as_echo "$JTREGEXE" >&6; }
41368else
41369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41370$as_echo "no" >&6; }
41371fi
41372
41373
41374  test -n "$JTREGEXE" && break
41375done
41376
41377    else
41378      # If it succeeded, then it was overridden by the user. We will use it
41379      # for the tool.
41380
41381      # First remove it from the list of overridden variables, so we can test
41382      # for unknown variables in the end.
41383      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41384
41385      # Check if the provided tool contains a complete path.
41386      tool_specified="$JTREGEXE"
41387      tool_basename="${tool_specified##*/}"
41388      if test "x$tool_basename" = "x$tool_specified"; then
41389        # A command without a complete path is provided, search $PATH.
41390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41391$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41392        # Extract the first word of "$tool_basename", so it can be a program name with args.
41393set dummy $tool_basename; ac_word=$2
41394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41395$as_echo_n "checking for $ac_word... " >&6; }
41396if ${ac_cv_path_JTREGEXE+:} false; then :
41397  $as_echo_n "(cached) " >&6
41398else
41399  case $JTREGEXE in
41400  [\\/]* | ?:[\\/]*)
41401  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41402  ;;
41403  *)
41404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41405for as_dir in $PATH
41406do
41407  IFS=$as_save_IFS
41408  test -z "$as_dir" && as_dir=.
41409    for ac_exec_ext in '' $ac_executable_extensions; do
41410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41411    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41413    break 2
41414  fi
41415done
41416  done
41417IFS=$as_save_IFS
41418
41419  ;;
41420esac
41421fi
41422JTREGEXE=$ac_cv_path_JTREGEXE
41423if test -n "$JTREGEXE"; then
41424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41425$as_echo "$JTREGEXE" >&6; }
41426else
41427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41428$as_echo "no" >&6; }
41429fi
41430
41431
41432        if test "x$JTREGEXE" = x; then
41433          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41434        fi
41435      else
41436        # Otherwise we believe it is a complete path. Use it as it is.
41437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41438$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41440$as_echo_n "checking for JTREGEXE... " >&6; }
41441        if test ! -x "$tool_specified"; then
41442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41443$as_echo "not found" >&6; }
41444          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41445        fi
41446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41447$as_echo "$tool_specified" >&6; }
41448      fi
41449    fi
41450  fi
41451
41452
41453
41454  if test "x$JTREGEXE" = x; then
41455    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41456  fi
41457
41458
41459      JT_HOME="`$DIRNAME $JTREGEXE`"
41460    fi
41461  fi
41462
41463
41464
41465
41466
41467
41468  # Option used to tell the compiler whether to create 32- or 64-bit executables
41469  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41470    COMPILER_TARGET_BITS_FLAG="-q"
41471  else
41472    COMPILER_TARGET_BITS_FLAG="-m"
41473  fi
41474
41475
41476  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41477  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41478    ARFLAGS="-r"
41479  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41480    ARFLAGS="-X64"
41481  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41482    # lib.exe is used as AR to create static libraries.
41483    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41484  else
41485    ARFLAGS=""
41486  fi
41487
41488
41489  ## Setup strip.
41490  # FIXME: should this really be per platform, or should it be per toolchain type?
41491  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41492  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41493  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41494    STRIPFLAGS="-g"
41495  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41496    STRIPFLAGS="-x"
41497  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41498    STRIPFLAGS="-S"
41499  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41500    STRIPFLAGS="-X32_64"
41501  fi
41502
41503  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41504    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41505  fi
41506
41507
41508  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41509    CC_OUT_OPTION=-Fo
41510    EXE_OUT_OPTION=-out:
41511    LD_OUT_OPTION=-out:
41512    AR_OUT_OPTION=-out:
41513  else
41514    # The option used to specify the target .o,.a or .so file.
41515    # When compiling, how to specify the to be created object file.
41516    CC_OUT_OPTION='-o$(SPACE)'
41517    # When linking, how to specify the to be created executable.
41518    EXE_OUT_OPTION='-o$(SPACE)'
41519    # When linking, how to specify the to be created dynamically linkable library.
41520    LD_OUT_OPTION='-o$(SPACE)'
41521    # When archiving, how to specify the to be create static archive for object files.
41522    AR_OUT_OPTION='rcs$(SPACE)'
41523  fi
41524
41525
41526
41527
41528
41529  # On Windows, we need to set RC flags.
41530  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41531    RC_FLAGS="-nologo -l0x409"
41532    if test "x$VARIANT" = xOPT; then
41533      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41534    fi
41535
41536    # The version variables used to create RC_FLAGS may be overridden
41537    # in a custom configure script, or possibly the command line.
41538    # Let those variables be expanded at make time in spec.gmk.
41539    # The \$ are escaped to the shell, and the $(...) variables
41540    # are evaluated by make.
41541    RC_FLAGS="$RC_FLAGS \
41542        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41543        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41544        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41545        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
41546        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41547        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41548        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41549  fi
41550
41551
41552  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41553    # silence copyright notice and other headers.
41554    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41555  fi
41556
41557  if test "x$SYSROOT" != "x"; then
41558    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41559      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41560        # Solaris Studio does not have a concept of sysroot. Instead we must
41561        # make sure the default include and lib dirs are appended to each
41562        # compile and link command line.
41563        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41564        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41565            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41566            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41567      fi
41568    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41569      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41570      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41571      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41572    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41573      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41574      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41575    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41576      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41577      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41578    fi
41579    # Propagate the sysroot args to hotspot
41580    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41581    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41582    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41583  fi
41584
41585  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41586  # set this here so it doesn't have to be peppered throughout the forest
41587  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41588    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41589    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41590  fi
41591
41592
41593
41594
41595
41596# FIXME: Currently we must test this after toolchain but before flags. Fix!
41597
41598# Now we can test some aspects on the target using configure macros.
41599
41600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41601$as_echo_n "checking for ANSI C header files... " >&6; }
41602if ${ac_cv_header_stdc+:} false; then :
41603  $as_echo_n "(cached) " >&6
41604else
41605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41606/* end confdefs.h.  */
41607#include <stdlib.h>
41608#include <stdarg.h>
41609#include <string.h>
41610#include <float.h>
41611
41612int
41613main ()
41614{
41615
41616  ;
41617  return 0;
41618}
41619_ACEOF
41620if ac_fn_cxx_try_compile "$LINENO"; then :
41621  ac_cv_header_stdc=yes
41622else
41623  ac_cv_header_stdc=no
41624fi
41625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41626
41627if test $ac_cv_header_stdc = yes; then
41628  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41630/* end confdefs.h.  */
41631#include <string.h>
41632
41633_ACEOF
41634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41635  $EGREP "memchr" >/dev/null 2>&1; then :
41636
41637else
41638  ac_cv_header_stdc=no
41639fi
41640rm -f conftest*
41641
41642fi
41643
41644if test $ac_cv_header_stdc = yes; then
41645  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41647/* end confdefs.h.  */
41648#include <stdlib.h>
41649
41650_ACEOF
41651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41652  $EGREP "free" >/dev/null 2>&1; then :
41653
41654else
41655  ac_cv_header_stdc=no
41656fi
41657rm -f conftest*
41658
41659fi
41660
41661if test $ac_cv_header_stdc = yes; then
41662  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41663  if test "$cross_compiling" = yes; then :
41664  :
41665else
41666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41667/* end confdefs.h.  */
41668#include <ctype.h>
41669#include <stdlib.h>
41670#if ((' ' & 0x0FF) == 0x020)
41671# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41672# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41673#else
41674# define ISLOWER(c) \
41675		   (('a' <= (c) && (c) <= 'i') \
41676		     || ('j' <= (c) && (c) <= 'r') \
41677		     || ('s' <= (c) && (c) <= 'z'))
41678# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41679#endif
41680
41681#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41682int
41683main ()
41684{
41685  int i;
41686  for (i = 0; i < 256; i++)
41687    if (XOR (islower (i), ISLOWER (i))
41688	|| toupper (i) != TOUPPER (i))
41689      return 2;
41690  return 0;
41691}
41692_ACEOF
41693if ac_fn_cxx_try_run "$LINENO"; then :
41694
41695else
41696  ac_cv_header_stdc=no
41697fi
41698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41699  conftest.$ac_objext conftest.beam conftest.$ac_ext
41700fi
41701
41702fi
41703fi
41704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41705$as_echo "$ac_cv_header_stdc" >&6; }
41706if test $ac_cv_header_stdc = yes; then
41707
41708$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41709
41710fi
41711
41712# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41713for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41714		  inttypes.h stdint.h unistd.h
41715do :
41716  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41717ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41718"
41719if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41720  cat >>confdefs.h <<_ACEOF
41721#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41722_ACEOF
41723
41724fi
41725
41726done
41727
41728
41729
41730  ###############################################################################
41731  #
41732  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41733  # (The JVM can use 32 or 64 bit Java pointers but that decision
41734  # is made at runtime.)
41735  #
41736
41737  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41738    # Always specify -m flag on Solaris
41739    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41740
41741  # When we add flags to the "official" CFLAGS etc, we need to
41742  # keep track of these additions in ADDED_CFLAGS etc. These
41743  # will later be checked to make sure only controlled additions
41744  # have been made to CFLAGS etc.
41745  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41746  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41747  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41748
41749  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41750  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41751  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41752
41753  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41754  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41755  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41756
41757  elif test "x$COMPILE_TYPE" = xreduced; then
41758    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41759      # Specify -m if running reduced on unix platforms
41760
41761  # When we add flags to the "official" CFLAGS etc, we need to
41762  # keep track of these additions in ADDED_CFLAGS etc. These
41763  # will later be checked to make sure only controlled additions
41764  # have been made to CFLAGS etc.
41765  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41766  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41767  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41768
41769  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41770  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41771  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41772
41773  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41774  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41775  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41776
41777    fi
41778  fi
41779
41780  # Make compilation sanity check
41781  for ac_header in stdio.h
41782do :
41783  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41784if test "x$ac_cv_header_stdio_h" = xyes; then :
41785  cat >>confdefs.h <<_ACEOF
41786#define HAVE_STDIO_H 1
41787_ACEOF
41788
41789else
41790
41791    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41792$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41793    if test "x$COMPILE_TYPE" = xreduced; then
41794      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41795$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41796    elif test "x$COMPILE_TYPE" = xcross; then
41797      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41798$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41799    fi
41800    as_fn_error $? "Cannot continue." "$LINENO" 5
41801
41802fi
41803
41804done
41805
41806
41807  # The cast to long int works around a bug in the HP C Compiler
41808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41810# This bug is HP SR number 8606223364.
41811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41812$as_echo_n "checking size of int *... " >&6; }
41813if ${ac_cv_sizeof_int_p+:} false; then :
41814  $as_echo_n "(cached) " >&6
41815else
41816  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41817
41818else
41819  if test "$ac_cv_type_int_p" = yes; then
41820     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41822as_fn_error 77 "cannot compute sizeof (int *)
41823See \`config.log' for more details" "$LINENO" 5; }
41824   else
41825     ac_cv_sizeof_int_p=0
41826   fi
41827fi
41828
41829fi
41830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41831$as_echo "$ac_cv_sizeof_int_p" >&6; }
41832
41833
41834
41835cat >>confdefs.h <<_ACEOF
41836#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41837_ACEOF
41838
41839
41840
41841  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41842  if test "x$ac_cv_sizeof_int_p" = x; then
41843    # The test failed, lets stick to the assumed value.
41844    { $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
41845$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41846  else
41847    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41848
41849    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41850      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41851      # Let's try to implicitely set the compilers target architecture and retry the test
41852      { $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
41853$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;}
41854      { $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
41855$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;}
41856
41857  # When we add flags to the "official" CFLAGS etc, we need to
41858  # keep track of these additions in ADDED_CFLAGS etc. These
41859  # will later be checked to make sure only controlled additions
41860  # have been made to CFLAGS etc.
41861  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41862  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41863  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41864
41865  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41866  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41867  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41868
41869  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41870  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41871  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41872
41873
41874      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41875      unset ac_cv_sizeof_int_p
41876      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41877      cat >>confdefs.h <<_ACEOF
41878#undef SIZEOF_INT_P
41879_ACEOF
41880
41881      # The cast to long int works around a bug in the HP C Compiler
41882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41884# This bug is HP SR number 8606223364.
41885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41886$as_echo_n "checking size of int *... " >&6; }
41887if ${ac_cv_sizeof_int_p+:} false; then :
41888  $as_echo_n "(cached) " >&6
41889else
41890  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41891
41892else
41893  if test "$ac_cv_type_int_p" = yes; then
41894     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41896as_fn_error 77 "cannot compute sizeof (int *)
41897See \`config.log' for more details" "$LINENO" 5; }
41898   else
41899     ac_cv_sizeof_int_p=0
41900   fi
41901fi
41902
41903fi
41904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41905$as_echo "$ac_cv_sizeof_int_p" >&6; }
41906
41907
41908
41909cat >>confdefs.h <<_ACEOF
41910#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41911_ACEOF
41912
41913
41914
41915      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41916
41917      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41918        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
41919      fi
41920    fi
41921  fi
41922
41923  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41924$as_echo_n "checking for target address size... " >&6; }
41925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41926$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41927
41928
41929  ###############################################################################
41930  #
41931  # Is the target little of big endian?
41932  #
41933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41934$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41935if ${ac_cv_c_bigendian+:} false; then :
41936  $as_echo_n "(cached) " >&6
41937else
41938  ac_cv_c_bigendian=unknown
41939    # See if we're dealing with a universal compiler.
41940    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41941/* end confdefs.h.  */
41942#ifndef __APPLE_CC__
41943	       not a universal capable compiler
41944	     #endif
41945	     typedef int dummy;
41946
41947_ACEOF
41948if ac_fn_cxx_try_compile "$LINENO"; then :
41949
41950	# Check for potential -arch flags.  It is not universal unless
41951	# there are at least two -arch flags with different values.
41952	ac_arch=
41953	ac_prev=
41954	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41955	 if test -n "$ac_prev"; then
41956	   case $ac_word in
41957	     i?86 | x86_64 | ppc | ppc64)
41958	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41959		 ac_arch=$ac_word
41960	       else
41961		 ac_cv_c_bigendian=universal
41962		 break
41963	       fi
41964	       ;;
41965	   esac
41966	   ac_prev=
41967	 elif test "x$ac_word" = "x-arch"; then
41968	   ac_prev=arch
41969	 fi
41970       done
41971fi
41972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41973    if test $ac_cv_c_bigendian = unknown; then
41974      # See if sys/param.h defines the BYTE_ORDER macro.
41975      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41976/* end confdefs.h.  */
41977#include <sys/types.h>
41978	     #include <sys/param.h>
41979
41980int
41981main ()
41982{
41983#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41984		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41985		     && LITTLE_ENDIAN)
41986	      bogus endian macros
41987	     #endif
41988
41989  ;
41990  return 0;
41991}
41992_ACEOF
41993if ac_fn_cxx_try_compile "$LINENO"; then :
41994  # It does; now see whether it defined to BIG_ENDIAN or not.
41995	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41996/* end confdefs.h.  */
41997#include <sys/types.h>
41998		#include <sys/param.h>
41999
42000int
42001main ()
42002{
42003#if BYTE_ORDER != BIG_ENDIAN
42004		 not big endian
42005		#endif
42006
42007  ;
42008  return 0;
42009}
42010_ACEOF
42011if ac_fn_cxx_try_compile "$LINENO"; then :
42012  ac_cv_c_bigendian=yes
42013else
42014  ac_cv_c_bigendian=no
42015fi
42016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42017fi
42018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42019    fi
42020    if test $ac_cv_c_bigendian = unknown; then
42021      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42022      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42023/* end confdefs.h.  */
42024#include <limits.h>
42025
42026int
42027main ()
42028{
42029#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42030	      bogus endian macros
42031	     #endif
42032
42033  ;
42034  return 0;
42035}
42036_ACEOF
42037if ac_fn_cxx_try_compile "$LINENO"; then :
42038  # It does; now see whether it defined to _BIG_ENDIAN or not.
42039	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42040/* end confdefs.h.  */
42041#include <limits.h>
42042
42043int
42044main ()
42045{
42046#ifndef _BIG_ENDIAN
42047		 not big endian
42048		#endif
42049
42050  ;
42051  return 0;
42052}
42053_ACEOF
42054if ac_fn_cxx_try_compile "$LINENO"; then :
42055  ac_cv_c_bigendian=yes
42056else
42057  ac_cv_c_bigendian=no
42058fi
42059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42060fi
42061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42062    fi
42063    if test $ac_cv_c_bigendian = unknown; then
42064      # Compile a test program.
42065      if test "$cross_compiling" = yes; then :
42066  # Try to guess by grepping values from an object file.
42067	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42068/* end confdefs.h.  */
42069short int ascii_mm[] =
42070		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42071		short int ascii_ii[] =
42072		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42073		int use_ascii (int i) {
42074		  return ascii_mm[i] + ascii_ii[i];
42075		}
42076		short int ebcdic_ii[] =
42077		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42078		short int ebcdic_mm[] =
42079		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42080		int use_ebcdic (int i) {
42081		  return ebcdic_mm[i] + ebcdic_ii[i];
42082		}
42083		extern int foo;
42084
42085int
42086main ()
42087{
42088return use_ascii (foo) == use_ebcdic (foo);
42089  ;
42090  return 0;
42091}
42092_ACEOF
42093if ac_fn_cxx_try_compile "$LINENO"; then :
42094  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42095	      ac_cv_c_bigendian=yes
42096	    fi
42097	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42098	      if test "$ac_cv_c_bigendian" = unknown; then
42099		ac_cv_c_bigendian=no
42100	      else
42101		# finding both strings is unlikely to happen, but who knows?
42102		ac_cv_c_bigendian=unknown
42103	      fi
42104	    fi
42105fi
42106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42107else
42108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42109/* end confdefs.h.  */
42110$ac_includes_default
42111int
42112main ()
42113{
42114
42115	     /* Are we little or big endian?  From Harbison&Steele.  */
42116	     union
42117	     {
42118	       long int l;
42119	       char c[sizeof (long int)];
42120	     } u;
42121	     u.l = 1;
42122	     return u.c[sizeof (long int) - 1] == 1;
42123
42124  ;
42125  return 0;
42126}
42127_ACEOF
42128if ac_fn_cxx_try_run "$LINENO"; then :
42129  ac_cv_c_bigendian=no
42130else
42131  ac_cv_c_bigendian=yes
42132fi
42133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42134  conftest.$ac_objext conftest.beam conftest.$ac_ext
42135fi
42136
42137    fi
42138fi
42139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42140$as_echo "$ac_cv_c_bigendian" >&6; }
42141 case $ac_cv_c_bigendian in #(
42142   yes)
42143     ENDIAN="big";; #(
42144   no)
42145     ENDIAN="little" ;; #(
42146   universal)
42147     ENDIAN="universal_endianness"
42148     ;; #(
42149   *)
42150     ENDIAN="unknown" ;;
42151 esac
42152
42153
42154  if test "x$ENDIAN" = xuniversal_endianness; then
42155    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42156  fi
42157  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42158    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
42159  fi
42160
42161
42162# Configure flags for the tools
42163
42164  ###############################################################################
42165  #
42166  # How to compile shared libraries.
42167  #
42168
42169  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42170    PICFLAG="-fPIC"
42171    C_FLAG_REORDER=''
42172    CXX_FLAG_REORDER=''
42173
42174    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42175      # Linking is different on MacOSX
42176      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42177      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42178      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42179      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42180      SET_SHARED_LIBRARY_MAPFILE=''
42181    else
42182      # Default works for linux, might work on other platforms as well.
42183      SHARED_LIBRARY_FLAGS='-shared'
42184      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42185      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42186      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42187      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42188    fi
42189  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42190    PICFLAG=''
42191    C_FLAG_REORDER=''
42192    CXX_FLAG_REORDER=''
42193
42194    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42195      # Linking is different on MacOSX
42196      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42197      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42198      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42199      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42200      SET_SHARED_LIBRARY_MAPFILE=''
42201    else
42202      # Default works for linux, might work on other platforms as well.
42203      SHARED_LIBRARY_FLAGS='-shared'
42204      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42205      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42206      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42207      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42208    fi
42209  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42210    PICFLAG="-KPIC"
42211    C_FLAG_REORDER='-xF'
42212    CXX_FLAG_REORDER='-xF'
42213    SHARED_LIBRARY_FLAGS="-G"
42214    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42215    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42216    SET_SHARED_LIBRARY_NAME=''
42217    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42218  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42219    PICFLAG="-qpic=large"
42220    C_FLAG_REORDER=''
42221    CXX_FLAG_REORDER=''
42222    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42223    SET_EXECUTABLE_ORIGIN=""
42224    SET_SHARED_LIBRARY_ORIGIN=''
42225    SET_SHARED_LIBRARY_NAME=''
42226    SET_SHARED_LIBRARY_MAPFILE=''
42227  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42228    PICFLAG=""
42229    C_FLAG_REORDER=''
42230    CXX_FLAG_REORDER=''
42231    SHARED_LIBRARY_FLAGS="-LD"
42232    SET_EXECUTABLE_ORIGIN=''
42233    SET_SHARED_LIBRARY_ORIGIN=''
42234    SET_SHARED_LIBRARY_NAME=''
42235    SET_SHARED_LIBRARY_MAPFILE=''
42236  fi
42237
42238
42239
42240
42241
42242
42243
42244
42245  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42246    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42247    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42248    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42249  fi
42250  # The (cross) compiler is now configured, we can now test capabilities
42251  # of the target platform.
42252
42253
42254
42255  ###############################################################################
42256  #
42257  # Setup the opt flags for different compilers
42258  # and different operating systems.
42259  #
42260
42261  # FIXME: this was indirectly the old default, but just inherited.
42262  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42263  #   C_FLAG_DEPS="-MMD -MF"
42264  # fi
42265
42266  # Generate make dependency files
42267  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42268    C_FLAG_DEPS="-MMD -MF"
42269  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42270    C_FLAG_DEPS="-MMD -MF"
42271  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42272    C_FLAG_DEPS="-xMMD -xMF"
42273  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42274    C_FLAG_DEPS="-qmakedep=gcc -MF"
42275  fi
42276  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42277
42278
42279
42280  # Debug symbols
42281  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42282    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42283      # reduce from default "-g2" option to save space
42284      CFLAGS_DEBUG_SYMBOLS="-g1"
42285      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42286    else
42287      CFLAGS_DEBUG_SYMBOLS="-g"
42288      CXXFLAGS_DEBUG_SYMBOLS="-g"
42289    fi
42290  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42291    CFLAGS_DEBUG_SYMBOLS="-g"
42292    CXXFLAGS_DEBUG_SYMBOLS="-g"
42293  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42294    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42295    # FIXME: likely a bug, this disables debug symbols rather than enables them
42296    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42297  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42298    CFLAGS_DEBUG_SYMBOLS="-g"
42299    CXXFLAGS_DEBUG_SYMBOLS="-g"
42300  fi
42301
42302
42303
42304  # bounds, memory and behavior checking options
42305  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42306    case $DEBUG_LEVEL in
42307    release )
42308      # no adjustment
42309      ;;
42310    fastdebug )
42311      # no adjustment
42312      ;;
42313    slowdebug )
42314      # Add runtime stack smashing and undefined behavior checks.
42315      # Not all versions of gcc support -fstack-protector
42316      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42317
42318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42319$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42320  supports=yes
42321
42322  saved_cflags="$CFLAGS"
42323  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42324  ac_ext=c
42325ac_cpp='$CPP $CPPFLAGS'
42326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42328ac_compiler_gnu=$ac_cv_c_compiler_gnu
42329
42330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42331/* end confdefs.h.  */
42332int i;
42333_ACEOF
42334if ac_fn_c_try_compile "$LINENO"; then :
42335
42336else
42337  supports=no
42338fi
42339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42340  ac_ext=cpp
42341ac_cpp='$CXXCPP $CPPFLAGS'
42342ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42343ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42344ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42345
42346  CFLAGS="$saved_cflags"
42347
42348  saved_cxxflags="$CXXFLAGS"
42349  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42350  ac_ext=cpp
42351ac_cpp='$CXXCPP $CPPFLAGS'
42352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42355
42356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42357/* end confdefs.h.  */
42358int i;
42359_ACEOF
42360if ac_fn_cxx_try_compile "$LINENO"; then :
42361
42362else
42363  supports=no
42364fi
42365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42366  ac_ext=cpp
42367ac_cpp='$CXXCPP $CPPFLAGS'
42368ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42369ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42370ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42371
42372  CXXFLAGS="$saved_cxxflags"
42373
42374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42375$as_echo "$supports" >&6; }
42376  if test "x$supports" = "xyes" ; then
42377    :
42378  else
42379    STACK_PROTECTOR_CFLAG=""
42380  fi
42381
42382
42383      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42384      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42385      ;;
42386    esac
42387  fi
42388
42389  # Optimization levels
42390  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42391    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42392
42393    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42394      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42395      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42396      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42397      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42398      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42399      C_O_FLAG_NONE="-xregs=no%frameptr"
42400      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42401      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42402      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42403      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42404      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42405      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42406        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42407        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42408      fi
42409    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42410      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42411      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42412      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42413      C_O_FLAG_DEBUG=""
42414      C_O_FLAG_NONE=""
42415      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42416      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42417      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42418      C_O_FLAG_DEBUG=""
42419      CXX_O_FLAG_NONE=""
42420    fi
42421  else
42422    # The remaining toolchains share opt flags between CC and CXX;
42423    # setup for C and duplicate afterwards.
42424    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42425      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42426        # On MacOSX we optimize for size, something
42427        # we should do for all platforms?
42428        C_O_FLAG_HIGHEST="-Os"
42429        C_O_FLAG_HI="-Os"
42430        C_O_FLAG_NORM="-Os"
42431      else
42432        C_O_FLAG_HIGHEST="-O3"
42433        C_O_FLAG_HI="-O3"
42434        C_O_FLAG_NORM="-O2"
42435      fi
42436      C_O_FLAG_DEBUG="-O0"
42437      C_O_FLAG_NONE="-O0"
42438    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42439      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42440        # On MacOSX we optimize for size, something
42441        # we should do for all platforms?
42442        C_O_FLAG_HIGHEST="-Os"
42443        C_O_FLAG_HI="-Os"
42444        C_O_FLAG_NORM="-Os"
42445      else
42446        C_O_FLAG_HIGHEST="-O3"
42447        C_O_FLAG_HI="-O3"
42448        C_O_FLAG_NORM="-O2"
42449      fi
42450      C_O_FLAG_DEBUG="-O0"
42451      C_O_FLAG_NONE="-O0"
42452    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42453      C_O_FLAG_HIGHEST="-O3"
42454      C_O_FLAG_HI="-O3 -qstrict"
42455      C_O_FLAG_NORM="-O2"
42456      C_O_FLAG_DEBUG="-qnoopt"
42457      C_O_FLAG_NONE="-qnoop"
42458    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42459      C_O_FLAG_HIGHEST="-O2"
42460      C_O_FLAG_HI="-O1"
42461      C_O_FLAG_NORM="-O1"
42462      C_O_FLAG_DEBUG="-Od"
42463      C_O_FLAG_NONE="-Od"
42464    fi
42465    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42466    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42467    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42468    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42469    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42470  fi
42471
42472  # Adjust optimization flags according to debug level.
42473  case $DEBUG_LEVEL in
42474    release )
42475      # no adjustment
42476      ;;
42477    fastdebug )
42478      # Not quite so much optimization
42479      C_O_FLAG_HI="$C_O_FLAG_NORM"
42480      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42481      ;;
42482    slowdebug )
42483      # Disable optimization
42484      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42485      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42486      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42487      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42488      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42489      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42490      ;;
42491  esac
42492
42493
42494
42495
42496
42497
42498
42499
42500
42501
42502
42503
42504
42505  # Special extras...
42506  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42507    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42508      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42509      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42510    fi
42511    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42512    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42513  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42514    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42515    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42516  fi
42517
42518  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42520$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42521  fi
42522
42523  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42525$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42526  fi
42527
42528  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42530$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42531  fi
42532
42533
42534# Check whether --with-extra-cflags was given.
42535if test "${with_extra_cflags+set}" = set; then :
42536  withval=$with_extra_cflags;
42537fi
42538
42539
42540
42541# Check whether --with-extra-cxxflags was given.
42542if test "${with_extra_cxxflags+set}" = set; then :
42543  withval=$with_extra_cxxflags;
42544fi
42545
42546
42547
42548# Check whether --with-extra-ldflags was given.
42549if test "${with_extra_ldflags+set}" = set; then :
42550  withval=$with_extra_ldflags;
42551fi
42552
42553
42554  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42555  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42556  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42557
42558  # Hotspot needs these set in their legacy form
42559  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42560  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42561  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42562
42563
42564
42565
42566
42567  ###############################################################################
42568  #
42569  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42570  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42571  #
42572
42573  # Setup compiler/platform specific flags into
42574  #    CFLAGS_JDK    - C Compiler flags
42575  #    CXXFLAGS_JDK  - C++ Compiler flags
42576  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42577  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42578    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42579      # Force compatibility with i586 on 32 bit intel platforms.
42580      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42581    fi
42582    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42583        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42584    case $OPENJDK_TARGET_CPU_ARCH in
42585      arm )
42586        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42587        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42588        ;;
42589      ppc )
42590        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42591        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42592        ;;
42593      * )
42594        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42595        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42596        ;;
42597    esac
42598  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42599    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42600    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42601      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42602    fi
42603
42604    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42605    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42606  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42607    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42608    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42609  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42610    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42611        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42612        -DWIN32_LEAN_AND_MEAN \
42613        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42614        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42615        -DWIN32 -DIAL"
42616    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42617      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42618    else
42619      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42620    fi
42621    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42622    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42623    # studio.
42624    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42625      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42626          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42627    fi
42628  fi
42629
42630  ###############################################################################
42631
42632  # Adjust flags according to debug level.
42633  case $DEBUG_LEVEL in
42634    fastdebug | slowdebug )
42635      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42636      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42637      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42638      ;;
42639    release )
42640      ;;
42641    * )
42642      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42643      ;;
42644  esac
42645
42646  # Setup LP64
42647  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42648
42649  # Set some common defines. These works for all compilers, but assume
42650  # -D is universally accepted.
42651
42652  # Setup endianness
42653  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42654    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42655    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42656    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42657    #   Note: -Dmacro         is the same as    #define macro 1
42658    #         -Dmacro=        is the same as    #define macro
42659    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42660      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42661    else
42662      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42663    fi
42664  else
42665    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42666    # are defined in the system?
42667    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42668      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42669    else
42670      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42671    fi
42672  fi
42673
42674  # Setup target OS define. Use OS target name but in upper case.
42675  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42676  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42677
42678  # Setup target CPU
42679  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42680
42681  # Setup debug/release defines
42682  if test "x$DEBUG_LEVEL" = xrelease; then
42683    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42684    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42685      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42686    fi
42687  else
42688    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42689  fi
42690
42691  # Set some additional per-OS defines.
42692  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42693    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42694  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42695    # FIXME: PPC64 should not be here.
42696    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42697  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42698    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42699  fi
42700
42701  # Additional macosx handling
42702  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42703    # Setting these parameters makes it an error to link to macosx APIs that are
42704    # newer than the given OS version and makes the linked binaries compatible
42705    # even if built on a newer version of the OS.
42706    # The expected format is X.Y.Z
42707    MACOSX_VERSION_MIN=10.7.0
42708
42709
42710    # The macro takes the version with no dots, ex: 1070
42711    # Let the flags variables get resolved in make for easier override on make
42712    # command line.
42713    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42714    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42715  fi
42716
42717  # Setup some hard coded includes
42718  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42719      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42720      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42721      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42722
42723  # The shared libraries are compiled using the picflag.
42724  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42725  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42726
42727  # Executable flags
42728  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42729  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42730
42731
42732
42733
42734
42735
42736  # Flags for compiling test libraries
42737  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42738  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42739
42740  # Flags for compiling test executables
42741  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42742  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42743
42744
42745
42746
42747
42748
42749  # Setup LDFLAGS et al.
42750  #
42751
42752  # Now this is odd. The JDK native libraries have to link against libjvm.so
42753  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42754  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42755  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42756  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42757  # libraries will link to whatever is in memory. Yuck.
42758  #
42759  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42760  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42761    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42762    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42763      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42764    fi
42765    # TODO: make -debug optional "--disable-full-debug-symbols"
42766    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42767  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42768    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42769    # We have previously set HAS_GNU_HASH if this is the case
42770    if test -n "$HAS_GNU_HASH"; then
42771      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42772    fi
42773    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42774      # And since we now know that the linker is gnu, then add -z defs, to forbid
42775      # undefined symbols in object files.
42776      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42777      case $DEBUG_LEVEL in
42778        release )
42779          # tell linker to optimize libraries.
42780          # Should this be supplied to the OSS linker as well?
42781          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42782          ;;
42783        slowdebug )
42784          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42785            # do relocations at load
42786            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42787            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42788          fi
42789          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42790            # mark relocations read only
42791            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42792            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42793          fi
42794          ;;
42795        fastdebug )
42796          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42797            # mark relocations read only
42798            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42799            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42800          fi
42801          ;;
42802        * )
42803          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42804          ;;
42805        esac
42806    fi
42807  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42808    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42809    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42810  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42811    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42812  fi
42813
42814  # Customize LDFLAGS for executables
42815
42816  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42817
42818  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42819    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42820      LDFLAGS_STACK_SIZE=1048576
42821    else
42822      LDFLAGS_STACK_SIZE=327680
42823    fi
42824    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42825  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42826    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42827  fi
42828
42829  # Customize LDFLAGS for libs
42830  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42831
42832  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42833    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42834    LDFLAGS_JDKLIB_SUFFIX=""
42835  else
42836    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42837        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42838
42839    # On some platforms (mac) the linker warns about non existing -L dirs.
42840    # Add server first if available. Linking aginst client does not always produce the same results.
42841    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42842    # Default to server for other variants.
42843    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42844      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42845    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42846      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42847    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42848      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42849    else
42850      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42851    fi
42852
42853    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42854    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42855      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42856    fi
42857  fi
42858
42859
42860
42861
42862
42863
42864
42865  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42866  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42867  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42868  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42869
42870
42871
42872
42873
42874
42875
42876  # Some Zero and Shark settings.
42877  # ZERO_ARCHFLAG tells the compiler which mode to build for
42878  case "${OPENJDK_TARGET_CPU}" in
42879    s390)
42880      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42881      ;;
42882    *)
42883      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42884  esac
42885
42886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42887$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42888  supports=yes
42889
42890  saved_cflags="$CFLAGS"
42891  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42892  ac_ext=c
42893ac_cpp='$CPP $CPPFLAGS'
42894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42896ac_compiler_gnu=$ac_cv_c_compiler_gnu
42897
42898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42899/* end confdefs.h.  */
42900int i;
42901_ACEOF
42902if ac_fn_c_try_compile "$LINENO"; then :
42903
42904else
42905  supports=no
42906fi
42907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42908  ac_ext=cpp
42909ac_cpp='$CXXCPP $CPPFLAGS'
42910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42913
42914  CFLAGS="$saved_cflags"
42915
42916  saved_cxxflags="$CXXFLAGS"
42917  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42918  ac_ext=cpp
42919ac_cpp='$CXXCPP $CPPFLAGS'
42920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42923
42924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42925/* end confdefs.h.  */
42926int i;
42927_ACEOF
42928if ac_fn_cxx_try_compile "$LINENO"; then :
42929
42930else
42931  supports=no
42932fi
42933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42934  ac_ext=cpp
42935ac_cpp='$CXXCPP $CPPFLAGS'
42936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42939
42940  CXXFLAGS="$saved_cxxflags"
42941
42942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42943$as_echo "$supports" >&6; }
42944  if test "x$supports" = "xyes" ; then
42945    :
42946  else
42947    ZERO_ARCHFLAG=""
42948  fi
42949
42950
42951
42952  # Check that the compiler supports -mX (or -qX on AIX) flags
42953  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42954
42955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42956$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42957  supports=yes
42958
42959  saved_cflags="$CFLAGS"
42960  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42961  ac_ext=c
42962ac_cpp='$CPP $CPPFLAGS'
42963ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42964ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42965ac_compiler_gnu=$ac_cv_c_compiler_gnu
42966
42967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42968/* end confdefs.h.  */
42969int i;
42970_ACEOF
42971if ac_fn_c_try_compile "$LINENO"; then :
42972
42973else
42974  supports=no
42975fi
42976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42977  ac_ext=cpp
42978ac_cpp='$CXXCPP $CPPFLAGS'
42979ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42980ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42981ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42982
42983  CFLAGS="$saved_cflags"
42984
42985  saved_cxxflags="$CXXFLAGS"
42986  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42987  ac_ext=cpp
42988ac_cpp='$CXXCPP $CPPFLAGS'
42989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42992
42993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42994/* end confdefs.h.  */
42995int i;
42996_ACEOF
42997if ac_fn_cxx_try_compile "$LINENO"; then :
42998
42999else
43000  supports=no
43001fi
43002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43003  ac_ext=cpp
43004ac_cpp='$CXXCPP $CPPFLAGS'
43005ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43006ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43007ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43008
43009  CXXFLAGS="$saved_cxxflags"
43010
43011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43012$as_echo "$supports" >&6; }
43013  if test "x$supports" = "xyes" ; then
43014    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43015  else
43016    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43017  fi
43018
43019
43020
43021  # Check whether --enable-warnings-as-errors was given.
43022if test "${enable_warnings_as_errors+set}" = set; then :
43023  enableval=$enable_warnings_as_errors;
43024fi
43025
43026
43027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43028$as_echo_n "checking if native warnings are errors... " >&6; }
43029  if test "x$enable_warnings_as_errors" = "xyes"; then
43030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43031$as_echo "yes (explicitely set)" >&6; }
43032    WARNINGS_AS_ERRORS=true
43033  elif test "x$enable_warnings_as_errors" = "xno"; then
43034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43035$as_echo "no" >&6; }
43036    WARNINGS_AS_ERRORS=false
43037  elif test "x$enable_warnings_as_errors" = "x"; then
43038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43039$as_echo "yes (default)" >&6; }
43040    WARNINGS_AS_ERRORS=true
43041  else
43042    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43043  fi
43044
43045
43046  case "${TOOLCHAIN_TYPE}" in
43047    microsoft)
43048      DISABLE_WARNING_PREFIX="-wd"
43049      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43050      ;;
43051    solstudio)
43052      DISABLE_WARNING_PREFIX="-erroff="
43053      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43054      ;;
43055    gcc)
43056      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43057
43058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43059$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43060  supports=yes
43061
43062  saved_cflags="$CFLAGS"
43063  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43064  ac_ext=c
43065ac_cpp='$CPP $CPPFLAGS'
43066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43068ac_compiler_gnu=$ac_cv_c_compiler_gnu
43069
43070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43071/* end confdefs.h.  */
43072int i;
43073_ACEOF
43074if ac_fn_c_try_compile "$LINENO"; then :
43075
43076else
43077  supports=no
43078fi
43079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43080  ac_ext=cpp
43081ac_cpp='$CXXCPP $CPPFLAGS'
43082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43085
43086  CFLAGS="$saved_cflags"
43087
43088  saved_cxxflags="$CXXFLAGS"
43089  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43090  ac_ext=cpp
43091ac_cpp='$CXXCPP $CPPFLAGS'
43092ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43093ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43094ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43095
43096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43097/* end confdefs.h.  */
43098int i;
43099_ACEOF
43100if ac_fn_cxx_try_compile "$LINENO"; then :
43101
43102else
43103  supports=no
43104fi
43105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43106  ac_ext=cpp
43107ac_cpp='$CXXCPP $CPPFLAGS'
43108ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43109ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43110ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43111
43112  CXXFLAGS="$saved_cxxflags"
43113
43114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43115$as_echo "$supports" >&6; }
43116  if test "x$supports" = "xyes" ; then
43117    GCC_CAN_DISABLE_WARNINGS=true
43118  else
43119    GCC_CAN_DISABLE_WARNINGS=false
43120
43121  fi
43122
43123      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43124        DISABLE_WARNING_PREFIX="-Wno-"
43125      else
43126        DISABLE_WARNING_PREFIX=
43127      fi
43128      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43129      ;;
43130    clang)
43131      DISABLE_WARNING_PREFIX="-Wno-"
43132      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43133      ;;
43134  esac
43135
43136
43137
43138
43139# Setup debug symbols (need objcopy from the toolchain for that)
43140
43141  #
43142  # ENABLE_DEBUG_SYMBOLS
43143  # This must be done after the toolchain is setup, since we're looking at objcopy.
43144  #
43145  # Check whether --enable-debug-symbols was given.
43146if test "${enable_debug_symbols+set}" = set; then :
43147  enableval=$enable_debug_symbols;
43148fi
43149
43150
43151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43152$as_echo_n "checking if we should generate debug symbols... " >&6; }
43153
43154  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43155    # explicit enabling of enable-debug-symbols and can't find objcopy
43156    #   this is an error
43157    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43158  fi
43159
43160  if test "x$enable_debug_symbols" = "xyes"; then
43161    ENABLE_DEBUG_SYMBOLS=true
43162  elif test "x$enable_debug_symbols" = "xno"; then
43163    ENABLE_DEBUG_SYMBOLS=false
43164  else
43165    # Default is on if objcopy is found
43166    if test "x$OBJCOPY" != x; then
43167      ENABLE_DEBUG_SYMBOLS=true
43168    # MacOS X and Windows don't use objcopy but default is on for those OSes
43169    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43170      ENABLE_DEBUG_SYMBOLS=true
43171    else
43172      ENABLE_DEBUG_SYMBOLS=false
43173    fi
43174  fi
43175
43176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43177$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43178
43179  #
43180  # ZIP_DEBUGINFO_FILES
43181  #
43182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43183$as_echo_n "checking if we should zip debug-info files... " >&6; }
43184  # Check whether --enable-zip-debug-info was given.
43185if test "${enable_zip_debug_info+set}" = set; then :
43186  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43187else
43188  enable_zip_debug_info="yes"
43189fi
43190
43191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43192$as_echo "${enable_zip_debug_info}" >&6; }
43193
43194  if test "x${enable_zip_debug_info}" = "xno"; then
43195    ZIP_DEBUGINFO_FILES=false
43196  else
43197    ZIP_DEBUGINFO_FILES=true
43198  fi
43199
43200
43201
43202
43203
43204  # Check whether --enable-native-coverage was given.
43205if test "${enable_native_coverage+set}" = set; then :
43206  enableval=$enable_native_coverage;
43207fi
43208
43209  GCOV_ENABLED="false"
43210  if test "x$enable_native_coverage" = "xyes"; then
43211    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43213$as_echo_n "checking if native coverage is enabled... " >&6; }
43214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43215$as_echo "yes" >&6; }
43216      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43217      GCOV_LDFLAGS="-fprofile-arcs"
43218      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43219      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43220      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43221      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43222      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43223      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43224      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43225      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43226      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43227      GCOV_ENABLED="true"
43228    else
43229      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43230    fi
43231  elif test "x$enable_native_coverage" = "xno"; then
43232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43233$as_echo_n "checking if native coverage is enabled... " >&6; }
43234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43235$as_echo "no" >&6; }
43236  elif test "x$enable_native_coverage" != "x"; then
43237    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43238  fi
43239
43240
43241
43242
43243###############################################################################
43244#
43245# Check dependencies for external and internal libraries.
43246#
43247###############################################################################
43248
43249# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43250
43251  # When using cygwin or msys, we need a wrapper binary that renames
43252  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43253  # @files and rewrites these too! This wrapper binary is
43254  # called fixpath.
43255  FIXPATH=
43256  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43258$as_echo_n "checking if fixpath can be created... " >&6; }
43259    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43260    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43261    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43262    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43263      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43264      FIXPATH="$FIXPATH_BIN -c"
43265    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43266      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43267      # @ was chosen as separator to minimize risk of other tools messing around with it
43268      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43269          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43270      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43271      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43272    fi
43273    FIXPATH_SRC_W="$FIXPATH_SRC"
43274    FIXPATH_BIN_W="$FIXPATH_BIN"
43275
43276  unix_path="$FIXPATH_SRC_W"
43277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43278    windows_path=`$CYGPATH -m "$unix_path"`
43279    FIXPATH_SRC_W="$windows_path"
43280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43281    windows_path=`cmd //c echo $unix_path`
43282    FIXPATH_SRC_W="$windows_path"
43283  fi
43284
43285
43286  unix_path="$FIXPATH_BIN_W"
43287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43288    windows_path=`$CYGPATH -m "$unix_path"`
43289    FIXPATH_BIN_W="$windows_path"
43290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43291    windows_path=`cmd //c echo $unix_path`
43292    FIXPATH_BIN_W="$windows_path"
43293  fi
43294
43295    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43296    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43297    cd $FIXPATH_DIR
43298    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43299    cd $CURDIR
43300
43301    if test ! -x $FIXPATH_BIN; then
43302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43303$as_echo "no" >&6; }
43304      cat $FIXPATH_DIR/fixpath1.log
43305      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43306    fi
43307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43308$as_echo "yes" >&6; }
43309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43310$as_echo_n "checking if fixpath.exe works... " >&6; }
43311    cd $FIXPATH_DIR
43312    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43313        > $FIXPATH_DIR/fixpath2.log 2>&1
43314    cd $CURDIR
43315    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43317$as_echo "no" >&6; }
43318      cat $FIXPATH_DIR/fixpath2.log
43319      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43320    fi
43321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43322$as_echo "yes" >&6; }
43323  fi
43324
43325
43326
43327
43328
43329
43330  ###############################################################################
43331  #
43332  # OS specific settings that we never will need to probe.
43333  #
43334  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43336$as_echo_n "checking what is not needed on Linux?... " >&6; }
43337    PULSE_NOT_NEEDED=yes
43338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43339$as_echo "pulse" >&6; }
43340  fi
43341
43342  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43344$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43345    ALSA_NOT_NEEDED=yes
43346    PULSE_NOT_NEEDED=yes
43347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43348$as_echo "alsa pulse" >&6; }
43349  fi
43350
43351  if test "x$OPENJDK_TARGET_OS" = xaix; then
43352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43353$as_echo_n "checking what is not needed on AIX?... " >&6; }
43354    ALSA_NOT_NEEDED=yes
43355    PULSE_NOT_NEEDED=yes
43356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43357$as_echo "alsa pulse" >&6; }
43358  fi
43359
43360
43361  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43363$as_echo_n "checking what is not needed on Windows?... " >&6; }
43364    CUPS_NOT_NEEDED=yes
43365    ALSA_NOT_NEEDED=yes
43366    PULSE_NOT_NEEDED=yes
43367    X11_NOT_NEEDED=yes
43368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43369$as_echo "alsa cups pulse x11" >&6; }
43370  fi
43371
43372  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43374$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43375    ALSA_NOT_NEEDED=yes
43376    PULSE_NOT_NEEDED=yes
43377    X11_NOT_NEEDED=yes
43378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43379$as_echo "alsa pulse x11" >&6; }
43380  fi
43381
43382  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43384$as_echo_n "checking what is not needed on bsd?... " >&6; }
43385    ALSA_NOT_NEEDED=yes
43386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43387$as_echo "alsa" >&6; }
43388  fi
43389
43390  if test "x$OPENJDK" = "xfalse"; then
43391    FREETYPE_NOT_NEEDED=yes
43392  fi
43393
43394  if test "x$SUPPORT_HEADFUL" = xno; then
43395    X11_NOT_NEEDED=yes
43396  fi
43397
43398
43399
43400  ###############################################################################
43401  #
43402  # Check for X Windows
43403  #
43404
43405  if test "x$X11_NOT_NEEDED" = xyes; then
43406    if test "x${with_x}" != x; then
43407      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43408$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43409    fi
43410    X_CFLAGS=
43411    X_LIBS=
43412  else
43413    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43414    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43415    # --x-libraries for the sysroot, if that seems to be correct.
43416    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43417      if test "x$SYSROOT" != "x"; then
43418        if test "x$x_includes" = xNONE; then
43419          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43420            x_includes="$SYSROOT/usr/X11R6/include"
43421          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43422            x_includes="$SYSROOT/usr/include"
43423          fi
43424        fi
43425        if test "x$x_libraries" = xNONE; then
43426          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43427            x_libraries="$SYSROOT/usr/X11R6/lib"
43428          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43429            x_libraries="$SYSROOT/usr/lib64"
43430          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43431            x_libraries="$SYSROOT/usr/lib"
43432          fi
43433        fi
43434      fi
43435    fi
43436
43437    # Now let autoconf do it's magic
43438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43439$as_echo_n "checking for X... " >&6; }
43440
43441
43442# Check whether --with-x was given.
43443if test "${with_x+set}" = set; then :
43444  withval=$with_x;
43445fi
43446
43447# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43448if test "x$with_x" = xno; then
43449  # The user explicitly disabled X.
43450  have_x=disabled
43451else
43452  case $x_includes,$x_libraries in #(
43453    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43454    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43455  $as_echo_n "(cached) " >&6
43456else
43457  # One or both of the vars are not set, and there is no cached value.
43458ac_x_includes=no ac_x_libraries=no
43459rm -f -r conftest.dir
43460if mkdir conftest.dir; then
43461  cd conftest.dir
43462  cat >Imakefile <<'_ACEOF'
43463incroot:
43464	@echo incroot='${INCROOT}'
43465usrlibdir:
43466	@echo usrlibdir='${USRLIBDIR}'
43467libdir:
43468	@echo libdir='${LIBDIR}'
43469_ACEOF
43470  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43471    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43472    for ac_var in incroot usrlibdir libdir; do
43473      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43474    done
43475    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43476    for ac_extension in a so sl dylib la dll; do
43477      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43478	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43479	ac_im_usrlibdir=$ac_im_libdir; break
43480      fi
43481    done
43482    # Screen out bogus values from the imake configuration.  They are
43483    # bogus both because they are the default anyway, and because
43484    # using them would break gcc on systems where it needs fixed includes.
43485    case $ac_im_incroot in
43486	/usr/include) ac_x_includes= ;;
43487	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43488    esac
43489    case $ac_im_usrlibdir in
43490	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43491	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43492    esac
43493  fi
43494  cd ..
43495  rm -f -r conftest.dir
43496fi
43497
43498# Standard set of common directories for X headers.
43499# Check X11 before X11Rn because it is often a symlink to the current release.
43500ac_x_header_dirs='
43501/usr/X11/include
43502/usr/X11R7/include
43503/usr/X11R6/include
43504/usr/X11R5/include
43505/usr/X11R4/include
43506
43507/usr/include/X11
43508/usr/include/X11R7
43509/usr/include/X11R6
43510/usr/include/X11R5
43511/usr/include/X11R4
43512
43513/usr/local/X11/include
43514/usr/local/X11R7/include
43515/usr/local/X11R6/include
43516/usr/local/X11R5/include
43517/usr/local/X11R4/include
43518
43519/usr/local/include/X11
43520/usr/local/include/X11R7
43521/usr/local/include/X11R6
43522/usr/local/include/X11R5
43523/usr/local/include/X11R4
43524
43525/usr/X386/include
43526/usr/x386/include
43527/usr/XFree86/include/X11
43528
43529/usr/include
43530/usr/local/include
43531/usr/unsupported/include
43532/usr/athena/include
43533/usr/local/x11r5/include
43534/usr/lpp/Xamples/include
43535
43536/usr/openwin/include
43537/usr/openwin/share/include'
43538
43539if test "$ac_x_includes" = no; then
43540  # Guess where to find include files, by looking for Xlib.h.
43541  # First, try using that file with no special directory specified.
43542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43543/* end confdefs.h.  */
43544#include <X11/Xlib.h>
43545_ACEOF
43546if ac_fn_cxx_try_cpp "$LINENO"; then :
43547  # We can compile using X headers with no special include directory.
43548ac_x_includes=
43549else
43550  for ac_dir in $ac_x_header_dirs; do
43551  if test -r "$ac_dir/X11/Xlib.h"; then
43552    ac_x_includes=$ac_dir
43553    break
43554  fi
43555done
43556fi
43557rm -f conftest.err conftest.i conftest.$ac_ext
43558fi # $ac_x_includes = no
43559
43560if test "$ac_x_libraries" = no; then
43561  # Check for the libraries.
43562  # See if we find them without any special options.
43563  # Don't add to $LIBS permanently.
43564  ac_save_LIBS=$LIBS
43565  LIBS="-lX11 $LIBS"
43566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43567/* end confdefs.h.  */
43568#include <X11/Xlib.h>
43569int
43570main ()
43571{
43572XrmInitialize ()
43573  ;
43574  return 0;
43575}
43576_ACEOF
43577if ac_fn_cxx_try_link "$LINENO"; then :
43578  LIBS=$ac_save_LIBS
43579# We can link X programs with no special library path.
43580ac_x_libraries=
43581else
43582  LIBS=$ac_save_LIBS
43583for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43584do
43585  # Don't even attempt the hair of trying to link an X program!
43586  for ac_extension in a so sl dylib la dll; do
43587    if test -r "$ac_dir/libX11.$ac_extension"; then
43588      ac_x_libraries=$ac_dir
43589      break 2
43590    fi
43591  done
43592done
43593fi
43594rm -f core conftest.err conftest.$ac_objext \
43595    conftest$ac_exeext conftest.$ac_ext
43596fi # $ac_x_libraries = no
43597
43598case $ac_x_includes,$ac_x_libraries in #(
43599  no,* | *,no | *\'*)
43600    # Didn't find X, or a directory has "'" in its name.
43601    ac_cv_have_x="have_x=no";; #(
43602  *)
43603    # Record where we found X for the cache.
43604    ac_cv_have_x="have_x=yes\
43605	ac_x_includes='$ac_x_includes'\
43606	ac_x_libraries='$ac_x_libraries'"
43607esac
43608fi
43609;; #(
43610    *) have_x=yes;;
43611  esac
43612  eval "$ac_cv_have_x"
43613fi # $with_x != no
43614
43615if test "$have_x" != yes; then
43616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43617$as_echo "$have_x" >&6; }
43618  no_x=yes
43619else
43620  # If each of the values was on the command line, it overrides each guess.
43621  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43622  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43623  # Update the cache value to reflect the command line values.
43624  ac_cv_have_x="have_x=yes\
43625	ac_x_includes='$x_includes'\
43626	ac_x_libraries='$x_libraries'"
43627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43628$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43629fi
43630
43631    if test "$no_x" = yes; then
43632  # Not all programs may use this symbol, but it does not hurt to define it.
43633
43634$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43635
43636  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43637else
43638  if test -n "$x_includes"; then
43639    X_CFLAGS="$X_CFLAGS -I$x_includes"
43640  fi
43641
43642  # It would also be nice to do this for all -L options, not just this one.
43643  if test -n "$x_libraries"; then
43644    X_LIBS="$X_LIBS -L$x_libraries"
43645    # For Solaris; some versions of Sun CC require a space after -R and
43646    # others require no space.  Words are not sufficient . . . .
43647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43648$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43649    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43650    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43651    ac_cxx_werror_flag=yes
43652    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43653/* end confdefs.h.  */
43654
43655int
43656main ()
43657{
43658
43659  ;
43660  return 0;
43661}
43662_ACEOF
43663if ac_fn_cxx_try_link "$LINENO"; then :
43664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43665$as_echo "no" >&6; }
43666       X_LIBS="$X_LIBS -R$x_libraries"
43667else
43668  LIBS="$ac_xsave_LIBS -R $x_libraries"
43669       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43670/* end confdefs.h.  */
43671
43672int
43673main ()
43674{
43675
43676  ;
43677  return 0;
43678}
43679_ACEOF
43680if ac_fn_cxx_try_link "$LINENO"; then :
43681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43682$as_echo "yes" >&6; }
43683	  X_LIBS="$X_LIBS -R $x_libraries"
43684else
43685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43686$as_echo "neither works" >&6; }
43687fi
43688rm -f core conftest.err conftest.$ac_objext \
43689    conftest$ac_exeext conftest.$ac_ext
43690fi
43691rm -f core conftest.err conftest.$ac_objext \
43692    conftest$ac_exeext conftest.$ac_ext
43693    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43694    LIBS=$ac_xsave_LIBS
43695  fi
43696
43697  # Check for system-dependent libraries X programs must link with.
43698  # Do this before checking for the system-independent R6 libraries
43699  # (-lICE), since we may need -lsocket or whatever for X linking.
43700
43701  if test "$ISC" = yes; then
43702    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43703  else
43704    # Martyn Johnson says this is needed for Ultrix, if the X
43705    # libraries were built with DECnet support.  And Karl Berry says
43706    # the Alpha needs dnet_stub (dnet does not exist).
43707    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43708    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43709/* end confdefs.h.  */
43710
43711/* Override any GCC internal prototype to avoid an error.
43712   Use char because int might match the return type of a GCC
43713   builtin and then its argument prototype would still apply.  */
43714#ifdef __cplusplus
43715extern "C"
43716#endif
43717char XOpenDisplay ();
43718int
43719main ()
43720{
43721return XOpenDisplay ();
43722  ;
43723  return 0;
43724}
43725_ACEOF
43726if ac_fn_cxx_try_link "$LINENO"; then :
43727
43728else
43729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43730$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43731if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43732  $as_echo_n "(cached) " >&6
43733else
43734  ac_check_lib_save_LIBS=$LIBS
43735LIBS="-ldnet  $LIBS"
43736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43737/* end confdefs.h.  */
43738
43739/* Override any GCC internal prototype to avoid an error.
43740   Use char because int might match the return type of a GCC
43741   builtin and then its argument prototype would still apply.  */
43742#ifdef __cplusplus
43743extern "C"
43744#endif
43745char dnet_ntoa ();
43746int
43747main ()
43748{
43749return dnet_ntoa ();
43750  ;
43751  return 0;
43752}
43753_ACEOF
43754if ac_fn_cxx_try_link "$LINENO"; then :
43755  ac_cv_lib_dnet_dnet_ntoa=yes
43756else
43757  ac_cv_lib_dnet_dnet_ntoa=no
43758fi
43759rm -f core conftest.err conftest.$ac_objext \
43760    conftest$ac_exeext conftest.$ac_ext
43761LIBS=$ac_check_lib_save_LIBS
43762fi
43763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43764$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43765if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43766  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43767fi
43768
43769    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43771$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43772if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43773  $as_echo_n "(cached) " >&6
43774else
43775  ac_check_lib_save_LIBS=$LIBS
43776LIBS="-ldnet_stub  $LIBS"
43777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43778/* end confdefs.h.  */
43779
43780/* Override any GCC internal prototype to avoid an error.
43781   Use char because int might match the return type of a GCC
43782   builtin and then its argument prototype would still apply.  */
43783#ifdef __cplusplus
43784extern "C"
43785#endif
43786char dnet_ntoa ();
43787int
43788main ()
43789{
43790return dnet_ntoa ();
43791  ;
43792  return 0;
43793}
43794_ACEOF
43795if ac_fn_cxx_try_link "$LINENO"; then :
43796  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43797else
43798  ac_cv_lib_dnet_stub_dnet_ntoa=no
43799fi
43800rm -f core conftest.err conftest.$ac_objext \
43801    conftest$ac_exeext conftest.$ac_ext
43802LIBS=$ac_check_lib_save_LIBS
43803fi
43804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43805$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43806if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43807  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43808fi
43809
43810    fi
43811fi
43812rm -f core conftest.err conftest.$ac_objext \
43813    conftest$ac_exeext conftest.$ac_ext
43814    LIBS="$ac_xsave_LIBS"
43815
43816    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43817    # to get the SysV transport functions.
43818    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43819    # needs -lnsl.
43820    # The nsl library prevents programs from opening the X display
43821    # on Irix 5.2, according to T.E. Dickey.
43822    # The functions gethostbyname, getservbyname, and inet_addr are
43823    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43824    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43825if test "x$ac_cv_func_gethostbyname" = xyes; then :
43826
43827fi
43828
43829    if test $ac_cv_func_gethostbyname = no; then
43830      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43831$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43832if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43833  $as_echo_n "(cached) " >&6
43834else
43835  ac_check_lib_save_LIBS=$LIBS
43836LIBS="-lnsl  $LIBS"
43837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43838/* end confdefs.h.  */
43839
43840/* Override any GCC internal prototype to avoid an error.
43841   Use char because int might match the return type of a GCC
43842   builtin and then its argument prototype would still apply.  */
43843#ifdef __cplusplus
43844extern "C"
43845#endif
43846char gethostbyname ();
43847int
43848main ()
43849{
43850return gethostbyname ();
43851  ;
43852  return 0;
43853}
43854_ACEOF
43855if ac_fn_cxx_try_link "$LINENO"; then :
43856  ac_cv_lib_nsl_gethostbyname=yes
43857else
43858  ac_cv_lib_nsl_gethostbyname=no
43859fi
43860rm -f core conftest.err conftest.$ac_objext \
43861    conftest$ac_exeext conftest.$ac_ext
43862LIBS=$ac_check_lib_save_LIBS
43863fi
43864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43865$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43866if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43867  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43868fi
43869
43870      if test $ac_cv_lib_nsl_gethostbyname = no; then
43871	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43872$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43873if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43874  $as_echo_n "(cached) " >&6
43875else
43876  ac_check_lib_save_LIBS=$LIBS
43877LIBS="-lbsd  $LIBS"
43878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43879/* end confdefs.h.  */
43880
43881/* Override any GCC internal prototype to avoid an error.
43882   Use char because int might match the return type of a GCC
43883   builtin and then its argument prototype would still apply.  */
43884#ifdef __cplusplus
43885extern "C"
43886#endif
43887char gethostbyname ();
43888int
43889main ()
43890{
43891return gethostbyname ();
43892  ;
43893  return 0;
43894}
43895_ACEOF
43896if ac_fn_cxx_try_link "$LINENO"; then :
43897  ac_cv_lib_bsd_gethostbyname=yes
43898else
43899  ac_cv_lib_bsd_gethostbyname=no
43900fi
43901rm -f core conftest.err conftest.$ac_objext \
43902    conftest$ac_exeext conftest.$ac_ext
43903LIBS=$ac_check_lib_save_LIBS
43904fi
43905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43906$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43907if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43908  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43909fi
43910
43911      fi
43912    fi
43913
43914    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43915    # socket/setsockopt and other routines are undefined under SCO ODT
43916    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43917    # on later versions), says Simon Leinen: it contains gethostby*
43918    # variants that don't use the name server (or something).  -lsocket
43919    # must be given before -lnsl if both are needed.  We assume that
43920    # if connect needs -lnsl, so does gethostbyname.
43921    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43922if test "x$ac_cv_func_connect" = xyes; then :
43923
43924fi
43925
43926    if test $ac_cv_func_connect = no; then
43927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43928$as_echo_n "checking for connect in -lsocket... " >&6; }
43929if ${ac_cv_lib_socket_connect+:} false; then :
43930  $as_echo_n "(cached) " >&6
43931else
43932  ac_check_lib_save_LIBS=$LIBS
43933LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43935/* end confdefs.h.  */
43936
43937/* Override any GCC internal prototype to avoid an error.
43938   Use char because int might match the return type of a GCC
43939   builtin and then its argument prototype would still apply.  */
43940#ifdef __cplusplus
43941extern "C"
43942#endif
43943char connect ();
43944int
43945main ()
43946{
43947return connect ();
43948  ;
43949  return 0;
43950}
43951_ACEOF
43952if ac_fn_cxx_try_link "$LINENO"; then :
43953  ac_cv_lib_socket_connect=yes
43954else
43955  ac_cv_lib_socket_connect=no
43956fi
43957rm -f core conftest.err conftest.$ac_objext \
43958    conftest$ac_exeext conftest.$ac_ext
43959LIBS=$ac_check_lib_save_LIBS
43960fi
43961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43962$as_echo "$ac_cv_lib_socket_connect" >&6; }
43963if test "x$ac_cv_lib_socket_connect" = xyes; then :
43964  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43965fi
43966
43967    fi
43968
43969    # Guillermo Gomez says -lposix is necessary on A/UX.
43970    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43971if test "x$ac_cv_func_remove" = xyes; then :
43972
43973fi
43974
43975    if test $ac_cv_func_remove = no; then
43976      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43977$as_echo_n "checking for remove in -lposix... " >&6; }
43978if ${ac_cv_lib_posix_remove+:} false; then :
43979  $as_echo_n "(cached) " >&6
43980else
43981  ac_check_lib_save_LIBS=$LIBS
43982LIBS="-lposix  $LIBS"
43983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43984/* end confdefs.h.  */
43985
43986/* Override any GCC internal prototype to avoid an error.
43987   Use char because int might match the return type of a GCC
43988   builtin and then its argument prototype would still apply.  */
43989#ifdef __cplusplus
43990extern "C"
43991#endif
43992char remove ();
43993int
43994main ()
43995{
43996return remove ();
43997  ;
43998  return 0;
43999}
44000_ACEOF
44001if ac_fn_cxx_try_link "$LINENO"; then :
44002  ac_cv_lib_posix_remove=yes
44003else
44004  ac_cv_lib_posix_remove=no
44005fi
44006rm -f core conftest.err conftest.$ac_objext \
44007    conftest$ac_exeext conftest.$ac_ext
44008LIBS=$ac_check_lib_save_LIBS
44009fi
44010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44011$as_echo "$ac_cv_lib_posix_remove" >&6; }
44012if test "x$ac_cv_lib_posix_remove" = xyes; then :
44013  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44014fi
44015
44016    fi
44017
44018    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44019    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44020if test "x$ac_cv_func_shmat" = xyes; then :
44021
44022fi
44023
44024    if test $ac_cv_func_shmat = no; then
44025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44026$as_echo_n "checking for shmat in -lipc... " >&6; }
44027if ${ac_cv_lib_ipc_shmat+:} false; then :
44028  $as_echo_n "(cached) " >&6
44029else
44030  ac_check_lib_save_LIBS=$LIBS
44031LIBS="-lipc  $LIBS"
44032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44033/* end confdefs.h.  */
44034
44035/* Override any GCC internal prototype to avoid an error.
44036   Use char because int might match the return type of a GCC
44037   builtin and then its argument prototype would still apply.  */
44038#ifdef __cplusplus
44039extern "C"
44040#endif
44041char shmat ();
44042int
44043main ()
44044{
44045return shmat ();
44046  ;
44047  return 0;
44048}
44049_ACEOF
44050if ac_fn_cxx_try_link "$LINENO"; then :
44051  ac_cv_lib_ipc_shmat=yes
44052else
44053  ac_cv_lib_ipc_shmat=no
44054fi
44055rm -f core conftest.err conftest.$ac_objext \
44056    conftest$ac_exeext conftest.$ac_ext
44057LIBS=$ac_check_lib_save_LIBS
44058fi
44059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44060$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44061if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44062  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44063fi
44064
44065    fi
44066  fi
44067
44068  # Check for libraries that X11R6 Xt/Xaw programs need.
44069  ac_save_LDFLAGS=$LDFLAGS
44070  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44071  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44072  # check for ICE first), but we must link in the order -lSM -lICE or
44073  # we get undefined symbols.  So assume we have SM if we have ICE.
44074  # These have to be linked with before -lX11, unlike the other
44075  # libraries we check for below, so use a different variable.
44076  # John Interrante, Karl Berry
44077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44078$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44079if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44080  $as_echo_n "(cached) " >&6
44081else
44082  ac_check_lib_save_LIBS=$LIBS
44083LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44085/* end confdefs.h.  */
44086
44087/* Override any GCC internal prototype to avoid an error.
44088   Use char because int might match the return type of a GCC
44089   builtin and then its argument prototype would still apply.  */
44090#ifdef __cplusplus
44091extern "C"
44092#endif
44093char IceConnectionNumber ();
44094int
44095main ()
44096{
44097return IceConnectionNumber ();
44098  ;
44099  return 0;
44100}
44101_ACEOF
44102if ac_fn_cxx_try_link "$LINENO"; then :
44103  ac_cv_lib_ICE_IceConnectionNumber=yes
44104else
44105  ac_cv_lib_ICE_IceConnectionNumber=no
44106fi
44107rm -f core conftest.err conftest.$ac_objext \
44108    conftest$ac_exeext conftest.$ac_ext
44109LIBS=$ac_check_lib_save_LIBS
44110fi
44111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44112$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44113if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44114  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44115fi
44116
44117  LDFLAGS=$ac_save_LDFLAGS
44118
44119fi
44120
44121
44122    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44123    # this doesn't make sense so we remove it.
44124    if test "x$COMPILE_TYPE" = xcross; then
44125      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44126    fi
44127
44128    if test "x$no_x" = xyes; then
44129
44130  # Print a helpful message on how to acquire the necessary build dependency.
44131  # x11 is the help tag: freetype, cups, pulse, alsa etc
44132  MISSING_DEPENDENCY=x11
44133
44134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44135    cygwin_help $MISSING_DEPENDENCY
44136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44137    msys_help $MISSING_DEPENDENCY
44138  else
44139    PKGHANDLER_COMMAND=
44140
44141    case $PKGHANDLER in
44142      apt-get)
44143        apt_help     $MISSING_DEPENDENCY ;;
44144      yum)
44145        yum_help     $MISSING_DEPENDENCY ;;
44146      port)
44147        port_help    $MISSING_DEPENDENCY ;;
44148      pkgutil)
44149        pkgutil_help $MISSING_DEPENDENCY ;;
44150      pkgadd)
44151        pkgadd_help  $MISSING_DEPENDENCY ;;
44152    esac
44153
44154    if test "x$PKGHANDLER_COMMAND" != x; then
44155      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44156    fi
44157  fi
44158
44159      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44160    fi
44161
44162    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44163      OPENWIN_HOME="/usr/openwin"
44164      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44165      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44166          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44167          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44168          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44169    fi
44170
44171    ac_ext=c
44172ac_cpp='$CPP $CPPFLAGS'
44173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44175ac_compiler_gnu=$ac_cv_c_compiler_gnu
44176
44177    OLD_CFLAGS="$CFLAGS"
44178    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44179
44180    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44181    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44182do :
44183  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44184ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44185          # include <X11/Xlib.h>
44186          # include <X11/Xutil.h>
44187
44188
44189"
44190if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44191  cat >>confdefs.h <<_ACEOF
44192#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44193_ACEOF
44194 X11_HEADERS_OK=yes
44195else
44196  X11_HEADERS_OK=no; break
44197fi
44198
44199done
44200
44201
44202    if test "x$X11_HEADERS_OK" = xno; then
44203
44204  # Print a helpful message on how to acquire the necessary build dependency.
44205  # x11 is the help tag: freetype, cups, pulse, alsa etc
44206  MISSING_DEPENDENCY=x11
44207
44208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44209    cygwin_help $MISSING_DEPENDENCY
44210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44211    msys_help $MISSING_DEPENDENCY
44212  else
44213    PKGHANDLER_COMMAND=
44214
44215    case $PKGHANDLER in
44216      apt-get)
44217        apt_help     $MISSING_DEPENDENCY ;;
44218      yum)
44219        yum_help     $MISSING_DEPENDENCY ;;
44220      port)
44221        port_help    $MISSING_DEPENDENCY ;;
44222      pkgutil)
44223        pkgutil_help $MISSING_DEPENDENCY ;;
44224      pkgadd)
44225        pkgadd_help  $MISSING_DEPENDENCY ;;
44226    esac
44227
44228    if test "x$PKGHANDLER_COMMAND" != x; then
44229      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44230    fi
44231  fi
44232
44233      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44234    fi
44235
44236    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44237    # defined in libawt_xawt.
44238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44239$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44240    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44241/* end confdefs.h.  */
44242#include <X11/extensions/Xrender.h>
44243int
44244main ()
44245{
44246XLinearGradient x;
44247  ;
44248  return 0;
44249}
44250_ACEOF
44251if ac_fn_c_try_compile "$LINENO"; then :
44252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44253$as_echo "yes" >&6; }
44254else
44255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44256$as_echo "no" >&6; }
44257         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44258fi
44259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44260
44261    CFLAGS="$OLD_CFLAGS"
44262    ac_ext=cpp
44263ac_cpp='$CXXCPP $CPPFLAGS'
44264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44267
44268  fi # X11_NOT_NEEDED
44269
44270
44271
44272
44273
44274
44275  ###############################################################################
44276  #
44277  # The common unix printing system cups is used to print from java.
44278  #
44279
44280# Check whether --with-cups was given.
44281if test "${with_cups+set}" = set; then :
44282  withval=$with_cups;
44283fi
44284
44285
44286# Check whether --with-cups-include was given.
44287if test "${with_cups_include+set}" = set; then :
44288  withval=$with_cups_include;
44289fi
44290
44291
44292  if test "x$CUPS_NOT_NEEDED" = xyes; then
44293    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44294      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44295$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44296    fi
44297    CUPS_CFLAGS=
44298  else
44299    CUPS_FOUND=no
44300
44301    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44302      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44303    fi
44304
44305    if test "x${with_cups}" != x; then
44306      CUPS_CFLAGS="-I${with_cups}/include"
44307      CUPS_FOUND=yes
44308    fi
44309    if test "x${with_cups_include}" != x; then
44310      CUPS_CFLAGS="-I${with_cups_include}"
44311      CUPS_FOUND=yes
44312    fi
44313    if test "x$CUPS_FOUND" = xno; then
44314
44315
44316  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44317    # Source the builddeps file again, to make sure it uses the latest variables!
44318    . $builddepsfile
44319    # Look for a target and build machine specific resource!
44320    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44321    if test "x$resource" = x; then
44322      # Ok, lets instead look for a target specific resource
44323      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44324    fi
44325    if test "x$resource" = x; then
44326      # Ok, lets instead look for a build specific resource
44327      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44328    fi
44329    if test "x$resource" = x; then
44330      # Ok, lets instead look for a generic resource
44331      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44332      resource=${builddep_cups}
44333    fi
44334    if test "x$resource" != x; then
44335      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44336$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44337      # If the resource in the builddeps.conf file is an existing directory,
44338      # for example /java/linux/cups
44339      if test -d ${resource}; then
44340        depdir=${resource}
44341      else
44342
44343  # cups is for example mymodule
44344  # $resource is for example libs/general/libmymod_1_2_3.zip
44345  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44346  # $with_builddeps_dir is for example /localhome/builddeps
44347  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44348  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44349  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44350  filename=`basename $resource`
44351  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44352  filebase=${filename%%.*}
44353  extension=${filename#*.}
44354  installdir=$with_builddeps_dir/$filebase
44355  if test ! -f $installdir/$filename.unpacked; then
44356    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44357$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44358    if test ! -d $installdir; then
44359      mkdir -p $installdir
44360    fi
44361    if test ! -d $installdir; then
44362      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44363    fi
44364    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44365    touch $tmpfile
44366    if test ! -f $tmpfile; then
44367      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44368    fi
44369
44370  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44371  # $tmpfile is the local file name for the downloaded file.
44372  VALID_TOOL=no
44373  if test "x$BDEPS_FTP" = xwget; then
44374    VALID_TOOL=yes
44375    wget -O $tmpfile $with_builddeps_server/$resource
44376  fi
44377  if test "x$BDEPS_FTP" = xlftp; then
44378    VALID_TOOL=yes
44379    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44380  fi
44381  if test "x$BDEPS_FTP" = xftp; then
44382    VALID_TOOL=yes
44383    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44384    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44385    FTPUSERPWD=${FTPSERVER%%@*}
44386    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44387      FTPUSER=${userpwd%%:*}
44388      FTPPWD=${userpwd#*@}
44389      FTPSERVER=${FTPSERVER#*@}
44390    else
44391      FTPUSER=ftp
44392      FTPPWD=ftp
44393    fi
44394    # the "pass" command does not work on some
44395    # ftp clients (read ftp.exe) but if it works,
44396    # passive mode is better!
44397    ( \
44398        echo "user $FTPUSER $FTPPWD"        ; \
44399        echo "pass"                         ; \
44400        echo "bin"                          ; \
44401        echo "get $FTPPATH $tmpfile"              ; \
44402    ) | ftp -in $FTPSERVER
44403  fi
44404  if test "x$VALID_TOOL" != xyes; then
44405    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44406  fi
44407
44408    mv $tmpfile $installdir/$filename
44409    if test ! -s $installdir/$filename; then
44410      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44411    fi
44412    case "$extension" in
44413      zip)  echo "Unzipping $installdir/$filename..."
44414        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44415        ;;
44416      tar.gz) echo "Untaring $installdir/$filename..."
44417        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44418        ;;
44419      tgz) echo "Untaring $installdir/$filename..."
44420        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44421        ;;
44422      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44423        ;;
44424    esac
44425  fi
44426  if test -f $installdir/$filename.unpacked; then
44427    depdir=$installdir
44428  fi
44429
44430      fi
44431      # Source the builddeps file again, because in the previous command, the depdir
44432      # was updated to point at the current build dependency install directory.
44433      . $builddepsfile
44434      # Now extract variables from the builddeps.conf files.
44435      theroot=${builddep_cups_ROOT}
44436      thecflags=${builddep_cups_CFLAGS}
44437      thelibs=${builddep_cups_LIBS}
44438      if test "x$depdir" = x; then
44439        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44440      fi
44441      CUPS=$depdir
44442      if test "x$theroot" != x; then
44443        CUPS="$theroot"
44444      fi
44445      if test "x$thecflags" != x; then
44446        CUPS_CFLAGS="$thecflags"
44447      fi
44448      if test "x$thelibs" != x; then
44449        CUPS_LIBS="$thelibs"
44450      fi
44451      CUPS_FOUND=yes
44452
44453    fi
44454
44455  fi
44456
44457    fi
44458    if test "x$CUPS_FOUND" = xno; then
44459      # Are the cups headers installed in the default /usr/include location?
44460      for ac_header in cups/cups.h cups/ppd.h
44461do :
44462  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44463ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44464if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44465  cat >>confdefs.h <<_ACEOF
44466#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44467_ACEOF
44468
44469            CUPS_FOUND=yes
44470            CUPS_CFLAGS=
44471            DEFAULT_CUPS=yes
44472
44473
44474fi
44475
44476done
44477
44478    fi
44479    if test "x$CUPS_FOUND" = xno; then
44480      # Getting nervous now? Lets poke around for standard Solaris third-party
44481      # package installation locations.
44482      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44483$as_echo_n "checking for cups headers... " >&6; }
44484      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44485        # An SFW package seems to be installed!
44486        CUPS_FOUND=yes
44487        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44488      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44489        # A CSW package seems to be installed!
44490        CUPS_FOUND=yes
44491        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44492      fi
44493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44494$as_echo "$CUPS_FOUND" >&6; }
44495    fi
44496    if test "x$CUPS_FOUND" = xno; then
44497
44498  # Print a helpful message on how to acquire the necessary build dependency.
44499  # cups is the help tag: freetype, cups, pulse, alsa etc
44500  MISSING_DEPENDENCY=cups
44501
44502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44503    cygwin_help $MISSING_DEPENDENCY
44504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44505    msys_help $MISSING_DEPENDENCY
44506  else
44507    PKGHANDLER_COMMAND=
44508
44509    case $PKGHANDLER in
44510      apt-get)
44511        apt_help     $MISSING_DEPENDENCY ;;
44512      yum)
44513        yum_help     $MISSING_DEPENDENCY ;;
44514      port)
44515        port_help    $MISSING_DEPENDENCY ;;
44516      pkgutil)
44517        pkgutil_help $MISSING_DEPENDENCY ;;
44518      pkgadd)
44519        pkgadd_help  $MISSING_DEPENDENCY ;;
44520    esac
44521
44522    if test "x$PKGHANDLER_COMMAND" != x; then
44523      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44524    fi
44525  fi
44526
44527      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44528    fi
44529  fi
44530
44531
44532
44533
44534
44535
44536  ###############################################################################
44537  #
44538  # The ubiquitous freetype library is used to render fonts.
44539  #
44540
44541# Check whether --with-freetype was given.
44542if test "${with_freetype+set}" = set; then :
44543  withval=$with_freetype;
44544fi
44545
44546
44547# Check whether --with-freetype-include was given.
44548if test "${with_freetype_include+set}" = set; then :
44549  withval=$with_freetype_include;
44550fi
44551
44552
44553# Check whether --with-freetype-lib was given.
44554if test "${with_freetype_lib+set}" = set; then :
44555  withval=$with_freetype_lib;
44556fi
44557
44558
44559# Check whether --with-freetype-src was given.
44560if test "${with_freetype_src+set}" = set; then :
44561  withval=$with_freetype_src;
44562fi
44563
44564  # Check whether --enable-freetype-bundling was given.
44565if test "${enable_freetype_bundling+set}" = set; then :
44566  enableval=$enable_freetype_bundling;
44567fi
44568
44569
44570  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44571  FREETYPE_BASE_NAME=freetype
44572  FREETYPE_CFLAGS=
44573  FREETYPE_LIBS=
44574  FREETYPE_BUNDLE_LIB_PATH=
44575
44576  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44577    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44578      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44579$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44580    fi
44581    if test "x$enable_freetype_bundling" != x; then
44582      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44583$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44584    fi
44585  else
44586    # freetype is needed to build; go get it!
44587
44588    BUNDLE_FREETYPE="$enable_freetype_bundling"
44589
44590    if  test "x$with_freetype_src" != x; then
44591      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44592        # Try to build freetype if --with-freetype-src was given on Windows
44593
44594  FREETYPE_SRC_PATH="$with_freetype_src"
44595  BUILD_FREETYPE=yes
44596
44597  # Check if the freetype sources are acessible..
44598  if ! test -d $FREETYPE_SRC_PATH; then
44599    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44600$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44601    BUILD_FREETYPE=no
44602  fi
44603  # ..and contain a vc2010 project file
44604  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44605  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44606    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44607$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44608    BUILD_FREETYPE=no
44609  fi
44610  # Now check if configure found a version of 'msbuild.exe'
44611  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44612    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44613$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44614    BUILD_FREETYPE=no
44615  fi
44616
44617  # Ready to go..
44618  if test "x$BUILD_FREETYPE" = xyes; then
44619
44620    # msbuild requires trailing slashes for output directories
44621    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44622    freetype_lib_path_unix="$freetype_lib_path"
44623    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44624
44625  unix_path="$vcxproj_path"
44626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44627    windows_path=`$CYGPATH -m "$unix_path"`
44628    vcxproj_path="$windows_path"
44629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44630    windows_path=`cmd //c echo $unix_path`
44631    vcxproj_path="$windows_path"
44632  fi
44633
44634
44635  unix_path="$freetype_lib_path"
44636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44637    windows_path=`$CYGPATH -m "$unix_path"`
44638    freetype_lib_path="$windows_path"
44639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44640    windows_path=`cmd //c echo $unix_path`
44641    freetype_lib_path="$windows_path"
44642  fi
44643
44644
44645  unix_path="$freetype_obj_path"
44646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44647    windows_path=`$CYGPATH -m "$unix_path"`
44648    freetype_obj_path="$windows_path"
44649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44650    windows_path=`cmd //c echo $unix_path`
44651    freetype_obj_path="$windows_path"
44652  fi
44653
44654    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44655      freetype_platform=x64
44656    else
44657      freetype_platform=win32
44658    fi
44659
44660    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44661    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44662    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44663    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44664    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44665$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44666
44667    # First we try to build the freetype.dll
44668    $ECHO -e "@echo off\n"\
44669	     "$MSBUILD $vcxproj_path "\
44670		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44671		       "/p:Configuration=\"Release Multithreaded\" "\
44672		       "/p:Platform=$freetype_platform "\
44673		       "/p:ConfigurationType=DynamicLibrary "\
44674		       "/p:TargetName=freetype "\
44675		       "/p:OutDir=\"$freetype_lib_path\" "\
44676		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44677    cmd /c freetype.bat
44678
44679    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44680      # If that succeeds we also build freetype.lib
44681      $ECHO -e "@echo off\n"\
44682	       "$MSBUILD $vcxproj_path "\
44683			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44684			 "/p:Configuration=\"Release Multithreaded\" "\
44685			 "/p:Platform=$freetype_platform "\
44686			 "/p:ConfigurationType=StaticLibrary "\
44687			 "/p:TargetName=freetype "\
44688			 "/p:OutDir=\"$freetype_lib_path\" "\
44689			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44690      cmd /c freetype.bat
44691
44692      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44693	# Once we build both, lib and dll, set freetype lib and include path appropriately
44694	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44695	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44696	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44697$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44698      else
44699	BUILD_FREETYPE=no
44700      fi
44701    else
44702      BUILD_FREETYPE=no
44703    fi
44704  fi
44705
44706        if test "x$BUILD_FREETYPE" = xyes; then
44707          # Okay, we built it. Check that it works.
44708
44709  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44710  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44711  METHOD="--with-freetype-src"
44712
44713  # Let's start with an optimistic view of the world :-)
44714  FOUND_FREETYPE=yes
44715
44716  # First look for the canonical freetype main include file ft2build.h.
44717  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44718    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44719    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44720    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44721      # Fail.
44722      FOUND_FREETYPE=no
44723    fi
44724  fi
44725
44726  if test "x$FOUND_FREETYPE" = xyes; then
44727    # Include file found, let's continue the sanity check.
44728    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44729$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44730
44731    # Reset to default value
44732    FREETYPE_BASE_NAME=freetype
44733    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44734    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44735      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44737        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44738        # for the .6 version explicitly.
44739        FREETYPE_BASE_NAME=freetype.6
44740        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44741        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44742$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44743      else
44744        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44745$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44746        FOUND_FREETYPE=no
44747      fi
44748    else
44749      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44750        # On Windows, we will need both .lib and .dll file.
44751        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44752          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44754          FOUND_FREETYPE=no
44755        fi
44756      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44758        # Found lib in isa dir, use that instead.
44759        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44760        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44761$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44762      fi
44763    fi
44764  fi
44765
44766  if test "x$FOUND_FREETYPE" = xyes; then
44767
44768  # Only process if variable expands to non-empty
44769
44770  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44772
44773  # Input might be given as Windows format, start by converting to
44774  # unix format.
44775  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44776  new_path=`$CYGPATH -u "$path"`
44777
44778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44781  # "foo.exe" is OK but "foo" is an error.
44782  #
44783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44784  # It is also a way to make sure we got the proper file name for the real test later on.
44785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44786  if test "x$test_shortpath" = x; then
44787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44788$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44789    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44790  fi
44791
44792  # Call helper function which possibly converts this using DOS-style short mode.
44793  # If so, the updated path is stored in $new_path.
44794
44795  input_path="$new_path"
44796  # Check if we need to convert this using DOS-style short mode. If the path
44797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44798  # take no chances and rewrite it.
44799  # Note: m4 eats our [], so we need to use [ and ] instead.
44800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44801  if test "x$has_forbidden_chars" != x; then
44802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44806      # Going to short mode and back again did indeed matter. Since short mode is
44807      # case insensitive, let's make it lowercase to improve readability.
44808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44809      # Now convert it back to Unix-style (cygpath)
44810      input_path=`$CYGPATH -u "$shortmode_path"`
44811      new_path="$input_path"
44812    fi
44813  fi
44814
44815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44816  if test "x$test_cygdrive_prefix" = x; then
44817    # As a simple fix, exclude /usr/bin since it's not a real path.
44818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44820      # a path prefixed by /cygdrive for fixpath to work.
44821      new_path="$CYGWIN_ROOT_PATH$input_path"
44822    fi
44823  fi
44824
44825
44826  if test "x$path" != "x$new_path"; then
44827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44830  fi
44831
44832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44833
44834  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44835  has_colon=`$ECHO $path | $GREP ^.:`
44836  new_path="$path"
44837  if test "x$has_colon" = x; then
44838    # Not in mixed or Windows style, start by that.
44839    new_path=`cmd //c echo $path`
44840  fi
44841
44842
44843  input_path="$new_path"
44844  # Check if we need to convert this using DOS-style short mode. If the path
44845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44846  # take no chances and rewrite it.
44847  # Note: m4 eats our [], so we need to use [ and ] instead.
44848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44849  if test "x$has_forbidden_chars" != x; then
44850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44852  fi
44853
44854
44855  windows_path="$new_path"
44856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44857    unix_path=`$CYGPATH -u "$windows_path"`
44858    new_path="$unix_path"
44859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44861    new_path="$unix_path"
44862  fi
44863
44864  if test "x$path" != "x$new_path"; then
44865    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44868  fi
44869
44870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44872
44873    else
44874      # We're on a unix platform. Hooray! :)
44875      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44876      has_space=`$ECHO "$path" | $GREP " "`
44877      if test "x$has_space" != x; then
44878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44881      fi
44882
44883      # Use eval to expand a potential ~
44884      eval path="$path"
44885      if test ! -f "$path" && test ! -d "$path"; then
44886        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44887      fi
44888
44889      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44890    fi
44891  fi
44892
44893
44894  # Only process if variable expands to non-empty
44895
44896  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44898
44899  # Input might be given as Windows format, start by converting to
44900  # unix format.
44901  path="$POTENTIAL_FREETYPE_LIB_PATH"
44902  new_path=`$CYGPATH -u "$path"`
44903
44904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44907  # "foo.exe" is OK but "foo" is an error.
44908  #
44909  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44910  # It is also a way to make sure we got the proper file name for the real test later on.
44911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44912  if test "x$test_shortpath" = x; then
44913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44915    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44916  fi
44917
44918  # Call helper function which possibly converts this using DOS-style short mode.
44919  # If so, the updated path is stored in $new_path.
44920
44921  input_path="$new_path"
44922  # Check if we need to convert this using DOS-style short mode. If the path
44923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44924  # take no chances and rewrite it.
44925  # Note: m4 eats our [], so we need to use [ and ] instead.
44926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44927  if test "x$has_forbidden_chars" != x; then
44928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44932      # Going to short mode and back again did indeed matter. Since short mode is
44933      # case insensitive, let's make it lowercase to improve readability.
44934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44935      # Now convert it back to Unix-style (cygpath)
44936      input_path=`$CYGPATH -u "$shortmode_path"`
44937      new_path="$input_path"
44938    fi
44939  fi
44940
44941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44942  if test "x$test_cygdrive_prefix" = x; then
44943    # As a simple fix, exclude /usr/bin since it's not a real path.
44944    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44946      # a path prefixed by /cygdrive for fixpath to work.
44947      new_path="$CYGWIN_ROOT_PATH$input_path"
44948    fi
44949  fi
44950
44951
44952  if test "x$path" != "x$new_path"; then
44953    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44956  fi
44957
44958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44959
44960  path="$POTENTIAL_FREETYPE_LIB_PATH"
44961  has_colon=`$ECHO $path | $GREP ^.:`
44962  new_path="$path"
44963  if test "x$has_colon" = x; then
44964    # Not in mixed or Windows style, start by that.
44965    new_path=`cmd //c echo $path`
44966  fi
44967
44968
44969  input_path="$new_path"
44970  # Check if we need to convert this using DOS-style short mode. If the path
44971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44972  # take no chances and rewrite it.
44973  # Note: m4 eats our [], so we need to use [ and ] instead.
44974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44975  if test "x$has_forbidden_chars" != x; then
44976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44978  fi
44979
44980
44981  windows_path="$new_path"
44982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44983    unix_path=`$CYGPATH -u "$windows_path"`
44984    new_path="$unix_path"
44985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44987    new_path="$unix_path"
44988  fi
44989
44990  if test "x$path" != "x$new_path"; then
44991    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44993$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44994  fi
44995
44996  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44997  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44998
44999    else
45000      # We're on a unix platform. Hooray! :)
45001      path="$POTENTIAL_FREETYPE_LIB_PATH"
45002      has_space=`$ECHO "$path" | $GREP " "`
45003      if test "x$has_space" != x; then
45004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45005$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45006        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45007      fi
45008
45009      # Use eval to expand a potential ~
45010      eval path="$path"
45011      if test ! -f "$path" && test ! -d "$path"; then
45012        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45013      fi
45014
45015      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45016    fi
45017  fi
45018
45019
45020    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45022$as_echo_n "checking for freetype includes... " >&6; }
45023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45024$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45025    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45027$as_echo_n "checking for freetype libraries... " >&6; }
45028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45029$as_echo "$FREETYPE_LIB_PATH" >&6; }
45030  fi
45031
45032          if test "x$FOUND_FREETYPE" != xyes; then
45033            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45034          fi
45035        else
45036          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45037$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45038          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45039        fi
45040      else
45041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45042$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45043      fi
45044    fi
45045
45046    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45047      # User has specified settings
45048
45049      if test "x$BUNDLE_FREETYPE" = x; then
45050        # If not specified, default is to bundle freetype
45051        BUNDLE_FREETYPE=yes
45052      fi
45053
45054      if test "x$with_freetype" != x; then
45055        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45056        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45057      fi
45058
45059      # Allow --with-freetype-lib and --with-freetype-include to override
45060      if test "x$with_freetype_include" != x; then
45061        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45062      fi
45063      if test "x$with_freetype_lib" != x; then
45064        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45065      fi
45066
45067      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45068        # Okay, we got it. Check that it works.
45069
45070  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45071  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45072  METHOD="--with-freetype"
45073
45074  # Let's start with an optimistic view of the world :-)
45075  FOUND_FREETYPE=yes
45076
45077  # First look for the canonical freetype main include file ft2build.h.
45078  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45079    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45080    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45081    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45082      # Fail.
45083      FOUND_FREETYPE=no
45084    fi
45085  fi
45086
45087  if test "x$FOUND_FREETYPE" = xyes; then
45088    # Include file found, let's continue the sanity check.
45089    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45090$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45091
45092    # Reset to default value
45093    FREETYPE_BASE_NAME=freetype
45094    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45095    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45096      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45097          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45098        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45099        # for the .6 version explicitly.
45100        FREETYPE_BASE_NAME=freetype.6
45101        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45102        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45103$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45104      else
45105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45106$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45107        FOUND_FREETYPE=no
45108      fi
45109    else
45110      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45111        # On Windows, we will need both .lib and .dll file.
45112        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45113          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45114$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45115          FOUND_FREETYPE=no
45116        fi
45117      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45119        # Found lib in isa dir, use that instead.
45120        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45121        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45122$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45123      fi
45124    fi
45125  fi
45126
45127  if test "x$FOUND_FREETYPE" = xyes; then
45128
45129  # Only process if variable expands to non-empty
45130
45131  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45133
45134  # Input might be given as Windows format, start by converting to
45135  # unix format.
45136  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45137  new_path=`$CYGPATH -u "$path"`
45138
45139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45142  # "foo.exe" is OK but "foo" is an error.
45143  #
45144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45145  # It is also a way to make sure we got the proper file name for the real test later on.
45146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45147  if test "x$test_shortpath" = x; then
45148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45150    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45151  fi
45152
45153  # Call helper function which possibly converts this using DOS-style short mode.
45154  # If so, the updated path is stored in $new_path.
45155
45156  input_path="$new_path"
45157  # Check if we need to convert this using DOS-style short mode. If the path
45158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45159  # take no chances and rewrite it.
45160  # Note: m4 eats our [], so we need to use [ and ] instead.
45161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45162  if test "x$has_forbidden_chars" != x; then
45163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45167      # Going to short mode and back again did indeed matter. Since short mode is
45168      # case insensitive, let's make it lowercase to improve readability.
45169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45170      # Now convert it back to Unix-style (cygpath)
45171      input_path=`$CYGPATH -u "$shortmode_path"`
45172      new_path="$input_path"
45173    fi
45174  fi
45175
45176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45177  if test "x$test_cygdrive_prefix" = x; then
45178    # As a simple fix, exclude /usr/bin since it's not a real path.
45179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45181      # a path prefixed by /cygdrive for fixpath to work.
45182      new_path="$CYGWIN_ROOT_PATH$input_path"
45183    fi
45184  fi
45185
45186
45187  if test "x$path" != "x$new_path"; then
45188    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45191  fi
45192
45193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45194
45195  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45196  has_colon=`$ECHO $path | $GREP ^.:`
45197  new_path="$path"
45198  if test "x$has_colon" = x; then
45199    # Not in mixed or Windows style, start by that.
45200    new_path=`cmd //c echo $path`
45201  fi
45202
45203
45204  input_path="$new_path"
45205  # Check if we need to convert this using DOS-style short mode. If the path
45206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45207  # take no chances and rewrite it.
45208  # Note: m4 eats our [], so we need to use [ and ] instead.
45209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45210  if test "x$has_forbidden_chars" != x; then
45211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45213  fi
45214
45215
45216  windows_path="$new_path"
45217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45218    unix_path=`$CYGPATH -u "$windows_path"`
45219    new_path="$unix_path"
45220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45222    new_path="$unix_path"
45223  fi
45224
45225  if test "x$path" != "x$new_path"; then
45226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45229  fi
45230
45231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45233
45234    else
45235      # We're on a unix platform. Hooray! :)
45236      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45237      has_space=`$ECHO "$path" | $GREP " "`
45238      if test "x$has_space" != x; then
45239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45242      fi
45243
45244      # Use eval to expand a potential ~
45245      eval path="$path"
45246      if test ! -f "$path" && test ! -d "$path"; then
45247        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45248      fi
45249
45250      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45251    fi
45252  fi
45253
45254
45255  # Only process if variable expands to non-empty
45256
45257  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45259
45260  # Input might be given as Windows format, start by converting to
45261  # unix format.
45262  path="$POTENTIAL_FREETYPE_LIB_PATH"
45263  new_path=`$CYGPATH -u "$path"`
45264
45265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45268  # "foo.exe" is OK but "foo" is an error.
45269  #
45270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45271  # It is also a way to make sure we got the proper file name for the real test later on.
45272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45273  if test "x$test_shortpath" = x; then
45274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45275$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45276    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45277  fi
45278
45279  # Call helper function which possibly converts this using DOS-style short mode.
45280  # If so, the updated path is stored in $new_path.
45281
45282  input_path="$new_path"
45283  # Check if we need to convert this using DOS-style short mode. If the path
45284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45285  # take no chances and rewrite it.
45286  # Note: m4 eats our [], so we need to use [ and ] instead.
45287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45288  if test "x$has_forbidden_chars" != x; then
45289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45293      # Going to short mode and back again did indeed matter. Since short mode is
45294      # case insensitive, let's make it lowercase to improve readability.
45295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45296      # Now convert it back to Unix-style (cygpath)
45297      input_path=`$CYGPATH -u "$shortmode_path"`
45298      new_path="$input_path"
45299    fi
45300  fi
45301
45302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45303  if test "x$test_cygdrive_prefix" = x; then
45304    # As a simple fix, exclude /usr/bin since it's not a real path.
45305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45307      # a path prefixed by /cygdrive for fixpath to work.
45308      new_path="$CYGWIN_ROOT_PATH$input_path"
45309    fi
45310  fi
45311
45312
45313  if test "x$path" != "x$new_path"; then
45314    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45316$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45317  fi
45318
45319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45320
45321  path="$POTENTIAL_FREETYPE_LIB_PATH"
45322  has_colon=`$ECHO $path | $GREP ^.:`
45323  new_path="$path"
45324  if test "x$has_colon" = x; then
45325    # Not in mixed or Windows style, start by that.
45326    new_path=`cmd //c echo $path`
45327  fi
45328
45329
45330  input_path="$new_path"
45331  # Check if we need to convert this using DOS-style short mode. If the path
45332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45333  # take no chances and rewrite it.
45334  # Note: m4 eats our [], so we need to use [ and ] instead.
45335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45336  if test "x$has_forbidden_chars" != x; then
45337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45339  fi
45340
45341
45342  windows_path="$new_path"
45343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45344    unix_path=`$CYGPATH -u "$windows_path"`
45345    new_path="$unix_path"
45346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45348    new_path="$unix_path"
45349  fi
45350
45351  if test "x$path" != "x$new_path"; then
45352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45355  fi
45356
45357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45359
45360    else
45361      # We're on a unix platform. Hooray! :)
45362      path="$POTENTIAL_FREETYPE_LIB_PATH"
45363      has_space=`$ECHO "$path" | $GREP " "`
45364      if test "x$has_space" != x; then
45365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45368      fi
45369
45370      # Use eval to expand a potential ~
45371      eval path="$path"
45372      if test ! -f "$path" && test ! -d "$path"; then
45373        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45374      fi
45375
45376      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45377    fi
45378  fi
45379
45380
45381    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45383$as_echo_n "checking for freetype includes... " >&6; }
45384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45385$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45386    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45388$as_echo_n "checking for freetype libraries... " >&6; }
45389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45390$as_echo "$FREETYPE_LIB_PATH" >&6; }
45391  fi
45392
45393        if test "x$FOUND_FREETYPE" != xyes; then
45394          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45395        fi
45396      else
45397        # User specified only one of lib or include. This is an error.
45398        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45399          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45400$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45401          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45402        else
45403          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45404$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45405          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45406        fi
45407      fi
45408    else
45409      # User did not specify settings, but we need freetype. Try to locate it.
45410
45411      if test "x$BUNDLE_FREETYPE" = x; then
45412        # If not specified, default is to bundle freetype only on windows
45413        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45414          BUNDLE_FREETYPE=yes
45415        else
45416          BUNDLE_FREETYPE=no
45417        fi
45418      fi
45419
45420      if test "x$FOUND_FREETYPE" != xyes; then
45421        # Check builddeps
45422
45423
45424  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45425    # Source the builddeps file again, to make sure it uses the latest variables!
45426    . $builddepsfile
45427    # Look for a target and build machine specific resource!
45428    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45429    if test "x$resource" = x; then
45430      # Ok, lets instead look for a target specific resource
45431      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45432    fi
45433    if test "x$resource" = x; then
45434      # Ok, lets instead look for a build specific resource
45435      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45436    fi
45437    if test "x$resource" = x; then
45438      # Ok, lets instead look for a generic resource
45439      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45440      resource=${builddep_freetype2}
45441    fi
45442    if test "x$resource" != x; then
45443      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45444$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45445      # If the resource in the builddeps.conf file is an existing directory,
45446      # for example /java/linux/cups
45447      if test -d ${resource}; then
45448        depdir=${resource}
45449      else
45450
45451  # freetype2 is for example mymodule
45452  # $resource is for example libs/general/libmymod_1_2_3.zip
45453  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45454  # $with_builddeps_dir is for example /localhome/builddeps
45455  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45456  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45457  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45458  filename=`basename $resource`
45459  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45460  filebase=${filename%%.*}
45461  extension=${filename#*.}
45462  installdir=$with_builddeps_dir/$filebase
45463  if test ! -f $installdir/$filename.unpacked; then
45464    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45465$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45466    if test ! -d $installdir; then
45467      mkdir -p $installdir
45468    fi
45469    if test ! -d $installdir; then
45470      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45471    fi
45472    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45473    touch $tmpfile
45474    if test ! -f $tmpfile; then
45475      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45476    fi
45477
45478  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45479  # $tmpfile is the local file name for the downloaded file.
45480  VALID_TOOL=no
45481  if test "x$BDEPS_FTP" = xwget; then
45482    VALID_TOOL=yes
45483    wget -O $tmpfile $with_builddeps_server/$resource
45484  fi
45485  if test "x$BDEPS_FTP" = xlftp; then
45486    VALID_TOOL=yes
45487    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45488  fi
45489  if test "x$BDEPS_FTP" = xftp; then
45490    VALID_TOOL=yes
45491    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45492    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45493    FTPUSERPWD=${FTPSERVER%%@*}
45494    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45495      FTPUSER=${userpwd%%:*}
45496      FTPPWD=${userpwd#*@}
45497      FTPSERVER=${FTPSERVER#*@}
45498    else
45499      FTPUSER=ftp
45500      FTPPWD=ftp
45501    fi
45502    # the "pass" command does not work on some
45503    # ftp clients (read ftp.exe) but if it works,
45504    # passive mode is better!
45505    ( \
45506        echo "user $FTPUSER $FTPPWD"        ; \
45507        echo "pass"                         ; \
45508        echo "bin"                          ; \
45509        echo "get $FTPPATH $tmpfile"              ; \
45510    ) | ftp -in $FTPSERVER
45511  fi
45512  if test "x$VALID_TOOL" != xyes; then
45513    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45514  fi
45515
45516    mv $tmpfile $installdir/$filename
45517    if test ! -s $installdir/$filename; then
45518      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45519    fi
45520    case "$extension" in
45521      zip)  echo "Unzipping $installdir/$filename..."
45522        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45523        ;;
45524      tar.gz) echo "Untaring $installdir/$filename..."
45525        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45526        ;;
45527      tgz) echo "Untaring $installdir/$filename..."
45528        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45529        ;;
45530      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45531        ;;
45532    esac
45533  fi
45534  if test -f $installdir/$filename.unpacked; then
45535    depdir=$installdir
45536  fi
45537
45538      fi
45539      # Source the builddeps file again, because in the previous command, the depdir
45540      # was updated to point at the current build dependency install directory.
45541      . $builddepsfile
45542      # Now extract variables from the builddeps.conf files.
45543      theroot=${builddep_freetype2_ROOT}
45544      thecflags=${builddep_freetype2_CFLAGS}
45545      thelibs=${builddep_freetype2_LIBS}
45546      if test "x$depdir" = x; then
45547        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45548      fi
45549      FREETYPE=$depdir
45550      if test "x$theroot" != x; then
45551        FREETYPE="$theroot"
45552      fi
45553      if test "x$thecflags" != x; then
45554        FREETYPE_CFLAGS="$thecflags"
45555      fi
45556      if test "x$thelibs" != x; then
45557        FREETYPE_LIBS="$thelibs"
45558      fi
45559      FOUND_FREETYPE=yes
45560      else FOUND_FREETYPE=no
45561
45562    fi
45563    else FOUND_FREETYPE=no
45564
45565  fi
45566
45567        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45568        if test "x$FOUND_FREETYPE" = xyes; then
45569          if test "x$BUNDLE_FREETYPE" = xyes; then
45570            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45571$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45572            FOUND_FREETYPE=no
45573          else
45574            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45575$as_echo_n "checking for freetype... " >&6; }
45576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45577$as_echo "yes (using builddeps)" >&6; }
45578          fi
45579        fi
45580      fi
45581
45582      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45583      if test "x$SYSROOT" = x; then
45584        if test "x$FOUND_FREETYPE" != xyes; then
45585          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45586          if test "x$PKG_CONFIG" != x; then
45587
45588pkg_failed=no
45589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45590$as_echo_n "checking for FREETYPE... " >&6; }
45591
45592if test -n "$FREETYPE_CFLAGS"; then
45593    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45594 elif test -n "$PKG_CONFIG"; then
45595    if test -n "$PKG_CONFIG" && \
45596    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45597  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45598  ac_status=$?
45599  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45600  test $ac_status = 0; }; then
45601  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45602else
45603  pkg_failed=yes
45604fi
45605 else
45606    pkg_failed=untried
45607fi
45608if test -n "$FREETYPE_LIBS"; then
45609    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45610 elif test -n "$PKG_CONFIG"; then
45611    if test -n "$PKG_CONFIG" && \
45612    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45613  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45614  ac_status=$?
45615  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45616  test $ac_status = 0; }; then
45617  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45618else
45619  pkg_failed=yes
45620fi
45621 else
45622    pkg_failed=untried
45623fi
45624
45625
45626
45627if test $pkg_failed = yes; then
45628
45629if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45630        _pkg_short_errors_supported=yes
45631else
45632        _pkg_short_errors_supported=no
45633fi
45634        if test $_pkg_short_errors_supported = yes; then
45635	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45636        else
45637	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45638        fi
45639	# Put the nasty error message in config.log where it belongs
45640	echo "$FREETYPE_PKG_ERRORS" >&5
45641
45642	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45643$as_echo "no" >&6; }
45644                FOUND_FREETYPE=no
45645elif test $pkg_failed = untried; then
45646	FOUND_FREETYPE=no
45647else
45648	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45649	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45651$as_echo "yes" >&6; }
45652	FOUND_FREETYPE=yes
45653fi
45654            if test "x$FOUND_FREETYPE" = xyes; then
45655              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45656              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45657              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45658              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45659                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45660              fi
45661              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45662              if test "x$BUNDLE_FREETYPE" = xyes; then
45663                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45664$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45665                FOUND_FREETYPE=no
45666              else
45667                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45668$as_echo_n "checking for freetype... " >&6; }
45669                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45670$as_echo "yes (using pkg-config)" >&6; }
45671              fi
45672            fi
45673          fi
45674        fi
45675      fi
45676
45677      if test "x$FOUND_FREETYPE" != xyes; then
45678        # Check in well-known locations
45679        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45680          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45681
45682  windows_path="$FREETYPE_BASE_DIR"
45683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45684    unix_path=`$CYGPATH -u "$windows_path"`
45685    FREETYPE_BASE_DIR="$unix_path"
45686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45688    FREETYPE_BASE_DIR="$unix_path"
45689  fi
45690
45691
45692  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45693  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45694  METHOD="well-known location"
45695
45696  # Let's start with an optimistic view of the world :-)
45697  FOUND_FREETYPE=yes
45698
45699  # First look for the canonical freetype main include file ft2build.h.
45700  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45701    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45702    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45703    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45704      # Fail.
45705      FOUND_FREETYPE=no
45706    fi
45707  fi
45708
45709  if test "x$FOUND_FREETYPE" = xyes; then
45710    # Include file found, let's continue the sanity check.
45711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45712$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45713
45714    # Reset to default value
45715    FREETYPE_BASE_NAME=freetype
45716    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45717    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45718      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45720        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45721        # for the .6 version explicitly.
45722        FREETYPE_BASE_NAME=freetype.6
45723        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45724        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45725$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45726      else
45727        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45728$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45729        FOUND_FREETYPE=no
45730      fi
45731    else
45732      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45733        # On Windows, we will need both .lib and .dll file.
45734        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45735          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45736$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45737          FOUND_FREETYPE=no
45738        fi
45739      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45740          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45741        # Found lib in isa dir, use that instead.
45742        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45743        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45744$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45745      fi
45746    fi
45747  fi
45748
45749  if test "x$FOUND_FREETYPE" = xyes; then
45750
45751  # Only process if variable expands to non-empty
45752
45753  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45755
45756  # Input might be given as Windows format, start by converting to
45757  # unix format.
45758  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45759  new_path=`$CYGPATH -u "$path"`
45760
45761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45764  # "foo.exe" is OK but "foo" is an error.
45765  #
45766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45767  # It is also a way to make sure we got the proper file name for the real test later on.
45768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45769  if test "x$test_shortpath" = x; then
45770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45772    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45773  fi
45774
45775  # Call helper function which possibly converts this using DOS-style short mode.
45776  # If so, the updated path is stored in $new_path.
45777
45778  input_path="$new_path"
45779  # Check if we need to convert this using DOS-style short mode. If the path
45780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45781  # take no chances and rewrite it.
45782  # Note: m4 eats our [], so we need to use [ and ] instead.
45783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45784  if test "x$has_forbidden_chars" != x; then
45785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45789      # Going to short mode and back again did indeed matter. Since short mode is
45790      # case insensitive, let's make it lowercase to improve readability.
45791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45792      # Now convert it back to Unix-style (cygpath)
45793      input_path=`$CYGPATH -u "$shortmode_path"`
45794      new_path="$input_path"
45795    fi
45796  fi
45797
45798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45799  if test "x$test_cygdrive_prefix" = x; then
45800    # As a simple fix, exclude /usr/bin since it's not a real path.
45801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45803      # a path prefixed by /cygdrive for fixpath to work.
45804      new_path="$CYGWIN_ROOT_PATH$input_path"
45805    fi
45806  fi
45807
45808
45809  if test "x$path" != "x$new_path"; then
45810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45813  fi
45814
45815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45816
45817  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45818  has_colon=`$ECHO $path | $GREP ^.:`
45819  new_path="$path"
45820  if test "x$has_colon" = x; then
45821    # Not in mixed or Windows style, start by that.
45822    new_path=`cmd //c echo $path`
45823  fi
45824
45825
45826  input_path="$new_path"
45827  # Check if we need to convert this using DOS-style short mode. If the path
45828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45829  # take no chances and rewrite it.
45830  # Note: m4 eats our [], so we need to use [ and ] instead.
45831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45832  if test "x$has_forbidden_chars" != x; then
45833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45835  fi
45836
45837
45838  windows_path="$new_path"
45839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45840    unix_path=`$CYGPATH -u "$windows_path"`
45841    new_path="$unix_path"
45842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45844    new_path="$unix_path"
45845  fi
45846
45847  if test "x$path" != "x$new_path"; then
45848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45851  fi
45852
45853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45855
45856    else
45857      # We're on a unix platform. Hooray! :)
45858      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45859      has_space=`$ECHO "$path" | $GREP " "`
45860      if test "x$has_space" != x; then
45861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45863        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45864      fi
45865
45866      # Use eval to expand a potential ~
45867      eval path="$path"
45868      if test ! -f "$path" && test ! -d "$path"; then
45869        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45870      fi
45871
45872      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45873    fi
45874  fi
45875
45876
45877  # Only process if variable expands to non-empty
45878
45879  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45881
45882  # Input might be given as Windows format, start by converting to
45883  # unix format.
45884  path="$POTENTIAL_FREETYPE_LIB_PATH"
45885  new_path=`$CYGPATH -u "$path"`
45886
45887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45890  # "foo.exe" is OK but "foo" is an error.
45891  #
45892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45893  # It is also a way to make sure we got the proper file name for the real test later on.
45894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45895  if test "x$test_shortpath" = x; then
45896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45898    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45899  fi
45900
45901  # Call helper function which possibly converts this using DOS-style short mode.
45902  # If so, the updated path is stored in $new_path.
45903
45904  input_path="$new_path"
45905  # Check if we need to convert this using DOS-style short mode. If the path
45906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45907  # take no chances and rewrite it.
45908  # Note: m4 eats our [], so we need to use [ and ] instead.
45909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45910  if test "x$has_forbidden_chars" != x; then
45911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45915      # Going to short mode and back again did indeed matter. Since short mode is
45916      # case insensitive, let's make it lowercase to improve readability.
45917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45918      # Now convert it back to Unix-style (cygpath)
45919      input_path=`$CYGPATH -u "$shortmode_path"`
45920      new_path="$input_path"
45921    fi
45922  fi
45923
45924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45925  if test "x$test_cygdrive_prefix" = x; then
45926    # As a simple fix, exclude /usr/bin since it's not a real path.
45927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45929      # a path prefixed by /cygdrive for fixpath to work.
45930      new_path="$CYGWIN_ROOT_PATH$input_path"
45931    fi
45932  fi
45933
45934
45935  if test "x$path" != "x$new_path"; then
45936    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45939  fi
45940
45941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45942
45943  path="$POTENTIAL_FREETYPE_LIB_PATH"
45944  has_colon=`$ECHO $path | $GREP ^.:`
45945  new_path="$path"
45946  if test "x$has_colon" = x; then
45947    # Not in mixed or Windows style, start by that.
45948    new_path=`cmd //c echo $path`
45949  fi
45950
45951
45952  input_path="$new_path"
45953  # Check if we need to convert this using DOS-style short mode. If the path
45954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45955  # take no chances and rewrite it.
45956  # Note: m4 eats our [], so we need to use [ and ] instead.
45957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45958  if test "x$has_forbidden_chars" != x; then
45959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45961  fi
45962
45963
45964  windows_path="$new_path"
45965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45966    unix_path=`$CYGPATH -u "$windows_path"`
45967    new_path="$unix_path"
45968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45970    new_path="$unix_path"
45971  fi
45972
45973  if test "x$path" != "x$new_path"; then
45974    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45977  fi
45978
45979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45981
45982    else
45983      # We're on a unix platform. Hooray! :)
45984      path="$POTENTIAL_FREETYPE_LIB_PATH"
45985      has_space=`$ECHO "$path" | $GREP " "`
45986      if test "x$has_space" != x; then
45987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45990      fi
45991
45992      # Use eval to expand a potential ~
45993      eval path="$path"
45994      if test ! -f "$path" && test ! -d "$path"; then
45995        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45996      fi
45997
45998      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45999    fi
46000  fi
46001
46002
46003    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46005$as_echo_n "checking for freetype includes... " >&6; }
46006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46007$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46008    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46010$as_echo_n "checking for freetype libraries... " >&6; }
46011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46012$as_echo "$FREETYPE_LIB_PATH" >&6; }
46013  fi
46014
46015          if test "x$FOUND_FREETYPE" != xyes; then
46016            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
46017
46018  windows_path="$FREETYPE_BASE_DIR"
46019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46020    unix_path=`$CYGPATH -u "$windows_path"`
46021    FREETYPE_BASE_DIR="$unix_path"
46022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46024    FREETYPE_BASE_DIR="$unix_path"
46025  fi
46026
46027
46028  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46029  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46030  METHOD="well-known location"
46031
46032  # Let's start with an optimistic view of the world :-)
46033  FOUND_FREETYPE=yes
46034
46035  # First look for the canonical freetype main include file ft2build.h.
46036  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46037    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46038    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46039    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46040      # Fail.
46041      FOUND_FREETYPE=no
46042    fi
46043  fi
46044
46045  if test "x$FOUND_FREETYPE" = xyes; then
46046    # Include file found, let's continue the sanity check.
46047    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46048$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46049
46050    # Reset to default value
46051    FREETYPE_BASE_NAME=freetype
46052    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46053    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46054      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46055          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46056        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46057        # for the .6 version explicitly.
46058        FREETYPE_BASE_NAME=freetype.6
46059        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46060        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46061$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46062      else
46063        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46064$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46065        FOUND_FREETYPE=no
46066      fi
46067    else
46068      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46069        # On Windows, we will need both .lib and .dll file.
46070        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46071          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46072$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46073          FOUND_FREETYPE=no
46074        fi
46075      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46076          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46077        # Found lib in isa dir, use that instead.
46078        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46080$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46081      fi
46082    fi
46083  fi
46084
46085  if test "x$FOUND_FREETYPE" = xyes; then
46086
46087  # Only process if variable expands to non-empty
46088
46089  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46091
46092  # Input might be given as Windows format, start by converting to
46093  # unix format.
46094  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46095  new_path=`$CYGPATH -u "$path"`
46096
46097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46100  # "foo.exe" is OK but "foo" is an error.
46101  #
46102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46103  # It is also a way to make sure we got the proper file name for the real test later on.
46104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46105  if test "x$test_shortpath" = x; then
46106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46108    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46109  fi
46110
46111  # Call helper function which possibly converts this using DOS-style short mode.
46112  # If so, the updated path is stored in $new_path.
46113
46114  input_path="$new_path"
46115  # Check if we need to convert this using DOS-style short mode. If the path
46116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46117  # take no chances and rewrite it.
46118  # Note: m4 eats our [], so we need to use [ and ] instead.
46119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46120  if test "x$has_forbidden_chars" != x; then
46121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46125      # Going to short mode and back again did indeed matter. Since short mode is
46126      # case insensitive, let's make it lowercase to improve readability.
46127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46128      # Now convert it back to Unix-style (cygpath)
46129      input_path=`$CYGPATH -u "$shortmode_path"`
46130      new_path="$input_path"
46131    fi
46132  fi
46133
46134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46135  if test "x$test_cygdrive_prefix" = x; then
46136    # As a simple fix, exclude /usr/bin since it's not a real path.
46137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46139      # a path prefixed by /cygdrive for fixpath to work.
46140      new_path="$CYGWIN_ROOT_PATH$input_path"
46141    fi
46142  fi
46143
46144
46145  if test "x$path" != "x$new_path"; then
46146    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46149  fi
46150
46151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46152
46153  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46154  has_colon=`$ECHO $path | $GREP ^.:`
46155  new_path="$path"
46156  if test "x$has_colon" = x; then
46157    # Not in mixed or Windows style, start by that.
46158    new_path=`cmd //c echo $path`
46159  fi
46160
46161
46162  input_path="$new_path"
46163  # Check if we need to convert this using DOS-style short mode. If the path
46164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46165  # take no chances and rewrite it.
46166  # Note: m4 eats our [], so we need to use [ and ] instead.
46167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46168  if test "x$has_forbidden_chars" != x; then
46169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46171  fi
46172
46173
46174  windows_path="$new_path"
46175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46176    unix_path=`$CYGPATH -u "$windows_path"`
46177    new_path="$unix_path"
46178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46180    new_path="$unix_path"
46181  fi
46182
46183  if test "x$path" != "x$new_path"; then
46184    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46186$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46187  fi
46188
46189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46191
46192    else
46193      # We're on a unix platform. Hooray! :)
46194      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46195      has_space=`$ECHO "$path" | $GREP " "`
46196      if test "x$has_space" != x; then
46197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46200      fi
46201
46202      # Use eval to expand a potential ~
46203      eval path="$path"
46204      if test ! -f "$path" && test ! -d "$path"; then
46205        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46206      fi
46207
46208      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46209    fi
46210  fi
46211
46212
46213  # Only process if variable expands to non-empty
46214
46215  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46217
46218  # Input might be given as Windows format, start by converting to
46219  # unix format.
46220  path="$POTENTIAL_FREETYPE_LIB_PATH"
46221  new_path=`$CYGPATH -u "$path"`
46222
46223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46226  # "foo.exe" is OK but "foo" is an error.
46227  #
46228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46229  # It is also a way to make sure we got the proper file name for the real test later on.
46230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46231  if test "x$test_shortpath" = x; then
46232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46233$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46234    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46235  fi
46236
46237  # Call helper function which possibly converts this using DOS-style short mode.
46238  # If so, the updated path is stored in $new_path.
46239
46240  input_path="$new_path"
46241  # Check if we need to convert this using DOS-style short mode. If the path
46242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46243  # take no chances and rewrite it.
46244  # Note: m4 eats our [], so we need to use [ and ] instead.
46245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46246  if test "x$has_forbidden_chars" != x; then
46247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46251      # Going to short mode and back again did indeed matter. Since short mode is
46252      # case insensitive, let's make it lowercase to improve readability.
46253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46254      # Now convert it back to Unix-style (cygpath)
46255      input_path=`$CYGPATH -u "$shortmode_path"`
46256      new_path="$input_path"
46257    fi
46258  fi
46259
46260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46261  if test "x$test_cygdrive_prefix" = x; then
46262    # As a simple fix, exclude /usr/bin since it's not a real path.
46263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46265      # a path prefixed by /cygdrive for fixpath to work.
46266      new_path="$CYGWIN_ROOT_PATH$input_path"
46267    fi
46268  fi
46269
46270
46271  if test "x$path" != "x$new_path"; then
46272    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46275  fi
46276
46277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46278
46279  path="$POTENTIAL_FREETYPE_LIB_PATH"
46280  has_colon=`$ECHO $path | $GREP ^.:`
46281  new_path="$path"
46282  if test "x$has_colon" = x; then
46283    # Not in mixed or Windows style, start by that.
46284    new_path=`cmd //c echo $path`
46285  fi
46286
46287
46288  input_path="$new_path"
46289  # Check if we need to convert this using DOS-style short mode. If the path
46290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46291  # take no chances and rewrite it.
46292  # Note: m4 eats our [], so we need to use [ and ] instead.
46293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46294  if test "x$has_forbidden_chars" != x; then
46295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46297  fi
46298
46299
46300  windows_path="$new_path"
46301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46302    unix_path=`$CYGPATH -u "$windows_path"`
46303    new_path="$unix_path"
46304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46306    new_path="$unix_path"
46307  fi
46308
46309  if test "x$path" != "x$new_path"; then
46310    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46313  fi
46314
46315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46317
46318    else
46319      # We're on a unix platform. Hooray! :)
46320      path="$POTENTIAL_FREETYPE_LIB_PATH"
46321      has_space=`$ECHO "$path" | $GREP " "`
46322      if test "x$has_space" != x; then
46323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46326      fi
46327
46328      # Use eval to expand a potential ~
46329      eval path="$path"
46330      if test ! -f "$path" && test ! -d "$path"; then
46331        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46332      fi
46333
46334      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46335    fi
46336  fi
46337
46338
46339    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46341$as_echo_n "checking for freetype includes... " >&6; }
46342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46343$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46344    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46346$as_echo_n "checking for freetype libraries... " >&6; }
46347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46348$as_echo "$FREETYPE_LIB_PATH" >&6; }
46349  fi
46350
46351          fi
46352        else
46353          FREETYPE_BASE_DIR="$SYSROOT/usr"
46354
46355  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46356  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46357  METHOD="well-known location"
46358
46359  # Let's start with an optimistic view of the world :-)
46360  FOUND_FREETYPE=yes
46361
46362  # First look for the canonical freetype main include file ft2build.h.
46363  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46364    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46365    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46366    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46367      # Fail.
46368      FOUND_FREETYPE=no
46369    fi
46370  fi
46371
46372  if test "x$FOUND_FREETYPE" = xyes; then
46373    # Include file found, let's continue the sanity check.
46374    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46375$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46376
46377    # Reset to default value
46378    FREETYPE_BASE_NAME=freetype
46379    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46380    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46381      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46382          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46383        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46384        # for the .6 version explicitly.
46385        FREETYPE_BASE_NAME=freetype.6
46386        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46387        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46388$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46389      else
46390        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46391$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46392        FOUND_FREETYPE=no
46393      fi
46394    else
46395      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46396        # On Windows, we will need both .lib and .dll file.
46397        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46398          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46399$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46400          FOUND_FREETYPE=no
46401        fi
46402      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46403          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46404        # Found lib in isa dir, use that instead.
46405        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46406        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46407$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46408      fi
46409    fi
46410  fi
46411
46412  if test "x$FOUND_FREETYPE" = xyes; then
46413
46414  # Only process if variable expands to non-empty
46415
46416  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46418
46419  # Input might be given as Windows format, start by converting to
46420  # unix format.
46421  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46422  new_path=`$CYGPATH -u "$path"`
46423
46424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46427  # "foo.exe" is OK but "foo" is an error.
46428  #
46429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46430  # It is also a way to make sure we got the proper file name for the real test later on.
46431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46432  if test "x$test_shortpath" = x; then
46433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46436  fi
46437
46438  # Call helper function which possibly converts this using DOS-style short mode.
46439  # If so, the updated path is stored in $new_path.
46440
46441  input_path="$new_path"
46442  # Check if we need to convert this using DOS-style short mode. If the path
46443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46444  # take no chances and rewrite it.
46445  # Note: m4 eats our [], so we need to use [ and ] instead.
46446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46447  if test "x$has_forbidden_chars" != x; then
46448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46452      # Going to short mode and back again did indeed matter. Since short mode is
46453      # case insensitive, let's make it lowercase to improve readability.
46454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46455      # Now convert it back to Unix-style (cygpath)
46456      input_path=`$CYGPATH -u "$shortmode_path"`
46457      new_path="$input_path"
46458    fi
46459  fi
46460
46461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46462  if test "x$test_cygdrive_prefix" = x; then
46463    # As a simple fix, exclude /usr/bin since it's not a real path.
46464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46466      # a path prefixed by /cygdrive for fixpath to work.
46467      new_path="$CYGWIN_ROOT_PATH$input_path"
46468    fi
46469  fi
46470
46471
46472  if test "x$path" != "x$new_path"; then
46473    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46476  fi
46477
46478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46479
46480  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46481  has_colon=`$ECHO $path | $GREP ^.:`
46482  new_path="$path"
46483  if test "x$has_colon" = x; then
46484    # Not in mixed or Windows style, start by that.
46485    new_path=`cmd //c echo $path`
46486  fi
46487
46488
46489  input_path="$new_path"
46490  # Check if we need to convert this using DOS-style short mode. If the path
46491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46492  # take no chances and rewrite it.
46493  # Note: m4 eats our [], so we need to use [ and ] instead.
46494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46495  if test "x$has_forbidden_chars" != x; then
46496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46498  fi
46499
46500
46501  windows_path="$new_path"
46502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46503    unix_path=`$CYGPATH -u "$windows_path"`
46504    new_path="$unix_path"
46505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46507    new_path="$unix_path"
46508  fi
46509
46510  if test "x$path" != "x$new_path"; then
46511    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46514  fi
46515
46516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46518
46519    else
46520      # We're on a unix platform. Hooray! :)
46521      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46522      has_space=`$ECHO "$path" | $GREP " "`
46523      if test "x$has_space" != x; then
46524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46527      fi
46528
46529      # Use eval to expand a potential ~
46530      eval path="$path"
46531      if test ! -f "$path" && test ! -d "$path"; then
46532        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46533      fi
46534
46535      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46536    fi
46537  fi
46538
46539
46540  # Only process if variable expands to non-empty
46541
46542  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46544
46545  # Input might be given as Windows format, start by converting to
46546  # unix format.
46547  path="$POTENTIAL_FREETYPE_LIB_PATH"
46548  new_path=`$CYGPATH -u "$path"`
46549
46550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46553  # "foo.exe" is OK but "foo" is an error.
46554  #
46555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46556  # It is also a way to make sure we got the proper file name for the real test later on.
46557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46558  if test "x$test_shortpath" = x; then
46559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46560$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46561    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46562  fi
46563
46564  # Call helper function which possibly converts this using DOS-style short mode.
46565  # If so, the updated path is stored in $new_path.
46566
46567  input_path="$new_path"
46568  # Check if we need to convert this using DOS-style short mode. If the path
46569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46570  # take no chances and rewrite it.
46571  # Note: m4 eats our [], so we need to use [ and ] instead.
46572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46573  if test "x$has_forbidden_chars" != x; then
46574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46578      # Going to short mode and back again did indeed matter. Since short mode is
46579      # case insensitive, let's make it lowercase to improve readability.
46580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46581      # Now convert it back to Unix-style (cygpath)
46582      input_path=`$CYGPATH -u "$shortmode_path"`
46583      new_path="$input_path"
46584    fi
46585  fi
46586
46587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46588  if test "x$test_cygdrive_prefix" = x; then
46589    # As a simple fix, exclude /usr/bin since it's not a real path.
46590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46592      # a path prefixed by /cygdrive for fixpath to work.
46593      new_path="$CYGWIN_ROOT_PATH$input_path"
46594    fi
46595  fi
46596
46597
46598  if test "x$path" != "x$new_path"; then
46599    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46602  fi
46603
46604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46605
46606  path="$POTENTIAL_FREETYPE_LIB_PATH"
46607  has_colon=`$ECHO $path | $GREP ^.:`
46608  new_path="$path"
46609  if test "x$has_colon" = x; then
46610    # Not in mixed or Windows style, start by that.
46611    new_path=`cmd //c echo $path`
46612  fi
46613
46614
46615  input_path="$new_path"
46616  # Check if we need to convert this using DOS-style short mode. If the path
46617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46618  # take no chances and rewrite it.
46619  # Note: m4 eats our [], so we need to use [ and ] instead.
46620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46621  if test "x$has_forbidden_chars" != x; then
46622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46624  fi
46625
46626
46627  windows_path="$new_path"
46628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46629    unix_path=`$CYGPATH -u "$windows_path"`
46630    new_path="$unix_path"
46631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46633    new_path="$unix_path"
46634  fi
46635
46636  if test "x$path" != "x$new_path"; then
46637    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46640  fi
46641
46642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46644
46645    else
46646      # We're on a unix platform. Hooray! :)
46647      path="$POTENTIAL_FREETYPE_LIB_PATH"
46648      has_space=`$ECHO "$path" | $GREP " "`
46649      if test "x$has_space" != x; then
46650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46651$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46653      fi
46654
46655      # Use eval to expand a potential ~
46656      eval path="$path"
46657      if test ! -f "$path" && test ! -d "$path"; then
46658        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46659      fi
46660
46661      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46662    fi
46663  fi
46664
46665
46666    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46668$as_echo_n "checking for freetype includes... " >&6; }
46669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46670$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46671    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46673$as_echo_n "checking for freetype libraries... " >&6; }
46674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46675$as_echo "$FREETYPE_LIB_PATH" >&6; }
46676  fi
46677
46678
46679          if test "x$FOUND_FREETYPE" != xyes; then
46680            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46681
46682  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46683  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46684  METHOD="well-known location"
46685
46686  # Let's start with an optimistic view of the world :-)
46687  FOUND_FREETYPE=yes
46688
46689  # First look for the canonical freetype main include file ft2build.h.
46690  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46691    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46692    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46693    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46694      # Fail.
46695      FOUND_FREETYPE=no
46696    fi
46697  fi
46698
46699  if test "x$FOUND_FREETYPE" = xyes; then
46700    # Include file found, let's continue the sanity check.
46701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46702$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46703
46704    # Reset to default value
46705    FREETYPE_BASE_NAME=freetype
46706    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46707    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46708      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46709          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46710        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46711        # for the .6 version explicitly.
46712        FREETYPE_BASE_NAME=freetype.6
46713        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46714        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46715$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46716      else
46717        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46718$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46719        FOUND_FREETYPE=no
46720      fi
46721    else
46722      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46723        # On Windows, we will need both .lib and .dll file.
46724        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46725          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46726$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46727          FOUND_FREETYPE=no
46728        fi
46729      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46730          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46731        # Found lib in isa dir, use that instead.
46732        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46733        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46734$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46735      fi
46736    fi
46737  fi
46738
46739  if test "x$FOUND_FREETYPE" = xyes; then
46740
46741  # Only process if variable expands to non-empty
46742
46743  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46745
46746  # Input might be given as Windows format, start by converting to
46747  # unix format.
46748  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46749  new_path=`$CYGPATH -u "$path"`
46750
46751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46754  # "foo.exe" is OK but "foo" is an error.
46755  #
46756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46757  # It is also a way to make sure we got the proper file name for the real test later on.
46758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46759  if test "x$test_shortpath" = x; then
46760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46762    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46763  fi
46764
46765  # Call helper function which possibly converts this using DOS-style short mode.
46766  # If so, the updated path is stored in $new_path.
46767
46768  input_path="$new_path"
46769  # Check if we need to convert this using DOS-style short mode. If the path
46770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46771  # take no chances and rewrite it.
46772  # Note: m4 eats our [], so we need to use [ and ] instead.
46773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46774  if test "x$has_forbidden_chars" != x; then
46775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46779      # Going to short mode and back again did indeed matter. Since short mode is
46780      # case insensitive, let's make it lowercase to improve readability.
46781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46782      # Now convert it back to Unix-style (cygpath)
46783      input_path=`$CYGPATH -u "$shortmode_path"`
46784      new_path="$input_path"
46785    fi
46786  fi
46787
46788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46789  if test "x$test_cygdrive_prefix" = x; then
46790    # As a simple fix, exclude /usr/bin since it's not a real path.
46791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46793      # a path prefixed by /cygdrive for fixpath to work.
46794      new_path="$CYGWIN_ROOT_PATH$input_path"
46795    fi
46796  fi
46797
46798
46799  if test "x$path" != "x$new_path"; then
46800    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46803  fi
46804
46805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46806
46807  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46808  has_colon=`$ECHO $path | $GREP ^.:`
46809  new_path="$path"
46810  if test "x$has_colon" = x; then
46811    # Not in mixed or Windows style, start by that.
46812    new_path=`cmd //c echo $path`
46813  fi
46814
46815
46816  input_path="$new_path"
46817  # Check if we need to convert this using DOS-style short mode. If the path
46818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46819  # take no chances and rewrite it.
46820  # Note: m4 eats our [], so we need to use [ and ] instead.
46821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46822  if test "x$has_forbidden_chars" != x; then
46823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46825  fi
46826
46827
46828  windows_path="$new_path"
46829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46830    unix_path=`$CYGPATH -u "$windows_path"`
46831    new_path="$unix_path"
46832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46834    new_path="$unix_path"
46835  fi
46836
46837  if test "x$path" != "x$new_path"; then
46838    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46840$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46841  fi
46842
46843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46845
46846    else
46847      # We're on a unix platform. Hooray! :)
46848      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46849      has_space=`$ECHO "$path" | $GREP " "`
46850      if test "x$has_space" != x; then
46851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46854      fi
46855
46856      # Use eval to expand a potential ~
46857      eval path="$path"
46858      if test ! -f "$path" && test ! -d "$path"; then
46859        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46860      fi
46861
46862      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46863    fi
46864  fi
46865
46866
46867  # Only process if variable expands to non-empty
46868
46869  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46871
46872  # Input might be given as Windows format, start by converting to
46873  # unix format.
46874  path="$POTENTIAL_FREETYPE_LIB_PATH"
46875  new_path=`$CYGPATH -u "$path"`
46876
46877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46880  # "foo.exe" is OK but "foo" is an error.
46881  #
46882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46883  # It is also a way to make sure we got the proper file name for the real test later on.
46884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46885  if test "x$test_shortpath" = x; then
46886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46888    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46889  fi
46890
46891  # Call helper function which possibly converts this using DOS-style short mode.
46892  # If so, the updated path is stored in $new_path.
46893
46894  input_path="$new_path"
46895  # Check if we need to convert this using DOS-style short mode. If the path
46896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46897  # take no chances and rewrite it.
46898  # Note: m4 eats our [], so we need to use [ and ] instead.
46899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46900  if test "x$has_forbidden_chars" != x; then
46901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46905      # Going to short mode and back again did indeed matter. Since short mode is
46906      # case insensitive, let's make it lowercase to improve readability.
46907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46908      # Now convert it back to Unix-style (cygpath)
46909      input_path=`$CYGPATH -u "$shortmode_path"`
46910      new_path="$input_path"
46911    fi
46912  fi
46913
46914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46915  if test "x$test_cygdrive_prefix" = x; then
46916    # As a simple fix, exclude /usr/bin since it's not a real path.
46917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46919      # a path prefixed by /cygdrive for fixpath to work.
46920      new_path="$CYGWIN_ROOT_PATH$input_path"
46921    fi
46922  fi
46923
46924
46925  if test "x$path" != "x$new_path"; then
46926    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46929  fi
46930
46931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46932
46933  path="$POTENTIAL_FREETYPE_LIB_PATH"
46934  has_colon=`$ECHO $path | $GREP ^.:`
46935  new_path="$path"
46936  if test "x$has_colon" = x; then
46937    # Not in mixed or Windows style, start by that.
46938    new_path=`cmd //c echo $path`
46939  fi
46940
46941
46942  input_path="$new_path"
46943  # Check if we need to convert this using DOS-style short mode. If the path
46944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46945  # take no chances and rewrite it.
46946  # Note: m4 eats our [], so we need to use [ and ] instead.
46947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46948  if test "x$has_forbidden_chars" != x; then
46949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46951  fi
46952
46953
46954  windows_path="$new_path"
46955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46956    unix_path=`$CYGPATH -u "$windows_path"`
46957    new_path="$unix_path"
46958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46960    new_path="$unix_path"
46961  fi
46962
46963  if test "x$path" != "x$new_path"; then
46964    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46967  fi
46968
46969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46971
46972    else
46973      # We're on a unix platform. Hooray! :)
46974      path="$POTENTIAL_FREETYPE_LIB_PATH"
46975      has_space=`$ECHO "$path" | $GREP " "`
46976      if test "x$has_space" != x; then
46977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46978$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46979        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46980      fi
46981
46982      # Use eval to expand a potential ~
46983      eval path="$path"
46984      if test ! -f "$path" && test ! -d "$path"; then
46985        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46986      fi
46987
46988      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46989    fi
46990  fi
46991
46992
46993    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46995$as_echo_n "checking for freetype includes... " >&6; }
46996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46997$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46998    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47000$as_echo_n "checking for freetype libraries... " >&6; }
47001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47002$as_echo "$FREETYPE_LIB_PATH" >&6; }
47003  fi
47004
47005          fi
47006
47007          if test "x$FOUND_FREETYPE" != xyes; then
47008            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
47009
47010  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47011  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
47012  METHOD="well-known location"
47013
47014  # Let's start with an optimistic view of the world :-)
47015  FOUND_FREETYPE=yes
47016
47017  # First look for the canonical freetype main include file ft2build.h.
47018  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47019    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47020    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47021    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47022      # Fail.
47023      FOUND_FREETYPE=no
47024    fi
47025  fi
47026
47027  if test "x$FOUND_FREETYPE" = xyes; then
47028    # Include file found, let's continue the sanity check.
47029    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47030$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47031
47032    # Reset to default value
47033    FREETYPE_BASE_NAME=freetype
47034    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47035    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47036      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47037          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47038        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47039        # for the .6 version explicitly.
47040        FREETYPE_BASE_NAME=freetype.6
47041        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47042        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47043$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47044      else
47045        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47047        FOUND_FREETYPE=no
47048      fi
47049    else
47050      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47051        # On Windows, we will need both .lib and .dll file.
47052        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47053          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47054$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47055          FOUND_FREETYPE=no
47056        fi
47057      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47059        # Found lib in isa dir, use that instead.
47060        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47061        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47062$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47063      fi
47064    fi
47065  fi
47066
47067  if test "x$FOUND_FREETYPE" = xyes; then
47068
47069  # Only process if variable expands to non-empty
47070
47071  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47073
47074  # Input might be given as Windows format, start by converting to
47075  # unix format.
47076  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47077  new_path=`$CYGPATH -u "$path"`
47078
47079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47082  # "foo.exe" is OK but "foo" is an error.
47083  #
47084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47085  # It is also a way to make sure we got the proper file name for the real test later on.
47086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47087  if test "x$test_shortpath" = x; then
47088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47089$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47090    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47091  fi
47092
47093  # Call helper function which possibly converts this using DOS-style short mode.
47094  # If so, the updated path is stored in $new_path.
47095
47096  input_path="$new_path"
47097  # Check if we need to convert this using DOS-style short mode. If the path
47098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47099  # take no chances and rewrite it.
47100  # Note: m4 eats our [], so we need to use [ and ] instead.
47101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47102  if test "x$has_forbidden_chars" != x; then
47103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47107      # Going to short mode and back again did indeed matter. Since short mode is
47108      # case insensitive, let's make it lowercase to improve readability.
47109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47110      # Now convert it back to Unix-style (cygpath)
47111      input_path=`$CYGPATH -u "$shortmode_path"`
47112      new_path="$input_path"
47113    fi
47114  fi
47115
47116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47117  if test "x$test_cygdrive_prefix" = x; then
47118    # As a simple fix, exclude /usr/bin since it's not a real path.
47119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47121      # a path prefixed by /cygdrive for fixpath to work.
47122      new_path="$CYGWIN_ROOT_PATH$input_path"
47123    fi
47124  fi
47125
47126
47127  if test "x$path" != "x$new_path"; then
47128    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47130$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47131  fi
47132
47133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47134
47135  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47136  has_colon=`$ECHO $path | $GREP ^.:`
47137  new_path="$path"
47138  if test "x$has_colon" = x; then
47139    # Not in mixed or Windows style, start by that.
47140    new_path=`cmd //c echo $path`
47141  fi
47142
47143
47144  input_path="$new_path"
47145  # Check if we need to convert this using DOS-style short mode. If the path
47146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47147  # take no chances and rewrite it.
47148  # Note: m4 eats our [], so we need to use [ and ] instead.
47149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47150  if test "x$has_forbidden_chars" != x; then
47151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47153  fi
47154
47155
47156  windows_path="$new_path"
47157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47158    unix_path=`$CYGPATH -u "$windows_path"`
47159    new_path="$unix_path"
47160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47162    new_path="$unix_path"
47163  fi
47164
47165  if test "x$path" != "x$new_path"; then
47166    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47169  fi
47170
47171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47173
47174    else
47175      # We're on a unix platform. Hooray! :)
47176      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47177      has_space=`$ECHO "$path" | $GREP " "`
47178      if test "x$has_space" != x; then
47179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47180$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47181        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47182      fi
47183
47184      # Use eval to expand a potential ~
47185      eval path="$path"
47186      if test ! -f "$path" && test ! -d "$path"; then
47187        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47188      fi
47189
47190      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47191    fi
47192  fi
47193
47194
47195  # Only process if variable expands to non-empty
47196
47197  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47199
47200  # Input might be given as Windows format, start by converting to
47201  # unix format.
47202  path="$POTENTIAL_FREETYPE_LIB_PATH"
47203  new_path=`$CYGPATH -u "$path"`
47204
47205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47208  # "foo.exe" is OK but "foo" is an error.
47209  #
47210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47211  # It is also a way to make sure we got the proper file name for the real test later on.
47212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47213  if test "x$test_shortpath" = x; then
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47217  fi
47218
47219  # Call helper function which possibly converts this using DOS-style short mode.
47220  # If so, the updated path is stored in $new_path.
47221
47222  input_path="$new_path"
47223  # Check if we need to convert this using DOS-style short mode. If the path
47224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47225  # take no chances and rewrite it.
47226  # Note: m4 eats our [], so we need to use [ and ] instead.
47227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47228  if test "x$has_forbidden_chars" != x; then
47229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47233      # Going to short mode and back again did indeed matter. Since short mode is
47234      # case insensitive, let's make it lowercase to improve readability.
47235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47236      # Now convert it back to Unix-style (cygpath)
47237      input_path=`$CYGPATH -u "$shortmode_path"`
47238      new_path="$input_path"
47239    fi
47240  fi
47241
47242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47243  if test "x$test_cygdrive_prefix" = x; then
47244    # As a simple fix, exclude /usr/bin since it's not a real path.
47245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47247      # a path prefixed by /cygdrive for fixpath to work.
47248      new_path="$CYGWIN_ROOT_PATH$input_path"
47249    fi
47250  fi
47251
47252
47253  if test "x$path" != "x$new_path"; then
47254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47257  fi
47258
47259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47260
47261  path="$POTENTIAL_FREETYPE_LIB_PATH"
47262  has_colon=`$ECHO $path | $GREP ^.:`
47263  new_path="$path"
47264  if test "x$has_colon" = x; then
47265    # Not in mixed or Windows style, start by that.
47266    new_path=`cmd //c echo $path`
47267  fi
47268
47269
47270  input_path="$new_path"
47271  # Check if we need to convert this using DOS-style short mode. If the path
47272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47273  # take no chances and rewrite it.
47274  # Note: m4 eats our [], so we need to use [ and ] instead.
47275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47276  if test "x$has_forbidden_chars" != x; then
47277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47279  fi
47280
47281
47282  windows_path="$new_path"
47283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47284    unix_path=`$CYGPATH -u "$windows_path"`
47285    new_path="$unix_path"
47286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47288    new_path="$unix_path"
47289  fi
47290
47291  if test "x$path" != "x$new_path"; then
47292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47295  fi
47296
47297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47299
47300    else
47301      # We're on a unix platform. Hooray! :)
47302      path="$POTENTIAL_FREETYPE_LIB_PATH"
47303      has_space=`$ECHO "$path" | $GREP " "`
47304      if test "x$has_space" != x; then
47305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47308      fi
47309
47310      # Use eval to expand a potential ~
47311      eval path="$path"
47312      if test ! -f "$path" && test ! -d "$path"; then
47313        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47314      fi
47315
47316      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47317    fi
47318  fi
47319
47320
47321    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47323$as_echo_n "checking for freetype includes... " >&6; }
47324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47325$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47326    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47328$as_echo_n "checking for freetype libraries... " >&6; }
47329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47330$as_echo "$FREETYPE_LIB_PATH" >&6; }
47331  fi
47332
47333          fi
47334
47335          if test "x$FOUND_FREETYPE" != xyes; then
47336            FREETYPE_BASE_DIR="$SYSROOT/usr"
47337            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47338
47339  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47340  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47341  METHOD="well-known location"
47342
47343  # Let's start with an optimistic view of the world :-)
47344  FOUND_FREETYPE=yes
47345
47346  # First look for the canonical freetype main include file ft2build.h.
47347  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47348    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47349    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47350    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47351      # Fail.
47352      FOUND_FREETYPE=no
47353    fi
47354  fi
47355
47356  if test "x$FOUND_FREETYPE" = xyes; then
47357    # Include file found, let's continue the sanity check.
47358    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47359$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47360
47361    # Reset to default value
47362    FREETYPE_BASE_NAME=freetype
47363    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47364    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47365      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47366          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47367        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47368        # for the .6 version explicitly.
47369        FREETYPE_BASE_NAME=freetype.6
47370        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47371        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47372$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47373      else
47374        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47375$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47376        FOUND_FREETYPE=no
47377      fi
47378    else
47379      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47380        # On Windows, we will need both .lib and .dll file.
47381        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47382          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47383$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47384          FOUND_FREETYPE=no
47385        fi
47386      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47387          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47388        # Found lib in isa dir, use that instead.
47389        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47390        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47391$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47392      fi
47393    fi
47394  fi
47395
47396  if test "x$FOUND_FREETYPE" = xyes; then
47397
47398  # Only process if variable expands to non-empty
47399
47400  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47402
47403  # Input might be given as Windows format, start by converting to
47404  # unix format.
47405  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47406  new_path=`$CYGPATH -u "$path"`
47407
47408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47411  # "foo.exe" is OK but "foo" is an error.
47412  #
47413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47414  # It is also a way to make sure we got the proper file name for the real test later on.
47415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47416  if test "x$test_shortpath" = x; then
47417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47419    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47420  fi
47421
47422  # Call helper function which possibly converts this using DOS-style short mode.
47423  # If so, the updated path is stored in $new_path.
47424
47425  input_path="$new_path"
47426  # Check if we need to convert this using DOS-style short mode. If the path
47427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47428  # take no chances and rewrite it.
47429  # Note: m4 eats our [], so we need to use [ and ] instead.
47430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47431  if test "x$has_forbidden_chars" != x; then
47432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47436      # Going to short mode and back again did indeed matter. Since short mode is
47437      # case insensitive, let's make it lowercase to improve readability.
47438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47439      # Now convert it back to Unix-style (cygpath)
47440      input_path=`$CYGPATH -u "$shortmode_path"`
47441      new_path="$input_path"
47442    fi
47443  fi
47444
47445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47446  if test "x$test_cygdrive_prefix" = x; then
47447    # As a simple fix, exclude /usr/bin since it's not a real path.
47448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47450      # a path prefixed by /cygdrive for fixpath to work.
47451      new_path="$CYGWIN_ROOT_PATH$input_path"
47452    fi
47453  fi
47454
47455
47456  if test "x$path" != "x$new_path"; then
47457    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47460  fi
47461
47462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47463
47464  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47465  has_colon=`$ECHO $path | $GREP ^.:`
47466  new_path="$path"
47467  if test "x$has_colon" = x; then
47468    # Not in mixed or Windows style, start by that.
47469    new_path=`cmd //c echo $path`
47470  fi
47471
47472
47473  input_path="$new_path"
47474  # Check if we need to convert this using DOS-style short mode. If the path
47475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47476  # take no chances and rewrite it.
47477  # Note: m4 eats our [], so we need to use [ and ] instead.
47478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47479  if test "x$has_forbidden_chars" != x; then
47480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47482  fi
47483
47484
47485  windows_path="$new_path"
47486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47487    unix_path=`$CYGPATH -u "$windows_path"`
47488    new_path="$unix_path"
47489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47491    new_path="$unix_path"
47492  fi
47493
47494  if test "x$path" != "x$new_path"; then
47495    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47498  fi
47499
47500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47502
47503    else
47504      # We're on a unix platform. Hooray! :)
47505      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47506      has_space=`$ECHO "$path" | $GREP " "`
47507      if test "x$has_space" != x; then
47508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47511      fi
47512
47513      # Use eval to expand a potential ~
47514      eval path="$path"
47515      if test ! -f "$path" && test ! -d "$path"; then
47516        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47517      fi
47518
47519      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47520    fi
47521  fi
47522
47523
47524  # Only process if variable expands to non-empty
47525
47526  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47528
47529  # Input might be given as Windows format, start by converting to
47530  # unix format.
47531  path="$POTENTIAL_FREETYPE_LIB_PATH"
47532  new_path=`$CYGPATH -u "$path"`
47533
47534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47537  # "foo.exe" is OK but "foo" is an error.
47538  #
47539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47540  # It is also a way to make sure we got the proper file name for the real test later on.
47541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47542  if test "x$test_shortpath" = x; then
47543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47545    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47546  fi
47547
47548  # Call helper function which possibly converts this using DOS-style short mode.
47549  # If so, the updated path is stored in $new_path.
47550
47551  input_path="$new_path"
47552  # Check if we need to convert this using DOS-style short mode. If the path
47553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47554  # take no chances and rewrite it.
47555  # Note: m4 eats our [], so we need to use [ and ] instead.
47556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47557  if test "x$has_forbidden_chars" != x; then
47558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47562      # Going to short mode and back again did indeed matter. Since short mode is
47563      # case insensitive, let's make it lowercase to improve readability.
47564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47565      # Now convert it back to Unix-style (cygpath)
47566      input_path=`$CYGPATH -u "$shortmode_path"`
47567      new_path="$input_path"
47568    fi
47569  fi
47570
47571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47572  if test "x$test_cygdrive_prefix" = x; then
47573    # As a simple fix, exclude /usr/bin since it's not a real path.
47574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47576      # a path prefixed by /cygdrive for fixpath to work.
47577      new_path="$CYGWIN_ROOT_PATH$input_path"
47578    fi
47579  fi
47580
47581
47582  if test "x$path" != "x$new_path"; then
47583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47586  fi
47587
47588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47589
47590  path="$POTENTIAL_FREETYPE_LIB_PATH"
47591  has_colon=`$ECHO $path | $GREP ^.:`
47592  new_path="$path"
47593  if test "x$has_colon" = x; then
47594    # Not in mixed or Windows style, start by that.
47595    new_path=`cmd //c echo $path`
47596  fi
47597
47598
47599  input_path="$new_path"
47600  # Check if we need to convert this using DOS-style short mode. If the path
47601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47602  # take no chances and rewrite it.
47603  # Note: m4 eats our [], so we need to use [ and ] instead.
47604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47605  if test "x$has_forbidden_chars" != x; then
47606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47608  fi
47609
47610
47611  windows_path="$new_path"
47612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47613    unix_path=`$CYGPATH -u "$windows_path"`
47614    new_path="$unix_path"
47615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47617    new_path="$unix_path"
47618  fi
47619
47620  if test "x$path" != "x$new_path"; then
47621    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47623$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47624  fi
47625
47626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47628
47629    else
47630      # We're on a unix platform. Hooray! :)
47631      path="$POTENTIAL_FREETYPE_LIB_PATH"
47632      has_space=`$ECHO "$path" | $GREP " "`
47633      if test "x$has_space" != x; then
47634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47635$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47637      fi
47638
47639      # Use eval to expand a potential ~
47640      eval path="$path"
47641      if test ! -f "$path" && test ! -d "$path"; then
47642        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47643      fi
47644
47645      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47646    fi
47647  fi
47648
47649
47650    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47652$as_echo_n "checking for freetype includes... " >&6; }
47653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47654$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47655    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47657$as_echo_n "checking for freetype libraries... " >&6; }
47658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47659$as_echo "$FREETYPE_LIB_PATH" >&6; }
47660  fi
47661
47662            else
47663
47664  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47665  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47666  METHOD="well-known location"
47667
47668  # Let's start with an optimistic view of the world :-)
47669  FOUND_FREETYPE=yes
47670
47671  # First look for the canonical freetype main include file ft2build.h.
47672  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47673    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47674    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47675    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47676      # Fail.
47677      FOUND_FREETYPE=no
47678    fi
47679  fi
47680
47681  if test "x$FOUND_FREETYPE" = xyes; then
47682    # Include file found, let's continue the sanity check.
47683    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47684$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47685
47686    # Reset to default value
47687    FREETYPE_BASE_NAME=freetype
47688    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47689    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47690      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47691          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47692        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47693        # for the .6 version explicitly.
47694        FREETYPE_BASE_NAME=freetype.6
47695        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47696        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47697$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47698      else
47699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47700$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47701        FOUND_FREETYPE=no
47702      fi
47703    else
47704      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47705        # On Windows, we will need both .lib and .dll file.
47706        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47707          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47708$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47709          FOUND_FREETYPE=no
47710        fi
47711      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47712          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47713        # Found lib in isa dir, use that instead.
47714        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47715        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47716$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47717      fi
47718    fi
47719  fi
47720
47721  if test "x$FOUND_FREETYPE" = xyes; then
47722
47723  # Only process if variable expands to non-empty
47724
47725  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47727
47728  # Input might be given as Windows format, start by converting to
47729  # unix format.
47730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47731  new_path=`$CYGPATH -u "$path"`
47732
47733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47736  # "foo.exe" is OK but "foo" is an error.
47737  #
47738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47739  # It is also a way to make sure we got the proper file name for the real test later on.
47740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47741  if test "x$test_shortpath" = x; then
47742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47744    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47745  fi
47746
47747  # Call helper function which possibly converts this using DOS-style short mode.
47748  # If so, the updated path is stored in $new_path.
47749
47750  input_path="$new_path"
47751  # Check if we need to convert this using DOS-style short mode. If the path
47752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47753  # take no chances and rewrite it.
47754  # Note: m4 eats our [], so we need to use [ and ] instead.
47755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47756  if test "x$has_forbidden_chars" != x; then
47757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47761      # Going to short mode and back again did indeed matter. Since short mode is
47762      # case insensitive, let's make it lowercase to improve readability.
47763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47764      # Now convert it back to Unix-style (cygpath)
47765      input_path=`$CYGPATH -u "$shortmode_path"`
47766      new_path="$input_path"
47767    fi
47768  fi
47769
47770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47771  if test "x$test_cygdrive_prefix" = x; then
47772    # As a simple fix, exclude /usr/bin since it's not a real path.
47773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47775      # a path prefixed by /cygdrive for fixpath to work.
47776      new_path="$CYGWIN_ROOT_PATH$input_path"
47777    fi
47778  fi
47779
47780
47781  if test "x$path" != "x$new_path"; then
47782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47785  fi
47786
47787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47788
47789  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47790  has_colon=`$ECHO $path | $GREP ^.:`
47791  new_path="$path"
47792  if test "x$has_colon" = x; then
47793    # Not in mixed or Windows style, start by that.
47794    new_path=`cmd //c echo $path`
47795  fi
47796
47797
47798  input_path="$new_path"
47799  # Check if we need to convert this using DOS-style short mode. If the path
47800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47801  # take no chances and rewrite it.
47802  # Note: m4 eats our [], so we need to use [ and ] instead.
47803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47804  if test "x$has_forbidden_chars" != x; then
47805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47807  fi
47808
47809
47810  windows_path="$new_path"
47811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47812    unix_path=`$CYGPATH -u "$windows_path"`
47813    new_path="$unix_path"
47814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47816    new_path="$unix_path"
47817  fi
47818
47819  if test "x$path" != "x$new_path"; then
47820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47823  fi
47824
47825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47827
47828    else
47829      # We're on a unix platform. Hooray! :)
47830      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47831      has_space=`$ECHO "$path" | $GREP " "`
47832      if test "x$has_space" != x; then
47833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47835        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47836      fi
47837
47838      # Use eval to expand a potential ~
47839      eval path="$path"
47840      if test ! -f "$path" && test ! -d "$path"; then
47841        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47842      fi
47843
47844      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47845    fi
47846  fi
47847
47848
47849  # Only process if variable expands to non-empty
47850
47851  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47853
47854  # Input might be given as Windows format, start by converting to
47855  # unix format.
47856  path="$POTENTIAL_FREETYPE_LIB_PATH"
47857  new_path=`$CYGPATH -u "$path"`
47858
47859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47862  # "foo.exe" is OK but "foo" is an error.
47863  #
47864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47865  # It is also a way to make sure we got the proper file name for the real test later on.
47866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47867  if test "x$test_shortpath" = x; then
47868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47869$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47870    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47871  fi
47872
47873  # Call helper function which possibly converts this using DOS-style short mode.
47874  # If so, the updated path is stored in $new_path.
47875
47876  input_path="$new_path"
47877  # Check if we need to convert this using DOS-style short mode. If the path
47878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47879  # take no chances and rewrite it.
47880  # Note: m4 eats our [], so we need to use [ and ] instead.
47881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47882  if test "x$has_forbidden_chars" != x; then
47883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47887      # Going to short mode and back again did indeed matter. Since short mode is
47888      # case insensitive, let's make it lowercase to improve readability.
47889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47890      # Now convert it back to Unix-style (cygpath)
47891      input_path=`$CYGPATH -u "$shortmode_path"`
47892      new_path="$input_path"
47893    fi
47894  fi
47895
47896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47897  if test "x$test_cygdrive_prefix" = x; then
47898    # As a simple fix, exclude /usr/bin since it's not a real path.
47899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47901      # a path prefixed by /cygdrive for fixpath to work.
47902      new_path="$CYGWIN_ROOT_PATH$input_path"
47903    fi
47904  fi
47905
47906
47907  if test "x$path" != "x$new_path"; then
47908    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47911  fi
47912
47913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47914
47915  path="$POTENTIAL_FREETYPE_LIB_PATH"
47916  has_colon=`$ECHO $path | $GREP ^.:`
47917  new_path="$path"
47918  if test "x$has_colon" = x; then
47919    # Not in mixed or Windows style, start by that.
47920    new_path=`cmd //c echo $path`
47921  fi
47922
47923
47924  input_path="$new_path"
47925  # Check if we need to convert this using DOS-style short mode. If the path
47926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47927  # take no chances and rewrite it.
47928  # Note: m4 eats our [], so we need to use [ and ] instead.
47929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47930  if test "x$has_forbidden_chars" != x; then
47931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47933  fi
47934
47935
47936  windows_path="$new_path"
47937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47938    unix_path=`$CYGPATH -u "$windows_path"`
47939    new_path="$unix_path"
47940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47942    new_path="$unix_path"
47943  fi
47944
47945  if test "x$path" != "x$new_path"; then
47946    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47948$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47949  fi
47950
47951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47953
47954    else
47955      # We're on a unix platform. Hooray! :)
47956      path="$POTENTIAL_FREETYPE_LIB_PATH"
47957      has_space=`$ECHO "$path" | $GREP " "`
47958      if test "x$has_space" != x; then
47959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47962      fi
47963
47964      # Use eval to expand a potential ~
47965      eval path="$path"
47966      if test ! -f "$path" && test ! -d "$path"; then
47967        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47968      fi
47969
47970      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47971    fi
47972  fi
47973
47974
47975    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47977$as_echo_n "checking for freetype includes... " >&6; }
47978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47979$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47980    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47982$as_echo_n "checking for freetype libraries... " >&6; }
47983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47984$as_echo "$FREETYPE_LIB_PATH" >&6; }
47985  fi
47986
47987              if test "x$FOUND_FREETYPE" != xyes; then
47988
47989  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47990  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47991  METHOD="well-known location"
47992
47993  # Let's start with an optimistic view of the world :-)
47994  FOUND_FREETYPE=yes
47995
47996  # First look for the canonical freetype main include file ft2build.h.
47997  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47998    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47999    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48000    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48001      # Fail.
48002      FOUND_FREETYPE=no
48003    fi
48004  fi
48005
48006  if test "x$FOUND_FREETYPE" = xyes; then
48007    # Include file found, let's continue the sanity check.
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48009$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48010
48011    # Reset to default value
48012    FREETYPE_BASE_NAME=freetype
48013    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48014    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48015      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48017        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48018        # for the .6 version explicitly.
48019        FREETYPE_BASE_NAME=freetype.6
48020        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48021        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48022$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48023      else
48024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48026        FOUND_FREETYPE=no
48027      fi
48028    else
48029      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48030        # On Windows, we will need both .lib and .dll file.
48031        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48032          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48033$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48034          FOUND_FREETYPE=no
48035        fi
48036      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48037          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48038        # Found lib in isa dir, use that instead.
48039        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48040        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48041$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48042      fi
48043    fi
48044  fi
48045
48046  if test "x$FOUND_FREETYPE" = xyes; then
48047
48048  # Only process if variable expands to non-empty
48049
48050  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48052
48053  # Input might be given as Windows format, start by converting to
48054  # unix format.
48055  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48056  new_path=`$CYGPATH -u "$path"`
48057
48058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48061  # "foo.exe" is OK but "foo" is an error.
48062  #
48063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48064  # It is also a way to make sure we got the proper file name for the real test later on.
48065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48066  if test "x$test_shortpath" = x; then
48067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48069    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48070  fi
48071
48072  # Call helper function which possibly converts this using DOS-style short mode.
48073  # If so, the updated path is stored in $new_path.
48074
48075  input_path="$new_path"
48076  # Check if we need to convert this using DOS-style short mode. If the path
48077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48078  # take no chances and rewrite it.
48079  # Note: m4 eats our [], so we need to use [ and ] instead.
48080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48081  if test "x$has_forbidden_chars" != x; then
48082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48086      # Going to short mode and back again did indeed matter. Since short mode is
48087      # case insensitive, let's make it lowercase to improve readability.
48088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48089      # Now convert it back to Unix-style (cygpath)
48090      input_path=`$CYGPATH -u "$shortmode_path"`
48091      new_path="$input_path"
48092    fi
48093  fi
48094
48095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48096  if test "x$test_cygdrive_prefix" = x; then
48097    # As a simple fix, exclude /usr/bin since it's not a real path.
48098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48100      # a path prefixed by /cygdrive for fixpath to work.
48101      new_path="$CYGWIN_ROOT_PATH$input_path"
48102    fi
48103  fi
48104
48105
48106  if test "x$path" != "x$new_path"; then
48107    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48110  fi
48111
48112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48113
48114  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48115  has_colon=`$ECHO $path | $GREP ^.:`
48116  new_path="$path"
48117  if test "x$has_colon" = x; then
48118    # Not in mixed or Windows style, start by that.
48119    new_path=`cmd //c echo $path`
48120  fi
48121
48122
48123  input_path="$new_path"
48124  # Check if we need to convert this using DOS-style short mode. If the path
48125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48126  # take no chances and rewrite it.
48127  # Note: m4 eats our [], so we need to use [ and ] instead.
48128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48129  if test "x$has_forbidden_chars" != x; then
48130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48132  fi
48133
48134
48135  windows_path="$new_path"
48136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48137    unix_path=`$CYGPATH -u "$windows_path"`
48138    new_path="$unix_path"
48139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48141    new_path="$unix_path"
48142  fi
48143
48144  if test "x$path" != "x$new_path"; then
48145    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48148  fi
48149
48150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48152
48153    else
48154      # We're on a unix platform. Hooray! :)
48155      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48156      has_space=`$ECHO "$path" | $GREP " "`
48157      if test "x$has_space" != x; then
48158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48161      fi
48162
48163      # Use eval to expand a potential ~
48164      eval path="$path"
48165      if test ! -f "$path" && test ! -d "$path"; then
48166        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48167      fi
48168
48169      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48170    fi
48171  fi
48172
48173
48174  # Only process if variable expands to non-empty
48175
48176  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48178
48179  # Input might be given as Windows format, start by converting to
48180  # unix format.
48181  path="$POTENTIAL_FREETYPE_LIB_PATH"
48182  new_path=`$CYGPATH -u "$path"`
48183
48184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48187  # "foo.exe" is OK but "foo" is an error.
48188  #
48189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48190  # It is also a way to make sure we got the proper file name for the real test later on.
48191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48192  if test "x$test_shortpath" = x; then
48193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48195    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48196  fi
48197
48198  # Call helper function which possibly converts this using DOS-style short mode.
48199  # If so, the updated path is stored in $new_path.
48200
48201  input_path="$new_path"
48202  # Check if we need to convert this using DOS-style short mode. If the path
48203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48204  # take no chances and rewrite it.
48205  # Note: m4 eats our [], so we need to use [ and ] instead.
48206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48207  if test "x$has_forbidden_chars" != x; then
48208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48212      # Going to short mode and back again did indeed matter. Since short mode is
48213      # case insensitive, let's make it lowercase to improve readability.
48214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48215      # Now convert it back to Unix-style (cygpath)
48216      input_path=`$CYGPATH -u "$shortmode_path"`
48217      new_path="$input_path"
48218    fi
48219  fi
48220
48221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48222  if test "x$test_cygdrive_prefix" = x; then
48223    # As a simple fix, exclude /usr/bin since it's not a real path.
48224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48226      # a path prefixed by /cygdrive for fixpath to work.
48227      new_path="$CYGWIN_ROOT_PATH$input_path"
48228    fi
48229  fi
48230
48231
48232  if test "x$path" != "x$new_path"; then
48233    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48236  fi
48237
48238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48239
48240  path="$POTENTIAL_FREETYPE_LIB_PATH"
48241  has_colon=`$ECHO $path | $GREP ^.:`
48242  new_path="$path"
48243  if test "x$has_colon" = x; then
48244    # Not in mixed or Windows style, start by that.
48245    new_path=`cmd //c echo $path`
48246  fi
48247
48248
48249  input_path="$new_path"
48250  # Check if we need to convert this using DOS-style short mode. If the path
48251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48252  # take no chances and rewrite it.
48253  # Note: m4 eats our [], so we need to use [ and ] instead.
48254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48255  if test "x$has_forbidden_chars" != x; then
48256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48258  fi
48259
48260
48261  windows_path="$new_path"
48262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48263    unix_path=`$CYGPATH -u "$windows_path"`
48264    new_path="$unix_path"
48265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48267    new_path="$unix_path"
48268  fi
48269
48270  if test "x$path" != "x$new_path"; then
48271    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48274  fi
48275
48276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48278
48279    else
48280      # We're on a unix platform. Hooray! :)
48281      path="$POTENTIAL_FREETYPE_LIB_PATH"
48282      has_space=`$ECHO "$path" | $GREP " "`
48283      if test "x$has_space" != x; then
48284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48287      fi
48288
48289      # Use eval to expand a potential ~
48290      eval path="$path"
48291      if test ! -f "$path" && test ! -d "$path"; then
48292        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48293      fi
48294
48295      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48296    fi
48297  fi
48298
48299
48300    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48302$as_echo_n "checking for freetype includes... " >&6; }
48303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48304$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48305    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48307$as_echo_n "checking for freetype libraries... " >&6; }
48308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48309$as_echo "$FREETYPE_LIB_PATH" >&6; }
48310  fi
48311
48312              fi
48313            fi
48314          fi
48315        fi
48316      fi # end check in well-known locations
48317
48318      if test "x$FOUND_FREETYPE" != xyes; then
48319
48320  # Print a helpful message on how to acquire the necessary build dependency.
48321  # freetype is the help tag: freetype, cups, pulse, alsa etc
48322  MISSING_DEPENDENCY=freetype
48323
48324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48325    cygwin_help $MISSING_DEPENDENCY
48326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48327    msys_help $MISSING_DEPENDENCY
48328  else
48329    PKGHANDLER_COMMAND=
48330
48331    case $PKGHANDLER in
48332      apt-get)
48333        apt_help     $MISSING_DEPENDENCY ;;
48334      yum)
48335        yum_help     $MISSING_DEPENDENCY ;;
48336      port)
48337        port_help    $MISSING_DEPENDENCY ;;
48338      pkgutil)
48339        pkgutil_help $MISSING_DEPENDENCY ;;
48340      pkgadd)
48341        pkgadd_help  $MISSING_DEPENDENCY ;;
48342    esac
48343
48344    if test "x$PKGHANDLER_COMMAND" != x; then
48345      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48346    fi
48347  fi
48348
48349        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48350      fi
48351    fi # end user specified settings
48352
48353    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48354    if test "x$FREETYPE_CFLAGS" = x; then
48355
48356  # Only process if variable expands to non-empty
48357
48358  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48360
48361  # Input might be given as Windows format, start by converting to
48362  # unix format.
48363  path="$FREETYPE_INCLUDE_PATH"
48364  new_path=`$CYGPATH -u "$path"`
48365
48366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48369  # "foo.exe" is OK but "foo" is an error.
48370  #
48371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48372  # It is also a way to make sure we got the proper file name for the real test later on.
48373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48374  if test "x$test_shortpath" = x; then
48375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48376$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48377    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48378  fi
48379
48380  # Call helper function which possibly converts this using DOS-style short mode.
48381  # If so, the updated path is stored in $new_path.
48382
48383  input_path="$new_path"
48384  # Check if we need to convert this using DOS-style short mode. If the path
48385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48386  # take no chances and rewrite it.
48387  # Note: m4 eats our [], so we need to use [ and ] instead.
48388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48389  if test "x$has_forbidden_chars" != x; then
48390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48394      # Going to short mode and back again did indeed matter. Since short mode is
48395      # case insensitive, let's make it lowercase to improve readability.
48396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48397      # Now convert it back to Unix-style (cygpath)
48398      input_path=`$CYGPATH -u "$shortmode_path"`
48399      new_path="$input_path"
48400    fi
48401  fi
48402
48403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48404  if test "x$test_cygdrive_prefix" = x; then
48405    # As a simple fix, exclude /usr/bin since it's not a real path.
48406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48408      # a path prefixed by /cygdrive for fixpath to work.
48409      new_path="$CYGWIN_ROOT_PATH$input_path"
48410    fi
48411  fi
48412
48413
48414  if test "x$path" != "x$new_path"; then
48415    FREETYPE_INCLUDE_PATH="$new_path"
48416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48417$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48418  fi
48419
48420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48421
48422  path="$FREETYPE_INCLUDE_PATH"
48423  has_colon=`$ECHO $path | $GREP ^.:`
48424  new_path="$path"
48425  if test "x$has_colon" = x; then
48426    # Not in mixed or Windows style, start by that.
48427    new_path=`cmd //c echo $path`
48428  fi
48429
48430
48431  input_path="$new_path"
48432  # Check if we need to convert this using DOS-style short mode. If the path
48433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48434  # take no chances and rewrite it.
48435  # Note: m4 eats our [], so we need to use [ and ] instead.
48436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48437  if test "x$has_forbidden_chars" != x; then
48438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48440  fi
48441
48442
48443  windows_path="$new_path"
48444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48445    unix_path=`$CYGPATH -u "$windows_path"`
48446    new_path="$unix_path"
48447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48449    new_path="$unix_path"
48450  fi
48451
48452  if test "x$path" != "x$new_path"; then
48453    FREETYPE_INCLUDE_PATH="$new_path"
48454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48455$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48456  fi
48457
48458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48460
48461    else
48462      # We're on a unix platform. Hooray! :)
48463      path="$FREETYPE_INCLUDE_PATH"
48464      has_space=`$ECHO "$path" | $GREP " "`
48465      if test "x$has_space" != x; then
48466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48467$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48469      fi
48470
48471      # Use eval to expand a potential ~
48472      eval path="$path"
48473      if test ! -f "$path" && test ! -d "$path"; then
48474        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48475      fi
48476
48477      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48478    fi
48479  fi
48480
48481      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48482        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48483      else
48484        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48485      fi
48486    fi
48487
48488    if test "x$FREETYPE_LIBS" = x; then
48489
48490  # Only process if variable expands to non-empty
48491
48492  if test "x$FREETYPE_LIB_PATH" != x; then
48493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48494
48495  # Input might be given as Windows format, start by converting to
48496  # unix format.
48497  path="$FREETYPE_LIB_PATH"
48498  new_path=`$CYGPATH -u "$path"`
48499
48500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48503  # "foo.exe" is OK but "foo" is an error.
48504  #
48505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48506  # It is also a way to make sure we got the proper file name for the real test later on.
48507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48508  if test "x$test_shortpath" = x; then
48509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48510$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48511    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48512  fi
48513
48514  # Call helper function which possibly converts this using DOS-style short mode.
48515  # If so, the updated path is stored in $new_path.
48516
48517  input_path="$new_path"
48518  # Check if we need to convert this using DOS-style short mode. If the path
48519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48520  # take no chances and rewrite it.
48521  # Note: m4 eats our [], so we need to use [ and ] instead.
48522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48523  if test "x$has_forbidden_chars" != x; then
48524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48528      # Going to short mode and back again did indeed matter. Since short mode is
48529      # case insensitive, let's make it lowercase to improve readability.
48530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48531      # Now convert it back to Unix-style (cygpath)
48532      input_path=`$CYGPATH -u "$shortmode_path"`
48533      new_path="$input_path"
48534    fi
48535  fi
48536
48537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48538  if test "x$test_cygdrive_prefix" = x; then
48539    # As a simple fix, exclude /usr/bin since it's not a real path.
48540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48542      # a path prefixed by /cygdrive for fixpath to work.
48543      new_path="$CYGWIN_ROOT_PATH$input_path"
48544    fi
48545  fi
48546
48547
48548  if test "x$path" != "x$new_path"; then
48549    FREETYPE_LIB_PATH="$new_path"
48550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48551$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48552  fi
48553
48554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48555
48556  path="$FREETYPE_LIB_PATH"
48557  has_colon=`$ECHO $path | $GREP ^.:`
48558  new_path="$path"
48559  if test "x$has_colon" = x; then
48560    # Not in mixed or Windows style, start by that.
48561    new_path=`cmd //c echo $path`
48562  fi
48563
48564
48565  input_path="$new_path"
48566  # Check if we need to convert this using DOS-style short mode. If the path
48567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48568  # take no chances and rewrite it.
48569  # Note: m4 eats our [], so we need to use [ and ] instead.
48570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48571  if test "x$has_forbidden_chars" != x; then
48572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48574  fi
48575
48576
48577  windows_path="$new_path"
48578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48579    unix_path=`$CYGPATH -u "$windows_path"`
48580    new_path="$unix_path"
48581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48583    new_path="$unix_path"
48584  fi
48585
48586  if test "x$path" != "x$new_path"; then
48587    FREETYPE_LIB_PATH="$new_path"
48588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48589$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48590  fi
48591
48592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48594
48595    else
48596      # We're on a unix platform. Hooray! :)
48597      path="$FREETYPE_LIB_PATH"
48598      has_space=`$ECHO "$path" | $GREP " "`
48599      if test "x$has_space" != x; then
48600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48601$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48603      fi
48604
48605      # Use eval to expand a potential ~
48606      eval path="$path"
48607      if test ! -f "$path" && test ! -d "$path"; then
48608        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48609      fi
48610
48611      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48612    fi
48613  fi
48614
48615      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48616        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48617      else
48618        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48619      fi
48620    fi
48621
48622    # Try to compile it
48623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48624$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48625    ac_ext=cpp
48626ac_cpp='$CXXCPP $CPPFLAGS'
48627ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48628ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48629ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48630
48631    PREV_CXXCFLAGS="$CXXFLAGS"
48632    PREV_LIBS="$LIBS"
48633    PREV_CXX="$CXX"
48634    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48635    LIBS="$LIBS $FREETYPE_LIBS"
48636    CXX="$FIXPATH $CXX"
48637    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48638/* end confdefs.h.  */
48639
48640          #include<ft2build.h>
48641          #include FT_FREETYPE_H
48642          int main () {
48643            FT_Init_FreeType(NULL);
48644            return 0;
48645          }
48646
48647_ACEOF
48648if ac_fn_cxx_try_link "$LINENO"; then :
48649
48650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48651$as_echo "yes" >&6; }
48652
48653else
48654
48655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48656$as_echo "no" >&6; }
48657          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48658$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48659          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48660$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48661
48662
48663  # Print a helpful message on how to acquire the necessary build dependency.
48664  # freetype is the help tag: freetype, cups, pulse, alsa etc
48665  MISSING_DEPENDENCY=freetype
48666
48667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48668    cygwin_help $MISSING_DEPENDENCY
48669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48670    msys_help $MISSING_DEPENDENCY
48671  else
48672    PKGHANDLER_COMMAND=
48673
48674    case $PKGHANDLER in
48675      apt-get)
48676        apt_help     $MISSING_DEPENDENCY ;;
48677      yum)
48678        yum_help     $MISSING_DEPENDENCY ;;
48679      port)
48680        port_help    $MISSING_DEPENDENCY ;;
48681      pkgutil)
48682        pkgutil_help $MISSING_DEPENDENCY ;;
48683      pkgadd)
48684        pkgadd_help  $MISSING_DEPENDENCY ;;
48685    esac
48686
48687    if test "x$PKGHANDLER_COMMAND" != x; then
48688      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48689    fi
48690  fi
48691
48692
48693          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48694
48695
48696fi
48697rm -f core conftest.err conftest.$ac_objext \
48698    conftest$ac_exeext conftest.$ac_ext
48699    CXXCFLAGS="$PREV_CXXFLAGS"
48700    LIBS="$PREV_LIBS"
48701    CXX="$PREV_CXX"
48702    ac_ext=cpp
48703ac_cpp='$CXXCPP $CPPFLAGS'
48704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48705ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48707
48708
48709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48710$as_echo_n "checking if we should bundle freetype... " >&6; }
48711    if test "x$BUNDLE_FREETYPE" = xyes; then
48712      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48713    fi
48714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48715$as_echo "$BUNDLE_FREETYPE" >&6; }
48716
48717  fi # end freetype needed
48718
48719
48720
48721
48722
48723
48724
48725  ###############################################################################
48726  #
48727  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48728  #
48729
48730# Check whether --with-alsa was given.
48731if test "${with_alsa+set}" = set; then :
48732  withval=$with_alsa;
48733fi
48734
48735
48736# Check whether --with-alsa-include was given.
48737if test "${with_alsa_include+set}" = set; then :
48738  withval=$with_alsa_include;
48739fi
48740
48741
48742# Check whether --with-alsa-lib was given.
48743if test "${with_alsa_lib+set}" = set; then :
48744  withval=$with_alsa_lib;
48745fi
48746
48747
48748  if test "x$ALSA_NOT_NEEDED" = xyes; then
48749    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48750      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48751$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48752    fi
48753    ALSA_CFLAGS=
48754    ALSA_LIBS=
48755  else
48756    ALSA_FOUND=no
48757
48758    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48759      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48760    fi
48761
48762    if test "x${with_alsa}" != x; then
48763      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48764      ALSA_CFLAGS="-I${with_alsa}/include"
48765      ALSA_FOUND=yes
48766    fi
48767    if test "x${with_alsa_include}" != x; then
48768      ALSA_CFLAGS="-I${with_alsa_include}"
48769      ALSA_FOUND=yes
48770    fi
48771    if test "x${with_alsa_lib}" != x; then
48772      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48773      ALSA_FOUND=yes
48774    fi
48775    if test "x$ALSA_FOUND" = xno; then
48776
48777
48778  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48779    # Source the builddeps file again, to make sure it uses the latest variables!
48780    . $builddepsfile
48781    # Look for a target and build machine specific resource!
48782    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48783    if test "x$resource" = x; then
48784      # Ok, lets instead look for a target specific resource
48785      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48786    fi
48787    if test "x$resource" = x; then
48788      # Ok, lets instead look for a build specific resource
48789      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48790    fi
48791    if test "x$resource" = x; then
48792      # Ok, lets instead look for a generic resource
48793      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48794      resource=${builddep_alsa}
48795    fi
48796    if test "x$resource" != x; then
48797      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48798$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48799      # If the resource in the builddeps.conf file is an existing directory,
48800      # for example /java/linux/cups
48801      if test -d ${resource}; then
48802        depdir=${resource}
48803      else
48804
48805  # alsa is for example mymodule
48806  # $resource is for example libs/general/libmymod_1_2_3.zip
48807  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48808  # $with_builddeps_dir is for example /localhome/builddeps
48809  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48810  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48811  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48812  filename=`basename $resource`
48813  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48814  filebase=${filename%%.*}
48815  extension=${filename#*.}
48816  installdir=$with_builddeps_dir/$filebase
48817  if test ! -f $installdir/$filename.unpacked; then
48818    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48819$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48820    if test ! -d $installdir; then
48821      mkdir -p $installdir
48822    fi
48823    if test ! -d $installdir; then
48824      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48825    fi
48826    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48827    touch $tmpfile
48828    if test ! -f $tmpfile; then
48829      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48830    fi
48831
48832  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48833  # $tmpfile is the local file name for the downloaded file.
48834  VALID_TOOL=no
48835  if test "x$BDEPS_FTP" = xwget; then
48836    VALID_TOOL=yes
48837    wget -O $tmpfile $with_builddeps_server/$resource
48838  fi
48839  if test "x$BDEPS_FTP" = xlftp; then
48840    VALID_TOOL=yes
48841    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48842  fi
48843  if test "x$BDEPS_FTP" = xftp; then
48844    VALID_TOOL=yes
48845    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48846    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48847    FTPUSERPWD=${FTPSERVER%%@*}
48848    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48849      FTPUSER=${userpwd%%:*}
48850      FTPPWD=${userpwd#*@}
48851      FTPSERVER=${FTPSERVER#*@}
48852    else
48853      FTPUSER=ftp
48854      FTPPWD=ftp
48855    fi
48856    # the "pass" command does not work on some
48857    # ftp clients (read ftp.exe) but if it works,
48858    # passive mode is better!
48859    ( \
48860        echo "user $FTPUSER $FTPPWD"        ; \
48861        echo "pass"                         ; \
48862        echo "bin"                          ; \
48863        echo "get $FTPPATH $tmpfile"              ; \
48864    ) | ftp -in $FTPSERVER
48865  fi
48866  if test "x$VALID_TOOL" != xyes; then
48867    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48868  fi
48869
48870    mv $tmpfile $installdir/$filename
48871    if test ! -s $installdir/$filename; then
48872      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48873    fi
48874    case "$extension" in
48875      zip)  echo "Unzipping $installdir/$filename..."
48876        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48877        ;;
48878      tar.gz) echo "Untaring $installdir/$filename..."
48879        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48880        ;;
48881      tgz) echo "Untaring $installdir/$filename..."
48882        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48883        ;;
48884      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48885        ;;
48886    esac
48887  fi
48888  if test -f $installdir/$filename.unpacked; then
48889    depdir=$installdir
48890  fi
48891
48892      fi
48893      # Source the builddeps file again, because in the previous command, the depdir
48894      # was updated to point at the current build dependency install directory.
48895      . $builddepsfile
48896      # Now extract variables from the builddeps.conf files.
48897      theroot=${builddep_alsa_ROOT}
48898      thecflags=${builddep_alsa_CFLAGS}
48899      thelibs=${builddep_alsa_LIBS}
48900      if test "x$depdir" = x; then
48901        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48902      fi
48903      ALSA=$depdir
48904      if test "x$theroot" != x; then
48905        ALSA="$theroot"
48906      fi
48907      if test "x$thecflags" != x; then
48908        ALSA_CFLAGS="$thecflags"
48909      fi
48910      if test "x$thelibs" != x; then
48911        ALSA_LIBS="$thelibs"
48912      fi
48913      ALSA_FOUND=yes
48914      else ALSA_FOUND=no
48915
48916    fi
48917    else ALSA_FOUND=no
48918
48919  fi
48920
48921    fi
48922    # Do not try pkg-config if we have a sysroot set.
48923    if test "x$SYSROOT" = x; then
48924      if test "x$ALSA_FOUND" = xno; then
48925
48926pkg_failed=no
48927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48928$as_echo_n "checking for ALSA... " >&6; }
48929
48930if test -n "$ALSA_CFLAGS"; then
48931    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48932 elif test -n "$PKG_CONFIG"; then
48933    if test -n "$PKG_CONFIG" && \
48934    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48935  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48936  ac_status=$?
48937  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48938  test $ac_status = 0; }; then
48939  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48940else
48941  pkg_failed=yes
48942fi
48943 else
48944    pkg_failed=untried
48945fi
48946if test -n "$ALSA_LIBS"; then
48947    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48948 elif test -n "$PKG_CONFIG"; then
48949    if test -n "$PKG_CONFIG" && \
48950    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48951  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48952  ac_status=$?
48953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48954  test $ac_status = 0; }; then
48955  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48956else
48957  pkg_failed=yes
48958fi
48959 else
48960    pkg_failed=untried
48961fi
48962
48963
48964
48965if test $pkg_failed = yes; then
48966
48967if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48968        _pkg_short_errors_supported=yes
48969else
48970        _pkg_short_errors_supported=no
48971fi
48972        if test $_pkg_short_errors_supported = yes; then
48973	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48974        else
48975	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48976        fi
48977	# Put the nasty error message in config.log where it belongs
48978	echo "$ALSA_PKG_ERRORS" >&5
48979
48980	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48981$as_echo "no" >&6; }
48982                ALSA_FOUND=no
48983elif test $pkg_failed = untried; then
48984	ALSA_FOUND=no
48985else
48986	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48987	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48989$as_echo "yes" >&6; }
48990	ALSA_FOUND=yes
48991fi
48992      fi
48993    fi
48994    if test "x$ALSA_FOUND" = xno; then
48995      for ac_header in alsa/asoundlib.h
48996do :
48997  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48998if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48999  cat >>confdefs.h <<_ACEOF
49000#define HAVE_ALSA_ASOUNDLIB_H 1
49001_ACEOF
49002
49003            ALSA_FOUND=yes
49004            ALSA_CFLAGS=-Iignoreme
49005            ALSA_LIBS=-lasound
49006            DEFAULT_ALSA=yes
49007
49008else
49009  ALSA_FOUND=no
49010fi
49011
49012done
49013
49014    fi
49015    if test "x$ALSA_FOUND" = xno; then
49016
49017  # Print a helpful message on how to acquire the necessary build dependency.
49018  # alsa is the help tag: freetype, cups, pulse, alsa etc
49019  MISSING_DEPENDENCY=alsa
49020
49021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49022    cygwin_help $MISSING_DEPENDENCY
49023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49024    msys_help $MISSING_DEPENDENCY
49025  else
49026    PKGHANDLER_COMMAND=
49027
49028    case $PKGHANDLER in
49029      apt-get)
49030        apt_help     $MISSING_DEPENDENCY ;;
49031      yum)
49032        yum_help     $MISSING_DEPENDENCY ;;
49033      port)
49034        port_help    $MISSING_DEPENDENCY ;;
49035      pkgutil)
49036        pkgutil_help $MISSING_DEPENDENCY ;;
49037      pkgadd)
49038        pkgadd_help  $MISSING_DEPENDENCY ;;
49039    esac
49040
49041    if test "x$PKGHANDLER_COMMAND" != x; then
49042      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49043    fi
49044  fi
49045
49046      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49047    fi
49048  fi
49049
49050
49051
49052
49053
49054
49055  ###############################################################################
49056  #
49057  # Check for the jpeg library
49058  #
49059
49060
49061# Check whether --with-libjpeg was given.
49062if test "${with_libjpeg+set}" = set; then :
49063  withval=$with_libjpeg;
49064fi
49065
49066
49067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49068$as_echo_n "checking for which libjpeg to use... " >&6; }
49069
49070  # default is bundled
49071  DEFAULT_LIBJPEG=bundled
49072
49073  #
49074  # if user didn't specify, use DEFAULT_LIBJPEG
49075  #
49076  if test "x${with_libjpeg}" = "x"; then
49077    with_libjpeg=${DEFAULT_LIBJPEG}
49078  fi
49079
49080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49081$as_echo "${with_libjpeg}" >&6; }
49082
49083  if test "x${with_libjpeg}" = "xbundled"; then
49084    USE_EXTERNAL_LIBJPEG=false
49085  elif test "x${with_libjpeg}" = "xsystem"; then
49086    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49087if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49088
49089else
49090   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49091fi
49092
49093
49094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49095$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49096if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49097  $as_echo_n "(cached) " >&6
49098else
49099  ac_check_lib_save_LIBS=$LIBS
49100LIBS="-ljpeg  $LIBS"
49101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49102/* end confdefs.h.  */
49103
49104/* Override any GCC internal prototype to avoid an error.
49105   Use char because int might match the return type of a GCC
49106   builtin and then its argument prototype would still apply.  */
49107#ifdef __cplusplus
49108extern "C"
49109#endif
49110char jpeg_CreateDecompress ();
49111int
49112main ()
49113{
49114return jpeg_CreateDecompress ();
49115  ;
49116  return 0;
49117}
49118_ACEOF
49119if ac_fn_cxx_try_link "$LINENO"; then :
49120  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49121else
49122  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49123fi
49124rm -f core conftest.err conftest.$ac_objext \
49125    conftest$ac_exeext conftest.$ac_ext
49126LIBS=$ac_check_lib_save_LIBS
49127fi
49128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49129$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49130if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49131  cat >>confdefs.h <<_ACEOF
49132#define HAVE_LIBJPEG 1
49133_ACEOF
49134
49135  LIBS="-ljpeg $LIBS"
49136
49137else
49138   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49139fi
49140
49141
49142    USE_EXTERNAL_LIBJPEG=true
49143  else
49144    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49145  fi
49146
49147
49148
49149  ###############################################################################
49150  #
49151  # Check for the gif library
49152  #
49153
49154
49155# Check whether --with-giflib was given.
49156if test "${with_giflib+set}" = set; then :
49157  withval=$with_giflib;
49158fi
49159
49160
49161
49162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49163$as_echo_n "checking for which giflib to use... " >&6; }
49164
49165  # default is bundled
49166  DEFAULT_GIFLIB=bundled
49167
49168  #
49169  # if user didn't specify, use DEFAULT_GIFLIB
49170  #
49171  if test "x${with_giflib}" = "x"; then
49172    with_giflib=${DEFAULT_GIFLIB}
49173  fi
49174
49175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49176$as_echo "${with_giflib}" >&6; }
49177
49178  if test "x${with_giflib}" = "xbundled"; then
49179    USE_EXTERNAL_LIBGIF=false
49180  elif test "x${with_giflib}" = "xsystem"; then
49181    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49182if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49183
49184else
49185   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49186fi
49187
49188
49189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49190$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49191if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49192  $as_echo_n "(cached) " >&6
49193else
49194  ac_check_lib_save_LIBS=$LIBS
49195LIBS="-lgif  $LIBS"
49196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49197/* end confdefs.h.  */
49198
49199/* Override any GCC internal prototype to avoid an error.
49200   Use char because int might match the return type of a GCC
49201   builtin and then its argument prototype would still apply.  */
49202#ifdef __cplusplus
49203extern "C"
49204#endif
49205char DGifGetCode ();
49206int
49207main ()
49208{
49209return DGifGetCode ();
49210  ;
49211  return 0;
49212}
49213_ACEOF
49214if ac_fn_cxx_try_link "$LINENO"; then :
49215  ac_cv_lib_gif_DGifGetCode=yes
49216else
49217  ac_cv_lib_gif_DGifGetCode=no
49218fi
49219rm -f core conftest.err conftest.$ac_objext \
49220    conftest$ac_exeext conftest.$ac_ext
49221LIBS=$ac_check_lib_save_LIBS
49222fi
49223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49224$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49225if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49226  cat >>confdefs.h <<_ACEOF
49227#define HAVE_LIBGIF 1
49228_ACEOF
49229
49230  LIBS="-lgif $LIBS"
49231
49232else
49233   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49234fi
49235
49236
49237    USE_EXTERNAL_LIBGIF=true
49238  else
49239    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49240  fi
49241
49242
49243  ###############################################################################
49244  #
49245  # Check for the lcms2 library
49246  #
49247
49248
49249# Check whether --with-lcms was given.
49250if test "${with_lcms+set}" = set; then :
49251  withval=$with_lcms;
49252fi
49253
49254
49255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49256$as_echo_n "checking for which lcms to use... " >&6; }
49257
49258  DEFAULT_LCMS=bundled
49259
49260  #
49261  # If user didn't specify, use DEFAULT_LCMS
49262  #
49263  if test "x${with_lcms}" = "x"; then
49264      with_lcms=${DEFAULT_LCMS}
49265  fi
49266
49267  if test "x${with_lcms}" = "xbundled"; then
49268    USE_EXTERNAL_LCMS=false
49269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49270$as_echo "bundled" >&6; }
49271  elif test "x${with_lcms}" = "xsystem"; then
49272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49273$as_echo "system" >&6; }
49274
49275pkg_failed=no
49276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49277$as_echo_n "checking for LCMS... " >&6; }
49278
49279if test -n "$LCMS_CFLAGS"; then
49280    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49281 elif test -n "$PKG_CONFIG"; then
49282    if test -n "$PKG_CONFIG" && \
49283    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49284  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49285  ac_status=$?
49286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49287  test $ac_status = 0; }; then
49288  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49289else
49290  pkg_failed=yes
49291fi
49292 else
49293    pkg_failed=untried
49294fi
49295if test -n "$LCMS_LIBS"; then
49296    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49297 elif test -n "$PKG_CONFIG"; then
49298    if test -n "$PKG_CONFIG" && \
49299    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49300  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49301  ac_status=$?
49302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49303  test $ac_status = 0; }; then
49304  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49305else
49306  pkg_failed=yes
49307fi
49308 else
49309    pkg_failed=untried
49310fi
49311
49312
49313
49314if test $pkg_failed = yes; then
49315
49316if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49317        _pkg_short_errors_supported=yes
49318else
49319        _pkg_short_errors_supported=no
49320fi
49321        if test $_pkg_short_errors_supported = yes; then
49322	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49323        else
49324	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49325        fi
49326	# Put the nasty error message in config.log where it belongs
49327	echo "$LCMS_PKG_ERRORS" >&5
49328
49329	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49330$as_echo "no" >&6; }
49331                LCMS_FOUND=no
49332elif test $pkg_failed = untried; then
49333	LCMS_FOUND=no
49334else
49335	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49336	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49338$as_echo "yes" >&6; }
49339	LCMS_FOUND=yes
49340fi
49341    if test "x${LCMS_FOUND}" = "xyes"; then
49342      USE_EXTERNAL_LCMS=true
49343    else
49344      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49345    fi
49346  else
49347    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49348  fi
49349
49350
49351
49352  ###############################################################################
49353  #
49354  # Check for the png library
49355  #
49356
49357
49358# Check whether --with-libpng was given.
49359if test "${with_libpng+set}" = set; then :
49360  withval=$with_libpng;
49361fi
49362
49363
49364
49365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49366$as_echo_n "checking for which libpng to use... " >&6; }
49367
49368  # default is bundled
49369  DEFAULT_LIBPNG=bundled
49370
49371  #
49372  # if user didn't specify, use DEFAULT_LIBPNG
49373  #
49374  if test "x${with_libpng}" = "x"; then
49375      with_libpng=${DEFAULT_LIBPNG}
49376  fi
49377
49378  if test "x${with_libpng}" = "xbundled"; then
49379      USE_EXTERNAL_LIBPNG=false
49380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49381$as_echo "bundled" >&6; }
49382  elif test "x${with_libpng}" = "xsystem"; then
49383
49384pkg_failed=no
49385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49386$as_echo_n "checking for PNG... " >&6; }
49387
49388if test -n "$PNG_CFLAGS"; then
49389    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49390 elif test -n "$PKG_CONFIG"; then
49391    if test -n "$PKG_CONFIG" && \
49392    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49393  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49394  ac_status=$?
49395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49396  test $ac_status = 0; }; then
49397  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49398else
49399  pkg_failed=yes
49400fi
49401 else
49402    pkg_failed=untried
49403fi
49404if test -n "$PNG_LIBS"; then
49405    pkg_cv_PNG_LIBS="$PNG_LIBS"
49406 elif test -n "$PKG_CONFIG"; then
49407    if test -n "$PKG_CONFIG" && \
49408    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49409  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49410  ac_status=$?
49411  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49412  test $ac_status = 0; }; then
49413  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49414else
49415  pkg_failed=yes
49416fi
49417 else
49418    pkg_failed=untried
49419fi
49420
49421
49422
49423if test $pkg_failed = yes; then
49424
49425if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49426        _pkg_short_errors_supported=yes
49427else
49428        _pkg_short_errors_supported=no
49429fi
49430        if test $_pkg_short_errors_supported = yes; then
49431	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49432        else
49433	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49434        fi
49435	# Put the nasty error message in config.log where it belongs
49436	echo "$PNG_PKG_ERRORS" >&5
49437
49438	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49439$as_echo "no" >&6; }
49440                 LIBPNG_FOUND=no
49441elif test $pkg_failed = untried; then
49442	 LIBPNG_FOUND=no
49443else
49444	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49445	PNG_LIBS=$pkg_cv_PNG_LIBS
49446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49447$as_echo "yes" >&6; }
49448	 LIBPNG_FOUND=yes
49449fi
49450      if test "x${LIBPNG_FOUND}" = "xyes"; then
49451          USE_EXTERNAL_LIBPNG=true
49452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49453$as_echo "system" >&6; }
49454      else
49455          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49456$as_echo "system not found" >&6; }
49457          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49458      fi
49459  else
49460      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49461  fi
49462
49463
49464  ###############################################################################
49465  #
49466  # Check for the zlib library
49467  #
49468
49469
49470# Check whether --with-zlib was given.
49471if test "${with_zlib+set}" = set; then :
49472  withval=$with_zlib;
49473fi
49474
49475
49476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49477$as_echo_n "checking for compress in -lz... " >&6; }
49478if ${ac_cv_lib_z_compress+:} false; then :
49479  $as_echo_n "(cached) " >&6
49480else
49481  ac_check_lib_save_LIBS=$LIBS
49482LIBS="-lz  $LIBS"
49483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49484/* end confdefs.h.  */
49485
49486/* Override any GCC internal prototype to avoid an error.
49487   Use char because int might match the return type of a GCC
49488   builtin and then its argument prototype would still apply.  */
49489#ifdef __cplusplus
49490extern "C"
49491#endif
49492char compress ();
49493int
49494main ()
49495{
49496return compress ();
49497  ;
49498  return 0;
49499}
49500_ACEOF
49501if ac_fn_cxx_try_link "$LINENO"; then :
49502  ac_cv_lib_z_compress=yes
49503else
49504  ac_cv_lib_z_compress=no
49505fi
49506rm -f core conftest.err conftest.$ac_objext \
49507    conftest$ac_exeext conftest.$ac_ext
49508LIBS=$ac_check_lib_save_LIBS
49509fi
49510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49511$as_echo "$ac_cv_lib_z_compress" >&6; }
49512if test "x$ac_cv_lib_z_compress" = xyes; then :
49513   ZLIB_FOUND=yes
49514else
49515   ZLIB_FOUND=no
49516fi
49517
49518
49519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49520$as_echo_n "checking for which zlib to use... " >&6; }
49521
49522  DEFAULT_ZLIB=bundled
49523  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49524    #
49525    # On macosx default is system...on others default is
49526    #
49527    DEFAULT_ZLIB=system
49528  fi
49529
49530  if test "x${ZLIB_FOUND}" != "xyes"; then
49531    #
49532    # If we don't find any system...set default to bundled
49533    #
49534    DEFAULT_ZLIB=bundled
49535  fi
49536
49537  #
49538  # If user didn't specify, use DEFAULT_ZLIB
49539  #
49540  if test "x${with_zlib}" = "x"; then
49541    with_zlib=${DEFAULT_ZLIB}
49542  fi
49543
49544  if test "x${with_zlib}" = "xbundled"; then
49545    USE_EXTERNAL_LIBZ=false
49546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49547$as_echo "bundled" >&6; }
49548  elif test "x${with_zlib}" = "xsystem"; then
49549    if test "x${ZLIB_FOUND}" = "xyes"; then
49550      USE_EXTERNAL_LIBZ=true
49551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49552$as_echo "system" >&6; }
49553    else
49554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49555$as_echo "system not found" >&6; }
49556      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49557    fi
49558  else
49559    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49560  fi
49561
49562
49563
49564  ###############################################################################
49565  LIBZIP_CAN_USE_MMAP=true
49566
49567
49568
49569  ###############################################################################
49570  #
49571  # Check if altzone exists in time.h
49572  #
49573
49574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49575/* end confdefs.h.  */
49576#include <time.h>
49577int
49578main ()
49579{
49580return (int)altzone;
49581  ;
49582  return 0;
49583}
49584_ACEOF
49585if ac_fn_cxx_try_link "$LINENO"; then :
49586  has_altzone=yes
49587else
49588  has_altzone=no
49589fi
49590rm -f core conftest.err conftest.$ac_objext \
49591    conftest$ac_exeext conftest.$ac_ext
49592  if test "x$has_altzone" = xyes; then
49593
49594$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49595
49596  fi
49597
49598  ###############################################################################
49599  #
49600  # Check the maths library
49601  #
49602
49603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49604$as_echo_n "checking for cos in -lm... " >&6; }
49605if ${ac_cv_lib_m_cos+:} false; then :
49606  $as_echo_n "(cached) " >&6
49607else
49608  ac_check_lib_save_LIBS=$LIBS
49609LIBS="-lm  $LIBS"
49610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49611/* end confdefs.h.  */
49612
49613/* Override any GCC internal prototype to avoid an error.
49614   Use char because int might match the return type of a GCC
49615   builtin and then its argument prototype would still apply.  */
49616#ifdef __cplusplus
49617extern "C"
49618#endif
49619char cos ();
49620int
49621main ()
49622{
49623return cos ();
49624  ;
49625  return 0;
49626}
49627_ACEOF
49628if ac_fn_cxx_try_link "$LINENO"; then :
49629  ac_cv_lib_m_cos=yes
49630else
49631  ac_cv_lib_m_cos=no
49632fi
49633rm -f core conftest.err conftest.$ac_objext \
49634    conftest$ac_exeext conftest.$ac_ext
49635LIBS=$ac_check_lib_save_LIBS
49636fi
49637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49638$as_echo "$ac_cv_lib_m_cos" >&6; }
49639if test "x$ac_cv_lib_m_cos" = xyes; then :
49640  cat >>confdefs.h <<_ACEOF
49641#define HAVE_LIBM 1
49642_ACEOF
49643
49644  LIBS="-lm $LIBS"
49645
49646else
49647
49648        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49649$as_echo "$as_me: Maths library was not found" >&6;}
49650
49651
49652fi
49653
49654
49655
49656  ###############################################################################
49657  #
49658  # Check for libdl.so
49659
49660  save_LIBS="$LIBS"
49661  LIBS=""
49662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49663$as_echo_n "checking for dlopen in -ldl... " >&6; }
49664if ${ac_cv_lib_dl_dlopen+:} false; then :
49665  $as_echo_n "(cached) " >&6
49666else
49667  ac_check_lib_save_LIBS=$LIBS
49668LIBS="-ldl  $LIBS"
49669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49670/* end confdefs.h.  */
49671
49672/* Override any GCC internal prototype to avoid an error.
49673   Use char because int might match the return type of a GCC
49674   builtin and then its argument prototype would still apply.  */
49675#ifdef __cplusplus
49676extern "C"
49677#endif
49678char dlopen ();
49679int
49680main ()
49681{
49682return dlopen ();
49683  ;
49684  return 0;
49685}
49686_ACEOF
49687if ac_fn_cxx_try_link "$LINENO"; then :
49688  ac_cv_lib_dl_dlopen=yes
49689else
49690  ac_cv_lib_dl_dlopen=no
49691fi
49692rm -f core conftest.err conftest.$ac_objext \
49693    conftest$ac_exeext conftest.$ac_ext
49694LIBS=$ac_check_lib_save_LIBS
49695fi
49696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49697$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49698if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49699  cat >>confdefs.h <<_ACEOF
49700#define HAVE_LIBDL 1
49701_ACEOF
49702
49703  LIBS="-ldl $LIBS"
49704
49705fi
49706
49707  LIBDL="$LIBS"
49708
49709  LIBS="$save_LIBS"
49710
49711
49712  ###############################################################################
49713  #
49714  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49715  # dynamic build is configured on command line.
49716  #
49717
49718# Check whether --with-stdc++lib was given.
49719if test "${with_stdc__lib+set}" = set; then :
49720  withval=$with_stdc__lib;
49721        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49722                && test "x$with_stdc__lib" != xdefault; then
49723          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49724        fi
49725
49726else
49727  with_stdc__lib=default
49728
49729fi
49730
49731
49732  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49733    # Test if -lstdc++ works.
49734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49735$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49736    ac_ext=cpp
49737ac_cpp='$CXXCPP $CPPFLAGS'
49738ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49739ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49740ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49741
49742    OLD_CXXFLAGS="$CXXFLAGS"
49743    CXXFLAGS="$CXXFLAGS -lstdc++"
49744    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49745/* end confdefs.h.  */
49746
49747int
49748main ()
49749{
49750return 0;
49751  ;
49752  return 0;
49753}
49754_ACEOF
49755if ac_fn_cxx_try_link "$LINENO"; then :
49756  has_dynamic_libstdcxx=yes
49757else
49758  has_dynamic_libstdcxx=no
49759fi
49760rm -f core conftest.err conftest.$ac_objext \
49761    conftest$ac_exeext conftest.$ac_ext
49762    CXXFLAGS="$OLD_CXXFLAGS"
49763    ac_ext=cpp
49764ac_cpp='$CXXCPP $CPPFLAGS'
49765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49768
49769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49770$as_echo "$has_dynamic_libstdcxx" >&6; }
49771
49772    # Test if stdc++ can be linked statically.
49773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49774$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49775    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49776    ac_ext=cpp
49777ac_cpp='$CXXCPP $CPPFLAGS'
49778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49781
49782    OLD_LIBS="$LIBS"
49783    OLD_CXX="$CXX"
49784    LIBS="$STATIC_STDCXX_FLAGS"
49785    CXX="$CC"
49786    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49787/* end confdefs.h.  */
49788
49789int
49790main ()
49791{
49792return 0;
49793  ;
49794  return 0;
49795}
49796_ACEOF
49797if ac_fn_cxx_try_link "$LINENO"; then :
49798  has_static_libstdcxx=yes
49799else
49800  has_static_libstdcxx=no
49801fi
49802rm -f core conftest.err conftest.$ac_objext \
49803    conftest$ac_exeext conftest.$ac_ext
49804    LIBS="$OLD_LIBS"
49805    CXX="$OLD_CXX"
49806    ac_ext=cpp
49807ac_cpp='$CXXCPP $CPPFLAGS'
49808ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49809ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49810ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49811
49812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49813$as_echo "$has_static_libstdcxx" >&6; }
49814
49815    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49816      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49817    fi
49818
49819    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49820      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49821    fi
49822
49823    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49824      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49825    fi
49826
49827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49828$as_echo_n "checking how to link with libstdc++... " >&6; }
49829    # If dynamic was requested, it's available since it would fail above otherwise.
49830    # If dynamic wasn't requested, go with static unless it isn't available.
49831    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49832      LIBCXX="$LIBCXX -lstdc++"
49833      LDCXX="$CXX"
49834      STATIC_CXX_SETTING="STATIC_CXX=false"
49835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49836$as_echo "dynamic" >&6; }
49837    else
49838      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49839      LDCXX="$CC"
49840      STATIC_CXX_SETTING="STATIC_CXX=true"
49841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49842$as_echo "static" >&6; }
49843    fi
49844  fi
49845
49846
49847  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49848    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49849
49850pkg_failed=no
49851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49852$as_echo_n "checking for LIBFFI... " >&6; }
49853
49854if test -n "$LIBFFI_CFLAGS"; then
49855    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49856 elif test -n "$PKG_CONFIG"; then
49857    if test -n "$PKG_CONFIG" && \
49858    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49859  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49860  ac_status=$?
49861  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49862  test $ac_status = 0; }; then
49863  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49864else
49865  pkg_failed=yes
49866fi
49867 else
49868    pkg_failed=untried
49869fi
49870if test -n "$LIBFFI_LIBS"; then
49871    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49872 elif test -n "$PKG_CONFIG"; then
49873    if test -n "$PKG_CONFIG" && \
49874    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49875  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49876  ac_status=$?
49877  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49878  test $ac_status = 0; }; then
49879  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49880else
49881  pkg_failed=yes
49882fi
49883 else
49884    pkg_failed=untried
49885fi
49886
49887
49888
49889if test $pkg_failed = yes; then
49890
49891if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49892        _pkg_short_errors_supported=yes
49893else
49894        _pkg_short_errors_supported=no
49895fi
49896        if test $_pkg_short_errors_supported = yes; then
49897	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49898        else
49899	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49900        fi
49901	# Put the nasty error message in config.log where it belongs
49902	echo "$LIBFFI_PKG_ERRORS" >&5
49903
49904	as_fn_error $? "Package requirements (libffi) were not met:
49905
49906$LIBFFI_PKG_ERRORS
49907
49908Consider adjusting the PKG_CONFIG_PATH environment variable if you
49909installed software in a non-standard prefix.
49910
49911Alternatively, you may set the environment variables LIBFFI_CFLAGS
49912and LIBFFI_LIBS to avoid the need to call pkg-config.
49913See the pkg-config man page for more details.
49914" "$LINENO" 5
49915elif test $pkg_failed = untried; then
49916	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49918as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49919is in your PATH or set the PKG_CONFIG environment variable to the full
49920path to pkg-config.
49921
49922Alternatively, you may set the environment variables LIBFFI_CFLAGS
49923and LIBFFI_LIBS to avoid the need to call pkg-config.
49924See the pkg-config man page for more details.
49925
49926To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49927See \`config.log' for more details" "$LINENO" 5; }
49928else
49929	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49930	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49932$as_echo "yes" >&6; }
49933	:
49934fi
49935
49936  fi
49937
49938  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49939    # Extract the first word of "llvm-config", so it can be a program name with args.
49940set dummy llvm-config; ac_word=$2
49941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49942$as_echo_n "checking for $ac_word... " >&6; }
49943if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49944  $as_echo_n "(cached) " >&6
49945else
49946  if test -n "$LLVM_CONFIG"; then
49947  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49948else
49949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49950for as_dir in $PATH
49951do
49952  IFS=$as_save_IFS
49953  test -z "$as_dir" && as_dir=.
49954    for ac_exec_ext in '' $ac_executable_extensions; do
49955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49956    ac_cv_prog_LLVM_CONFIG="llvm-config"
49957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49958    break 2
49959  fi
49960done
49961  done
49962IFS=$as_save_IFS
49963
49964fi
49965fi
49966LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49967if test -n "$LLVM_CONFIG"; then
49968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49969$as_echo "$LLVM_CONFIG" >&6; }
49970else
49971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49972$as_echo "no" >&6; }
49973fi
49974
49975
49976
49977    if test "x$LLVM_CONFIG" != xllvm-config; then
49978      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49979    fi
49980
49981    llvm_components="jit mcjit engine nativecodegen native"
49982    unset LLVM_CFLAGS
49983    for flag in $("$LLVM_CONFIG" --cxxflags); do
49984      if echo "${flag}" | grep -q '^-[ID]'; then
49985        if test "${flag}" != "-D_DEBUG" ; then
49986          if test "${LLVM_CFLAGS}" != "" ; then
49987            LLVM_CFLAGS="${LLVM_CFLAGS} "
49988          fi
49989          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49990        fi
49991      fi
49992    done
49993    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49994    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49995
49996    unset LLVM_LDFLAGS
49997    for flag in $("${LLVM_CONFIG}" --ldflags); do
49998      if echo "${flag}" | grep -q '^-L'; then
49999        if test "${LLVM_LDFLAGS}" != ""; then
50000          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
50001        fi
50002        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
50003      fi
50004    done
50005
50006    unset LLVM_LIBS
50007    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
50008      if echo "${flag}" | grep -q '^-l'; then
50009        if test "${LLVM_LIBS}" != ""; then
50010          LLVM_LIBS="${LLVM_LIBS} "
50011        fi
50012        LLVM_LIBS="${LLVM_LIBS}${flag}"
50013      fi
50014    done
50015
50016
50017
50018
50019  fi
50020
50021  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50022  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50023    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50024  fi
50025
50026  # TODO better (platform agnostic) test
50027  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50028    LIBCXX="-lstdc++"
50029  fi
50030
50031
50032
50033
50034  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50035
50036
50037# Check whether --with-msvcr-dll was given.
50038if test "${with_msvcr_dll+set}" = set; then :
50039  withval=$with_msvcr_dll;
50040fi
50041
50042
50043  if test "x$with_msvcr_dll" != x; then
50044    # If given explicitely by user, do not probe. If not present, fail directly.
50045
50046  DLL_NAME="$MSVCR_NAME"
50047  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50048  METHOD="--with-msvcr-dll"
50049  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50051$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50052
50053    # Need to check if the found msvcr is correct architecture
50054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50055$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50056    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50058      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50059      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50061        CORRECT_MSVCR_ARCH="PE32 executable"
50062      else
50063        CORRECT_MSVCR_ARCH="PE32+ executable"
50064      fi
50065    else
50066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50067        CORRECT_MSVCR_ARCH=386
50068      else
50069        CORRECT_MSVCR_ARCH=x86-64
50070      fi
50071    fi
50072    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50074$as_echo "ok" >&6; }
50075      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50076
50077  # Only process if variable expands to non-empty
50078
50079  if test "x$MSVC_DLL" != x; then
50080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50081
50082  # Input might be given as Windows format, start by converting to
50083  # unix format.
50084  path="$MSVC_DLL"
50085  new_path=`$CYGPATH -u "$path"`
50086
50087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50090  # "foo.exe" is OK but "foo" is an error.
50091  #
50092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50093  # It is also a way to make sure we got the proper file name for the real test later on.
50094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50095  if test "x$test_shortpath" = x; then
50096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50097$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50098    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50099  fi
50100
50101  # Call helper function which possibly converts this using DOS-style short mode.
50102  # If so, the updated path is stored in $new_path.
50103
50104  input_path="$new_path"
50105  # Check if we need to convert this using DOS-style short mode. If the path
50106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50107  # take no chances and rewrite it.
50108  # Note: m4 eats our [], so we need to use [ and ] instead.
50109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50110  if test "x$has_forbidden_chars" != x; then
50111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50115      # Going to short mode and back again did indeed matter. Since short mode is
50116      # case insensitive, let's make it lowercase to improve readability.
50117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50118      # Now convert it back to Unix-style (cygpath)
50119      input_path=`$CYGPATH -u "$shortmode_path"`
50120      new_path="$input_path"
50121    fi
50122  fi
50123
50124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50125  if test "x$test_cygdrive_prefix" = x; then
50126    # As a simple fix, exclude /usr/bin since it's not a real path.
50127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50129      # a path prefixed by /cygdrive for fixpath to work.
50130      new_path="$CYGWIN_ROOT_PATH$input_path"
50131    fi
50132  fi
50133
50134
50135  if test "x$path" != "x$new_path"; then
50136    MSVC_DLL="$new_path"
50137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50139  fi
50140
50141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50142
50143  path="$MSVC_DLL"
50144  has_colon=`$ECHO $path | $GREP ^.:`
50145  new_path="$path"
50146  if test "x$has_colon" = x; then
50147    # Not in mixed or Windows style, start by that.
50148    new_path=`cmd //c echo $path`
50149  fi
50150
50151
50152  input_path="$new_path"
50153  # Check if we need to convert this using DOS-style short mode. If the path
50154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50155  # take no chances and rewrite it.
50156  # Note: m4 eats our [], so we need to use [ and ] instead.
50157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50158  if test "x$has_forbidden_chars" != x; then
50159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50161  fi
50162
50163
50164  windows_path="$new_path"
50165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50166    unix_path=`$CYGPATH -u "$windows_path"`
50167    new_path="$unix_path"
50168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50170    new_path="$unix_path"
50171  fi
50172
50173  if test "x$path" != "x$new_path"; then
50174    MSVC_DLL="$new_path"
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50177  fi
50178
50179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50181
50182    else
50183      # We're on a unix platform. Hooray! :)
50184      path="$MSVC_DLL"
50185      has_space=`$ECHO "$path" | $GREP " "`
50186      if test "x$has_space" != x; then
50187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50190      fi
50191
50192      # Use eval to expand a potential ~
50193      eval path="$path"
50194      if test ! -f "$path" && test ! -d "$path"; then
50195        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50196      fi
50197
50198      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50199    fi
50200  fi
50201
50202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50203$as_echo_n "checking for $DLL_NAME... " >&6; }
50204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50205$as_echo "$MSVC_DLL" >&6; }
50206    else
50207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50208$as_echo "incorrect, ignoring" >&6; }
50209      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50210$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50211    fi
50212  fi
50213
50214    if test "x$MSVC_DLL" = x; then
50215      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50216    fi
50217    MSVCR_DLL="$MSVC_DLL"
50218  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50219
50220  DLL_NAME="$MSVCR_NAME"
50221  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50222  METHOD="devkit"
50223  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50225$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50226
50227    # Need to check if the found msvcr is correct architecture
50228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50229$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50230    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50232      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50233      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50234      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50235        CORRECT_MSVCR_ARCH="PE32 executable"
50236      else
50237        CORRECT_MSVCR_ARCH="PE32+ executable"
50238      fi
50239    else
50240      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50241        CORRECT_MSVCR_ARCH=386
50242      else
50243        CORRECT_MSVCR_ARCH=x86-64
50244      fi
50245    fi
50246    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50248$as_echo "ok" >&6; }
50249      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50250
50251  # Only process if variable expands to non-empty
50252
50253  if test "x$MSVC_DLL" != x; then
50254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50255
50256  # Input might be given as Windows format, start by converting to
50257  # unix format.
50258  path="$MSVC_DLL"
50259  new_path=`$CYGPATH -u "$path"`
50260
50261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50264  # "foo.exe" is OK but "foo" is an error.
50265  #
50266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50267  # It is also a way to make sure we got the proper file name for the real test later on.
50268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50269  if test "x$test_shortpath" = x; then
50270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50271$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50272    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50273  fi
50274
50275  # Call helper function which possibly converts this using DOS-style short mode.
50276  # If so, the updated path is stored in $new_path.
50277
50278  input_path="$new_path"
50279  # Check if we need to convert this using DOS-style short mode. If the path
50280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50281  # take no chances and rewrite it.
50282  # Note: m4 eats our [], so we need to use [ and ] instead.
50283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50284  if test "x$has_forbidden_chars" != x; then
50285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50289      # Going to short mode and back again did indeed matter. Since short mode is
50290      # case insensitive, let's make it lowercase to improve readability.
50291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50292      # Now convert it back to Unix-style (cygpath)
50293      input_path=`$CYGPATH -u "$shortmode_path"`
50294      new_path="$input_path"
50295    fi
50296  fi
50297
50298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50299  if test "x$test_cygdrive_prefix" = x; then
50300    # As a simple fix, exclude /usr/bin since it's not a real path.
50301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50303      # a path prefixed by /cygdrive for fixpath to work.
50304      new_path="$CYGWIN_ROOT_PATH$input_path"
50305    fi
50306  fi
50307
50308
50309  if test "x$path" != "x$new_path"; then
50310    MSVC_DLL="$new_path"
50311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50312$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50313  fi
50314
50315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50316
50317  path="$MSVC_DLL"
50318  has_colon=`$ECHO $path | $GREP ^.:`
50319  new_path="$path"
50320  if test "x$has_colon" = x; then
50321    # Not in mixed or Windows style, start by that.
50322    new_path=`cmd //c echo $path`
50323  fi
50324
50325
50326  input_path="$new_path"
50327  # Check if we need to convert this using DOS-style short mode. If the path
50328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50329  # take no chances and rewrite it.
50330  # Note: m4 eats our [], so we need to use [ and ] instead.
50331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50332  if test "x$has_forbidden_chars" != x; then
50333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50335  fi
50336
50337
50338  windows_path="$new_path"
50339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50340    unix_path=`$CYGPATH -u "$windows_path"`
50341    new_path="$unix_path"
50342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50344    new_path="$unix_path"
50345  fi
50346
50347  if test "x$path" != "x$new_path"; then
50348    MSVC_DLL="$new_path"
50349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50350$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50351  fi
50352
50353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50355
50356    else
50357      # We're on a unix platform. Hooray! :)
50358      path="$MSVC_DLL"
50359      has_space=`$ECHO "$path" | $GREP " "`
50360      if test "x$has_space" != x; then
50361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50362$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50364      fi
50365
50366      # Use eval to expand a potential ~
50367      eval path="$path"
50368      if test ! -f "$path" && test ! -d "$path"; then
50369        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50370      fi
50371
50372      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50373    fi
50374  fi
50375
50376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50377$as_echo_n "checking for $DLL_NAME... " >&6; }
50378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50379$as_echo "$MSVC_DLL" >&6; }
50380    else
50381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50382$as_echo "incorrect, ignoring" >&6; }
50383      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50384$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50385    fi
50386  fi
50387
50388    if test "x$MSVC_DLL" = x; then
50389      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50390    fi
50391    MSVCR_DLL="$MSVC_DLL"
50392  else
50393
50394  DLL_NAME="${MSVCR_NAME}"
50395  MSVC_DLL=
50396
50397  if test "x$MSVC_DLL" = x; then
50398    # Probe: Using well-known location from Visual Studio 10.0
50399    if test "x$VCINSTALLDIR" != x; then
50400      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50401
50402  windows_path="$CYGWIN_VC_INSTALL_DIR"
50403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50404    unix_path=`$CYGPATH -u "$windows_path"`
50405    CYGWIN_VC_INSTALL_DIR="$unix_path"
50406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50408    CYGWIN_VC_INSTALL_DIR="$unix_path"
50409  fi
50410
50411      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50412        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50413      else
50414        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50415      fi
50416      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50417
50418  DLL_NAME="$DLL_NAME"
50419  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50420  METHOD="well-known location in VCINSTALLDIR"
50421  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50422    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50423$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50424
50425    # Need to check if the found msvcr is correct architecture
50426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50427$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50428    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50430      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50431      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50432      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50433        CORRECT_MSVCR_ARCH="PE32 executable"
50434      else
50435        CORRECT_MSVCR_ARCH="PE32+ executable"
50436      fi
50437    else
50438      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50439        CORRECT_MSVCR_ARCH=386
50440      else
50441        CORRECT_MSVCR_ARCH=x86-64
50442      fi
50443    fi
50444    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50446$as_echo "ok" >&6; }
50447      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50448
50449  # Only process if variable expands to non-empty
50450
50451  if test "x$MSVC_DLL" != x; then
50452    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50453
50454  # Input might be given as Windows format, start by converting to
50455  # unix format.
50456  path="$MSVC_DLL"
50457  new_path=`$CYGPATH -u "$path"`
50458
50459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50462  # "foo.exe" is OK but "foo" is an error.
50463  #
50464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50465  # It is also a way to make sure we got the proper file name for the real test later on.
50466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50467  if test "x$test_shortpath" = x; then
50468    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50469$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50470    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50471  fi
50472
50473  # Call helper function which possibly converts this using DOS-style short mode.
50474  # If so, the updated path is stored in $new_path.
50475
50476  input_path="$new_path"
50477  # Check if we need to convert this using DOS-style short mode. If the path
50478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50479  # take no chances and rewrite it.
50480  # Note: m4 eats our [], so we need to use [ and ] instead.
50481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50482  if test "x$has_forbidden_chars" != x; then
50483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50487      # Going to short mode and back again did indeed matter. Since short mode is
50488      # case insensitive, let's make it lowercase to improve readability.
50489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50490      # Now convert it back to Unix-style (cygpath)
50491      input_path=`$CYGPATH -u "$shortmode_path"`
50492      new_path="$input_path"
50493    fi
50494  fi
50495
50496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50497  if test "x$test_cygdrive_prefix" = x; then
50498    # As a simple fix, exclude /usr/bin since it's not a real path.
50499    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50501      # a path prefixed by /cygdrive for fixpath to work.
50502      new_path="$CYGWIN_ROOT_PATH$input_path"
50503    fi
50504  fi
50505
50506
50507  if test "x$path" != "x$new_path"; then
50508    MSVC_DLL="$new_path"
50509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50510$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50511  fi
50512
50513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50514
50515  path="$MSVC_DLL"
50516  has_colon=`$ECHO $path | $GREP ^.:`
50517  new_path="$path"
50518  if test "x$has_colon" = x; then
50519    # Not in mixed or Windows style, start by that.
50520    new_path=`cmd //c echo $path`
50521  fi
50522
50523
50524  input_path="$new_path"
50525  # Check if we need to convert this using DOS-style short mode. If the path
50526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50527  # take no chances and rewrite it.
50528  # Note: m4 eats our [], so we need to use [ and ] instead.
50529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50530  if test "x$has_forbidden_chars" != x; then
50531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50533  fi
50534
50535
50536  windows_path="$new_path"
50537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50538    unix_path=`$CYGPATH -u "$windows_path"`
50539    new_path="$unix_path"
50540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50542    new_path="$unix_path"
50543  fi
50544
50545  if test "x$path" != "x$new_path"; then
50546    MSVC_DLL="$new_path"
50547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50548$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50549  fi
50550
50551  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50552  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50553
50554    else
50555      # We're on a unix platform. Hooray! :)
50556      path="$MSVC_DLL"
50557      has_space=`$ECHO "$path" | $GREP " "`
50558      if test "x$has_space" != x; then
50559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50560$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50561        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50562      fi
50563
50564      # Use eval to expand a potential ~
50565      eval path="$path"
50566      if test ! -f "$path" && test ! -d "$path"; then
50567        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50568      fi
50569
50570      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50571    fi
50572  fi
50573
50574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50575$as_echo_n "checking for $DLL_NAME... " >&6; }
50576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50577$as_echo "$MSVC_DLL" >&6; }
50578    else
50579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50580$as_echo "incorrect, ignoring" >&6; }
50581      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50582$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50583    fi
50584  fi
50585
50586    fi
50587  fi
50588
50589  if test "x$MSVC_DLL" = x; then
50590    # Probe: Check in the Boot JDK directory.
50591    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50592
50593  DLL_NAME="$DLL_NAME"
50594  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50595  METHOD="well-known location in Boot JDK"
50596  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50598$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50599
50600    # Need to check if the found msvcr is correct architecture
50601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50602$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50603    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50605      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50606      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50607      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50608        CORRECT_MSVCR_ARCH="PE32 executable"
50609      else
50610        CORRECT_MSVCR_ARCH="PE32+ executable"
50611      fi
50612    else
50613      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50614        CORRECT_MSVCR_ARCH=386
50615      else
50616        CORRECT_MSVCR_ARCH=x86-64
50617      fi
50618    fi
50619    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50621$as_echo "ok" >&6; }
50622      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50623
50624  # Only process if variable expands to non-empty
50625
50626  if test "x$MSVC_DLL" != x; then
50627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50628
50629  # Input might be given as Windows format, start by converting to
50630  # unix format.
50631  path="$MSVC_DLL"
50632  new_path=`$CYGPATH -u "$path"`
50633
50634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50637  # "foo.exe" is OK but "foo" is an error.
50638  #
50639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50640  # It is also a way to make sure we got the proper file name for the real test later on.
50641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50642  if test "x$test_shortpath" = x; then
50643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50644$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50645    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50646  fi
50647
50648  # Call helper function which possibly converts this using DOS-style short mode.
50649  # If so, the updated path is stored in $new_path.
50650
50651  input_path="$new_path"
50652  # Check if we need to convert this using DOS-style short mode. If the path
50653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50654  # take no chances and rewrite it.
50655  # Note: m4 eats our [], so we need to use [ and ] instead.
50656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50657  if test "x$has_forbidden_chars" != x; then
50658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50662      # Going to short mode and back again did indeed matter. Since short mode is
50663      # case insensitive, let's make it lowercase to improve readability.
50664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50665      # Now convert it back to Unix-style (cygpath)
50666      input_path=`$CYGPATH -u "$shortmode_path"`
50667      new_path="$input_path"
50668    fi
50669  fi
50670
50671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50672  if test "x$test_cygdrive_prefix" = x; then
50673    # As a simple fix, exclude /usr/bin since it's not a real path.
50674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50676      # a path prefixed by /cygdrive for fixpath to work.
50677      new_path="$CYGWIN_ROOT_PATH$input_path"
50678    fi
50679  fi
50680
50681
50682  if test "x$path" != "x$new_path"; then
50683    MSVC_DLL="$new_path"
50684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50685$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50686  fi
50687
50688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50689
50690  path="$MSVC_DLL"
50691  has_colon=`$ECHO $path | $GREP ^.:`
50692  new_path="$path"
50693  if test "x$has_colon" = x; then
50694    # Not in mixed or Windows style, start by that.
50695    new_path=`cmd //c echo $path`
50696  fi
50697
50698
50699  input_path="$new_path"
50700  # Check if we need to convert this using DOS-style short mode. If the path
50701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50702  # take no chances and rewrite it.
50703  # Note: m4 eats our [], so we need to use [ and ] instead.
50704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50705  if test "x$has_forbidden_chars" != x; then
50706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50708  fi
50709
50710
50711  windows_path="$new_path"
50712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50713    unix_path=`$CYGPATH -u "$windows_path"`
50714    new_path="$unix_path"
50715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50717    new_path="$unix_path"
50718  fi
50719
50720  if test "x$path" != "x$new_path"; then
50721    MSVC_DLL="$new_path"
50722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50723$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50724  fi
50725
50726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50728
50729    else
50730      # We're on a unix platform. Hooray! :)
50731      path="$MSVC_DLL"
50732      has_space=`$ECHO "$path" | $GREP " "`
50733      if test "x$has_space" != x; then
50734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50735$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50737      fi
50738
50739      # Use eval to expand a potential ~
50740      eval path="$path"
50741      if test ! -f "$path" && test ! -d "$path"; then
50742        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50743      fi
50744
50745      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50746    fi
50747  fi
50748
50749      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50750$as_echo_n "checking for $DLL_NAME... " >&6; }
50751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50752$as_echo "$MSVC_DLL" >&6; }
50753    else
50754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50755$as_echo "incorrect, ignoring" >&6; }
50756      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50757$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50758    fi
50759  fi
50760
50761  fi
50762
50763  if test "x$MSVC_DLL" = x; then
50764    # Probe: Look in the Windows system32 directory
50765    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50766
50767  windows_path="$CYGWIN_SYSTEMROOT"
50768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50769    unix_path=`$CYGPATH -u "$windows_path"`
50770    CYGWIN_SYSTEMROOT="$unix_path"
50771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50773    CYGWIN_SYSTEMROOT="$unix_path"
50774  fi
50775
50776    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50777
50778  DLL_NAME="$DLL_NAME"
50779  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50780  METHOD="well-known location in SYSTEMROOT"
50781  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50783$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50784
50785    # Need to check if the found msvcr is correct architecture
50786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50787$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50788    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50790      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50791      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50792      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50793        CORRECT_MSVCR_ARCH="PE32 executable"
50794      else
50795        CORRECT_MSVCR_ARCH="PE32+ executable"
50796      fi
50797    else
50798      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50799        CORRECT_MSVCR_ARCH=386
50800      else
50801        CORRECT_MSVCR_ARCH=x86-64
50802      fi
50803    fi
50804    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50806$as_echo "ok" >&6; }
50807      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50808
50809  # Only process if variable expands to non-empty
50810
50811  if test "x$MSVC_DLL" != x; then
50812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50813
50814  # Input might be given as Windows format, start by converting to
50815  # unix format.
50816  path="$MSVC_DLL"
50817  new_path=`$CYGPATH -u "$path"`
50818
50819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50822  # "foo.exe" is OK but "foo" is an error.
50823  #
50824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50825  # It is also a way to make sure we got the proper file name for the real test later on.
50826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50827  if test "x$test_shortpath" = x; then
50828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50829$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50830    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50831  fi
50832
50833  # Call helper function which possibly converts this using DOS-style short mode.
50834  # If so, the updated path is stored in $new_path.
50835
50836  input_path="$new_path"
50837  # Check if we need to convert this using DOS-style short mode. If the path
50838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50839  # take no chances and rewrite it.
50840  # Note: m4 eats our [], so we need to use [ and ] instead.
50841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50842  if test "x$has_forbidden_chars" != x; then
50843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50847      # Going to short mode and back again did indeed matter. Since short mode is
50848      # case insensitive, let's make it lowercase to improve readability.
50849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50850      # Now convert it back to Unix-style (cygpath)
50851      input_path=`$CYGPATH -u "$shortmode_path"`
50852      new_path="$input_path"
50853    fi
50854  fi
50855
50856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50857  if test "x$test_cygdrive_prefix" = x; then
50858    # As a simple fix, exclude /usr/bin since it's not a real path.
50859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50861      # a path prefixed by /cygdrive for fixpath to work.
50862      new_path="$CYGWIN_ROOT_PATH$input_path"
50863    fi
50864  fi
50865
50866
50867  if test "x$path" != "x$new_path"; then
50868    MSVC_DLL="$new_path"
50869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50870$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50871  fi
50872
50873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50874
50875  path="$MSVC_DLL"
50876  has_colon=`$ECHO $path | $GREP ^.:`
50877  new_path="$path"
50878  if test "x$has_colon" = x; then
50879    # Not in mixed or Windows style, start by that.
50880    new_path=`cmd //c echo $path`
50881  fi
50882
50883
50884  input_path="$new_path"
50885  # Check if we need to convert this using DOS-style short mode. If the path
50886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50887  # take no chances and rewrite it.
50888  # Note: m4 eats our [], so we need to use [ and ] instead.
50889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50890  if test "x$has_forbidden_chars" != x; then
50891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50893  fi
50894
50895
50896  windows_path="$new_path"
50897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50898    unix_path=`$CYGPATH -u "$windows_path"`
50899    new_path="$unix_path"
50900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50902    new_path="$unix_path"
50903  fi
50904
50905  if test "x$path" != "x$new_path"; then
50906    MSVC_DLL="$new_path"
50907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50908$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50909  fi
50910
50911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50913
50914    else
50915      # We're on a unix platform. Hooray! :)
50916      path="$MSVC_DLL"
50917      has_space=`$ECHO "$path" | $GREP " "`
50918      if test "x$has_space" != x; then
50919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50920$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50922      fi
50923
50924      # Use eval to expand a potential ~
50925      eval path="$path"
50926      if test ! -f "$path" && test ! -d "$path"; then
50927        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50928      fi
50929
50930      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50931    fi
50932  fi
50933
50934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50935$as_echo_n "checking for $DLL_NAME... " >&6; }
50936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50937$as_echo "$MSVC_DLL" >&6; }
50938    else
50939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50940$as_echo "incorrect, ignoring" >&6; }
50941      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50942$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50943    fi
50944  fi
50945
50946  fi
50947
50948  if test "x$MSVC_DLL" = x; then
50949    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50950    if test "x$VS100COMNTOOLS" != x; then
50951      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50952
50953  windows_path="$CYGWIN_VS_TOOLS_DIR"
50954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50955    unix_path=`$CYGPATH -u "$windows_path"`
50956    CYGWIN_VS_TOOLS_DIR="$unix_path"
50957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50959    CYGWIN_VS_TOOLS_DIR="$unix_path"
50960  fi
50961
50962      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50963        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50964	    | $GREP -i /x64/ | $HEAD --lines 1`
50965      else
50966        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50967	    | $GREP -i /x86/ | $HEAD --lines 1`
50968      fi
50969
50970  DLL_NAME="$DLL_NAME"
50971  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50972  METHOD="search of VS100COMNTOOLS"
50973  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50974    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50975$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50976
50977    # Need to check if the found msvcr is correct architecture
50978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50979$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50980    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50982      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50983      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50984      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50985        CORRECT_MSVCR_ARCH="PE32 executable"
50986      else
50987        CORRECT_MSVCR_ARCH="PE32+ executable"
50988      fi
50989    else
50990      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50991        CORRECT_MSVCR_ARCH=386
50992      else
50993        CORRECT_MSVCR_ARCH=x86-64
50994      fi
50995    fi
50996    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50998$as_echo "ok" >&6; }
50999      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51000
51001  # Only process if variable expands to non-empty
51002
51003  if test "x$MSVC_DLL" != x; then
51004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51005
51006  # Input might be given as Windows format, start by converting to
51007  # unix format.
51008  path="$MSVC_DLL"
51009  new_path=`$CYGPATH -u "$path"`
51010
51011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51014  # "foo.exe" is OK but "foo" is an error.
51015  #
51016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51017  # It is also a way to make sure we got the proper file name for the real test later on.
51018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51019  if test "x$test_shortpath" = x; then
51020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51021$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51022    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51023  fi
51024
51025  # Call helper function which possibly converts this using DOS-style short mode.
51026  # If so, the updated path is stored in $new_path.
51027
51028  input_path="$new_path"
51029  # Check if we need to convert this using DOS-style short mode. If the path
51030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51031  # take no chances and rewrite it.
51032  # Note: m4 eats our [], so we need to use [ and ] instead.
51033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51034  if test "x$has_forbidden_chars" != x; then
51035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51039      # Going to short mode and back again did indeed matter. Since short mode is
51040      # case insensitive, let's make it lowercase to improve readability.
51041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51042      # Now convert it back to Unix-style (cygpath)
51043      input_path=`$CYGPATH -u "$shortmode_path"`
51044      new_path="$input_path"
51045    fi
51046  fi
51047
51048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51049  if test "x$test_cygdrive_prefix" = x; then
51050    # As a simple fix, exclude /usr/bin since it's not a real path.
51051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51053      # a path prefixed by /cygdrive for fixpath to work.
51054      new_path="$CYGWIN_ROOT_PATH$input_path"
51055    fi
51056  fi
51057
51058
51059  if test "x$path" != "x$new_path"; then
51060    MSVC_DLL="$new_path"
51061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51062$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51063  fi
51064
51065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51066
51067  path="$MSVC_DLL"
51068  has_colon=`$ECHO $path | $GREP ^.:`
51069  new_path="$path"
51070  if test "x$has_colon" = x; then
51071    # Not in mixed or Windows style, start by that.
51072    new_path=`cmd //c echo $path`
51073  fi
51074
51075
51076  input_path="$new_path"
51077  # Check if we need to convert this using DOS-style short mode. If the path
51078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51079  # take no chances and rewrite it.
51080  # Note: m4 eats our [], so we need to use [ and ] instead.
51081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51082  if test "x$has_forbidden_chars" != x; then
51083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51085  fi
51086
51087
51088  windows_path="$new_path"
51089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51090    unix_path=`$CYGPATH -u "$windows_path"`
51091    new_path="$unix_path"
51092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51094    new_path="$unix_path"
51095  fi
51096
51097  if test "x$path" != "x$new_path"; then
51098    MSVC_DLL="$new_path"
51099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51100$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51101  fi
51102
51103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51105
51106    else
51107      # We're on a unix platform. Hooray! :)
51108      path="$MSVC_DLL"
51109      has_space=`$ECHO "$path" | $GREP " "`
51110      if test "x$has_space" != x; then
51111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51112$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51114      fi
51115
51116      # Use eval to expand a potential ~
51117      eval path="$path"
51118      if test ! -f "$path" && test ! -d "$path"; then
51119        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51120      fi
51121
51122      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51123    fi
51124  fi
51125
51126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51127$as_echo_n "checking for $DLL_NAME... " >&6; }
51128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51129$as_echo "$MSVC_DLL" >&6; }
51130    else
51131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51132$as_echo "incorrect, ignoring" >&6; }
51133      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51134$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51135    fi
51136  fi
51137
51138    fi
51139  fi
51140
51141  if test "x$MSVC_DLL" = x; then
51142    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51143    # (This was the original behaviour; kept since it might turn something up)
51144    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51145      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51146        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51147	    | $GREP x64 | $HEAD --lines 1`
51148      else
51149        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51150	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51151        if test "x$POSSIBLE_MSVC_DLL" = x; then
51152          # We're grasping at straws now...
51153          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51154	      | $HEAD --lines 1`
51155        fi
51156      fi
51157
51158
51159  DLL_NAME="$DLL_NAME"
51160  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51161  METHOD="search of VCINSTALLDIR"
51162  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51163    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51164$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51165
51166    # Need to check if the found msvcr is correct architecture
51167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51168$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51169    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51171      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51172      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51173      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51174        CORRECT_MSVCR_ARCH="PE32 executable"
51175      else
51176        CORRECT_MSVCR_ARCH="PE32+ executable"
51177      fi
51178    else
51179      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51180        CORRECT_MSVCR_ARCH=386
51181      else
51182        CORRECT_MSVCR_ARCH=x86-64
51183      fi
51184    fi
51185    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51187$as_echo "ok" >&6; }
51188      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51189
51190  # Only process if variable expands to non-empty
51191
51192  if test "x$MSVC_DLL" != x; then
51193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51194
51195  # Input might be given as Windows format, start by converting to
51196  # unix format.
51197  path="$MSVC_DLL"
51198  new_path=`$CYGPATH -u "$path"`
51199
51200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51203  # "foo.exe" is OK but "foo" is an error.
51204  #
51205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51206  # It is also a way to make sure we got the proper file name for the real test later on.
51207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51208  if test "x$test_shortpath" = x; then
51209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51210$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51211    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51212  fi
51213
51214  # Call helper function which possibly converts this using DOS-style short mode.
51215  # If so, the updated path is stored in $new_path.
51216
51217  input_path="$new_path"
51218  # Check if we need to convert this using DOS-style short mode. If the path
51219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51220  # take no chances and rewrite it.
51221  # Note: m4 eats our [], so we need to use [ and ] instead.
51222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51223  if test "x$has_forbidden_chars" != x; then
51224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51228      # Going to short mode and back again did indeed matter. Since short mode is
51229      # case insensitive, let's make it lowercase to improve readability.
51230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51231      # Now convert it back to Unix-style (cygpath)
51232      input_path=`$CYGPATH -u "$shortmode_path"`
51233      new_path="$input_path"
51234    fi
51235  fi
51236
51237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51238  if test "x$test_cygdrive_prefix" = x; then
51239    # As a simple fix, exclude /usr/bin since it's not a real path.
51240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51242      # a path prefixed by /cygdrive for fixpath to work.
51243      new_path="$CYGWIN_ROOT_PATH$input_path"
51244    fi
51245  fi
51246
51247
51248  if test "x$path" != "x$new_path"; then
51249    MSVC_DLL="$new_path"
51250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51251$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51252  fi
51253
51254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51255
51256  path="$MSVC_DLL"
51257  has_colon=`$ECHO $path | $GREP ^.:`
51258  new_path="$path"
51259  if test "x$has_colon" = x; then
51260    # Not in mixed or Windows style, start by that.
51261    new_path=`cmd //c echo $path`
51262  fi
51263
51264
51265  input_path="$new_path"
51266  # Check if we need to convert this using DOS-style short mode. If the path
51267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51268  # take no chances and rewrite it.
51269  # Note: m4 eats our [], so we need to use [ and ] instead.
51270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51271  if test "x$has_forbidden_chars" != x; then
51272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51274  fi
51275
51276
51277  windows_path="$new_path"
51278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51279    unix_path=`$CYGPATH -u "$windows_path"`
51280    new_path="$unix_path"
51281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51283    new_path="$unix_path"
51284  fi
51285
51286  if test "x$path" != "x$new_path"; then
51287    MSVC_DLL="$new_path"
51288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51289$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51290  fi
51291
51292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51294
51295    else
51296      # We're on a unix platform. Hooray! :)
51297      path="$MSVC_DLL"
51298      has_space=`$ECHO "$path" | $GREP " "`
51299      if test "x$has_space" != x; then
51300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51301$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51302        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51303      fi
51304
51305      # Use eval to expand a potential ~
51306      eval path="$path"
51307      if test ! -f "$path" && test ! -d "$path"; then
51308        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51309      fi
51310
51311      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51312    fi
51313  fi
51314
51315      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51316$as_echo_n "checking for $DLL_NAME... " >&6; }
51317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51318$as_echo "$MSVC_DLL" >&6; }
51319    else
51320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51321$as_echo "incorrect, ignoring" >&6; }
51322      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51323$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51324    fi
51325  fi
51326
51327    fi
51328  fi
51329
51330  if test "x$MSVC_DLL" = x; then
51331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51332$as_echo_n "checking for $DLL_NAME... " >&6; }
51333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51334$as_echo "no" >&6; }
51335    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51336  fi
51337
51338    MSVCR_DLL="$MSVC_DLL"
51339  fi
51340
51341
51342
51343# Check whether --with-msvcp-dll was given.
51344if test "${with_msvcp_dll+set}" = set; then :
51345  withval=$with_msvcp_dll;
51346fi
51347
51348
51349  if test "x$MSVCP_NAME" != "x"; then
51350    if test "x$with_msvcp_dll" != x; then
51351      # If given explicitely by user, do not probe. If not present, fail directly.
51352
51353  DLL_NAME="$MSVCP_NAME"
51354  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51355  METHOD="--with-msvcp-dll"
51356  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51357    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51358$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51359
51360    # Need to check if the found msvcr is correct architecture
51361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51362$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51363    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51365      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51366      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51367      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51368        CORRECT_MSVCR_ARCH="PE32 executable"
51369      else
51370        CORRECT_MSVCR_ARCH="PE32+ executable"
51371      fi
51372    else
51373      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51374        CORRECT_MSVCR_ARCH=386
51375      else
51376        CORRECT_MSVCR_ARCH=x86-64
51377      fi
51378    fi
51379    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51381$as_echo "ok" >&6; }
51382      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51383
51384  # Only process if variable expands to non-empty
51385
51386  if test "x$MSVC_DLL" != x; then
51387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51388
51389  # Input might be given as Windows format, start by converting to
51390  # unix format.
51391  path="$MSVC_DLL"
51392  new_path=`$CYGPATH -u "$path"`
51393
51394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51397  # "foo.exe" is OK but "foo" is an error.
51398  #
51399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51400  # It is also a way to make sure we got the proper file name for the real test later on.
51401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51402  if test "x$test_shortpath" = x; then
51403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51404$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51405    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51406  fi
51407
51408  # Call helper function which possibly converts this using DOS-style short mode.
51409  # If so, the updated path is stored in $new_path.
51410
51411  input_path="$new_path"
51412  # Check if we need to convert this using DOS-style short mode. If the path
51413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51414  # take no chances and rewrite it.
51415  # Note: m4 eats our [], so we need to use [ and ] instead.
51416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51417  if test "x$has_forbidden_chars" != x; then
51418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51422      # Going to short mode and back again did indeed matter. Since short mode is
51423      # case insensitive, let's make it lowercase to improve readability.
51424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51425      # Now convert it back to Unix-style (cygpath)
51426      input_path=`$CYGPATH -u "$shortmode_path"`
51427      new_path="$input_path"
51428    fi
51429  fi
51430
51431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51432  if test "x$test_cygdrive_prefix" = x; then
51433    # As a simple fix, exclude /usr/bin since it's not a real path.
51434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51436      # a path prefixed by /cygdrive for fixpath to work.
51437      new_path="$CYGWIN_ROOT_PATH$input_path"
51438    fi
51439  fi
51440
51441
51442  if test "x$path" != "x$new_path"; then
51443    MSVC_DLL="$new_path"
51444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51445$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51446  fi
51447
51448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51449
51450  path="$MSVC_DLL"
51451  has_colon=`$ECHO $path | $GREP ^.:`
51452  new_path="$path"
51453  if test "x$has_colon" = x; then
51454    # Not in mixed or Windows style, start by that.
51455    new_path=`cmd //c echo $path`
51456  fi
51457
51458
51459  input_path="$new_path"
51460  # Check if we need to convert this using DOS-style short mode. If the path
51461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51462  # take no chances and rewrite it.
51463  # Note: m4 eats our [], so we need to use [ and ] instead.
51464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51465  if test "x$has_forbidden_chars" != x; then
51466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51468  fi
51469
51470
51471  windows_path="$new_path"
51472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51473    unix_path=`$CYGPATH -u "$windows_path"`
51474    new_path="$unix_path"
51475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51477    new_path="$unix_path"
51478  fi
51479
51480  if test "x$path" != "x$new_path"; then
51481    MSVC_DLL="$new_path"
51482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51483$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51484  fi
51485
51486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51488
51489    else
51490      # We're on a unix platform. Hooray! :)
51491      path="$MSVC_DLL"
51492      has_space=`$ECHO "$path" | $GREP " "`
51493      if test "x$has_space" != x; then
51494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51495$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51496        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51497      fi
51498
51499      # Use eval to expand a potential ~
51500      eval path="$path"
51501      if test ! -f "$path" && test ! -d "$path"; then
51502        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51503      fi
51504
51505      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51506    fi
51507  fi
51508
51509      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51510$as_echo_n "checking for $DLL_NAME... " >&6; }
51511      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51512$as_echo "$MSVC_DLL" >&6; }
51513    else
51514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51515$as_echo "incorrect, ignoring" >&6; }
51516      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51517$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51518    fi
51519  fi
51520
51521      if test "x$MSVC_DLL" = x; then
51522        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51523      fi
51524      MSVCP_DLL="$MSVC_DLL"
51525    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51526
51527  DLL_NAME="$MSVCP_NAME"
51528  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51529  METHOD="devkit"
51530  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51531    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51532$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51533
51534    # Need to check if the found msvcr is correct architecture
51535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51536$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51537    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51539      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51540      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51542        CORRECT_MSVCR_ARCH="PE32 executable"
51543      else
51544        CORRECT_MSVCR_ARCH="PE32+ executable"
51545      fi
51546    else
51547      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51548        CORRECT_MSVCR_ARCH=386
51549      else
51550        CORRECT_MSVCR_ARCH=x86-64
51551      fi
51552    fi
51553    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51555$as_echo "ok" >&6; }
51556      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51557
51558  # Only process if variable expands to non-empty
51559
51560  if test "x$MSVC_DLL" != x; then
51561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51562
51563  # Input might be given as Windows format, start by converting to
51564  # unix format.
51565  path="$MSVC_DLL"
51566  new_path=`$CYGPATH -u "$path"`
51567
51568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51571  # "foo.exe" is OK but "foo" is an error.
51572  #
51573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51574  # It is also a way to make sure we got the proper file name for the real test later on.
51575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51576  if test "x$test_shortpath" = x; then
51577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51579    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51580  fi
51581
51582  # Call helper function which possibly converts this using DOS-style short mode.
51583  # If so, the updated path is stored in $new_path.
51584
51585  input_path="$new_path"
51586  # Check if we need to convert this using DOS-style short mode. If the path
51587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51588  # take no chances and rewrite it.
51589  # Note: m4 eats our [], so we need to use [ and ] instead.
51590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51591  if test "x$has_forbidden_chars" != x; then
51592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51596      # Going to short mode and back again did indeed matter. Since short mode is
51597      # case insensitive, let's make it lowercase to improve readability.
51598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51599      # Now convert it back to Unix-style (cygpath)
51600      input_path=`$CYGPATH -u "$shortmode_path"`
51601      new_path="$input_path"
51602    fi
51603  fi
51604
51605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51606  if test "x$test_cygdrive_prefix" = x; then
51607    # As a simple fix, exclude /usr/bin since it's not a real path.
51608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51610      # a path prefixed by /cygdrive for fixpath to work.
51611      new_path="$CYGWIN_ROOT_PATH$input_path"
51612    fi
51613  fi
51614
51615
51616  if test "x$path" != "x$new_path"; then
51617    MSVC_DLL="$new_path"
51618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51619$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51620  fi
51621
51622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51623
51624  path="$MSVC_DLL"
51625  has_colon=`$ECHO $path | $GREP ^.:`
51626  new_path="$path"
51627  if test "x$has_colon" = x; then
51628    # Not in mixed or Windows style, start by that.
51629    new_path=`cmd //c echo $path`
51630  fi
51631
51632
51633  input_path="$new_path"
51634  # Check if we need to convert this using DOS-style short mode. If the path
51635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51636  # take no chances and rewrite it.
51637  # Note: m4 eats our [], so we need to use [ and ] instead.
51638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51639  if test "x$has_forbidden_chars" != x; then
51640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51642  fi
51643
51644
51645  windows_path="$new_path"
51646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51647    unix_path=`$CYGPATH -u "$windows_path"`
51648    new_path="$unix_path"
51649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51651    new_path="$unix_path"
51652  fi
51653
51654  if test "x$path" != "x$new_path"; then
51655    MSVC_DLL="$new_path"
51656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51657$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51658  fi
51659
51660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51662
51663    else
51664      # We're on a unix platform. Hooray! :)
51665      path="$MSVC_DLL"
51666      has_space=`$ECHO "$path" | $GREP " "`
51667      if test "x$has_space" != x; then
51668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51669$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51671      fi
51672
51673      # Use eval to expand a potential ~
51674      eval path="$path"
51675      if test ! -f "$path" && test ! -d "$path"; then
51676        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51677      fi
51678
51679      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51680    fi
51681  fi
51682
51683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51684$as_echo_n "checking for $DLL_NAME... " >&6; }
51685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51686$as_echo "$MSVC_DLL" >&6; }
51687    else
51688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51689$as_echo "incorrect, ignoring" >&6; }
51690      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51691$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51692    fi
51693  fi
51694
51695      if test "x$MSVC_DLL" = x; then
51696        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51697      fi
51698      MSVCP_DLL="$MSVC_DLL"
51699    else
51700
51701  DLL_NAME="${MSVCP_NAME}"
51702  MSVC_DLL=
51703
51704  if test "x$MSVC_DLL" = x; then
51705    # Probe: Using well-known location from Visual Studio 10.0
51706    if test "x$VCINSTALLDIR" != x; then
51707      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51708
51709  windows_path="$CYGWIN_VC_INSTALL_DIR"
51710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51711    unix_path=`$CYGPATH -u "$windows_path"`
51712    CYGWIN_VC_INSTALL_DIR="$unix_path"
51713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51715    CYGWIN_VC_INSTALL_DIR="$unix_path"
51716  fi
51717
51718      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51719        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51720      else
51721        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51722      fi
51723      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51724
51725  DLL_NAME="$DLL_NAME"
51726  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51727  METHOD="well-known location in VCINSTALLDIR"
51728  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51729    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51730$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51731
51732    # Need to check if the found msvcr is correct architecture
51733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51734$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51735    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51737      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51738      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51739      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51740        CORRECT_MSVCR_ARCH="PE32 executable"
51741      else
51742        CORRECT_MSVCR_ARCH="PE32+ executable"
51743      fi
51744    else
51745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51746        CORRECT_MSVCR_ARCH=386
51747      else
51748        CORRECT_MSVCR_ARCH=x86-64
51749      fi
51750    fi
51751    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51753$as_echo "ok" >&6; }
51754      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51755
51756  # Only process if variable expands to non-empty
51757
51758  if test "x$MSVC_DLL" != x; then
51759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51760
51761  # Input might be given as Windows format, start by converting to
51762  # unix format.
51763  path="$MSVC_DLL"
51764  new_path=`$CYGPATH -u "$path"`
51765
51766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51769  # "foo.exe" is OK but "foo" is an error.
51770  #
51771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51772  # It is also a way to make sure we got the proper file name for the real test later on.
51773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51774  if test "x$test_shortpath" = x; then
51775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51776$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51777    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51778  fi
51779
51780  # Call helper function which possibly converts this using DOS-style short mode.
51781  # If so, the updated path is stored in $new_path.
51782
51783  input_path="$new_path"
51784  # Check if we need to convert this using DOS-style short mode. If the path
51785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51786  # take no chances and rewrite it.
51787  # Note: m4 eats our [], so we need to use [ and ] instead.
51788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51789  if test "x$has_forbidden_chars" != x; then
51790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51794      # Going to short mode and back again did indeed matter. Since short mode is
51795      # case insensitive, let's make it lowercase to improve readability.
51796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51797      # Now convert it back to Unix-style (cygpath)
51798      input_path=`$CYGPATH -u "$shortmode_path"`
51799      new_path="$input_path"
51800    fi
51801  fi
51802
51803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51804  if test "x$test_cygdrive_prefix" = x; then
51805    # As a simple fix, exclude /usr/bin since it's not a real path.
51806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51808      # a path prefixed by /cygdrive for fixpath to work.
51809      new_path="$CYGWIN_ROOT_PATH$input_path"
51810    fi
51811  fi
51812
51813
51814  if test "x$path" != "x$new_path"; then
51815    MSVC_DLL="$new_path"
51816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51818  fi
51819
51820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51821
51822  path="$MSVC_DLL"
51823  has_colon=`$ECHO $path | $GREP ^.:`
51824  new_path="$path"
51825  if test "x$has_colon" = x; then
51826    # Not in mixed or Windows style, start by that.
51827    new_path=`cmd //c echo $path`
51828  fi
51829
51830
51831  input_path="$new_path"
51832  # Check if we need to convert this using DOS-style short mode. If the path
51833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51834  # take no chances and rewrite it.
51835  # Note: m4 eats our [], so we need to use [ and ] instead.
51836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51837  if test "x$has_forbidden_chars" != x; then
51838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51840  fi
51841
51842
51843  windows_path="$new_path"
51844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51845    unix_path=`$CYGPATH -u "$windows_path"`
51846    new_path="$unix_path"
51847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51849    new_path="$unix_path"
51850  fi
51851
51852  if test "x$path" != "x$new_path"; then
51853    MSVC_DLL="$new_path"
51854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51855$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51856  fi
51857
51858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51860
51861    else
51862      # We're on a unix platform. Hooray! :)
51863      path="$MSVC_DLL"
51864      has_space=`$ECHO "$path" | $GREP " "`
51865      if test "x$has_space" != x; then
51866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51867$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51868        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51869      fi
51870
51871      # Use eval to expand a potential ~
51872      eval path="$path"
51873      if test ! -f "$path" && test ! -d "$path"; then
51874        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51875      fi
51876
51877      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51878    fi
51879  fi
51880
51881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51882$as_echo_n "checking for $DLL_NAME... " >&6; }
51883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51884$as_echo "$MSVC_DLL" >&6; }
51885    else
51886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51887$as_echo "incorrect, ignoring" >&6; }
51888      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51889$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51890    fi
51891  fi
51892
51893    fi
51894  fi
51895
51896  if test "x$MSVC_DLL" = x; then
51897    # Probe: Check in the Boot JDK directory.
51898    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51899
51900  DLL_NAME="$DLL_NAME"
51901  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51902  METHOD="well-known location in Boot JDK"
51903  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51904    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51905$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51906
51907    # Need to check if the found msvcr is correct architecture
51908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51909$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51910    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51912      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51913      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51914      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51915        CORRECT_MSVCR_ARCH="PE32 executable"
51916      else
51917        CORRECT_MSVCR_ARCH="PE32+ executable"
51918      fi
51919    else
51920      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51921        CORRECT_MSVCR_ARCH=386
51922      else
51923        CORRECT_MSVCR_ARCH=x86-64
51924      fi
51925    fi
51926    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51928$as_echo "ok" >&6; }
51929      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51930
51931  # Only process if variable expands to non-empty
51932
51933  if test "x$MSVC_DLL" != x; then
51934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51935
51936  # Input might be given as Windows format, start by converting to
51937  # unix format.
51938  path="$MSVC_DLL"
51939  new_path=`$CYGPATH -u "$path"`
51940
51941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51944  # "foo.exe" is OK but "foo" is an error.
51945  #
51946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51947  # It is also a way to make sure we got the proper file name for the real test later on.
51948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51949  if test "x$test_shortpath" = x; then
51950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51951$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51952    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51953  fi
51954
51955  # Call helper function which possibly converts this using DOS-style short mode.
51956  # If so, the updated path is stored in $new_path.
51957
51958  input_path="$new_path"
51959  # Check if we need to convert this using DOS-style short mode. If the path
51960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51961  # take no chances and rewrite it.
51962  # Note: m4 eats our [], so we need to use [ and ] instead.
51963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51964  if test "x$has_forbidden_chars" != x; then
51965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51969      # Going to short mode and back again did indeed matter. Since short mode is
51970      # case insensitive, let's make it lowercase to improve readability.
51971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51972      # Now convert it back to Unix-style (cygpath)
51973      input_path=`$CYGPATH -u "$shortmode_path"`
51974      new_path="$input_path"
51975    fi
51976  fi
51977
51978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51979  if test "x$test_cygdrive_prefix" = x; then
51980    # As a simple fix, exclude /usr/bin since it's not a real path.
51981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51983      # a path prefixed by /cygdrive for fixpath to work.
51984      new_path="$CYGWIN_ROOT_PATH$input_path"
51985    fi
51986  fi
51987
51988
51989  if test "x$path" != "x$new_path"; then
51990    MSVC_DLL="$new_path"
51991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51992$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51993  fi
51994
51995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51996
51997  path="$MSVC_DLL"
51998  has_colon=`$ECHO $path | $GREP ^.:`
51999  new_path="$path"
52000  if test "x$has_colon" = x; then
52001    # Not in mixed or Windows style, start by that.
52002    new_path=`cmd //c echo $path`
52003  fi
52004
52005
52006  input_path="$new_path"
52007  # Check if we need to convert this using DOS-style short mode. If the path
52008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52009  # take no chances and rewrite it.
52010  # Note: m4 eats our [], so we need to use [ and ] instead.
52011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52012  if test "x$has_forbidden_chars" != x; then
52013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52015  fi
52016
52017
52018  windows_path="$new_path"
52019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52020    unix_path=`$CYGPATH -u "$windows_path"`
52021    new_path="$unix_path"
52022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52024    new_path="$unix_path"
52025  fi
52026
52027  if test "x$path" != "x$new_path"; then
52028    MSVC_DLL="$new_path"
52029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52030$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52031  fi
52032
52033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52035
52036    else
52037      # We're on a unix platform. Hooray! :)
52038      path="$MSVC_DLL"
52039      has_space=`$ECHO "$path" | $GREP " "`
52040      if test "x$has_space" != x; then
52041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52042$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52043        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52044      fi
52045
52046      # Use eval to expand a potential ~
52047      eval path="$path"
52048      if test ! -f "$path" && test ! -d "$path"; then
52049        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52050      fi
52051
52052      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52053    fi
52054  fi
52055
52056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52057$as_echo_n "checking for $DLL_NAME... " >&6; }
52058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52059$as_echo "$MSVC_DLL" >&6; }
52060    else
52061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52062$as_echo "incorrect, ignoring" >&6; }
52063      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52064$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52065    fi
52066  fi
52067
52068  fi
52069
52070  if test "x$MSVC_DLL" = x; then
52071    # Probe: Look in the Windows system32 directory
52072    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52073
52074  windows_path="$CYGWIN_SYSTEMROOT"
52075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52076    unix_path=`$CYGPATH -u "$windows_path"`
52077    CYGWIN_SYSTEMROOT="$unix_path"
52078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52080    CYGWIN_SYSTEMROOT="$unix_path"
52081  fi
52082
52083    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52084
52085  DLL_NAME="$DLL_NAME"
52086  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52087  METHOD="well-known location in SYSTEMROOT"
52088  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52089    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52090$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52091
52092    # Need to check if the found msvcr is correct architecture
52093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52094$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52095    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52097      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52098      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52099      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52100        CORRECT_MSVCR_ARCH="PE32 executable"
52101      else
52102        CORRECT_MSVCR_ARCH="PE32+ executable"
52103      fi
52104    else
52105      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52106        CORRECT_MSVCR_ARCH=386
52107      else
52108        CORRECT_MSVCR_ARCH=x86-64
52109      fi
52110    fi
52111    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52113$as_echo "ok" >&6; }
52114      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52115
52116  # Only process if variable expands to non-empty
52117
52118  if test "x$MSVC_DLL" != x; then
52119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52120
52121  # Input might be given as Windows format, start by converting to
52122  # unix format.
52123  path="$MSVC_DLL"
52124  new_path=`$CYGPATH -u "$path"`
52125
52126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52129  # "foo.exe" is OK but "foo" is an error.
52130  #
52131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52132  # It is also a way to make sure we got the proper file name for the real test later on.
52133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52134  if test "x$test_shortpath" = x; then
52135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52136$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52137    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52138  fi
52139
52140  # Call helper function which possibly converts this using DOS-style short mode.
52141  # If so, the updated path is stored in $new_path.
52142
52143  input_path="$new_path"
52144  # Check if we need to convert this using DOS-style short mode. If the path
52145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52146  # take no chances and rewrite it.
52147  # Note: m4 eats our [], so we need to use [ and ] instead.
52148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52149  if test "x$has_forbidden_chars" != x; then
52150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52154      # Going to short mode and back again did indeed matter. Since short mode is
52155      # case insensitive, let's make it lowercase to improve readability.
52156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52157      # Now convert it back to Unix-style (cygpath)
52158      input_path=`$CYGPATH -u "$shortmode_path"`
52159      new_path="$input_path"
52160    fi
52161  fi
52162
52163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52164  if test "x$test_cygdrive_prefix" = x; then
52165    # As a simple fix, exclude /usr/bin since it's not a real path.
52166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52168      # a path prefixed by /cygdrive for fixpath to work.
52169      new_path="$CYGWIN_ROOT_PATH$input_path"
52170    fi
52171  fi
52172
52173
52174  if test "x$path" != "x$new_path"; then
52175    MSVC_DLL="$new_path"
52176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52177$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52178  fi
52179
52180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52181
52182  path="$MSVC_DLL"
52183  has_colon=`$ECHO $path | $GREP ^.:`
52184  new_path="$path"
52185  if test "x$has_colon" = x; then
52186    # Not in mixed or Windows style, start by that.
52187    new_path=`cmd //c echo $path`
52188  fi
52189
52190
52191  input_path="$new_path"
52192  # Check if we need to convert this using DOS-style short mode. If the path
52193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52194  # take no chances and rewrite it.
52195  # Note: m4 eats our [], so we need to use [ and ] instead.
52196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52197  if test "x$has_forbidden_chars" != x; then
52198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52200  fi
52201
52202
52203  windows_path="$new_path"
52204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52205    unix_path=`$CYGPATH -u "$windows_path"`
52206    new_path="$unix_path"
52207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52209    new_path="$unix_path"
52210  fi
52211
52212  if test "x$path" != "x$new_path"; then
52213    MSVC_DLL="$new_path"
52214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52215$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52216  fi
52217
52218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52220
52221    else
52222      # We're on a unix platform. Hooray! :)
52223      path="$MSVC_DLL"
52224      has_space=`$ECHO "$path" | $GREP " "`
52225      if test "x$has_space" != x; then
52226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52227$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52229      fi
52230
52231      # Use eval to expand a potential ~
52232      eval path="$path"
52233      if test ! -f "$path" && test ! -d "$path"; then
52234        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52235      fi
52236
52237      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52238    fi
52239  fi
52240
52241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52242$as_echo_n "checking for $DLL_NAME... " >&6; }
52243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52244$as_echo "$MSVC_DLL" >&6; }
52245    else
52246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52247$as_echo "incorrect, ignoring" >&6; }
52248      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52249$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52250    fi
52251  fi
52252
52253  fi
52254
52255  if test "x$MSVC_DLL" = x; then
52256    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52257    if test "x$VS100COMNTOOLS" != x; then
52258      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52259
52260  windows_path="$CYGWIN_VS_TOOLS_DIR"
52261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52262    unix_path=`$CYGPATH -u "$windows_path"`
52263    CYGWIN_VS_TOOLS_DIR="$unix_path"
52264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52266    CYGWIN_VS_TOOLS_DIR="$unix_path"
52267  fi
52268
52269      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52270        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52271	    | $GREP -i /x64/ | $HEAD --lines 1`
52272      else
52273        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52274	    | $GREP -i /x86/ | $HEAD --lines 1`
52275      fi
52276
52277  DLL_NAME="$DLL_NAME"
52278  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52279  METHOD="search of VS100COMNTOOLS"
52280  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52281    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52282$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52283
52284    # Need to check if the found msvcr is correct architecture
52285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52286$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52287    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52289      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52290      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52292        CORRECT_MSVCR_ARCH="PE32 executable"
52293      else
52294        CORRECT_MSVCR_ARCH="PE32+ executable"
52295      fi
52296    else
52297      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52298        CORRECT_MSVCR_ARCH=386
52299      else
52300        CORRECT_MSVCR_ARCH=x86-64
52301      fi
52302    fi
52303    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52305$as_echo "ok" >&6; }
52306      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52307
52308  # Only process if variable expands to non-empty
52309
52310  if test "x$MSVC_DLL" != x; then
52311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52312
52313  # Input might be given as Windows format, start by converting to
52314  # unix format.
52315  path="$MSVC_DLL"
52316  new_path=`$CYGPATH -u "$path"`
52317
52318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52321  # "foo.exe" is OK but "foo" is an error.
52322  #
52323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52324  # It is also a way to make sure we got the proper file name for the real test later on.
52325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52326  if test "x$test_shortpath" = x; then
52327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52328$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52329    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52330  fi
52331
52332  # Call helper function which possibly converts this using DOS-style short mode.
52333  # If so, the updated path is stored in $new_path.
52334
52335  input_path="$new_path"
52336  # Check if we need to convert this using DOS-style short mode. If the path
52337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52338  # take no chances and rewrite it.
52339  # Note: m4 eats our [], so we need to use [ and ] instead.
52340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52341  if test "x$has_forbidden_chars" != x; then
52342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52346      # Going to short mode and back again did indeed matter. Since short mode is
52347      # case insensitive, let's make it lowercase to improve readability.
52348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52349      # Now convert it back to Unix-style (cygpath)
52350      input_path=`$CYGPATH -u "$shortmode_path"`
52351      new_path="$input_path"
52352    fi
52353  fi
52354
52355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52356  if test "x$test_cygdrive_prefix" = x; then
52357    # As a simple fix, exclude /usr/bin since it's not a real path.
52358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52360      # a path prefixed by /cygdrive for fixpath to work.
52361      new_path="$CYGWIN_ROOT_PATH$input_path"
52362    fi
52363  fi
52364
52365
52366  if test "x$path" != "x$new_path"; then
52367    MSVC_DLL="$new_path"
52368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52369$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52370  fi
52371
52372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52373
52374  path="$MSVC_DLL"
52375  has_colon=`$ECHO $path | $GREP ^.:`
52376  new_path="$path"
52377  if test "x$has_colon" = x; then
52378    # Not in mixed or Windows style, start by that.
52379    new_path=`cmd //c echo $path`
52380  fi
52381
52382
52383  input_path="$new_path"
52384  # Check if we need to convert this using DOS-style short mode. If the path
52385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52386  # take no chances and rewrite it.
52387  # Note: m4 eats our [], so we need to use [ and ] instead.
52388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52389  if test "x$has_forbidden_chars" != x; then
52390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52392  fi
52393
52394
52395  windows_path="$new_path"
52396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52397    unix_path=`$CYGPATH -u "$windows_path"`
52398    new_path="$unix_path"
52399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52401    new_path="$unix_path"
52402  fi
52403
52404  if test "x$path" != "x$new_path"; then
52405    MSVC_DLL="$new_path"
52406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52408  fi
52409
52410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52412
52413    else
52414      # We're on a unix platform. Hooray! :)
52415      path="$MSVC_DLL"
52416      has_space=`$ECHO "$path" | $GREP " "`
52417      if test "x$has_space" != x; then
52418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52419$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52421      fi
52422
52423      # Use eval to expand a potential ~
52424      eval path="$path"
52425      if test ! -f "$path" && test ! -d "$path"; then
52426        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52427      fi
52428
52429      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52430    fi
52431  fi
52432
52433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52434$as_echo_n "checking for $DLL_NAME... " >&6; }
52435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52436$as_echo "$MSVC_DLL" >&6; }
52437    else
52438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52439$as_echo "incorrect, ignoring" >&6; }
52440      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52441$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52442    fi
52443  fi
52444
52445    fi
52446  fi
52447
52448  if test "x$MSVC_DLL" = x; then
52449    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52450    # (This was the original behaviour; kept since it might turn something up)
52451    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52452      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52453        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52454	    | $GREP x64 | $HEAD --lines 1`
52455      else
52456        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52457	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52458        if test "x$POSSIBLE_MSVC_DLL" = x; then
52459          # We're grasping at straws now...
52460          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52461	      | $HEAD --lines 1`
52462        fi
52463      fi
52464
52465
52466  DLL_NAME="$DLL_NAME"
52467  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52468  METHOD="search of VCINSTALLDIR"
52469  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52470    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52471$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52472
52473    # Need to check if the found msvcr is correct architecture
52474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52475$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52476    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52478      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52479      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52480      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52481        CORRECT_MSVCR_ARCH="PE32 executable"
52482      else
52483        CORRECT_MSVCR_ARCH="PE32+ executable"
52484      fi
52485    else
52486      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52487        CORRECT_MSVCR_ARCH=386
52488      else
52489        CORRECT_MSVCR_ARCH=x86-64
52490      fi
52491    fi
52492    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52494$as_echo "ok" >&6; }
52495      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52496
52497  # Only process if variable expands to non-empty
52498
52499  if test "x$MSVC_DLL" != x; then
52500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52501
52502  # Input might be given as Windows format, start by converting to
52503  # unix format.
52504  path="$MSVC_DLL"
52505  new_path=`$CYGPATH -u "$path"`
52506
52507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52510  # "foo.exe" is OK but "foo" is an error.
52511  #
52512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52513  # It is also a way to make sure we got the proper file name for the real test later on.
52514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52515  if test "x$test_shortpath" = x; then
52516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52517$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52518    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52519  fi
52520
52521  # Call helper function which possibly converts this using DOS-style short mode.
52522  # If so, the updated path is stored in $new_path.
52523
52524  input_path="$new_path"
52525  # Check if we need to convert this using DOS-style short mode. If the path
52526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52527  # take no chances and rewrite it.
52528  # Note: m4 eats our [], so we need to use [ and ] instead.
52529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52530  if test "x$has_forbidden_chars" != x; then
52531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52535      # Going to short mode and back again did indeed matter. Since short mode is
52536      # case insensitive, let's make it lowercase to improve readability.
52537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52538      # Now convert it back to Unix-style (cygpath)
52539      input_path=`$CYGPATH -u "$shortmode_path"`
52540      new_path="$input_path"
52541    fi
52542  fi
52543
52544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52545  if test "x$test_cygdrive_prefix" = x; then
52546    # As a simple fix, exclude /usr/bin since it's not a real path.
52547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52549      # a path prefixed by /cygdrive for fixpath to work.
52550      new_path="$CYGWIN_ROOT_PATH$input_path"
52551    fi
52552  fi
52553
52554
52555  if test "x$path" != "x$new_path"; then
52556    MSVC_DLL="$new_path"
52557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52558$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52559  fi
52560
52561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52562
52563  path="$MSVC_DLL"
52564  has_colon=`$ECHO $path | $GREP ^.:`
52565  new_path="$path"
52566  if test "x$has_colon" = x; then
52567    # Not in mixed or Windows style, start by that.
52568    new_path=`cmd //c echo $path`
52569  fi
52570
52571
52572  input_path="$new_path"
52573  # Check if we need to convert this using DOS-style short mode. If the path
52574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52575  # take no chances and rewrite it.
52576  # Note: m4 eats our [], so we need to use [ and ] instead.
52577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52578  if test "x$has_forbidden_chars" != x; then
52579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52581  fi
52582
52583
52584  windows_path="$new_path"
52585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52586    unix_path=`$CYGPATH -u "$windows_path"`
52587    new_path="$unix_path"
52588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52590    new_path="$unix_path"
52591  fi
52592
52593  if test "x$path" != "x$new_path"; then
52594    MSVC_DLL="$new_path"
52595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52596$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52597  fi
52598
52599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52601
52602    else
52603      # We're on a unix platform. Hooray! :)
52604      path="$MSVC_DLL"
52605      has_space=`$ECHO "$path" | $GREP " "`
52606      if test "x$has_space" != x; then
52607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52608$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52610      fi
52611
52612      # Use eval to expand a potential ~
52613      eval path="$path"
52614      if test ! -f "$path" && test ! -d "$path"; then
52615        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52616      fi
52617
52618      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52619    fi
52620  fi
52621
52622      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52623$as_echo_n "checking for $DLL_NAME... " >&6; }
52624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52625$as_echo "$MSVC_DLL" >&6; }
52626    else
52627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52628$as_echo "incorrect, ignoring" >&6; }
52629      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52630$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52631    fi
52632  fi
52633
52634    fi
52635  fi
52636
52637  if test "x$MSVC_DLL" = x; then
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52639$as_echo_n "checking for $DLL_NAME... " >&6; }
52640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52641$as_echo "no" >&6; }
52642    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52643  fi
52644
52645      MSVCP_DLL="$MSVC_DLL"
52646    fi
52647
52648  fi
52649
52650
52651
52652# Check whether --with-dxsdk was given.
52653if test "${with_dxsdk+set}" = set; then :
52654  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52655$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52656fi
52657
52658
52659
52660
52661# Check whether --with-dxsdk-lib was given.
52662if test "${with_dxsdk_lib+set}" = set; then :
52663  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52664$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52665fi
52666
52667
52668
52669
52670# Check whether --with-dxsdk-include was given.
52671if test "${with_dxsdk_include+set}" = set; then :
52672  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52673$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52674fi
52675
52676
52677  fi
52678
52679
52680###############################################################################
52681#
52682# We need to do some final tweaking, when everything else is done.
52683#
52684###############################################################################
52685
52686
52687  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52688
52689
52690  # The name of the Service Agent jar.
52691  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52692  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52693    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52694  fi
52695
52696
52697
52698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52699$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52700
52701  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52702    ENABLE_INTREE_EC=yes
52703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52704$as_echo "yes" >&6; }
52705  else
52706    ENABLE_INTREE_EC=no
52707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52708$as_echo "no" >&6; }
52709  fi
52710
52711
52712
52713
52714###############################################################################
52715#
52716# Configure parts of the build that only affect the build performance,
52717# not the result.
52718#
52719###############################################################################
52720
52721
52722  # How many cores do we have on this build system?
52723
52724# Check whether --with-num-cores was given.
52725if test "${with_num_cores+set}" = set; then :
52726  withval=$with_num_cores;
52727fi
52728
52729  if test "x$with_num_cores" = x; then
52730    # The number of cores were not specified, try to probe them.
52731
52732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52733$as_echo_n "checking for number of cores... " >&6; }
52734  NUM_CORES=1
52735  FOUND_CORES=no
52736
52737  if test -f /proc/cpuinfo; then
52738    # Looks like a Linux (or cygwin) system
52739    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52740    FOUND_CORES=yes
52741  elif test -x /usr/sbin/psrinfo; then
52742    # Looks like a Solaris system
52743    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52744    FOUND_CORES=yes
52745  elif test -x /usr/sbin/system_profiler; then
52746    # Looks like a MacOSX system
52747    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52748    FOUND_CORES=yes
52749  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52750    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52751    FOUND_CORES=yes
52752  elif test -n "$NUMBER_OF_PROCESSORS"; then
52753    # On windows, look in the env
52754    NUM_CORES=$NUMBER_OF_PROCESSORS
52755    FOUND_CORES=yes
52756  fi
52757
52758  if test "x$FOUND_CORES" = xyes; then
52759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52760$as_echo "$NUM_CORES" >&6; }
52761  else
52762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52763$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52764    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52765$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52766  fi
52767
52768  else
52769    NUM_CORES=$with_num_cores
52770  fi
52771
52772
52773
52774  # How much memory do we have on this build system?
52775
52776# Check whether --with-memory-size was given.
52777if test "${with_memory_size+set}" = set; then :
52778  withval=$with_memory_size;
52779fi
52780
52781  if test "x$with_memory_size" = x; then
52782    # The memory size was not specified, try to probe it.
52783
52784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52785$as_echo_n "checking for memory size... " >&6; }
52786  # Default to 1024 MB
52787  MEMORY_SIZE=1024
52788  FOUND_MEM=no
52789
52790  if test -f /proc/meminfo; then
52791    # Looks like a Linux (or cygwin) system
52792    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52793    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52794    FOUND_MEM=yes
52795  elif test -x /usr/sbin/prtconf; then
52796    # Looks like a Solaris or AIX system
52797    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52798    FOUND_MEM=yes
52799  elif test -x /usr/sbin/system_profiler; then
52800    # Looks like a MacOSX system
52801    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52802    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52803    FOUND_MEM=yes
52804  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52805    # Windows, but without cygwin
52806    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52807    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52808    FOUND_MEM=yes
52809  fi
52810
52811  if test "x$FOUND_MEM" = xyes; then
52812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52813$as_echo "$MEMORY_SIZE MB" >&6; }
52814  else
52815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52816$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52817    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52818$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52819  fi
52820
52821  else
52822    MEMORY_SIZE=$with_memory_size
52823  fi
52824
52825
52826
52827  # Provide a decent default number of parallel jobs for make depending on
52828  # number of cores, amount of memory and machine architecture.
52829
52830# Check whether --with-jobs was given.
52831if test "${with_jobs+set}" = set; then :
52832  withval=$with_jobs;
52833fi
52834
52835  if test "x$with_jobs" = x; then
52836    # Number of jobs was not specified, calculate.
52837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52838$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52839    # Approximate memory in GB.
52840    memory_gb=`expr $MEMORY_SIZE / 1024`
52841    # Pick the lowest of memory in gb and number of cores.
52842    if test "$memory_gb" -lt "$NUM_CORES"; then
52843      JOBS="$memory_gb"
52844    else
52845      JOBS="$NUM_CORES"
52846      # On bigger machines, leave some room for other processes to run
52847      if test "$JOBS" -gt "4"; then
52848        JOBS=`expr $JOBS '*' 90 / 100`
52849      fi
52850    fi
52851    # Cap number of jobs to 16
52852    if test "$JOBS" -gt "16"; then
52853      JOBS=16
52854    fi
52855    if test "$JOBS" -eq "0"; then
52856      JOBS=1
52857    fi
52858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52859$as_echo "$JOBS" >&6; }
52860  else
52861    JOBS=$with_jobs
52862  fi
52863
52864
52865
52866# Setup arguments for the boot jdk (after cores and memory have been setup)
52867
52868  ##############################################################################
52869  #
52870  # Specify jvm options for anything that is run with the Boot JDK.
52871  # Not all JVM:s accept the same arguments on the command line.
52872  #
52873
52874# Check whether --with-boot-jdk-jvmargs was given.
52875if test "${with_boot_jdk_jvmargs+set}" = set; then :
52876  withval=$with_boot_jdk_jvmargs;
52877fi
52878
52879
52880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52881$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52882
52883  # Disable special log output when a debug build is used as Boot JDK...
52884
52885  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52886  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52887  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52888  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52889  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52890  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52891    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52892    JVM_ARG_OK=true
52893  else
52894    $ECHO "Arg failed:" >&5
52895    $ECHO "$OUTPUT" >&5
52896    JVM_ARG_OK=false
52897  fi
52898
52899
52900  # Apply user provided options.
52901
52902  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52903  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52904  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52905  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52906  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52907  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52908    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52909    JVM_ARG_OK=true
52910  else
52911    $ECHO "Arg failed:" >&5
52912    $ECHO "$OUTPUT" >&5
52913    JVM_ARG_OK=false
52914  fi
52915
52916
52917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52918$as_echo "$boot_jdk_jvmargs" >&6; }
52919
52920  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52921  JAVA_FLAGS=$boot_jdk_jvmargs
52922
52923
52924
52925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52926$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52927
52928  # Starting amount of heap memory.
52929
52930  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52931  $ECHO "Command: $JAVA -Xms64M -version" >&5
52932  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52933  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52934  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52935  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52936    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52937    JVM_ARG_OK=true
52938  else
52939    $ECHO "Arg failed:" >&5
52940    $ECHO "$OUTPUT" >&5
52941    JVM_ARG_OK=false
52942  fi
52943
52944
52945  # Maximum amount of heap memory.
52946  # Maximum stack size.
52947  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52948  if test "x$BUILD_NUM_BITS" = x32; then
52949    if test "$JVM_MAX_HEAP" -gt "1100"; then
52950      JVM_MAX_HEAP=1100
52951    elif test "$JVM_MAX_HEAP" -lt "512"; then
52952      JVM_MAX_HEAP=512
52953    fi
52954    STACK_SIZE=768
52955  else
52956    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52957    # pointers are used. Apparently, we need to increase the heap and stack
52958    # space for the jvm. More specifically, when running javac to build huge
52959    # jdk batch
52960    if test "$JVM_MAX_HEAP" -gt "1600"; then
52961      JVM_MAX_HEAP=1600
52962    elif test "$JVM_MAX_HEAP" -lt "512"; then
52963      JVM_MAX_HEAP=512
52964    fi
52965    STACK_SIZE=1536
52966  fi
52967
52968  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52969  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52970  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52971  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52972  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52973  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52974    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52975    JVM_ARG_OK=true
52976  else
52977    $ECHO "Arg failed:" >&5
52978    $ECHO "$OUTPUT" >&5
52979    JVM_ARG_OK=false
52980  fi
52981
52982
52983  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52984  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52985  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52986  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52987  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52988  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52989    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52990    JVM_ARG_OK=true
52991  else
52992    $ECHO "Arg failed:" >&5
52993    $ECHO "$OUTPUT" >&5
52994    JVM_ARG_OK=false
52995  fi
52996
52997
52998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52999$as_echo "$boot_jdk_jvmargs_big" >&6; }
53000
53001  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53002
53003
53004
53005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53006$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53007
53008  # Use serial gc for small short lived tools if possible
53009
53010  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53011  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53012  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53013  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53014  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53015  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53016    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53017    JVM_ARG_OK=true
53018  else
53019    $ECHO "Arg failed:" >&5
53020    $ECHO "$OUTPUT" >&5
53021    JVM_ARG_OK=false
53022  fi
53023
53024
53025  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53026  $ECHO "Command: $JAVA -Xms32M -version" >&5
53027  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53028  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53029  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53030  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53031    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53032    JVM_ARG_OK=true
53033  else
53034    $ECHO "Arg failed:" >&5
53035    $ECHO "$OUTPUT" >&5
53036    JVM_ARG_OK=false
53037  fi
53038
53039
53040  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53041  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53042  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53043  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53044  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53046    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53047    JVM_ARG_OK=true
53048  else
53049    $ECHO "Arg failed:" >&5
53050    $ECHO "$OUTPUT" >&5
53051    JVM_ARG_OK=false
53052  fi
53053
53054
53055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53056$as_echo "$boot_jdk_jvmargs_small" >&6; }
53057
53058  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53059
53060
53061  JAVA_TOOL_FLAGS_SMALL=""
53062  for f in $JAVA_FLAGS_SMALL; do
53063    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53064  done
53065
53066
53067
53068# Setup smart javac (after cores and memory have been setup)
53069
53070
53071# Check whether --with-sjavac-server-java was given.
53072if test "${with_sjavac_server_java+set}" = set; then :
53073  withval=$with_sjavac_server_java;
53074fi
53075
53076
53077  if test "x$with_sjavac_server_java" != x; then
53078    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53079    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53080    if test "x$FOUND_VERSION" = x; then
53081      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53082    fi
53083  else
53084    SJAVAC_SERVER_JAVA="$JAVA"
53085  fi
53086
53087
53088  if test "$MEMORY_SIZE" -gt "3000"; then
53089
53090  $ECHO "Check if jvm arg is ok: -d64" >&5
53091  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53092  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53093  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53094  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53095  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53096    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53097    JVM_ARG_OK=true
53098  else
53099    $ECHO "Arg failed:" >&5
53100    $ECHO "$OUTPUT" >&5
53101    JVM_ARG_OK=false
53102  fi
53103
53104    if test "$JVM_ARG_OK" = true; then
53105      JVM_64BIT=true
53106      JVM_ARG_OK=false
53107    fi
53108  fi
53109
53110  MX_VALUE=`expr $MEMORY_SIZE / 2`
53111  if test "$JVM_64BIT" = true; then
53112    # Set ms lower than mx since more than one instance of the server might
53113    # get launched at the same time before they figure out which instance won.
53114    MS_VALUE=512
53115    if test "$MX_VALUE" -gt "2048"; then
53116      MX_VALUE=2048
53117    fi
53118  else
53119    MS_VALUE=256
53120    if test "$MX_VALUE" -gt "1500"; then
53121      MX_VALUE=1500
53122    fi
53123  fi
53124  if test "$MX_VALUE" -lt "512"; then
53125    MX_VALUE=512
53126  fi
53127
53128  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53129  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53130  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53131  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53132  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53133  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53134    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53135    JVM_ARG_OK=true
53136  else
53137    $ECHO "Arg failed:" >&5
53138    $ECHO "$OUTPUT" >&5
53139    JVM_ARG_OK=false
53140  fi
53141
53142
53143
53144  # Check whether --enable-sjavac was given.
53145if test "${enable_sjavac+set}" = set; then :
53146  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53147else
53148  ENABLE_SJAVAC='no'
53149fi
53150
53151  if test "x$JVM_ARG_OK" = "xfalse"; then
53152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53153$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53154    ENABLE_SJAVAC=no;
53155  fi
53156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53157$as_echo_n "checking whether to use sjavac... " >&6; }
53158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53159$as_echo "$ENABLE_SJAVAC" >&6; }
53160
53161
53162
53163# Can the C/C++ compiler use precompiled headers?
53164
53165
53166  ###############################################################################
53167  #
53168  # Can the C/C++ compiler use precompiled headers?
53169  #
53170  # Check whether --enable-precompiled-headers was given.
53171if test "${enable_precompiled_headers+set}" = set; then :
53172  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53173else
53174  ENABLE_PRECOMPH=yes
53175fi
53176
53177
53178  USE_PRECOMPILED_HEADER=1
53179  if test "x$ENABLE_PRECOMPH" = xno; then
53180    USE_PRECOMPILED_HEADER=0
53181  fi
53182
53183  if test "x$ENABLE_PRECOMPH" = xyes; then
53184    # Check that the compiler actually supports precomp headers.
53185    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53187$as_echo_n "checking that precompiled headers work... " >&6; }
53188      echo "int alfa();" > conftest.h
53189      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53190      if test ! -f conftest.hpp.gch; then
53191        USE_PRECOMPILED_HEADER=0
53192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53193$as_echo "no" >&6; }
53194      else
53195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53196$as_echo "yes" >&6; }
53197      fi
53198      rm -f conftest.h conftest.hpp.gch
53199    fi
53200  fi
53201
53202
53203
53204
53205# Setup use of ccache, if available
53206
53207  # Check whether --enable-ccache was given.
53208if test "${enable_ccache+set}" = set; then :
53209  enableval=$enable_ccache;
53210fi
53211
53212
53213  CCACHE=
53214  CCACHE_STATUS=
53215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53216$as_echo_n "checking is ccache enabled... " >&6; }
53217  if test "x$enable_ccache" = xyes; then
53218    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53220$as_echo "yes" >&6; }
53221      OLD_PATH="$PATH"
53222      if test "x$TOOLCHAIN_PATH" != x; then
53223        PATH=$TOOLCHAIN_PATH:$PATH
53224      fi
53225
53226
53227
53228  # Publish this variable in the help.
53229
53230
53231  if test "x$CCACHE" = x; then
53232    # The variable is not set by user, try to locate tool using the code snippet
53233    for ac_prog in ccache
53234do
53235  # Extract the first word of "$ac_prog", so it can be a program name with args.
53236set dummy $ac_prog; ac_word=$2
53237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53238$as_echo_n "checking for $ac_word... " >&6; }
53239if ${ac_cv_path_CCACHE+:} false; then :
53240  $as_echo_n "(cached) " >&6
53241else
53242  case $CCACHE in
53243  [\\/]* | ?:[\\/]*)
53244  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53245  ;;
53246  *)
53247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53248for as_dir in $PATH
53249do
53250  IFS=$as_save_IFS
53251  test -z "$as_dir" && as_dir=.
53252    for ac_exec_ext in '' $ac_executable_extensions; do
53253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53254    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53256    break 2
53257  fi
53258done
53259  done
53260IFS=$as_save_IFS
53261
53262  ;;
53263esac
53264fi
53265CCACHE=$ac_cv_path_CCACHE
53266if test -n "$CCACHE"; then
53267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53268$as_echo "$CCACHE" >&6; }
53269else
53270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53271$as_echo "no" >&6; }
53272fi
53273
53274
53275  test -n "$CCACHE" && break
53276done
53277
53278  else
53279    # The variable is set, but is it from the command line or the environment?
53280
53281    # Try to remove the string !CCACHE! from our list.
53282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53284      # If it failed, the variable was not from the command line. Ignore it,
53285      # but warn the user (except for BASH, which is always set by the calling BASH).
53286      if test "xCCACHE" != xBASH; then
53287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53288$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53289      fi
53290      # Try to locate tool using the code snippet
53291      for ac_prog in ccache
53292do
53293  # Extract the first word of "$ac_prog", so it can be a program name with args.
53294set dummy $ac_prog; ac_word=$2
53295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53296$as_echo_n "checking for $ac_word... " >&6; }
53297if ${ac_cv_path_CCACHE+:} false; then :
53298  $as_echo_n "(cached) " >&6
53299else
53300  case $CCACHE in
53301  [\\/]* | ?:[\\/]*)
53302  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53303  ;;
53304  *)
53305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53306for as_dir in $PATH
53307do
53308  IFS=$as_save_IFS
53309  test -z "$as_dir" && as_dir=.
53310    for ac_exec_ext in '' $ac_executable_extensions; do
53311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53312    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53314    break 2
53315  fi
53316done
53317  done
53318IFS=$as_save_IFS
53319
53320  ;;
53321esac
53322fi
53323CCACHE=$ac_cv_path_CCACHE
53324if test -n "$CCACHE"; then
53325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53326$as_echo "$CCACHE" >&6; }
53327else
53328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53329$as_echo "no" >&6; }
53330fi
53331
53332
53333  test -n "$CCACHE" && break
53334done
53335
53336    else
53337      # If it succeeded, then it was overridden by the user. We will use it
53338      # for the tool.
53339
53340      # First remove it from the list of overridden variables, so we can test
53341      # for unknown variables in the end.
53342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53343
53344      # Check if the provided tool contains a complete path.
53345      tool_specified="$CCACHE"
53346      tool_basename="${tool_specified##*/}"
53347      if test "x$tool_basename" = "x$tool_specified"; then
53348        # A command without a complete path is provided, search $PATH.
53349        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53350$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53351        # Extract the first word of "$tool_basename", so it can be a program name with args.
53352set dummy $tool_basename; ac_word=$2
53353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53354$as_echo_n "checking for $ac_word... " >&6; }
53355if ${ac_cv_path_CCACHE+:} false; then :
53356  $as_echo_n "(cached) " >&6
53357else
53358  case $CCACHE in
53359  [\\/]* | ?:[\\/]*)
53360  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53361  ;;
53362  *)
53363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53364for as_dir in $PATH
53365do
53366  IFS=$as_save_IFS
53367  test -z "$as_dir" && as_dir=.
53368    for ac_exec_ext in '' $ac_executable_extensions; do
53369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53370    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53372    break 2
53373  fi
53374done
53375  done
53376IFS=$as_save_IFS
53377
53378  ;;
53379esac
53380fi
53381CCACHE=$ac_cv_path_CCACHE
53382if test -n "$CCACHE"; then
53383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53384$as_echo "$CCACHE" >&6; }
53385else
53386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53387$as_echo "no" >&6; }
53388fi
53389
53390
53391        if test "x$CCACHE" = x; then
53392          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53393        fi
53394      else
53395        # Otherwise we believe it is a complete path. Use it as it is.
53396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53397$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53399$as_echo_n "checking for CCACHE... " >&6; }
53400        if test ! -x "$tool_specified"; then
53401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53402$as_echo "not found" >&6; }
53403          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53404        fi
53405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53406$as_echo "$tool_specified" >&6; }
53407      fi
53408    fi
53409  fi
53410
53411
53412
53413  if test "x$CCACHE" = x; then
53414    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53415  fi
53416
53417
53418      PATH="$OLD_PATH"
53419      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53420      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53421    else
53422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53423$as_echo "no" >&6; }
53424      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53425$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53426    fi
53427  elif test "x$enable_ccache" = xno; then
53428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53429$as_echo "no, explicitly disabled" >&6; }
53430    CCACHE_STATUS="Disabled"
53431  elif test "x$enable_ccache" = x; then
53432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53433$as_echo "no" >&6; }
53434  else
53435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53436$as_echo "unknown" >&6; }
53437    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53438  fi
53439
53440
53441
53442# Check whether --with-ccache-dir was given.
53443if test "${with_ccache_dir+set}" = set; then :
53444  withval=$with_ccache_dir;
53445fi
53446
53447
53448  if test "x$with_ccache_dir" != x; then
53449    # When using a non home ccache directory, assume the use is to share ccache files
53450    # with other users. Thus change the umask.
53451    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53452    if test "x$CCACHE" = x; then
53453      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53454$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53455    fi
53456  fi
53457
53458  if test "x$CCACHE" != x; then
53459
53460  if test "x$CCACHE" != x; then
53461    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53462      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53463          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53464      if test "x$HAS_BAD_CCACHE" != "x"; then
53465        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53466      fi
53467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53468$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53469      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53470      PUSHED_FLAGS="$CXXFLAGS"
53471      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53472      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53473/* end confdefs.h.  */
53474
53475int
53476main ()
53477{
53478
53479  ;
53480  return 0;
53481}
53482_ACEOF
53483if ac_fn_cxx_try_compile "$LINENO"; then :
53484  CC_KNOWS_CCACHE_TRICK=yes
53485else
53486  CC_KNOWS_CCACHE_TRICK=no
53487fi
53488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53489      CXXFLAGS="$PUSHED_FLAGS"
53490      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53492$as_echo "yes" >&6; }
53493        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53494
53495        CCACHE_SLOPPINESS=pch_defines,time_macros
53496      else
53497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53498$as_echo "no" >&6; }
53499        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53500      fi
53501    fi
53502
53503    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53504        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53505
53506    if test "x$SET_CCACHE_DIR" != x; then
53507      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53508      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53509    fi
53510  fi
53511
53512  fi
53513
53514
53515###############################################################################
53516#
53517# And now the finish...
53518#
53519###############################################################################
53520
53521# Check for some common pitfalls
53522
53523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53524    file_to_test="$SRC_ROOT/LICENSE"
53525    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53526      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
53527    fi
53528  fi
53529
53530
53531  # Did user specify any unknown variables?
53532
53533  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53534    # Replace the separating ! with spaces before presenting for end user.
53535    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53537$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53538  fi
53539
53540
53541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53542$as_echo_n "checking if build directory is on local disk... " >&6; }
53543
53544  # df -l lists only local disks; if the given directory is not found then
53545  # a non-zero exit code is given
53546  if test "x$DF" = x; then
53547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53548      # msys does not have df; use Windows "net use" instead.
53549      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53550      if test "x$IS_NETWORK_DISK" = x; then
53551        OUTPUT_DIR_IS_LOCAL="yes"
53552      else
53553        OUTPUT_DIR_IS_LOCAL="no"
53554      fi
53555    else
53556      # No df here, say it's local
53557      OUTPUT_DIR_IS_LOCAL="yes"
53558    fi
53559  else
53560    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53561      OUTPUT_DIR_IS_LOCAL="yes"
53562    else
53563      OUTPUT_DIR_IS_LOCAL="no"
53564    fi
53565  fi
53566
53567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53568$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53569
53570
53571
53572  # Check if the user has any old-style ALT_ variables set.
53573  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53574
53575  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53576  # Since we can't properly handle the dependencies for this, warn the user about the situation
53577  if test -e $OUTPUT_ROOT/spec.gmk; then
53578    IS_RECONFIGURE=yes
53579  else
53580    IS_RECONFIGURE=no
53581  fi
53582
53583
53584# At the end, call the custom hook. (Dummy macro if no custom sources available)
53585
53586
53587# We're messing a bit with internal autoconf variables to put the config.status
53588# in the output directory instead of the current directory.
53589CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53590
53591# Create the actual output files. Now the main work of configure is done.
53592cat >confcache <<\_ACEOF
53593# This file is a shell script that caches the results of configure
53594# tests run on this system so they can be shared between configure
53595# scripts and configure runs, see configure's option --config-cache.
53596# It is not useful on other systems.  If it contains results you don't
53597# want to keep, you may remove or edit it.
53598#
53599# config.status only pays attention to the cache file if you give it
53600# the --recheck option to rerun configure.
53601#
53602# `ac_cv_env_foo' variables (set or unset) will be overridden when
53603# loading this file, other *unset* `ac_cv_foo' will be assigned the
53604# following values.
53605
53606_ACEOF
53607
53608# The following way of writing the cache mishandles newlines in values,
53609# but we know of no workaround that is simple, portable, and efficient.
53610# So, we kill variables containing newlines.
53611# Ultrix sh set writes to stderr and can't be redirected directly,
53612# and sets the high bit in the cache file unless we assign to the vars.
53613(
53614  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53615    eval ac_val=\$$ac_var
53616    case $ac_val in #(
53617    *${as_nl}*)
53618      case $ac_var in #(
53619      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53620$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53621      esac
53622      case $ac_var in #(
53623      _ | IFS | as_nl) ;; #(
53624      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53625      *) { eval $ac_var=; unset $ac_var;} ;;
53626      esac ;;
53627    esac
53628  done
53629
53630  (set) 2>&1 |
53631    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53632    *${as_nl}ac_space=\ *)
53633      # `set' does not quote correctly, so add quotes: double-quote
53634      # substitution turns \\\\ into \\, and sed turns \\ into \.
53635      sed -n \
53636	"s/'/'\\\\''/g;
53637	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53638      ;; #(
53639    *)
53640      # `set' quotes correctly as required by POSIX, so do not add quotes.
53641      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53642      ;;
53643    esac |
53644    sort
53645) |
53646  sed '
53647     /^ac_cv_env_/b end
53648     t clear
53649     :clear
53650     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53651     t end
53652     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53653     :end' >>confcache
53654if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53655  if test -w "$cache_file"; then
53656    if test "x$cache_file" != "x/dev/null"; then
53657      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53658$as_echo "$as_me: updating cache $cache_file" >&6;}
53659      if test ! -f "$cache_file" || test -h "$cache_file"; then
53660	cat confcache >"$cache_file"
53661      else
53662        case $cache_file in #(
53663        */* | ?:*)
53664	  mv -f confcache "$cache_file"$$ &&
53665	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53666        *)
53667	  mv -f confcache "$cache_file" ;;
53668	esac
53669      fi
53670    fi
53671  else
53672    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53673$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53674  fi
53675fi
53676rm -f confcache
53677
53678test "x$prefix" = xNONE && prefix=$ac_default_prefix
53679# Let make expand exec_prefix.
53680test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53681
53682# Transform confdefs.h into DEFS.
53683# Protect against shell expansion while executing Makefile rules.
53684# Protect against Makefile macro expansion.
53685#
53686# If the first sed substitution is executed (which looks for macros that
53687# take arguments), then branch to the quote section.  Otherwise,
53688# look for a macro that doesn't take arguments.
53689ac_script='
53690:mline
53691/\\$/{
53692 N
53693 s,\\\n,,
53694 b mline
53695}
53696t clear
53697:clear
53698s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53699t quote
53700s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53701t quote
53702b any
53703:quote
53704s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53705s/\[/\\&/g
53706s/\]/\\&/g
53707s/\$/$$/g
53708H
53709:any
53710${
53711	g
53712	s/^\n//
53713	s/\n/ /g
53714	p
53715}
53716'
53717DEFS=`sed -n "$ac_script" confdefs.h`
53718
53719
53720ac_libobjs=
53721ac_ltlibobjs=
53722U=
53723for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53724  # 1. Remove the extension, and $U if already installed.
53725  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53726  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53727  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53728  #    will be set to the directory where LIBOBJS objects are built.
53729  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53730  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53731done
53732LIBOBJS=$ac_libobjs
53733
53734LTLIBOBJS=$ac_ltlibobjs
53735
53736
53737
53738: "${CONFIG_STATUS=./config.status}"
53739ac_write_fail=0
53740ac_clean_files_save=$ac_clean_files
53741ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53742{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53743$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53744as_write_fail=0
53745cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53746#! $SHELL
53747# Generated by $as_me.
53748# Run this file to recreate the current configuration.
53749# Compiler output produced by configure, useful for debugging
53750# configure, is in config.log if it exists.
53751
53752debug=false
53753ac_cs_recheck=false
53754ac_cs_silent=false
53755
53756SHELL=\${CONFIG_SHELL-$SHELL}
53757export SHELL
53758_ASEOF
53759cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53760## -------------------- ##
53761## M4sh Initialization. ##
53762## -------------------- ##
53763
53764# Be more Bourne compatible
53765DUALCASE=1; export DUALCASE # for MKS sh
53766if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53767  emulate sh
53768  NULLCMD=:
53769  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53770  # is contrary to our usage.  Disable this feature.
53771  alias -g '${1+"$@"}'='"$@"'
53772  setopt NO_GLOB_SUBST
53773else
53774  case `(set -o) 2>/dev/null` in #(
53775  *posix*) :
53776    set -o posix ;; #(
53777  *) :
53778     ;;
53779esac
53780fi
53781
53782
53783as_nl='
53784'
53785export as_nl
53786# Printing a long string crashes Solaris 7 /usr/bin/printf.
53787as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53788as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53789as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53790# Prefer a ksh shell builtin over an external printf program on Solaris,
53791# but without wasting forks for bash or zsh.
53792if test -z "$BASH_VERSION$ZSH_VERSION" \
53793    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53794  as_echo='print -r --'
53795  as_echo_n='print -rn --'
53796elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53797  as_echo='printf %s\n'
53798  as_echo_n='printf %s'
53799else
53800  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53801    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53802    as_echo_n='/usr/ucb/echo -n'
53803  else
53804    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53805    as_echo_n_body='eval
53806      arg=$1;
53807      case $arg in #(
53808      *"$as_nl"*)
53809	expr "X$arg" : "X\\(.*\\)$as_nl";
53810	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53811      esac;
53812      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53813    '
53814    export as_echo_n_body
53815    as_echo_n='sh -c $as_echo_n_body as_echo'
53816  fi
53817  export as_echo_body
53818  as_echo='sh -c $as_echo_body as_echo'
53819fi
53820
53821# The user is always right.
53822if test "${PATH_SEPARATOR+set}" != set; then
53823  PATH_SEPARATOR=:
53824  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53825    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53826      PATH_SEPARATOR=';'
53827  }
53828fi
53829
53830
53831# IFS
53832# We need space, tab and new line, in precisely that order.  Quoting is
53833# there to prevent editors from complaining about space-tab.
53834# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53835# splitting by setting IFS to empty value.)
53836IFS=" ""	$as_nl"
53837
53838# Find who we are.  Look in the path if we contain no directory separator.
53839as_myself=
53840case $0 in #((
53841  *[\\/]* ) as_myself=$0 ;;
53842  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53843for as_dir in $PATH
53844do
53845  IFS=$as_save_IFS
53846  test -z "$as_dir" && as_dir=.
53847    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53848  done
53849IFS=$as_save_IFS
53850
53851     ;;
53852esac
53853# We did not find ourselves, most probably we were run as `sh COMMAND'
53854# in which case we are not to be found in the path.
53855if test "x$as_myself" = x; then
53856  as_myself=$0
53857fi
53858if test ! -f "$as_myself"; then
53859  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53860  exit 1
53861fi
53862
53863# Unset variables that we do not need and which cause bugs (e.g. in
53864# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53865# suppresses any "Segmentation fault" message there.  '((' could
53866# trigger a bug in pdksh 5.2.14.
53867for as_var in BASH_ENV ENV MAIL MAILPATH
53868do eval test x\${$as_var+set} = xset \
53869  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53870done
53871PS1='$ '
53872PS2='> '
53873PS4='+ '
53874
53875# NLS nuisances.
53876LC_ALL=C
53877export LC_ALL
53878LANGUAGE=C
53879export LANGUAGE
53880
53881# CDPATH.
53882(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53883
53884
53885# as_fn_error STATUS ERROR [LINENO LOG_FD]
53886# ----------------------------------------
53887# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53888# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53889# script with STATUS, using 1 if that was 0.
53890as_fn_error ()
53891{
53892  as_status=$1; test $as_status -eq 0 && as_status=1
53893  if test "$4"; then
53894    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53895    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53896  fi
53897  $as_echo "$as_me: error: $2" >&2
53898  as_fn_exit $as_status
53899} # as_fn_error
53900
53901
53902# as_fn_set_status STATUS
53903# -----------------------
53904# Set $? to STATUS, without forking.
53905as_fn_set_status ()
53906{
53907  return $1
53908} # as_fn_set_status
53909
53910# as_fn_exit STATUS
53911# -----------------
53912# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53913as_fn_exit ()
53914{
53915  set +e
53916  as_fn_set_status $1
53917  exit $1
53918} # as_fn_exit
53919
53920# as_fn_unset VAR
53921# ---------------
53922# Portably unset VAR.
53923as_fn_unset ()
53924{
53925  { eval $1=; unset $1;}
53926}
53927as_unset=as_fn_unset
53928# as_fn_append VAR VALUE
53929# ----------------------
53930# Append the text in VALUE to the end of the definition contained in VAR. Take
53931# advantage of any shell optimizations that allow amortized linear growth over
53932# repeated appends, instead of the typical quadratic growth present in naive
53933# implementations.
53934if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53935  eval 'as_fn_append ()
53936  {
53937    eval $1+=\$2
53938  }'
53939else
53940  as_fn_append ()
53941  {
53942    eval $1=\$$1\$2
53943  }
53944fi # as_fn_append
53945
53946# as_fn_arith ARG...
53947# ------------------
53948# Perform arithmetic evaluation on the ARGs, and store the result in the
53949# global $as_val. Take advantage of shells that can avoid forks. The arguments
53950# must be portable across $(()) and expr.
53951if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53952  eval 'as_fn_arith ()
53953  {
53954    as_val=$(( $* ))
53955  }'
53956else
53957  as_fn_arith ()
53958  {
53959    as_val=`expr "$@" || test $? -eq 1`
53960  }
53961fi # as_fn_arith
53962
53963
53964if expr a : '\(a\)' >/dev/null 2>&1 &&
53965   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53966  as_expr=expr
53967else
53968  as_expr=false
53969fi
53970
53971if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53972  as_basename=basename
53973else
53974  as_basename=false
53975fi
53976
53977if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53978  as_dirname=dirname
53979else
53980  as_dirname=false
53981fi
53982
53983as_me=`$as_basename -- "$0" ||
53984$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53985	 X"$0" : 'X\(//\)$' \| \
53986	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53987$as_echo X/"$0" |
53988    sed '/^.*\/\([^/][^/]*\)\/*$/{
53989	    s//\1/
53990	    q
53991	  }
53992	  /^X\/\(\/\/\)$/{
53993	    s//\1/
53994	    q
53995	  }
53996	  /^X\/\(\/\).*/{
53997	    s//\1/
53998	    q
53999	  }
54000	  s/.*/./; q'`
54001
54002# Avoid depending upon Character Ranges.
54003as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54004as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54005as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54006as_cr_digits='0123456789'
54007as_cr_alnum=$as_cr_Letters$as_cr_digits
54008
54009ECHO_C= ECHO_N= ECHO_T=
54010case `echo -n x` in #(((((
54011-n*)
54012  case `echo 'xy\c'` in
54013  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54014  xy)  ECHO_C='\c';;
54015  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54016       ECHO_T='	';;
54017  esac;;
54018*)
54019  ECHO_N='-n';;
54020esac
54021
54022rm -f conf$$ conf$$.exe conf$$.file
54023if test -d conf$$.dir; then
54024  rm -f conf$$.dir/conf$$.file
54025else
54026  rm -f conf$$.dir
54027  mkdir conf$$.dir 2>/dev/null
54028fi
54029if (echo >conf$$.file) 2>/dev/null; then
54030  if ln -s conf$$.file conf$$ 2>/dev/null; then
54031    as_ln_s='ln -s'
54032    # ... but there are two gotchas:
54033    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54034    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54035    # In both cases, we have to default to `cp -pR'.
54036    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54037      as_ln_s='cp -pR'
54038  elif ln conf$$.file conf$$ 2>/dev/null; then
54039    as_ln_s=ln
54040  else
54041    as_ln_s='cp -pR'
54042  fi
54043else
54044  as_ln_s='cp -pR'
54045fi
54046rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54047rmdir conf$$.dir 2>/dev/null
54048
54049
54050# as_fn_mkdir_p
54051# -------------
54052# Create "$as_dir" as a directory, including parents if necessary.
54053as_fn_mkdir_p ()
54054{
54055
54056  case $as_dir in #(
54057  -*) as_dir=./$as_dir;;
54058  esac
54059  test -d "$as_dir" || eval $as_mkdir_p || {
54060    as_dirs=
54061    while :; do
54062      case $as_dir in #(
54063      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54064      *) as_qdir=$as_dir;;
54065      esac
54066      as_dirs="'$as_qdir' $as_dirs"
54067      as_dir=`$as_dirname -- "$as_dir" ||
54068$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54069	 X"$as_dir" : 'X\(//\)[^/]' \| \
54070	 X"$as_dir" : 'X\(//\)$' \| \
54071	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54072$as_echo X"$as_dir" |
54073    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54074	    s//\1/
54075	    q
54076	  }
54077	  /^X\(\/\/\)[^/].*/{
54078	    s//\1/
54079	    q
54080	  }
54081	  /^X\(\/\/\)$/{
54082	    s//\1/
54083	    q
54084	  }
54085	  /^X\(\/\).*/{
54086	    s//\1/
54087	    q
54088	  }
54089	  s/.*/./; q'`
54090      test -d "$as_dir" && break
54091    done
54092    test -z "$as_dirs" || eval "mkdir $as_dirs"
54093  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54094
54095
54096} # as_fn_mkdir_p
54097if mkdir -p . 2>/dev/null; then
54098  as_mkdir_p='mkdir -p "$as_dir"'
54099else
54100  test -d ./-p && rmdir ./-p
54101  as_mkdir_p=false
54102fi
54103
54104
54105# as_fn_executable_p FILE
54106# -----------------------
54107# Test if FILE is an executable regular file.
54108as_fn_executable_p ()
54109{
54110  test -f "$1" && test -x "$1"
54111} # as_fn_executable_p
54112as_test_x='test -x'
54113as_executable_p=as_fn_executable_p
54114
54115# Sed expression to map a string onto a valid CPP name.
54116as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54117
54118# Sed expression to map a string onto a valid variable name.
54119as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54120
54121
54122exec 6>&1
54123## ----------------------------------- ##
54124## Main body of $CONFIG_STATUS script. ##
54125## ----------------------------------- ##
54126_ASEOF
54127test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54128
54129cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54130# Save the log message, to keep $0 and so on meaningful, and to
54131# report actual input values of CONFIG_FILES etc. instead of their
54132# values after options handling.
54133ac_log="
54134This file was extended by OpenJDK $as_me jdk9, which was
54135generated by GNU Autoconf 2.69.  Invocation command line was
54136
54137  CONFIG_FILES    = $CONFIG_FILES
54138  CONFIG_HEADERS  = $CONFIG_HEADERS
54139  CONFIG_LINKS    = $CONFIG_LINKS
54140  CONFIG_COMMANDS = $CONFIG_COMMANDS
54141  $ $0 $@
54142
54143on `(hostname || uname -n) 2>/dev/null | sed 1q`
54144"
54145
54146_ACEOF
54147
54148case $ac_config_files in *"
54149"*) set x $ac_config_files; shift; ac_config_files=$*;;
54150esac
54151
54152
54153
54154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54155# Files that config.status was made for.
54156config_files="$ac_config_files"
54157
54158_ACEOF
54159
54160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54161ac_cs_usage="\
54162\`$as_me' instantiates files and other configuration actions
54163from templates according to the current configuration.  Unless the files
54164and actions are specified as TAGs, all are instantiated by default.
54165
54166Usage: $0 [OPTION]... [TAG]...
54167
54168  -h, --help       print this help, then exit
54169  -V, --version    print version number and configuration settings, then exit
54170      --config     print configuration, then exit
54171  -q, --quiet, --silent
54172                   do not print progress messages
54173  -d, --debug      don't remove temporary files
54174      --recheck    update $as_me by reconfiguring in the same conditions
54175      --file=FILE[:TEMPLATE]
54176                   instantiate the configuration file FILE
54177
54178Configuration files:
54179$config_files
54180
54181Report bugs to <build-dev@openjdk.java.net>.
54182OpenJDK home page: <http://openjdk.java.net>."
54183
54184_ACEOF
54185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54186ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54187ac_cs_version="\\
54188OpenJDK config.status jdk9
54189configured by $0, generated by GNU Autoconf 2.69,
54190  with options \\"\$ac_cs_config\\"
54191
54192Copyright (C) 2012 Free Software Foundation, Inc.
54193This config.status script is free software; the Free Software Foundation
54194gives unlimited permission to copy, distribute and modify it."
54195
54196ac_pwd='$ac_pwd'
54197srcdir='$srcdir'
54198AWK='$AWK'
54199test -n "\$AWK" || AWK=awk
54200_ACEOF
54201
54202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54203# The default lists apply if the user does not specify any file.
54204ac_need_defaults=:
54205while test $# != 0
54206do
54207  case $1 in
54208  --*=?*)
54209    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54210    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54211    ac_shift=:
54212    ;;
54213  --*=)
54214    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54215    ac_optarg=
54216    ac_shift=:
54217    ;;
54218  *)
54219    ac_option=$1
54220    ac_optarg=$2
54221    ac_shift=shift
54222    ;;
54223  esac
54224
54225  case $ac_option in
54226  # Handling of the options.
54227  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54228    ac_cs_recheck=: ;;
54229  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54230    $as_echo "$ac_cs_version"; exit ;;
54231  --config | --confi | --conf | --con | --co | --c )
54232    $as_echo "$ac_cs_config"; exit ;;
54233  --debug | --debu | --deb | --de | --d | -d )
54234    debug=: ;;
54235  --file | --fil | --fi | --f )
54236    $ac_shift
54237    case $ac_optarg in
54238    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54239    '') as_fn_error $? "missing file argument" ;;
54240    esac
54241    as_fn_append CONFIG_FILES " '$ac_optarg'"
54242    ac_need_defaults=false;;
54243  --he | --h |  --help | --hel | -h )
54244    $as_echo "$ac_cs_usage"; exit ;;
54245  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54246  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54247    ac_cs_silent=: ;;
54248
54249  # This is an error.
54250  -*) as_fn_error $? "unrecognized option: \`$1'
54251Try \`$0 --help' for more information." ;;
54252
54253  *) as_fn_append ac_config_targets " $1"
54254     ac_need_defaults=false ;;
54255
54256  esac
54257  shift
54258done
54259
54260ac_configure_extra_args=
54261
54262if $ac_cs_silent; then
54263  exec 6>/dev/null
54264  ac_configure_extra_args="$ac_configure_extra_args --silent"
54265fi
54266
54267_ACEOF
54268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54269if \$ac_cs_recheck; then
54270  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54271  shift
54272  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54273  CONFIG_SHELL='$SHELL'
54274  export CONFIG_SHELL
54275  exec "\$@"
54276fi
54277
54278_ACEOF
54279cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54280exec 5>>config.log
54281{
54282  echo
54283  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54284## Running $as_me. ##
54285_ASBOX
54286  $as_echo "$ac_log"
54287} >&5
54288
54289_ACEOF
54290cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54291_ACEOF
54292
54293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54294
54295# Handling of arguments.
54296for ac_config_target in $ac_config_targets
54297do
54298  case $ac_config_target in
54299    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54300    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54301    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54302    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54303    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54304
54305  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54306  esac
54307done
54308
54309
54310# If the user did not use the arguments to specify the items to instantiate,
54311# then the envvar interface is used.  Set only those that are not.
54312# We use the long form for the default assignment because of an extremely
54313# bizarre bug on SunOS 4.1.3.
54314if $ac_need_defaults; then
54315  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54316fi
54317
54318# Have a temporary directory for convenience.  Make it in the build tree
54319# simply because there is no reason against having it here, and in addition,
54320# creating and moving files from /tmp can sometimes cause problems.
54321# Hook for its removal unless debugging.
54322# Note that there is a small window in which the directory will not be cleaned:
54323# after its creation but before its name has been assigned to `$tmp'.
54324$debug ||
54325{
54326  tmp= ac_tmp=
54327  trap 'exit_status=$?
54328  : "${ac_tmp:=$tmp}"
54329  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54330' 0
54331  trap 'as_fn_exit 1' 1 2 13 15
54332}
54333# Create a (secure) tmp directory for tmp files.
54334
54335{
54336  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54337  test -d "$tmp"
54338}  ||
54339{
54340  tmp=./conf$$-$RANDOM
54341  (umask 077 && mkdir "$tmp")
54342} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54343ac_tmp=$tmp
54344
54345# Set up the scripts for CONFIG_FILES section.
54346# No need to generate them if there are no CONFIG_FILES.
54347# This happens for instance with `./config.status config.h'.
54348if test -n "$CONFIG_FILES"; then
54349
54350
54351ac_cr=`echo X | tr X '\015'`
54352# On cygwin, bash can eat \r inside `` if the user requested igncr.
54353# But we know of no other shell where ac_cr would be empty at this
54354# point, so we can use a bashism as a fallback.
54355if test "x$ac_cr" = x; then
54356  eval ac_cr=\$\'\\r\'
54357fi
54358ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54359if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54360  ac_cs_awk_cr='\\r'
54361else
54362  ac_cs_awk_cr=$ac_cr
54363fi
54364
54365echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54366_ACEOF
54367
54368
54369{
54370  echo "cat >conf$$subs.awk <<_ACEOF" &&
54371  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54372  echo "_ACEOF"
54373} >conf$$subs.sh ||
54374  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54375ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54376ac_delim='%!_!# '
54377for ac_last_try in false false false false false :; do
54378  . ./conf$$subs.sh ||
54379    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54380
54381  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54382  if test $ac_delim_n = $ac_delim_num; then
54383    break
54384  elif $ac_last_try; then
54385    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54386  else
54387    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54388  fi
54389done
54390rm -f conf$$subs.sh
54391
54392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54393cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54394_ACEOF
54395sed -n '
54396h
54397s/^/S["/; s/!.*/"]=/
54398p
54399g
54400s/^[^!]*!//
54401:repl
54402t repl
54403s/'"$ac_delim"'$//
54404t delim
54405:nl
54406h
54407s/\(.\{148\}\)..*/\1/
54408t more1
54409s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54410p
54411n
54412b repl
54413:more1
54414s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54415p
54416g
54417s/.\{148\}//
54418t nl
54419:delim
54420h
54421s/\(.\{148\}\)..*/\1/
54422t more2
54423s/["\\]/\\&/g; s/^/"/; s/$/"/
54424p
54425b
54426:more2
54427s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54428p
54429g
54430s/.\{148\}//
54431t delim
54432' <conf$$subs.awk | sed '
54433/^[^""]/{
54434  N
54435  s/\n//
54436}
54437' >>$CONFIG_STATUS || ac_write_fail=1
54438rm -f conf$$subs.awk
54439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54440_ACAWK
54441cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54442  for (key in S) S_is_set[key] = 1
54443  FS = ""
54444
54445}
54446{
54447  line = $ 0
54448  nfields = split(line, field, "@")
54449  substed = 0
54450  len = length(field[1])
54451  for (i = 2; i < nfields; i++) {
54452    key = field[i]
54453    keylen = length(key)
54454    if (S_is_set[key]) {
54455      value = S[key]
54456      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54457      len += length(value) + length(field[++i])
54458      substed = 1
54459    } else
54460      len += 1 + keylen
54461  }
54462
54463  print line
54464}
54465
54466_ACAWK
54467_ACEOF
54468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54469if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54470  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54471else
54472  cat
54473fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54474  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54475_ACEOF
54476
54477# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54478# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54479# trailing colons and then remove the whole line if VPATH becomes empty
54480# (actually we leave an empty line to preserve line numbers).
54481if test "x$srcdir" = x.; then
54482  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54483h
54484s///
54485s/^/:/
54486s/[	 ]*$/:/
54487s/:\$(srcdir):/:/g
54488s/:\${srcdir}:/:/g
54489s/:@srcdir@:/:/g
54490s/^:*//
54491s/:*$//
54492x
54493s/\(=[	 ]*\).*/\1/
54494G
54495s/\n//
54496s/^[^=]*=[	 ]*$//
54497}'
54498fi
54499
54500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54501fi # test -n "$CONFIG_FILES"
54502
54503
54504eval set X "  :F $CONFIG_FILES      "
54505shift
54506for ac_tag
54507do
54508  case $ac_tag in
54509  :[FHLC]) ac_mode=$ac_tag; continue;;
54510  esac
54511  case $ac_mode$ac_tag in
54512  :[FHL]*:*);;
54513  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54514  :[FH]-) ac_tag=-:-;;
54515  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54516  esac
54517  ac_save_IFS=$IFS
54518  IFS=:
54519  set x $ac_tag
54520  IFS=$ac_save_IFS
54521  shift
54522  ac_file=$1
54523  shift
54524
54525  case $ac_mode in
54526  :L) ac_source=$1;;
54527  :[FH])
54528    ac_file_inputs=
54529    for ac_f
54530    do
54531      case $ac_f in
54532      -) ac_f="$ac_tmp/stdin";;
54533      *) # Look for the file first in the build tree, then in the source tree
54534	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54535	 # because $ac_f cannot contain `:'.
54536	 test -f "$ac_f" ||
54537	   case $ac_f in
54538	   [\\/$]*) false;;
54539	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54540	   esac ||
54541	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54542      esac
54543      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54544      as_fn_append ac_file_inputs " '$ac_f'"
54545    done
54546
54547    # Let's still pretend it is `configure' which instantiates (i.e., don't
54548    # use $as_me), people would be surprised to read:
54549    #    /* config.h.  Generated by config.status.  */
54550    configure_input='Generated from '`
54551	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54552	`' by configure.'
54553    if test x"$ac_file" != x-; then
54554      configure_input="$ac_file.  $configure_input"
54555      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54556$as_echo "$as_me: creating $ac_file" >&6;}
54557    fi
54558    # Neutralize special characters interpreted by sed in replacement strings.
54559    case $configure_input in #(
54560    *\&* | *\|* | *\\* )
54561       ac_sed_conf_input=`$as_echo "$configure_input" |
54562       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54563    *) ac_sed_conf_input=$configure_input;;
54564    esac
54565
54566    case $ac_tag in
54567    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54568      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54569    esac
54570    ;;
54571  esac
54572
54573  ac_dir=`$as_dirname -- "$ac_file" ||
54574$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54575	 X"$ac_file" : 'X\(//\)[^/]' \| \
54576	 X"$ac_file" : 'X\(//\)$' \| \
54577	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54578$as_echo X"$ac_file" |
54579    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54580	    s//\1/
54581	    q
54582	  }
54583	  /^X\(\/\/\)[^/].*/{
54584	    s//\1/
54585	    q
54586	  }
54587	  /^X\(\/\/\)$/{
54588	    s//\1/
54589	    q
54590	  }
54591	  /^X\(\/\).*/{
54592	    s//\1/
54593	    q
54594	  }
54595	  s/.*/./; q'`
54596  as_dir="$ac_dir"; as_fn_mkdir_p
54597  ac_builddir=.
54598
54599case "$ac_dir" in
54600.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54601*)
54602  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54603  # A ".." for each directory in $ac_dir_suffix.
54604  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54605  case $ac_top_builddir_sub in
54606  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54607  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54608  esac ;;
54609esac
54610ac_abs_top_builddir=$ac_pwd
54611ac_abs_builddir=$ac_pwd$ac_dir_suffix
54612# for backward compatibility:
54613ac_top_builddir=$ac_top_build_prefix
54614
54615case $srcdir in
54616  .)  # We are building in place.
54617    ac_srcdir=.
54618    ac_top_srcdir=$ac_top_builddir_sub
54619    ac_abs_top_srcdir=$ac_pwd ;;
54620  [\\/]* | ?:[\\/]* )  # Absolute name.
54621    ac_srcdir=$srcdir$ac_dir_suffix;
54622    ac_top_srcdir=$srcdir
54623    ac_abs_top_srcdir=$srcdir ;;
54624  *) # Relative name.
54625    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54626    ac_top_srcdir=$ac_top_build_prefix$srcdir
54627    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54628esac
54629ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54630
54631
54632  case $ac_mode in
54633  :F)
54634  #
54635  # CONFIG_FILE
54636  #
54637
54638_ACEOF
54639
54640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54641# If the template does not know about datarootdir, expand it.
54642# FIXME: This hack should be removed a few years after 2.60.
54643ac_datarootdir_hack=; ac_datarootdir_seen=
54644ac_sed_dataroot='
54645/datarootdir/ {
54646  p
54647  q
54648}
54649/@datadir@/p
54650/@docdir@/p
54651/@infodir@/p
54652/@localedir@/p
54653/@mandir@/p'
54654case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54655*datarootdir*) ac_datarootdir_seen=yes;;
54656*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54657  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54658$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54659_ACEOF
54660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54661  ac_datarootdir_hack='
54662  s&@datadir@&$datadir&g
54663  s&@docdir@&$docdir&g
54664  s&@infodir@&$infodir&g
54665  s&@localedir@&$localedir&g
54666  s&@mandir@&$mandir&g
54667  s&\\\${datarootdir}&$datarootdir&g' ;;
54668esac
54669_ACEOF
54670
54671# Neutralize VPATH when `$srcdir' = `.'.
54672# Shell code in configure.ac might set extrasub.
54673# FIXME: do we really want to maintain this feature?
54674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54675ac_sed_extra="$ac_vpsub
54676$extrasub
54677_ACEOF
54678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54679:t
54680/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54681s|@configure_input@|$ac_sed_conf_input|;t t
54682s&@top_builddir@&$ac_top_builddir_sub&;t t
54683s&@top_build_prefix@&$ac_top_build_prefix&;t t
54684s&@srcdir@&$ac_srcdir&;t t
54685s&@abs_srcdir@&$ac_abs_srcdir&;t t
54686s&@top_srcdir@&$ac_top_srcdir&;t t
54687s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54688s&@builddir@&$ac_builddir&;t t
54689s&@abs_builddir@&$ac_abs_builddir&;t t
54690s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54691$ac_datarootdir_hack
54692"
54693eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54694  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54695
54696test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54697  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54698  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54699      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54700  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54701which seems to be undefined.  Please make sure it is defined" >&5
54702$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54703which seems to be undefined.  Please make sure it is defined" >&2;}
54704
54705  rm -f "$ac_tmp/stdin"
54706  case $ac_file in
54707  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54708  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54709  esac \
54710  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54711 ;;
54712
54713
54714
54715  esac
54716
54717done # for ac_tag
54718
54719
54720as_fn_exit 0
54721_ACEOF
54722ac_clean_files=$ac_clean_files_save
54723
54724test $ac_write_fail = 0 ||
54725  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54726
54727
54728# configure is writing to config.log, and then calls config.status.
54729# config.status does its own redirection, appending to config.log.
54730# Unfortunately, on DOS this fails, as config.log is still kept open
54731# by configure, so config.status won't be able to write to it; its
54732# output is simply discarded.  So we exec the FD to /dev/null,
54733# effectively closing config.log, so it can be properly (re)opened and
54734# appended to by config.status.  When coming back to configure, we
54735# need to make the FD available again.
54736if test "$no_create" != yes; then
54737  ac_cs_success=:
54738  ac_config_status_args=
54739  test "$silent" = yes &&
54740    ac_config_status_args="$ac_config_status_args --quiet"
54741  exec 5>/dev/null
54742  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54743  exec 5>>config.log
54744  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54745  # would make configure fail if this is the last instruction.
54746  $ac_cs_success || as_fn_exit 1
54747fi
54748if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54749  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54750$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54751fi
54752
54753
54754# After AC_OUTPUT, we need to do final work
54755
54756
54757  # Try to move config.log (generated by autoconf) to the configure-support directory.
54758  if test -e ./config.log; then
54759    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54760  fi
54761
54762  # Rotate our log file (configure.log)
54763  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54764    $RM -f "$OUTPUT_ROOT/configure.log.old"
54765  fi
54766  if test -e "$OUTPUT_ROOT/configure.log"; then
54767    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54768  fi
54769
54770  # Move configure.log from current directory to the build output root
54771  if test -e ./configure.log; then
54772    echo found it
54773    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54774  fi
54775
54776  # Make the compare script executable
54777  $CHMOD +x $OUTPUT_ROOT/compare.sh
54778
54779
54780# Finally output some useful information to the user
54781
54782  # Finally output some useful information to the user
54783
54784  printf "\n"
54785  printf "====================================================\n"
54786  if test "x$no_create" != "xyes"; then
54787    if test "x$IS_RECONFIGURE" != "xyes"; then
54788      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54789    else
54790      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54791    fi
54792  else
54793    if test "x$IS_RECONFIGURE" != "xyes"; then
54794      printf "A configuration has been successfully checked but not created\n"
54795    else
54796      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54797    fi
54798  fi
54799  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54800    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54801  else
54802    printf "using default settings.\n"
54803  fi
54804
54805  printf "\n"
54806  printf "Configuration summary:\n"
54807  printf "* Debug level:    $DEBUG_LEVEL\n"
54808  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54809  printf "* JDK variant:    $JDK_VARIANT\n"
54810  printf "* JVM variants:   $with_jvm_variants\n"
54811  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54812  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54813
54814  printf "\n"
54815  printf "Tools summary:\n"
54816  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54817    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54818  fi
54819  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54820  if test "x$TOOLCHAIN_VERSION" != "x"; then
54821    print_version=" $TOOLCHAIN_VERSION"
54822  fi
54823  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54824  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54825  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54826
54827  printf "\n"
54828  printf "Build performance summary:\n"
54829  printf "* Cores to use:   $JOBS\n"
54830  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54831  if test "x$CCACHE_STATUS" != "x"; then
54832    printf "* ccache status:  $CCACHE_STATUS\n"
54833  fi
54834  printf "\n"
54835
54836  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54837    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54838    printf "will result in longer build times.\n"
54839    printf "\n"
54840  fi
54841
54842  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54843    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54844    printf "These are not respected, and will be ignored. It is recommended\n"
54845    printf "that you clean your environment. The following variables are set:\n"
54846    printf "$FOUND_ALT_VARIABLES\n"
54847    printf "\n"
54848  fi
54849
54850  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54851    printf "WARNING: Your build output directory is not on a local disk.\n"
54852    printf "This will severely degrade build performance!\n"
54853    printf "It is recommended that you create an output directory on a local disk,\n"
54854    printf "and run the configure script again from that directory.\n"
54855    printf "\n"
54856  fi
54857
54858  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54859    printf "WARNING: The result of this configuration has overridden an older\n"
54860    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54861    printf "proper build. Failure to do so might result in strange build problems.\n"
54862    printf "\n"
54863  fi
54864
54865  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54866    printf "WARNING: The result of this configuration was not saved.\n"
54867    printf "You should run without '--no-create | -n' to create the configuration.\n"
54868    printf "\n"
54869  fi
54870
54871
54872
54873  # Locate config.log.
54874  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54875    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54876  elif test -e "./config.log"; then
54877    CONFIG_LOG_PATH="."
54878  fi
54879
54880  if test -e "$CONFIG_LOG_PATH/config.log"; then
54881    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54882    if test $? -eq 0; then
54883      printf "The following warnings were produced. Repeated here for convenience:\n"
54884      # We must quote sed expression (using []) to stop m4 from eating the [].
54885      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54886      printf "\n"
54887    fi
54888  fi
54889
54890