generated-configure.sh revision 1773:94682bac8456
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
847RMICONNECTOR_IIOP
848UNLIMITED_CRYPTO
849CACERTS_FILE
850TEST_IN_BUILD
851BUILD_HEADLESS
852SUPPORT_HEADFUL
853SUPPORT_HEADLESS
854BDEPS_FTP
855BDEPS_UNZIP
856OS_VERSION_MICRO
857OS_VERSION_MINOR
858OS_VERSION_MAJOR
859PKG_CONFIG
860BASH_ARGS
861SETFILE
862CODESIGN
863XATTR
864DSYMUTIL
865IS_GNU_TIME
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952CPIO
953DF
954READLINK
955CYGPATH
956SED
957FGREP
958EGREP
959GREP
960AWK
961XARGS
962WHICH
963WC
964UNIQ
965UNAME
966TR
967TOUCH
968TEE
969TAR
970TAIL
971SORT
972SH
973RM
974PRINTF
975NAWK
976MV
977MKTEMP
978MKDIR
979LS
980LN
981HEAD
982FIND
983FILE
984EXPR
985ECHO
986DIRNAME
987DIFF
988DATE
989CUT
990CP
991COMM
992CMP
993CHMOD
994CAT
995BASH
996BASENAME
997DATE_WHEN_CONFIGURED
998ORIGINAL_PATH
999CONFIGURE_COMMAND_LINE
1000target_alias
1001host_alias
1002build_alias
1003LIBS
1004ECHO_T
1005ECHO_N
1006ECHO_C
1007DEFS
1008mandir
1009localedir
1010libdir
1011psdir
1012pdfdir
1013dvidir
1014htmldir
1015infodir
1016docdir
1017oldincludedir
1018includedir
1019localstatedir
1020sharedstatedir
1021sysconfdir
1022datadir
1023datarootdir
1024libexecdir
1025sbindir
1026bindir
1027program_transform_name
1028prefix
1029exec_prefix
1030PACKAGE_URL
1031PACKAGE_BUGREPORT
1032PACKAGE_STRING
1033PACKAGE_VERSION
1034PACKAGE_TARNAME
1035PACKAGE_NAME
1036PATH_SEPARATOR
1037SHELL'
1038ac_subst_files=''
1039ac_user_opts='
1040enable_option_checking
1041with_target_bits
1042enable_openjdk_only
1043with_custom_make_dir
1044with_jdk_variant
1045with_jvm_interpreter
1046with_jvm_variants
1047enable_debug
1048with_debug_level
1049with_devkit
1050with_sys_root
1051with_sysroot
1052with_tools_dir
1053with_toolchain_path
1054with_extra_path
1055with_sdk_name
1056with_conf_name
1057with_output_sync
1058with_builddeps_conf
1059with_builddeps_server
1060with_builddeps_dir
1061with_builddeps_group
1062enable_headful
1063enable_hotspot_test_in_build
1064with_cacerts_file
1065enable_unlimited_crypto
1066enable_rmiconnector_iiop
1067with_copyright_year
1068with_milestone
1069with_update_version
1070with_user_release_suffix
1071with_build_number
1072with_version_string
1073with_version_pre
1074with_version_opt_base
1075with_version_opt_debuglevel
1076with_version_build
1077with_version_major
1078with_version_minor
1079with_version_security
1080with_version_patch
1081with_boot_jdk
1082with_add_source_root
1083with_override_source_root
1084with_adds_and_overrides
1085with_override_langtools
1086with_override_corba
1087with_override_jaxp
1088with_override_jaxws
1089with_override_hotspot
1090with_override_nashorn
1091with_override_jdk
1092with_import_hotspot
1093with_toolchain_type
1094with_toolchain_version
1095with_jtreg
1096with_extra_cflags
1097with_extra_cxxflags
1098with_extra_ldflags
1099enable_warnings_as_errors
1100enable_debug_symbols
1101enable_zip_debug_info
1102enable_native_coverage
1103with_x
1104with_cups
1105with_cups_include
1106with_freetype
1107with_freetype_include
1108with_freetype_lib
1109with_freetype_src
1110enable_freetype_bundling
1111with_alsa
1112with_alsa_include
1113with_alsa_lib
1114with_libjpeg
1115with_giflib
1116with_lcms
1117with_libpng
1118with_zlib
1119with_stdc__lib
1120with_msvcr_dll
1121with_msvcp_dll
1122with_dxsdk
1123with_dxsdk_lib
1124with_dxsdk_include
1125with_num_cores
1126with_memory_size
1127with_jobs
1128with_boot_jdk_jvmargs
1129with_sjavac_server_java
1130enable_sjavac
1131enable_precompiled_headers
1132enable_ccache
1133with_ccache_dir
1134'
1135      ac_precious_vars='build_alias
1136host_alias
1137target_alias
1138BASENAME
1139BASH
1140CAT
1141CHMOD
1142CMP
1143COMM
1144CP
1145CUT
1146DATE
1147DIFF
1148DIRNAME
1149ECHO
1150EXPR
1151FILE
1152FIND
1153HEAD
1154LN
1155LS
1156MKDIR
1157MKTEMP
1158MV
1159NAWK
1160PRINTF
1161RM
1162SH
1163SORT
1164TAIL
1165TAR
1166TEE
1167TOUCH
1168TR
1169UNAME
1170UNIQ
1171WC
1172WHICH
1173XARGS
1174AWK
1175GREP
1176EGREP
1177FGREP
1178SED
1179CYGPATH
1180READLINK
1181DF
1182CPIO
1183UNZIP
1184ZIP
1185LDD
1186OTOOL
1187READELF
1188HG
1189STAT
1190TIME
1191DSYMUTIL
1192XATTR
1193CODESIGN
1194SETFILE
1195PKG_CONFIG
1196JAVA
1197JAVAC
1198JAVAH
1199JAR
1200JARSIGNER
1201CC
1202CFLAGS
1203LDFLAGS
1204LIBS
1205CPPFLAGS
1206CXX
1207CXXFLAGS
1208CCC
1209CPP
1210CXXCPP
1211AS
1212AR
1213LIPO
1214STRIP
1215NM
1216GNM
1217OBJCOPY
1218OBJDUMP
1219BUILD_CC
1220BUILD_CXX
1221BUILD_LD
1222JTREGEXE
1223XMKMF
1224FREETYPE_CFLAGS
1225FREETYPE_LIBS
1226ALSA_CFLAGS
1227ALSA_LIBS
1228LCMS_CFLAGS
1229LCMS_LIBS
1230PNG_CFLAGS
1231PNG_LIBS
1232LIBFFI_CFLAGS
1233LIBFFI_LIBS
1234CCACHE'
1235
1236
1237# Initialize some variables set by options.
1238ac_init_help=
1239ac_init_version=false
1240ac_unrecognized_opts=
1241ac_unrecognized_sep=
1242# The variables have the same names as the options, with
1243# dashes changed to underlines.
1244cache_file=/dev/null
1245exec_prefix=NONE
1246no_create=
1247no_recursion=
1248prefix=NONE
1249program_prefix=NONE
1250program_suffix=NONE
1251program_transform_name=s,x,x,
1252silent=
1253site=
1254srcdir=
1255verbose=
1256x_includes=NONE
1257x_libraries=NONE
1258
1259# Installation directory options.
1260# These are left unexpanded so users can "make install exec_prefix=/foo"
1261# and all the variables that are supposed to be based on exec_prefix
1262# by default will actually change.
1263# Use braces instead of parens because sh, perl, etc. also accept them.
1264# (The list follows the same order as the GNU Coding Standards.)
1265bindir='${exec_prefix}/bin'
1266sbindir='${exec_prefix}/sbin'
1267libexecdir='${exec_prefix}/libexec'
1268datarootdir='${prefix}/share'
1269datadir='${datarootdir}'
1270sysconfdir='${prefix}/etc'
1271sharedstatedir='${prefix}/com'
1272localstatedir='${prefix}/var'
1273includedir='${prefix}/include'
1274oldincludedir='/usr/include'
1275docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1276infodir='${datarootdir}/info'
1277htmldir='${docdir}'
1278dvidir='${docdir}'
1279pdfdir='${docdir}'
1280psdir='${docdir}'
1281libdir='${exec_prefix}/lib'
1282localedir='${datarootdir}/locale'
1283mandir='${datarootdir}/man'
1284
1285ac_prev=
1286ac_dashdash=
1287for ac_option
1288do
1289  # If the previous option needs an argument, assign it.
1290  if test -n "$ac_prev"; then
1291    eval $ac_prev=\$ac_option
1292    ac_prev=
1293    continue
1294  fi
1295
1296  case $ac_option in
1297  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1298  *=)   ac_optarg= ;;
1299  *)    ac_optarg=yes ;;
1300  esac
1301
1302  # Accept the important Cygnus configure options, so we can diagnose typos.
1303
1304  case $ac_dashdash$ac_option in
1305  --)
1306    ac_dashdash=yes ;;
1307
1308  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1309    ac_prev=bindir ;;
1310  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1311    bindir=$ac_optarg ;;
1312
1313  -build | --build | --buil | --bui | --bu)
1314    ac_prev=build_alias ;;
1315  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1316    build_alias=$ac_optarg ;;
1317
1318  -cache-file | --cache-file | --cache-fil | --cache-fi \
1319  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1320    ac_prev=cache_file ;;
1321  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1322  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1323    cache_file=$ac_optarg ;;
1324
1325  --config-cache | -C)
1326    cache_file=config.cache ;;
1327
1328  -datadir | --datadir | --datadi | --datad)
1329    ac_prev=datadir ;;
1330  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1331    datadir=$ac_optarg ;;
1332
1333  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1334  | --dataroo | --dataro | --datar)
1335    ac_prev=datarootdir ;;
1336  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1337  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1338    datarootdir=$ac_optarg ;;
1339
1340  -disable-* | --disable-*)
1341    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1342    # Reject names that are not valid shell variable names.
1343    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1344      as_fn_error $? "invalid feature name: $ac_useropt"
1345    ac_useropt_orig=$ac_useropt
1346    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1347    case $ac_user_opts in
1348      *"
1349"enable_$ac_useropt"
1350"*) ;;
1351      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1352	 ac_unrecognized_sep=', ';;
1353    esac
1354    eval enable_$ac_useropt=no ;;
1355
1356  -docdir | --docdir | --docdi | --doc | --do)
1357    ac_prev=docdir ;;
1358  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1359    docdir=$ac_optarg ;;
1360
1361  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1362    ac_prev=dvidir ;;
1363  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1364    dvidir=$ac_optarg ;;
1365
1366  -enable-* | --enable-*)
1367    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1368    # Reject names that are not valid shell variable names.
1369    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1370      as_fn_error $? "invalid feature name: $ac_useropt"
1371    ac_useropt_orig=$ac_useropt
1372    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1373    case $ac_user_opts in
1374      *"
1375"enable_$ac_useropt"
1376"*) ;;
1377      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1378	 ac_unrecognized_sep=', ';;
1379    esac
1380    eval enable_$ac_useropt=\$ac_optarg ;;
1381
1382  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1383  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1384  | --exec | --exe | --ex)
1385    ac_prev=exec_prefix ;;
1386  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1387  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1388  | --exec=* | --exe=* | --ex=*)
1389    exec_prefix=$ac_optarg ;;
1390
1391  -gas | --gas | --ga | --g)
1392    # Obsolete; use --with-gas.
1393    with_gas=yes ;;
1394
1395  -help | --help | --hel | --he | -h)
1396    ac_init_help=long ;;
1397  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1398    ac_init_help=recursive ;;
1399  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1400    ac_init_help=short ;;
1401
1402  -host | --host | --hos | --ho)
1403    ac_prev=host_alias ;;
1404  -host=* | --host=* | --hos=* | --ho=*)
1405    host_alias=$ac_optarg ;;
1406
1407  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1408    ac_prev=htmldir ;;
1409  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1410  | --ht=*)
1411    htmldir=$ac_optarg ;;
1412
1413  -includedir | --includedir | --includedi | --included | --include \
1414  | --includ | --inclu | --incl | --inc)
1415    ac_prev=includedir ;;
1416  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1417  | --includ=* | --inclu=* | --incl=* | --inc=*)
1418    includedir=$ac_optarg ;;
1419
1420  -infodir | --infodir | --infodi | --infod | --info | --inf)
1421    ac_prev=infodir ;;
1422  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1423    infodir=$ac_optarg ;;
1424
1425  -libdir | --libdir | --libdi | --libd)
1426    ac_prev=libdir ;;
1427  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1428    libdir=$ac_optarg ;;
1429
1430  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1431  | --libexe | --libex | --libe)
1432    ac_prev=libexecdir ;;
1433  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1434  | --libexe=* | --libex=* | --libe=*)
1435    libexecdir=$ac_optarg ;;
1436
1437  -localedir | --localedir | --localedi | --localed | --locale)
1438    ac_prev=localedir ;;
1439  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1440    localedir=$ac_optarg ;;
1441
1442  -localstatedir | --localstatedir | --localstatedi | --localstated \
1443  | --localstate | --localstat | --localsta | --localst | --locals)
1444    ac_prev=localstatedir ;;
1445  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1446  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1447    localstatedir=$ac_optarg ;;
1448
1449  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1450    ac_prev=mandir ;;
1451  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1452    mandir=$ac_optarg ;;
1453
1454  -nfp | --nfp | --nf)
1455    # Obsolete; use --without-fp.
1456    with_fp=no ;;
1457
1458  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1459  | --no-cr | --no-c | -n)
1460    no_create=yes ;;
1461
1462  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1463  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1464    no_recursion=yes ;;
1465
1466  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1467  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1468  | --oldin | --oldi | --old | --ol | --o)
1469    ac_prev=oldincludedir ;;
1470  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1471  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1472  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1473    oldincludedir=$ac_optarg ;;
1474
1475  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1476    ac_prev=prefix ;;
1477  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1478    prefix=$ac_optarg ;;
1479
1480  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1481  | --program-pre | --program-pr | --program-p)
1482    ac_prev=program_prefix ;;
1483  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1484  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1485    program_prefix=$ac_optarg ;;
1486
1487  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1488  | --program-suf | --program-su | --program-s)
1489    ac_prev=program_suffix ;;
1490  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1491  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1492    program_suffix=$ac_optarg ;;
1493
1494  -program-transform-name | --program-transform-name \
1495  | --program-transform-nam | --program-transform-na \
1496  | --program-transform-n | --program-transform- \
1497  | --program-transform | --program-transfor \
1498  | --program-transfo | --program-transf \
1499  | --program-trans | --program-tran \
1500  | --progr-tra | --program-tr | --program-t)
1501    ac_prev=program_transform_name ;;
1502  -program-transform-name=* | --program-transform-name=* \
1503  | --program-transform-nam=* | --program-transform-na=* \
1504  | --program-transform-n=* | --program-transform-=* \
1505  | --program-transform=* | --program-transfor=* \
1506  | --program-transfo=* | --program-transf=* \
1507  | --program-trans=* | --program-tran=* \
1508  | --progr-tra=* | --program-tr=* | --program-t=*)
1509    program_transform_name=$ac_optarg ;;
1510
1511  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1512    ac_prev=pdfdir ;;
1513  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1514    pdfdir=$ac_optarg ;;
1515
1516  -psdir | --psdir | --psdi | --psd | --ps)
1517    ac_prev=psdir ;;
1518  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1519    psdir=$ac_optarg ;;
1520
1521  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1522  | -silent | --silent | --silen | --sile | --sil)
1523    silent=yes ;;
1524
1525  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1526    ac_prev=sbindir ;;
1527  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1528  | --sbi=* | --sb=*)
1529    sbindir=$ac_optarg ;;
1530
1531  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1532  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1533  | --sharedst | --shareds | --shared | --share | --shar \
1534  | --sha | --sh)
1535    ac_prev=sharedstatedir ;;
1536  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1537  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1538  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1539  | --sha=* | --sh=*)
1540    sharedstatedir=$ac_optarg ;;
1541
1542  -site | --site | --sit)
1543    ac_prev=site ;;
1544  -site=* | --site=* | --sit=*)
1545    site=$ac_optarg ;;
1546
1547  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1548    ac_prev=srcdir ;;
1549  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1550    srcdir=$ac_optarg ;;
1551
1552  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1553  | --syscon | --sysco | --sysc | --sys | --sy)
1554    ac_prev=sysconfdir ;;
1555  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1556  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1557    sysconfdir=$ac_optarg ;;
1558
1559  -target | --target | --targe | --targ | --tar | --ta | --t)
1560    ac_prev=target_alias ;;
1561  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1562    target_alias=$ac_optarg ;;
1563
1564  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1565    verbose=yes ;;
1566
1567  -version | --version | --versio | --versi | --vers | -V)
1568    ac_init_version=: ;;
1569
1570  -with-* | --with-*)
1571    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1572    # Reject names that are not valid shell variable names.
1573    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1574      as_fn_error $? "invalid package name: $ac_useropt"
1575    ac_useropt_orig=$ac_useropt
1576    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1577    case $ac_user_opts in
1578      *"
1579"with_$ac_useropt"
1580"*) ;;
1581      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1582	 ac_unrecognized_sep=', ';;
1583    esac
1584    eval with_$ac_useropt=\$ac_optarg ;;
1585
1586  -without-* | --without-*)
1587    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1588    # Reject names that are not valid shell variable names.
1589    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1590      as_fn_error $? "invalid package name: $ac_useropt"
1591    ac_useropt_orig=$ac_useropt
1592    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1593    case $ac_user_opts in
1594      *"
1595"with_$ac_useropt"
1596"*) ;;
1597      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1598	 ac_unrecognized_sep=', ';;
1599    esac
1600    eval with_$ac_useropt=no ;;
1601
1602  --x)
1603    # Obsolete; use --with-x.
1604    with_x=yes ;;
1605
1606  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1607  | --x-incl | --x-inc | --x-in | --x-i)
1608    ac_prev=x_includes ;;
1609  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1610  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1611    x_includes=$ac_optarg ;;
1612
1613  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1614  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1615    ac_prev=x_libraries ;;
1616  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1617  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1618    x_libraries=$ac_optarg ;;
1619
1620  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1621Try \`$0 --help' for more information"
1622    ;;
1623
1624  *=*)
1625    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1626    # Reject names that are not valid shell variable names.
1627    case $ac_envvar in #(
1628      '' | [0-9]* | *[!_$as_cr_alnum]* )
1629      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1630    esac
1631    eval $ac_envvar=\$ac_optarg
1632    export $ac_envvar ;;
1633
1634  *)
1635    # FIXME: should be removed in autoconf 3.0.
1636    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1637    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1638      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1639    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1640    ;;
1641
1642  esac
1643done
1644
1645if test -n "$ac_prev"; then
1646  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1647  as_fn_error $? "missing argument to $ac_option"
1648fi
1649
1650if test -n "$ac_unrecognized_opts"; then
1651  case $enable_option_checking in
1652    no) ;;
1653    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1654    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1655  esac
1656fi
1657
1658# Check all directory arguments for consistency.
1659for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1660		datadir sysconfdir sharedstatedir localstatedir includedir \
1661		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1662		libdir localedir mandir
1663do
1664  eval ac_val=\$$ac_var
1665  # Remove trailing slashes.
1666  case $ac_val in
1667    */ )
1668      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1669      eval $ac_var=\$ac_val;;
1670  esac
1671  # Be sure to have absolute directory names.
1672  case $ac_val in
1673    [\\/$]* | ?:[\\/]* )  continue;;
1674    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1675  esac
1676  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1677done
1678
1679# There might be people who depend on the old broken behavior: `$host'
1680# used to hold the argument of --host etc.
1681# FIXME: To remove some day.
1682build=$build_alias
1683host=$host_alias
1684target=$target_alias
1685
1686# FIXME: To remove some day.
1687if test "x$host_alias" != x; then
1688  if test "x$build_alias" = x; then
1689    cross_compiling=maybe
1690  elif test "x$build_alias" != "x$host_alias"; then
1691    cross_compiling=yes
1692  fi
1693fi
1694
1695ac_tool_prefix=
1696test -n "$host_alias" && ac_tool_prefix=$host_alias-
1697
1698test "$silent" = yes && exec 6>/dev/null
1699
1700
1701ac_pwd=`pwd` && test -n "$ac_pwd" &&
1702ac_ls_di=`ls -di .` &&
1703ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1704  as_fn_error $? "working directory cannot be determined"
1705test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1706  as_fn_error $? "pwd does not report name of working directory"
1707
1708
1709# Find the source files, if location was not specified.
1710if test -z "$srcdir"; then
1711  ac_srcdir_defaulted=yes
1712  # Try the directory containing this script, then the parent directory.
1713  ac_confdir=`$as_dirname -- "$as_myself" ||
1714$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1715	 X"$as_myself" : 'X\(//\)[^/]' \| \
1716	 X"$as_myself" : 'X\(//\)$' \| \
1717	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1718$as_echo X"$as_myself" |
1719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\/\)[^/].*/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\/\)$/{
1728	    s//\1/
1729	    q
1730	  }
1731	  /^X\(\/\).*/{
1732	    s//\1/
1733	    q
1734	  }
1735	  s/.*/./; q'`
1736  srcdir=$ac_confdir
1737  if test ! -r "$srcdir/$ac_unique_file"; then
1738    srcdir=..
1739  fi
1740else
1741  ac_srcdir_defaulted=no
1742fi
1743if test ! -r "$srcdir/$ac_unique_file"; then
1744  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1745  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1746fi
1747ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1748ac_abs_confdir=`(
1749	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1750	pwd)`
1751# When building in place, set srcdir=.
1752if test "$ac_abs_confdir" = "$ac_pwd"; then
1753  srcdir=.
1754fi
1755# Remove unnecessary trailing slashes from srcdir.
1756# Double slashes in file names in object file debugging info
1757# mess up M-x gdb in Emacs.
1758case $srcdir in
1759*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1760esac
1761for ac_var in $ac_precious_vars; do
1762  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1763  eval ac_env_${ac_var}_value=\$${ac_var}
1764  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1765  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1766done
1767
1768#
1769# Report the --help message.
1770#
1771if test "$ac_init_help" = "long"; then
1772  # Omit some internal or obsolete options to make the list less imposing.
1773  # This message is too long to be a string in the A/UX 3.1 sh.
1774  cat <<_ACEOF
1775\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1776
1777Usage: $0 [OPTION]... [VAR=VALUE]...
1778
1779To assign environment variables (e.g., CC, CFLAGS...), specify them as
1780VAR=VALUE.  See below for descriptions of some of the useful variables.
1781
1782Defaults for the options are specified in brackets.
1783
1784Configuration:
1785  -h, --help              display this help and exit
1786      --help=short        display options specific to this package
1787      --help=recursive    display the short help of all the included packages
1788  -V, --version           display version information and exit
1789  -q, --quiet, --silent   do not print \`checking ...' messages
1790      --cache-file=FILE   cache test results in FILE [disabled]
1791  -C, --config-cache      alias for \`--cache-file=config.cache'
1792  -n, --no-create         do not create output files
1793      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1794
1795Installation directories:
1796  --prefix=PREFIX         install architecture-independent files in PREFIX
1797                          [$ac_default_prefix]
1798  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1799                          [PREFIX]
1800
1801By default, \`make install' will install all the files in
1802\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1803an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1804for instance \`--prefix=\$HOME'.
1805
1806For better control, use the options below.
1807
1808Fine tuning of the installation directories:
1809  --bindir=DIR            user executables [EPREFIX/bin]
1810  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1811  --libexecdir=DIR        program executables [EPREFIX/libexec]
1812  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1813  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1814  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1815  --libdir=DIR            object code libraries [EPREFIX/lib]
1816  --includedir=DIR        C header files [PREFIX/include]
1817  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1818  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1819  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1820  --infodir=DIR           info documentation [DATAROOTDIR/info]
1821  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1822  --mandir=DIR            man documentation [DATAROOTDIR/man]
1823  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1824  --htmldir=DIR           html documentation [DOCDIR]
1825  --dvidir=DIR            dvi documentation [DOCDIR]
1826  --pdfdir=DIR            pdf documentation [DOCDIR]
1827  --psdir=DIR             ps documentation [DOCDIR]
1828_ACEOF
1829
1830  cat <<\_ACEOF
1831
1832X features:
1833  --x-includes=DIR    X include files are in DIR
1834  --x-libraries=DIR   X library files are in DIR
1835
1836System types:
1837  --build=BUILD     configure for building on BUILD [guessed]
1838  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1839  --target=TARGET   configure for building compilers for TARGET [HOST]
1840_ACEOF
1841fi
1842
1843if test -n "$ac_init_help"; then
1844  case $ac_init_help in
1845     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1846   esac
1847  cat <<\_ACEOF
1848
1849Optional Features:
1850  --disable-option-checking  ignore unrecognized --enable/--with options
1851  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1852  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1853  --enable-openjdk-only   suppress building custom source even if present
1854                          [disabled]
1855  --enable-debug          set the debug level to fastdebug (shorthand for
1856                          --with-debug-level=fastdebug) [disabled]
1857  --disable-headful       disable building headful support (graphical UI
1858                          support) [enabled]
1859  --enable-hotspot-test-in-build
1860                          run the Queens test after Hotspot build [disabled]
1861  --enable-unlimited-crypto
1862                          Enable unlimited crypto policy [disabled]
1863  --enable-rmiconnector-iiop
1864                          enable the JMX RMIConnector iiop transport
1865                          [disabled]
1866  --disable-warnings-as-errors
1867                          do not consider native warnings to be an error
1868                          [enabled]
1869  --disable-debug-symbols disable generation of debug symbols [enabled]
1870  --disable-zip-debug-info
1871                          disable zipping of debug-info files [enabled]
1872  --enable-native-coverage
1873                          enable native compilation with code coverage
1874                          data[disabled]
1875  --disable-freetype-bundling
1876                          disable bundling of the freetype library with the
1877                          build result [enabled on Windows or when using
1878                          --with-freetype, disabled otherwise]
1879  --enable-sjavac         use sjavac to do fast incremental compiles
1880                          [disabled]
1881  --disable-precompiled-headers
1882                          disable using precompiled headers when compiling C++
1883                          [enabled]
1884  --enable-ccache         enable using ccache to speed up recompilations
1885                          [disabled]
1886
1887Optional Packages:
1888  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1889  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1890  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1891                          support it), e.g. --with-target-bits=32 [guessed]
1892  --with-custom-make-dir  Deprecated. Option is kept for backwards
1893                          compatibility and is ignored
1894  --with-jdk-variant      JDK variant to build (normal) [normal]
1895  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1896  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1897                          client, minimal1, kernel, zero, zeroshark, core)
1898                          [server]
1899  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1900                          optimized (HotSpot build only)) [release]
1901  --with-devkit           use this devkit for compilers, tools and resources
1902  --with-sys-root         alias for --with-sysroot for backwards compatability
1903  --with-sysroot          use this directory as sysroot
1904  --with-tools-dir        alias for --with-toolchain-path for backwards
1905                          compatibility
1906  --with-toolchain-path   prepend these directories when searching for
1907                          toolchain binaries (compilers etc)
1908  --with-extra-path       prepend these directories to the default path
1909  --with-sdk-name         use the platform SDK of the given name. [macosx]
1910  --with-conf-name        use this as the name of the configuration [generated
1911                          from important configuration options]
1912  --with-output-sync      set make output sync type if supported by make.
1913                          [recurse]
1914  --with-builddeps-conf   use this configuration file for the builddeps
1915  --with-builddeps-server download and use build dependencies from this server
1916                          url
1917  --with-builddeps-dir    store downloaded build dependencies here
1918                          [/localhome/builddeps]
1919  --with-builddeps-group  chgrp the downloaded build dependencies to this
1920                          group
1921  --with-cacerts-file     specify alternative cacerts file
1922  --with-copyright-year   Set copyright year value for build [current year]
1923  --with-milestone        Deprecated. Option is kept for backwards
1924                          compatibility and is ignored
1925  --with-update-version   Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-user-release-suffix
1928                          Deprecated. Option is kept for backwards
1929                          compatibility and is ignored
1930  --with-build-number     Deprecated. Option is kept for backwards
1931                          compatibility and is ignored
1932  --with-version-string   Set version string [calculated]
1933  --with-version-pre      Set the base part of the version 'PRE' field
1934                          (pre-release identifier) ['internal']
1935  --with-version-opt-base Set version 'OPT' base field. Debug level will be
1936                          appended. (build metadata)
1937                          [<timestamp>.<user>.<dirname>]
1938  --with-version-opt-debuglevel
1939                          Set version 'OPT' field (build metadata)
1940                          [<timestamp>.<user>.<dirname>]
1941  --with-version-build    Set version 'BUILD' field (build number) [not
1942                          specified]
1943  --with-version-major    Set version 'MAJOR' field (first number) [current
1944                          source value]
1945  --with-version-minor    Set version 'MINOR' field (second number) [current
1946                          source value]
1947  --with-version-security Set version 'SECURITY' field (third number) [current
1948                          source value]
1949  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1950                          specified]
1951  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1952  --with-add-source-root  for each and every source directory, look in this
1953                          additional source root for the same directory; if it
1954                          exists and have files in it, include it in the build
1955  --with-override-source-root
1956                          for each and every source directory, look in this
1957                          override source root for the same directory; if it
1958                          exists, use that directory instead and ignore the
1959                          directory in the original source root
1960  --with-adds-and-overrides
1961                          use the subdirs 'adds' and 'overrides' in the
1962                          specified directory as add-source-root and
1963                          override-source-root
1964  --with-override-langtools
1965                          use this langtools dir for the build
1966  --with-override-corba   use this corba dir for the build
1967  --with-override-jaxp    use this jaxp dir for the build
1968  --with-override-jaxws   use this jaxws dir for the build
1969  --with-override-hotspot use this hotspot dir for the build
1970  --with-override-nashorn use this nashorn dir for the build
1971  --with-override-jdk     use this jdk dir for the build
1972  --with-import-hotspot   import hotspot binaries from this jdk image or
1973                          hotspot build dist dir instead of building from
1974                          source
1975  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1976                          to show possible values [platform dependent]
1977  --with-toolchain-version
1978                          the version of the toolchain to look for, use
1979                          '--help' to show possible values [platform
1980                          dependent]
1981  --with-jtreg            Regression Test Harness [probed]
1982  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1983  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1984  --with-extra-ldflags    extra flags to be used when linking jdk
1985  --with-x                use the X Window System
1986  --with-cups             specify prefix directory for the cups package
1987                          (expecting the headers under PATH/include)
1988  --with-cups-include     specify directory for the cups include files
1989  --with-freetype         specify prefix directory for the freetype package
1990                          (expecting the libraries under PATH/lib and the
1991                          headers under PATH/include)
1992  --with-freetype-include specify directory for the freetype include files
1993  --with-freetype-lib     specify directory for the freetype library
1994  --with-freetype-src     specify directory with freetype sources to
1995                          automatically build the library (experimental,
1996                          Windows-only)
1997  --with-alsa             specify prefix directory for the alsa package
1998                          (expecting the libraries under PATH/lib and the
1999                          headers under PATH/include)
2000  --with-alsa-include     specify directory for the alsa include files
2001  --with-alsa-lib         specify directory for the alsa library
2002  --with-libjpeg          use libjpeg from build system or OpenJDK source
2003                          (system, bundled) [bundled]
2004  --with-giflib           use giflib from build system or OpenJDK source
2005                          (system, bundled) [bundled]
2006  --with-lcms             use lcms2 from build system or OpenJDK source
2007                          (system, bundled) [bundled]
2008  --with-libpng           use libpng from build system or OpenJDK source
2009                          (system, bundled) [bundled]
2010  --with-zlib             use zlib from build system or OpenJDK source
2011                          (system, bundled) [bundled]
2012  --with-stdc++lib=<static>,<dynamic>,<default>
2013                          force linking of the C++ runtime on Linux to either
2014                          static or dynamic, default is static with dynamic as
2015                          fallback
2016  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2017                          (Windows only) [probed]
2018  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2019                          (Windows only) [probed]
2020  --with-dxsdk            Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-dxsdk-include    Deprecated. Option is kept for backwards
2025                          compatibility and is ignored
2026  --with-num-cores        number of cores in the build system, e.g.
2027                          --with-num-cores=8 [probed]
2028  --with-memory-size      memory (in MB) available in the build system, e.g.
2029                          --with-memory-size=1024 [probed]
2030  --with-jobs             number of parallel jobs to let make run [calculated
2031                          based on cores and memory]
2032  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2033                          invocations of boot JDK, overriding the default
2034                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2035                          -enableassertions"
2036  --with-sjavac-server-java
2037                          use this java binary for running the sjavac
2038                          background server [Boot JDK java]
2039  --with-ccache-dir       where to store ccache files [~/.ccache]
2040
2041Some influential environment variables:
2042  BASENAME    Override default value for BASENAME
2043  BASH        Override default value for BASH
2044  CAT         Override default value for CAT
2045  CHMOD       Override default value for CHMOD
2046  CMP         Override default value for CMP
2047  COMM        Override default value for COMM
2048  CP          Override default value for CP
2049  CUT         Override default value for CUT
2050  DATE        Override default value for DATE
2051  DIFF        Override default value for DIFF
2052  DIRNAME     Override default value for DIRNAME
2053  ECHO        Override default value for ECHO
2054  EXPR        Override default value for EXPR
2055  FILE        Override default value for FILE
2056  FIND        Override default value for FIND
2057  HEAD        Override default value for HEAD
2058  LN          Override default value for LN
2059  LS          Override default value for LS
2060  MKDIR       Override default value for MKDIR
2061  MKTEMP      Override default value for MKTEMP
2062  MV          Override default value for MV
2063  NAWK        Override default value for NAWK
2064  PRINTF      Override default value for PRINTF
2065  RM          Override default value for RM
2066  SH          Override default value for SH
2067  SORT        Override default value for SORT
2068  TAIL        Override default value for TAIL
2069  TAR         Override default value for TAR
2070  TEE         Override default value for TEE
2071  TOUCH       Override default value for TOUCH
2072  TR          Override default value for TR
2073  UNAME       Override default value for UNAME
2074  UNIQ        Override default value for UNIQ
2075  WC          Override default value for WC
2076  WHICH       Override default value for WHICH
2077  XARGS       Override default value for XARGS
2078  AWK         Override default value for AWK
2079  GREP        Override default value for GREP
2080  EGREP       Override default value for EGREP
2081  FGREP       Override default value for FGREP
2082  SED         Override default value for SED
2083  CYGPATH     Override default value for CYGPATH
2084  READLINK    Override default value for READLINK
2085  DF          Override default value for DF
2086  CPIO        Override default value for CPIO
2087  UNZIP       Override default value for UNZIP
2088  ZIP         Override default value for ZIP
2089  LDD         Override default value for LDD
2090  OTOOL       Override default value for OTOOL
2091  READELF     Override default value for READELF
2092  HG          Override default value for HG
2093  STAT        Override default value for STAT
2094  TIME        Override default value for TIME
2095  DSYMUTIL    Override default value for DSYMUTIL
2096  XATTR       Override default value for XATTR
2097  CODESIGN    Override default value for CODESIGN
2098  SETFILE     Override default value for SETFILE
2099  PKG_CONFIG  path to pkg-config utility
2100  JAVA        Override default value for JAVA
2101  JAVAC       Override default value for JAVAC
2102  JAVAH       Override default value for JAVAH
2103  JAR         Override default value for JAR
2104  JARSIGNER   Override default value for JARSIGNER
2105  CC          C compiler command
2106  CFLAGS      C compiler flags
2107  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2108              nonstandard directory <lib dir>
2109  LIBS        libraries to pass to the linker, e.g. -l<library>
2110  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2111              you have headers in a nonstandard directory <include dir>
2112  CXX         C++ compiler command
2113  CXXFLAGS    C++ compiler flags
2114  CPP         C preprocessor
2115  CXXCPP      C++ preprocessor
2116  AS          Override default value for AS
2117  AR          Override default value for AR
2118  LIPO        Override default value for LIPO
2119  STRIP       Override default value for STRIP
2120  NM          Override default value for NM
2121  GNM         Override default value for GNM
2122  OBJCOPY     Override default value for OBJCOPY
2123  OBJDUMP     Override default value for OBJDUMP
2124  BUILD_CC    Override default value for BUILD_CC
2125  BUILD_CXX   Override default value for BUILD_CXX
2126  BUILD_LD    Override default value for BUILD_LD
2127  JTREGEXE    Override default value for JTREGEXE
2128  XMKMF       Path to xmkmf, Makefile generator for X Window System
2129  FREETYPE_CFLAGS
2130              C compiler flags for FREETYPE, overriding pkg-config
2131  FREETYPE_LIBS
2132              linker flags for FREETYPE, overriding pkg-config
2133  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2134  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2135  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2136  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2137  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2138  PNG_LIBS    linker flags for PNG, overriding pkg-config
2139  LIBFFI_CFLAGS
2140              C compiler flags for LIBFFI, overriding pkg-config
2141  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2142  CCACHE      Override default value for CCACHE
2143
2144Use these variables to override the choices made by `configure' or to help
2145it to find libraries and programs with nonstandard names/locations.
2146
2147Report bugs to <build-dev@openjdk.java.net>.
2148OpenJDK home page: <http://openjdk.java.net>.
2149_ACEOF
2150ac_status=$?
2151fi
2152
2153if test "$ac_init_help" = "recursive"; then
2154  # If there are subdirs, report their specific --help.
2155  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2156    test -d "$ac_dir" ||
2157      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2158      continue
2159    ac_builddir=.
2160
2161case "$ac_dir" in
2162.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2163*)
2164  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2165  # A ".." for each directory in $ac_dir_suffix.
2166  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2167  case $ac_top_builddir_sub in
2168  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2169  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2170  esac ;;
2171esac
2172ac_abs_top_builddir=$ac_pwd
2173ac_abs_builddir=$ac_pwd$ac_dir_suffix
2174# for backward compatibility:
2175ac_top_builddir=$ac_top_build_prefix
2176
2177case $srcdir in
2178  .)  # We are building in place.
2179    ac_srcdir=.
2180    ac_top_srcdir=$ac_top_builddir_sub
2181    ac_abs_top_srcdir=$ac_pwd ;;
2182  [\\/]* | ?:[\\/]* )  # Absolute name.
2183    ac_srcdir=$srcdir$ac_dir_suffix;
2184    ac_top_srcdir=$srcdir
2185    ac_abs_top_srcdir=$srcdir ;;
2186  *) # Relative name.
2187    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2188    ac_top_srcdir=$ac_top_build_prefix$srcdir
2189    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2190esac
2191ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2192
2193    cd "$ac_dir" || { ac_status=$?; continue; }
2194    # Check for guested configure.
2195    if test -f "$ac_srcdir/configure.gnu"; then
2196      echo &&
2197      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2198    elif test -f "$ac_srcdir/configure"; then
2199      echo &&
2200      $SHELL "$ac_srcdir/configure" --help=recursive
2201    else
2202      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2203    fi || ac_status=$?
2204    cd "$ac_pwd" || { ac_status=$?; break; }
2205  done
2206fi
2207
2208test -n "$ac_init_help" && exit $ac_status
2209if $ac_init_version; then
2210  cat <<\_ACEOF
2211OpenJDK configure jdk9
2212generated by GNU Autoconf 2.69
2213
2214Copyright (C) 2012 Free Software Foundation, Inc.
2215This configure script is free software; the Free Software Foundation
2216gives unlimited permission to copy, distribute and modify it.
2217_ACEOF
2218  exit
2219fi
2220
2221## ------------------------ ##
2222## Autoconf initialization. ##
2223## ------------------------ ##
2224
2225# ac_fn_c_try_compile LINENO
2226# --------------------------
2227# Try to compile conftest.$ac_ext, and return whether this succeeded.
2228ac_fn_c_try_compile ()
2229{
2230  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231  rm -f conftest.$ac_objext
2232  if { { ac_try="$ac_compile"
2233case "(($ac_try" in
2234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2235  *) ac_try_echo=$ac_try;;
2236esac
2237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2238$as_echo "$ac_try_echo"; } >&5
2239  (eval "$ac_compile") 2>conftest.err
2240  ac_status=$?
2241  if test -s conftest.err; then
2242    grep -v '^ *+' conftest.err >conftest.er1
2243    cat conftest.er1 >&5
2244    mv -f conftest.er1 conftest.err
2245  fi
2246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2247  test $ac_status = 0; } && {
2248	 test -z "$ac_c_werror_flag" ||
2249	 test ! -s conftest.err
2250       } && test -s conftest.$ac_objext; then :
2251  ac_retval=0
2252else
2253  $as_echo "$as_me: failed program was:" >&5
2254sed 's/^/| /' conftest.$ac_ext >&5
2255
2256	ac_retval=1
2257fi
2258  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2259  as_fn_set_status $ac_retval
2260
2261} # ac_fn_c_try_compile
2262
2263# ac_fn_cxx_try_compile LINENO
2264# ----------------------------
2265# Try to compile conftest.$ac_ext, and return whether this succeeded.
2266ac_fn_cxx_try_compile ()
2267{
2268  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269  rm -f conftest.$ac_objext
2270  if { { ac_try="$ac_compile"
2271case "(($ac_try" in
2272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273  *) ac_try_echo=$ac_try;;
2274esac
2275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276$as_echo "$ac_try_echo"; } >&5
2277  (eval "$ac_compile") 2>conftest.err
2278  ac_status=$?
2279  if test -s conftest.err; then
2280    grep -v '^ *+' conftest.err >conftest.er1
2281    cat conftest.er1 >&5
2282    mv -f conftest.er1 conftest.err
2283  fi
2284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285  test $ac_status = 0; } && {
2286	 test -z "$ac_cxx_werror_flag" ||
2287	 test ! -s conftest.err
2288       } && test -s conftest.$ac_objext; then :
2289  ac_retval=0
2290else
2291  $as_echo "$as_me: failed program was:" >&5
2292sed 's/^/| /' conftest.$ac_ext >&5
2293
2294	ac_retval=1
2295fi
2296  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297  as_fn_set_status $ac_retval
2298
2299} # ac_fn_cxx_try_compile
2300
2301# ac_fn_c_try_cpp LINENO
2302# ----------------------
2303# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2304ac_fn_c_try_cpp ()
2305{
2306  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307  if { { ac_try="$ac_cpp conftest.$ac_ext"
2308case "(($ac_try" in
2309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2310  *) ac_try_echo=$ac_try;;
2311esac
2312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2313$as_echo "$ac_try_echo"; } >&5
2314  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2315  ac_status=$?
2316  if test -s conftest.err; then
2317    grep -v '^ *+' conftest.err >conftest.er1
2318    cat conftest.er1 >&5
2319    mv -f conftest.er1 conftest.err
2320  fi
2321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2322  test $ac_status = 0; } > conftest.i && {
2323	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2324	 test ! -s conftest.err
2325       }; then :
2326  ac_retval=0
2327else
2328  $as_echo "$as_me: failed program was:" >&5
2329sed 's/^/| /' conftest.$ac_ext >&5
2330
2331    ac_retval=1
2332fi
2333  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2334  as_fn_set_status $ac_retval
2335
2336} # ac_fn_c_try_cpp
2337
2338# ac_fn_cxx_try_cpp LINENO
2339# ------------------------
2340# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2341ac_fn_cxx_try_cpp ()
2342{
2343  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2344  if { { ac_try="$ac_cpp conftest.$ac_ext"
2345case "(($ac_try" in
2346  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2347  *) ac_try_echo=$ac_try;;
2348esac
2349eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2350$as_echo "$ac_try_echo"; } >&5
2351  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2352  ac_status=$?
2353  if test -s conftest.err; then
2354    grep -v '^ *+' conftest.err >conftest.er1
2355    cat conftest.er1 >&5
2356    mv -f conftest.er1 conftest.err
2357  fi
2358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2359  test $ac_status = 0; } > conftest.i && {
2360	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2361	 test ! -s conftest.err
2362       }; then :
2363  ac_retval=0
2364else
2365  $as_echo "$as_me: failed program was:" >&5
2366sed 's/^/| /' conftest.$ac_ext >&5
2367
2368    ac_retval=1
2369fi
2370  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371  as_fn_set_status $ac_retval
2372
2373} # ac_fn_cxx_try_cpp
2374
2375# ac_fn_c_try_link LINENO
2376# -----------------------
2377# Try to link conftest.$ac_ext, and return whether this succeeded.
2378ac_fn_c_try_link ()
2379{
2380  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381  rm -f conftest.$ac_objext conftest$ac_exeext
2382  if { { ac_try="$ac_link"
2383case "(($ac_try" in
2384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2385  *) ac_try_echo=$ac_try;;
2386esac
2387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2388$as_echo "$ac_try_echo"; } >&5
2389  (eval "$ac_link") 2>conftest.err
2390  ac_status=$?
2391  if test -s conftest.err; then
2392    grep -v '^ *+' conftest.err >conftest.er1
2393    cat conftest.er1 >&5
2394    mv -f conftest.er1 conftest.err
2395  fi
2396  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2397  test $ac_status = 0; } && {
2398	 test -z "$ac_c_werror_flag" ||
2399	 test ! -s conftest.err
2400       } && test -s conftest$ac_exeext && {
2401	 test "$cross_compiling" = yes ||
2402	 test -x conftest$ac_exeext
2403       }; then :
2404  ac_retval=0
2405else
2406  $as_echo "$as_me: failed program was:" >&5
2407sed 's/^/| /' conftest.$ac_ext >&5
2408
2409	ac_retval=1
2410fi
2411  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2412  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2413  # interfere with the next link command; also delete a directory that is
2414  # left behind by Apple's compiler.  We do this before executing the actions.
2415  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2416  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417  as_fn_set_status $ac_retval
2418
2419} # ac_fn_c_try_link
2420
2421# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2422# ---------------------------------------------------------
2423# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2424# the include files in INCLUDES and setting the cache variable VAR
2425# accordingly.
2426ac_fn_cxx_check_header_mongrel ()
2427{
2428  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429  if eval \${$3+:} false; then :
2430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431$as_echo_n "checking for $2... " >&6; }
2432if eval \${$3+:} false; then :
2433  $as_echo_n "(cached) " >&6
2434fi
2435eval ac_res=\$$3
2436	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437$as_echo "$ac_res" >&6; }
2438else
2439  # Is the header compilable?
2440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2441$as_echo_n "checking $2 usability... " >&6; }
2442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443/* end confdefs.h.  */
2444$4
2445#include <$2>
2446_ACEOF
2447if ac_fn_cxx_try_compile "$LINENO"; then :
2448  ac_header_compiler=yes
2449else
2450  ac_header_compiler=no
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2454$as_echo "$ac_header_compiler" >&6; }
2455
2456# Is the header present?
2457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2458$as_echo_n "checking $2 presence... " >&6; }
2459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2460/* end confdefs.h.  */
2461#include <$2>
2462_ACEOF
2463if ac_fn_cxx_try_cpp "$LINENO"; then :
2464  ac_header_preproc=yes
2465else
2466  ac_header_preproc=no
2467fi
2468rm -f conftest.err conftest.i conftest.$ac_ext
2469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2470$as_echo "$ac_header_preproc" >&6; }
2471
2472# So?  What about this header?
2473case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2474  yes:no: )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2476$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2478$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2479    ;;
2480  no:yes:* )
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2482$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2484$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2486$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2488$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2490$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2491( $as_echo "## ----------------------------------------- ##
2492## Report this to build-dev@openjdk.java.net ##
2493## ----------------------------------------- ##"
2494     ) | sed "s/^/$as_me: WARNING:     /" >&2
2495    ;;
2496esac
2497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2498$as_echo_n "checking for $2... " >&6; }
2499if eval \${$3+:} false; then :
2500  $as_echo_n "(cached) " >&6
2501else
2502  eval "$3=\$ac_header_compiler"
2503fi
2504eval ac_res=\$$3
2505	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2506$as_echo "$ac_res" >&6; }
2507fi
2508  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509
2510} # ac_fn_cxx_check_header_mongrel
2511
2512# ac_fn_cxx_try_run LINENO
2513# ------------------------
2514# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2515# that executables *can* be run.
2516ac_fn_cxx_try_run ()
2517{
2518  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519  if { { ac_try="$ac_link"
2520case "(($ac_try" in
2521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522  *) ac_try_echo=$ac_try;;
2523esac
2524eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525$as_echo "$ac_try_echo"; } >&5
2526  (eval "$ac_link") 2>&5
2527  ac_status=$?
2528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2529  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2530  { { case "(($ac_try" in
2531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532  *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536  (eval "$ac_try") 2>&5
2537  ac_status=$?
2538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2539  test $ac_status = 0; }; }; then :
2540  ac_retval=0
2541else
2542  $as_echo "$as_me: program exited with status $ac_status" >&5
2543       $as_echo "$as_me: failed program was:" >&5
2544sed 's/^/| /' conftest.$ac_ext >&5
2545
2546       ac_retval=$ac_status
2547fi
2548  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2549  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550  as_fn_set_status $ac_retval
2551
2552} # ac_fn_cxx_try_run
2553
2554# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2555# ---------------------------------------------------------
2556# Tests whether HEADER exists and can be compiled using the include files in
2557# INCLUDES, setting the cache variable VAR accordingly.
2558ac_fn_cxx_check_header_compile ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562$as_echo_n "checking for $2... " >&6; }
2563if eval \${$3+:} false; then :
2564  $as_echo_n "(cached) " >&6
2565else
2566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567/* end confdefs.h.  */
2568$4
2569#include <$2>
2570_ACEOF
2571if ac_fn_cxx_try_compile "$LINENO"; then :
2572  eval "$3=yes"
2573else
2574  eval "$3=no"
2575fi
2576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577fi
2578eval ac_res=\$$3
2579	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580$as_echo "$ac_res" >&6; }
2581  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582
2583} # ac_fn_cxx_check_header_compile
2584
2585# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2586# ----------------------------------------------
2587# Tries to find the compile-time value of EXPR in a program that includes
2588# INCLUDES, setting VAR accordingly. Returns whether the value could be
2589# computed
2590ac_fn_cxx_compute_int ()
2591{
2592  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593  if test "$cross_compiling" = yes; then
2594    # Depending upon the size, compute the lo and hi bounds.
2595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596/* end confdefs.h.  */
2597$4
2598int
2599main ()
2600{
2601static int test_array [1 - 2 * !(($2) >= 0)];
2602test_array [0] = 0;
2603return test_array [0];
2604
2605  ;
2606  return 0;
2607}
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_lo=0 ac_mid=0
2611  while :; do
2612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614$4
2615int
2616main ()
2617{
2618static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2619test_array [0] = 0;
2620return test_array [0];
2621
2622  ;
2623  return 0;
2624}
2625_ACEOF
2626if ac_fn_cxx_try_compile "$LINENO"; then :
2627  ac_hi=$ac_mid; break
2628else
2629  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2630			if test $ac_lo -le $ac_mid; then
2631			  ac_lo= ac_hi=
2632			  break
2633			fi
2634			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637  done
2638else
2639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641$4
2642int
2643main ()
2644{
2645static int test_array [1 - 2 * !(($2) < 0)];
2646test_array [0] = 0;
2647return test_array [0];
2648
2649  ;
2650  return 0;
2651}
2652_ACEOF
2653if ac_fn_cxx_try_compile "$LINENO"; then :
2654  ac_hi=-1 ac_mid=-1
2655  while :; do
2656    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2657/* end confdefs.h.  */
2658$4
2659int
2660main ()
2661{
2662static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2663test_array [0] = 0;
2664return test_array [0];
2665
2666  ;
2667  return 0;
2668}
2669_ACEOF
2670if ac_fn_cxx_try_compile "$LINENO"; then :
2671  ac_lo=$ac_mid; break
2672else
2673  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2674			if test $ac_mid -le $ac_hi; then
2675			  ac_lo= ac_hi=
2676			  break
2677			fi
2678			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681  done
2682else
2683  ac_lo= ac_hi=
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686fi
2687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688# Binary search between lo and hi bounds.
2689while test "x$ac_lo" != "x$ac_hi"; do
2690  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h.  */
2693$4
2694int
2695main ()
2696{
2697static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2698test_array [0] = 0;
2699return test_array [0];
2700
2701  ;
2702  return 0;
2703}
2704_ACEOF
2705if ac_fn_cxx_try_compile "$LINENO"; then :
2706  ac_hi=$ac_mid
2707else
2708  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2709fi
2710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711done
2712case $ac_lo in #((
2713?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2714'') ac_retval=1 ;;
2715esac
2716  else
2717    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718/* end confdefs.h.  */
2719$4
2720static long int longval () { return $2; }
2721static unsigned long int ulongval () { return $2; }
2722#include <stdio.h>
2723#include <stdlib.h>
2724int
2725main ()
2726{
2727
2728  FILE *f = fopen ("conftest.val", "w");
2729  if (! f)
2730    return 1;
2731  if (($2) < 0)
2732    {
2733      long int i = longval ();
2734      if (i != ($2))
2735	return 1;
2736      fprintf (f, "%ld", i);
2737    }
2738  else
2739    {
2740      unsigned long int i = ulongval ();
2741      if (i != ($2))
2742	return 1;
2743      fprintf (f, "%lu", i);
2744    }
2745  /* Do not output a trailing newline, as this causes \r\n confusion
2746     on some platforms.  */
2747  return ferror (f) || fclose (f) != 0;
2748
2749  ;
2750  return 0;
2751}
2752_ACEOF
2753if ac_fn_cxx_try_run "$LINENO"; then :
2754  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2755else
2756  ac_retval=1
2757fi
2758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2759  conftest.$ac_objext conftest.beam conftest.$ac_ext
2760rm -f conftest.val
2761
2762  fi
2763  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2764  as_fn_set_status $ac_retval
2765
2766} # ac_fn_cxx_compute_int
2767
2768# ac_fn_cxx_try_link LINENO
2769# -------------------------
2770# Try to link conftest.$ac_ext, and return whether this succeeded.
2771ac_fn_cxx_try_link ()
2772{
2773  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2774  rm -f conftest.$ac_objext conftest$ac_exeext
2775  if { { ac_try="$ac_link"
2776case "(($ac_try" in
2777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778  *) ac_try_echo=$ac_try;;
2779esac
2780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2781$as_echo "$ac_try_echo"; } >&5
2782  (eval "$ac_link") 2>conftest.err
2783  ac_status=$?
2784  if test -s conftest.err; then
2785    grep -v '^ *+' conftest.err >conftest.er1
2786    cat conftest.er1 >&5
2787    mv -f conftest.er1 conftest.err
2788  fi
2789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2790  test $ac_status = 0; } && {
2791	 test -z "$ac_cxx_werror_flag" ||
2792	 test ! -s conftest.err
2793       } && test -s conftest$ac_exeext && {
2794	 test "$cross_compiling" = yes ||
2795	 test -x conftest$ac_exeext
2796       }; then :
2797  ac_retval=0
2798else
2799  $as_echo "$as_me: failed program was:" >&5
2800sed 's/^/| /' conftest.$ac_ext >&5
2801
2802	ac_retval=1
2803fi
2804  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2805  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2806  # interfere with the next link command; also delete a directory that is
2807  # left behind by Apple's compiler.  We do this before executing the actions.
2808  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810  as_fn_set_status $ac_retval
2811
2812} # ac_fn_cxx_try_link
2813
2814# ac_fn_cxx_check_func LINENO FUNC VAR
2815# ------------------------------------
2816# Tests whether FUNC exists, setting the cache variable VAR accordingly
2817ac_fn_cxx_check_func ()
2818{
2819  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2821$as_echo_n "checking for $2... " >&6; }
2822if eval \${$3+:} false; then :
2823  $as_echo_n "(cached) " >&6
2824else
2825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2826/* end confdefs.h.  */
2827/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2828   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2829#define $2 innocuous_$2
2830
2831/* System header to define __stub macros and hopefully few prototypes,
2832    which can conflict with char $2 (); below.
2833    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2834    <limits.h> exists even on freestanding compilers.  */
2835
2836#ifdef __STDC__
2837# include <limits.h>
2838#else
2839# include <assert.h>
2840#endif
2841
2842#undef $2
2843
2844/* Override any GCC internal prototype to avoid an error.
2845   Use char because int might match the return type of a GCC
2846   builtin and then its argument prototype would still apply.  */
2847#ifdef __cplusplus
2848extern "C"
2849#endif
2850char $2 ();
2851/* The GNU C library defines this for functions which it implements
2852    to always fail with ENOSYS.  Some functions are actually named
2853    something starting with __ and the normal name is an alias.  */
2854#if defined __stub_$2 || defined __stub___$2
2855choke me
2856#endif
2857
2858int
2859main ()
2860{
2861return $2 ();
2862  ;
2863  return 0;
2864}
2865_ACEOF
2866if ac_fn_cxx_try_link "$LINENO"; then :
2867  eval "$3=yes"
2868else
2869  eval "$3=no"
2870fi
2871rm -f core conftest.err conftest.$ac_objext \
2872    conftest$ac_exeext conftest.$ac_ext
2873fi
2874eval ac_res=\$$3
2875	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2876$as_echo "$ac_res" >&6; }
2877  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2878
2879} # ac_fn_cxx_check_func
2880
2881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2882# -------------------------------------------------------
2883# Tests whether HEADER exists and can be compiled using the include files in
2884# INCLUDES, setting the cache variable VAR accordingly.
2885ac_fn_c_check_header_compile ()
2886{
2887  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2889$as_echo_n "checking for $2... " >&6; }
2890if eval \${$3+:} false; then :
2891  $as_echo_n "(cached) " >&6
2892else
2893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894/* end confdefs.h.  */
2895$4
2896#include <$2>
2897_ACEOF
2898if ac_fn_c_try_compile "$LINENO"; then :
2899  eval "$3=yes"
2900else
2901  eval "$3=no"
2902fi
2903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2904fi
2905eval ac_res=\$$3
2906	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2907$as_echo "$ac_res" >&6; }
2908  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2909
2910} # ac_fn_c_check_header_compile
2911cat >config.log <<_ACEOF
2912This file contains any messages produced by compilers while
2913running configure, to aid debugging if configure makes a mistake.
2914
2915It was created by OpenJDK $as_me jdk9, which was
2916generated by GNU Autoconf 2.69.  Invocation command line was
2917
2918  $ $0 $@
2919
2920_ACEOF
2921exec 5>>config.log
2922{
2923cat <<_ASUNAME
2924## --------- ##
2925## Platform. ##
2926## --------- ##
2927
2928hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2929uname -m = `(uname -m) 2>/dev/null || echo unknown`
2930uname -r = `(uname -r) 2>/dev/null || echo unknown`
2931uname -s = `(uname -s) 2>/dev/null || echo unknown`
2932uname -v = `(uname -v) 2>/dev/null || echo unknown`
2933
2934/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2935/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2936
2937/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2938/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2939/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2940/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2941/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2942/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2943/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2944
2945_ASUNAME
2946
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950  IFS=$as_save_IFS
2951  test -z "$as_dir" && as_dir=.
2952    $as_echo "PATH: $as_dir"
2953  done
2954IFS=$as_save_IFS
2955
2956} >&5
2957
2958cat >&5 <<_ACEOF
2959
2960
2961## ----------- ##
2962## Core tests. ##
2963## ----------- ##
2964
2965_ACEOF
2966
2967
2968# Keep a trace of the command line.
2969# Strip out --no-create and --no-recursion so they do not pile up.
2970# Strip out --silent because we don't want to record it for future runs.
2971# Also quote any args containing shell meta-characters.
2972# Make two passes to allow for proper duplicate-argument suppression.
2973ac_configure_args=
2974ac_configure_args0=
2975ac_configure_args1=
2976ac_must_keep_next=false
2977for ac_pass in 1 2
2978do
2979  for ac_arg
2980  do
2981    case $ac_arg in
2982    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2983    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2984    | -silent | --silent | --silen | --sile | --sil)
2985      continue ;;
2986    *\'*)
2987      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2988    esac
2989    case $ac_pass in
2990    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2991    2)
2992      as_fn_append ac_configure_args1 " '$ac_arg'"
2993      if test $ac_must_keep_next = true; then
2994	ac_must_keep_next=false # Got value, back to normal.
2995      else
2996	case $ac_arg in
2997	  *=* | --config-cache | -C | -disable-* | --disable-* \
2998	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2999	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3000	  | -with-* | --with-* | -without-* | --without-* | --x)
3001	    case "$ac_configure_args0 " in
3002	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3003	    esac
3004	    ;;
3005	  -* ) ac_must_keep_next=true ;;
3006	esac
3007      fi
3008      as_fn_append ac_configure_args " '$ac_arg'"
3009      ;;
3010    esac
3011  done
3012done
3013{ ac_configure_args0=; unset ac_configure_args0;}
3014{ ac_configure_args1=; unset ac_configure_args1;}
3015
3016# When interrupted or exit'd, cleanup temporary files, and complete
3017# config.log.  We remove comments because anyway the quotes in there
3018# would cause problems or look ugly.
3019# WARNING: Use '\'' to represent an apostrophe within the trap.
3020# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3021trap 'exit_status=$?
3022  # Save into config.log some information that might help in debugging.
3023  {
3024    echo
3025
3026    $as_echo "## ---------------- ##
3027## Cache variables. ##
3028## ---------------- ##"
3029    echo
3030    # The following way of writing the cache mishandles newlines in values,
3031(
3032  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3033    eval ac_val=\$$ac_var
3034    case $ac_val in #(
3035    *${as_nl}*)
3036      case $ac_var in #(
3037      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3038$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3039      esac
3040      case $ac_var in #(
3041      _ | IFS | as_nl) ;; #(
3042      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3043      *) { eval $ac_var=; unset $ac_var;} ;;
3044      esac ;;
3045    esac
3046  done
3047  (set) 2>&1 |
3048    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3049    *${as_nl}ac_space=\ *)
3050      sed -n \
3051	"s/'\''/'\''\\\\'\'''\''/g;
3052	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3053      ;; #(
3054    *)
3055      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3056      ;;
3057    esac |
3058    sort
3059)
3060    echo
3061
3062    $as_echo "## ----------------- ##
3063## Output variables. ##
3064## ----------------- ##"
3065    echo
3066    for ac_var in $ac_subst_vars
3067    do
3068      eval ac_val=\$$ac_var
3069      case $ac_val in
3070      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3071      esac
3072      $as_echo "$ac_var='\''$ac_val'\''"
3073    done | sort
3074    echo
3075
3076    if test -n "$ac_subst_files"; then
3077      $as_echo "## ------------------- ##
3078## File substitutions. ##
3079## ------------------- ##"
3080      echo
3081      for ac_var in $ac_subst_files
3082      do
3083	eval ac_val=\$$ac_var
3084	case $ac_val in
3085	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3086	esac
3087	$as_echo "$ac_var='\''$ac_val'\''"
3088      done | sort
3089      echo
3090    fi
3091
3092    if test -s confdefs.h; then
3093      $as_echo "## ----------- ##
3094## confdefs.h. ##
3095## ----------- ##"
3096      echo
3097      cat confdefs.h
3098      echo
3099    fi
3100    test "$ac_signal" != 0 &&
3101      $as_echo "$as_me: caught signal $ac_signal"
3102    $as_echo "$as_me: exit $exit_status"
3103  } >&5
3104  rm -f core *.core core.conftest.* &&
3105    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3106    exit $exit_status
3107' 0
3108for ac_signal in 1 2 13 15; do
3109  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3110done
3111ac_signal=0
3112
3113# confdefs.h avoids OS command line length limits that DEFS can exceed.
3114rm -f -r conftest* confdefs.h
3115
3116$as_echo "/* confdefs.h */" > confdefs.h
3117
3118# Predefined preprocessor variables.
3119
3120cat >>confdefs.h <<_ACEOF
3121#define PACKAGE_NAME "$PACKAGE_NAME"
3122_ACEOF
3123
3124cat >>confdefs.h <<_ACEOF
3125#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3126_ACEOF
3127
3128cat >>confdefs.h <<_ACEOF
3129#define PACKAGE_VERSION "$PACKAGE_VERSION"
3130_ACEOF
3131
3132cat >>confdefs.h <<_ACEOF
3133#define PACKAGE_STRING "$PACKAGE_STRING"
3134_ACEOF
3135
3136cat >>confdefs.h <<_ACEOF
3137#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3138_ACEOF
3139
3140cat >>confdefs.h <<_ACEOF
3141#define PACKAGE_URL "$PACKAGE_URL"
3142_ACEOF
3143
3144
3145# Let the site file select an alternate cache file if it wants to.
3146# Prefer an explicitly selected file to automatically selected ones.
3147ac_site_file1=NONE
3148ac_site_file2=NONE
3149if test -n "$CONFIG_SITE"; then
3150  # We do not want a PATH search for config.site.
3151  case $CONFIG_SITE in #((
3152    -*)  ac_site_file1=./$CONFIG_SITE;;
3153    */*) ac_site_file1=$CONFIG_SITE;;
3154    *)   ac_site_file1=./$CONFIG_SITE;;
3155  esac
3156elif test "x$prefix" != xNONE; then
3157  ac_site_file1=$prefix/share/config.site
3158  ac_site_file2=$prefix/etc/config.site
3159else
3160  ac_site_file1=$ac_default_prefix/share/config.site
3161  ac_site_file2=$ac_default_prefix/etc/config.site
3162fi
3163for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3164do
3165  test "x$ac_site_file" = xNONE && continue
3166  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3167    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3168$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3169    sed 's/^/| /' "$ac_site_file" >&5
3170    . "$ac_site_file" \
3171      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3173as_fn_error $? "failed to load site script $ac_site_file
3174See \`config.log' for more details" "$LINENO" 5; }
3175  fi
3176done
3177
3178if test -r "$cache_file"; then
3179  # Some versions of bash will fail to source /dev/null (special files
3180  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3181  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3182    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3183$as_echo "$as_me: loading cache $cache_file" >&6;}
3184    case $cache_file in
3185      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3186      *)                      . "./$cache_file";;
3187    esac
3188  fi
3189else
3190  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3191$as_echo "$as_me: creating cache $cache_file" >&6;}
3192  >$cache_file
3193fi
3194
3195# Check that the precious variables saved in the cache have kept the same
3196# value.
3197ac_cache_corrupted=false
3198for ac_var in $ac_precious_vars; do
3199  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3200  eval ac_new_set=\$ac_env_${ac_var}_set
3201  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3202  eval ac_new_val=\$ac_env_${ac_var}_value
3203  case $ac_old_set,$ac_new_set in
3204    set,)
3205      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3206$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3207      ac_cache_corrupted=: ;;
3208    ,set)
3209      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3210$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3211      ac_cache_corrupted=: ;;
3212    ,);;
3213    *)
3214      if test "x$ac_old_val" != "x$ac_new_val"; then
3215	# differences in whitespace do not lead to failure.
3216	ac_old_val_w=`echo x $ac_old_val`
3217	ac_new_val_w=`echo x $ac_new_val`
3218	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3219	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3220$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3221	  ac_cache_corrupted=:
3222	else
3223	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3224$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3225	  eval $ac_var=\$ac_old_val
3226	fi
3227	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3228$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3229	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3230$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3231      fi;;
3232  esac
3233  # Pass precious variables to config.status.
3234  if test "$ac_new_set" = set; then
3235    case $ac_new_val in
3236    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3237    *) ac_arg=$ac_var=$ac_new_val ;;
3238    esac
3239    case " $ac_configure_args " in
3240      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3241      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3242    esac
3243  fi
3244done
3245if $ac_cache_corrupted; then
3246  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3248  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3249$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3250  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3251fi
3252## -------------------- ##
3253## Main body of script. ##
3254## -------------------- ##
3255
3256ac_ext=c
3257ac_cpp='$CPP $CPPFLAGS'
3258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3260ac_compiler_gnu=$ac_cv_c_compiler_gnu
3261
3262
3263
3264ac_aux_dir=
3265for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3266  if test -f "$ac_dir/install-sh"; then
3267    ac_aux_dir=$ac_dir
3268    ac_install_sh="$ac_aux_dir/install-sh -c"
3269    break
3270  elif test -f "$ac_dir/install.sh"; then
3271    ac_aux_dir=$ac_dir
3272    ac_install_sh="$ac_aux_dir/install.sh -c"
3273    break
3274  elif test -f "$ac_dir/shtool"; then
3275    ac_aux_dir=$ac_dir
3276    ac_install_sh="$ac_aux_dir/shtool install -c"
3277    break
3278  fi
3279done
3280if test -z "$ac_aux_dir"; then
3281  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
3282fi
3283
3284# These three variables are undocumented and unsupported,
3285# and are intended to be withdrawn in a future Autoconf release.
3286# They can cause serious problems if a builder's source tree is in a directory
3287# whose full name contains unusual characters.
3288ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3289ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3290ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3291
3292
3293# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3294
3295#
3296# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298#
3299# This code is free software; you can redistribute it and/or modify it
3300# under the terms of the GNU General Public License version 2 only, as
3301# published by the Free Software Foundation.  Oracle designates this
3302# particular file as subject to the "Classpath" exception as provided
3303# by Oracle in the LICENSE file that accompanied this code.
3304#
3305# This code is distributed in the hope that it will be useful, but WITHOUT
3306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308# version 2 for more details (a copy is included in the LICENSE file that
3309# accompanied this code).
3310#
3311# You should have received a copy of the GNU General Public License version
3312# 2 along with this work; if not, write to the Free Software Foundation,
3313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314#
3315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316# or visit www.oracle.com if you need additional information or have any
3317# questions.
3318#
3319
3320#
3321# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3322#
3323# This program is free software; you can redistribute it and/or modify
3324# it under the terms of the GNU General Public License as published by
3325# the Free Software Foundation; either version 2 of the License, or
3326# (at your option) any later version.
3327#
3328# This program is distributed in the hope that it will be useful, but
3329# WITHOUT ANY WARRANTY; without even the implied warranty of
3330# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3331# General Public License for more details.
3332#
3333# You should have received a copy of the GNU General Public License
3334# along with this program; if not, write to the Free Software
3335# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3336#
3337# As a special exception to the GNU General Public License, if you
3338# distribute this file as part of a program that contains a
3339# configuration script generated by Autoconf, you may include it under
3340# the same distribution terms that you use for the rest of that program.
3341
3342# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3343# ----------------------------------
3344# PKG_PROG_PKG_CONFIG
3345
3346# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3347#
3348# Check to see whether a particular set of modules exists.  Similar
3349# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3350#
3351#
3352# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3353# this or PKG_CHECK_MODULES is called, or make sure to call
3354# PKG_CHECK_EXISTS manually
3355# --------------------------------------------------------------
3356
3357
3358
3359# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3360# ---------------------------------------------
3361# _PKG_CONFIG
3362
3363# _PKG_SHORT_ERRORS_SUPPORTED
3364# -----------------------------
3365# _PKG_SHORT_ERRORS_SUPPORTED
3366
3367
3368# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3369# [ACTION-IF-NOT-FOUND])
3370#
3371#
3372# Note that if there is a possibility the first call to
3373# PKG_CHECK_MODULES might not happen, you should be sure to include an
3374# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3375#
3376#
3377# --------------------------------------------------------------
3378# PKG_CHECK_MODULES
3379
3380
3381# Include these first...
3382#
3383# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3384# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3385#
3386# This code is free software; you can redistribute it and/or modify it
3387# under the terms of the GNU General Public License version 2 only, as
3388# published by the Free Software Foundation.  Oracle designates this
3389# particular file as subject to the "Classpath" exception as provided
3390# by Oracle in the LICENSE file that accompanied this code.
3391#
3392# This code is distributed in the hope that it will be useful, but WITHOUT
3393# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3394# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3395# version 2 for more details (a copy is included in the LICENSE file that
3396# accompanied this code).
3397#
3398# You should have received a copy of the GNU General Public License version
3399# 2 along with this work; if not, write to the Free Software Foundation,
3400# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3401#
3402# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3403# or visit www.oracle.com if you need additional information or have any
3404# questions.
3405#
3406
3407# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3408# If so, then append $1 to $2 \
3409# Also set JVM_ARG_OK to true/false depending on outcome.
3410
3411
3412# Appends a string to a path variable, only adding the : when needed.
3413
3414
3415# Prepends a string to a path variable, only adding the : when needed.
3416
3417
3418# This will make sure the given variable points to a full and proper
3419# path. This means:
3420# 1) There will be no spaces in the path. On unix platforms,
3421#    spaces in the path will result in an error. On Windows,
3422#    the path will be rewritten using short-style to be space-free.
3423# 2) The path will be absolute, and it will be in unix-style (on
3424#     cygwin).
3425# $1: The name of the variable to fix
3426
3427
3428# This will make sure the given variable points to a executable
3429# with a full and proper path. This means:
3430# 1) There will be no spaces in the path. On unix platforms,
3431#    spaces in the path will result in an error. On Windows,
3432#    the path will be rewritten using short-style to be space-free.
3433# 2) The path will be absolute, and it will be in unix-style (on
3434#     cygwin).
3435# Any arguments given to the executable is preserved.
3436# If the input variable does not have a directory specification, then
3437# it need to be in the PATH.
3438# $1: The name of the variable to fix
3439
3440
3441
3442
3443# Register a --with argument but mark it as deprecated
3444# $1: The name of the with argument to deprecate, not including --with-
3445
3446
3447# Register a --enable argument but mark it as deprecated
3448# $1: The name of the with argument to deprecate, not including --enable-
3449# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3450
3451
3452
3453
3454# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3455# $1: variable to check
3456
3457
3458# Check that there are no unprocessed overridden variables left.
3459# If so, they are an incorrect argument and we will exit with an error.
3460
3461
3462# Setup a tool for the given variable. If correctly specified by the user,
3463# use that value, otherwise search for the tool using the supplied code snippet.
3464# $1: variable to set
3465# $2: code snippet to call to look for the tool
3466
3467
3468# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3469# $1: variable to set
3470# $2: executable name (or list of names) to look for
3471
3472
3473# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Like BASIC_PATH_PROGS but fails if no tool was found.
3479# $1: variable to set
3480# $2: executable name (or list of names) to look for
3481
3482
3483# Like BASIC_SETUP_TOOL but fails if no tool was found.
3484# $1: variable to set
3485# $2: autoconf macro to call to look for the special tool
3486
3487
3488# Setup the most fundamental tools that relies on not much else to set up,
3489# but is used by much of the early bootstrap code.
3490
3491
3492# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3493
3494
3495# Evaluates platform specific overrides for devkit variables.
3496# $1: Name of variable
3497
3498
3499
3500
3501
3502
3503#%%% Simple tools %%%
3504
3505# Check if we have found a usable version of make
3506# $1: the path to a potential make binary (or empty)
3507# $2: the description on how we found this
3508
3509
3510
3511
3512# Goes looking for a usable version of GNU make.
3513
3514
3515
3516
3517
3518
3519# Check if build directory is on local disk. If not possible to determine,
3520# we prefer to claim it's local.
3521# Argument 1: directory to test
3522# Argument 2: what to do if it is on local disk
3523# Argument 3: what to do otherwise (remote disk or failure)
3524
3525
3526# Check that source files have basic read permissions set. This might
3527# not be the case in cygwin in certain conditions.
3528
3529
3530
3531
3532# Check for support for specific options in bash
3533
3534
3535# Code to run after AC_OUTPUT
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
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# Helper function which possibly converts a path using DOS-style short mode.
3573# If so, the updated path is stored in $new_path.
3574# $1: The path to check
3575
3576
3577# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3578# and could probably be heavily simplified. However, all changes in this
3579# area tend to need lot of testing in different scenarios, and in lack of
3580# proper unit testing, cleaning this up has not been deemed worth the effort
3581# at the moment.
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3592
3593
3594
3595
3596#
3597# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631# ... then the rest
3632#
3633# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3634# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3635#
3636# This code is free software; you can redistribute it and/or modify it
3637# under the terms of the GNU General Public License version 2 only, as
3638# published by the Free Software Foundation.  Oracle designates this
3639# particular file as subject to the "Classpath" exception as provided
3640# by Oracle in the LICENSE file that accompanied this code.
3641#
3642# This code is distributed in the hope that it will be useful, but WITHOUT
3643# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3644# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3645# version 2 for more details (a copy is included in the LICENSE file that
3646# accompanied this code).
3647#
3648# You should have received a copy of the GNU General Public License version
3649# 2 along with this work; if not, write to the Free Software Foundation,
3650# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3651#
3652# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3653# or visit www.oracle.com if you need additional information or have any
3654# questions.
3655#
3656
3657########################################################################
3658# This file handles detection of the Boot JDK. The Boot JDK detection
3659# process has been developed as a response to solve a complex real-world
3660# problem. Initially, it was simple, but it has grown as platform after
3661# platform, idiosyncracy after idiosyncracy has been supported.
3662#
3663# The basic idea is this:
3664# 1) You need an acceptable *) JDK to use as a Boot JDK
3665# 2) There are several ways to locate a JDK, that are mostly platform
3666#    dependent **)
3667# 3) You can have multiple JDKs installed
3668# 4) If possible, configure should try to dig out an acceptable JDK
3669#    automatically, without having to resort to command-line options
3670#
3671# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3672#     javac) and not a JRE, etc.
3673#
3674# **) On Windows we typically use a well-known path.
3675#     On MacOSX we typically use the tool java_home.
3676#     On Linux we typically find javac in the $PATH, and then follow a
3677#     chain of symlinks that often ends up in a real JDK.
3678#
3679# This leads to the code where we check in different ways to locate a
3680# JDK, and if one is found, check if it is acceptable. If not, we print
3681# our reasons for rejecting it (useful when debugging non-working
3682# configure situations) and continue checking the next one.
3683########################################################################
3684
3685# Execute the check given as argument, and verify the result
3686# If the Boot JDK was previously found, do nothing
3687# $1 A command line (typically autoconf macro) to execute
3688
3689
3690# Test: Is bootjdk explicitely set by command line arguments?
3691
3692
3693# Test: Is bootjdk available from builddeps?
3694
3695
3696# Test: Is $JAVA_HOME set?
3697
3698
3699# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3700
3701
3702# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3703# $1: Argument to the java_home binary (optional)
3704
3705
3706# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3707
3708
3709# Look for a jdk in the given path. If there are multiple, try to select the newest.
3710# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3711# $1 = Path to directory containing jdk installations.
3712# $2 = String to append to the found JDK directory to get the proper JDK home
3713
3714
3715# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3716# environmental variable as base for where to look.
3717# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3718
3719
3720# Test: Is there a JDK installed in default, well-known locations?
3721
3722
3723# Check that a command-line tool in the Boot JDK is correct
3724# $1 = name of variable to assign
3725# $2 = name of binary
3726
3727
3728###############################################################################
3729#
3730# We need a Boot JDK to bootstrap the build.
3731#
3732
3733
3734
3735
3736
3737#
3738# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781#
3782# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3783# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3784#
3785# This code is free software; you can redistribute it and/or modify it
3786# under the terms of the GNU General Public License version 2 only, as
3787# published by the Free Software Foundation.  Oracle designates this
3788# particular file as subject to the "Classpath" exception as provided
3789# by Oracle in the LICENSE file that accompanied this code.
3790#
3791# This code is distributed in the hope that it will be useful, but WITHOUT
3792# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3793# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3794# version 2 for more details (a copy is included in the LICENSE file that
3795# accompanied this code).
3796#
3797# You should have received a copy of the GNU General Public License version
3798# 2 along with this work; if not, write to the Free Software Foundation,
3799# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3800#
3801# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3802# or visit www.oracle.com if you need additional information or have any
3803# questions.
3804#
3805
3806
3807
3808
3809
3810# Documentation on common flags used for solstudio in HIGHEST.
3811#
3812# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3813#          done with care, there are some assumptions below that need to
3814#          be understood about the use of pointers, and IEEE behavior.
3815#
3816# -fns: Use non-standard floating point mode (not IEEE 754)
3817# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3818# -fsingle: Use single precision floating point with 'float'
3819# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3820#   (Source with excessing pointer casting and data access with mixed
3821#    pointer types are not recommended)
3822# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3823#   (If you expect perfect errno behavior, do not use this)
3824# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3825# -xrestrict: Pointer parameters to functions do not overlap
3826#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3827#    If you pass in multiple pointers to the same data, do not use this)
3828# -xlibmil: Inline some library routines
3829#   (If you expect perfect errno behavior, do not use this)
3830# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3831#   (If you expect perfect errno behavior, do not use this)
3832#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3833
3834    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3835    # Bug?
3836    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3837    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3838    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3839    #fi
3840
3841
3842
3843
3844
3845# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3846#                                   [RUN-IF-FALSE])
3847# ------------------------------------------------------------
3848# Check that the c and c++ compilers support an argument
3849
3850
3851# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3852#                                    [RUN-IF-FALSE])
3853# ------------------------------------------------------------
3854# Check that the linker support an argument
3855
3856
3857
3858
3859#
3860# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3862#
3863# This code is free software; you can redistribute it and/or modify it
3864# under the terms of the GNU General Public License version 2 only, as
3865# published by the Free Software Foundation.  Oracle designates this
3866# particular file as subject to the "Classpath" exception as provided
3867# by Oracle in the LICENSE file that accompanied this code.
3868#
3869# This code is distributed in the hope that it will be useful, but WITHOUT
3870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3872# version 2 for more details (a copy is included in the LICENSE file that
3873# accompanied this code).
3874#
3875# You should have received a copy of the GNU General Public License version
3876# 2 along with this work; if not, write to the Free Software Foundation,
3877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3878#
3879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3880# or visit www.oracle.com if you need additional information or have any
3881# questions.
3882#
3883
3884
3885
3886
3887
3888cygwin_help() {
3889  case $1 in
3890    unzip)
3891      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893      ;;
3894    zip)
3895      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897      ;;
3898    make)
3899      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3900      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3901      ;;
3902    freetype)
3903      HELP_MSG="
3904The freetype library can now be build during the configure process.
3905Download the freetype sources and unpack them into an arbitrary directory:
3906
3907wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3908tar -xzf freetype-2.5.3.tar.gz
3909
3910Then run configure with '--with-freetype-src=<freetype_src>'. This will
3911automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3912builds or into '<freetype_src>/lib32' for 32-bit builds.
3913Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3914and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3915      ;;
3916  esac
3917}
3918
3919msys_help() {
3920  PKGHANDLER_COMMAND=""
3921}
3922
3923apt_help() {
3924  case $1 in
3925    devkit)
3926      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3927    openjdk)
3928      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3929    alsa)
3930      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3931    cups)
3932      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3933    freetype)
3934      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3935    pulse)
3936      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3937    x11)
3938      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3939    ccache)
3940      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3941  esac
3942}
3943
3944yum_help() {
3945  case $1 in
3946    devkit)
3947      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3948    openjdk)
3949      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3950    alsa)
3951      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3952    cups)
3953      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3954    freetype)
3955      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3956    pulse)
3957      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3958    x11)
3959      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3960    ccache)
3961      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3962  esac
3963}
3964
3965port_help() {
3966  PKGHANDLER_COMMAND=""
3967}
3968
3969pkgutil_help() {
3970  PKGHANDLER_COMMAND=""
3971}
3972
3973pkgadd_help() {
3974  PKGHANDLER_COMMAND=""
3975}
3976
3977# This function will check if we're called from the "configure" wrapper while
3978# printing --help. If so, we will print out additional information that can
3979# only be extracted within the autoconf script, and then exit. This must be
3980# called at the very beginning in configure.ac.
3981
3982
3983
3984
3985
3986
3987#
3988# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021###############################################################################
4022#
4023# Should we build only OpenJDK even if closed sources are present?
4024#
4025
4026
4027
4028
4029
4030
4031###############################################################################
4032#
4033# Enable or disable the elliptic curve crypto implementation
4034#
4035
4036
4037
4038
4039
4040################################################################################
4041#
4042# Gcov coverage data for hotspot
4043#
4044
4045
4046#
4047# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4048# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4049#
4050# This code is free software; you can redistribute it and/or modify it
4051# under the terms of the GNU General Public License version 2 only, as
4052# published by the Free Software Foundation.  Oracle designates this
4053# particular file as subject to the "Classpath" exception as provided
4054# by Oracle in the LICENSE file that accompanied this code.
4055#
4056# This code is distributed in the hope that it will be useful, but WITHOUT
4057# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4058# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4059# version 2 for more details (a copy is included in the LICENSE file that
4060# accompanied this code).
4061#
4062# You should have received a copy of the GNU General Public License version
4063# 2 along with this work; if not, write to the Free Software Foundation,
4064# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4065#
4066# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4067# or visit www.oracle.com if you need additional information or have any
4068# questions.
4069#
4070
4071###############################################################################
4072#
4073# Setup version numbers
4074#
4075
4076# Verify that a given string represents a valid version number, and assign it
4077# to a variable.
4078
4079# Argument 1: the variable to assign to
4080# Argument 2: the value given by the user
4081
4082
4083
4084
4085#
4086# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130#
4131# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4132# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4133#
4134# This code is free software; you can redistribute it and/or modify it
4135# under the terms of the GNU General Public License version 2 only, as
4136# published by the Free Software Foundation.  Oracle designates this
4137# particular file as subject to the "Classpath" exception as provided
4138# by Oracle in the LICENSE file that accompanied this code.
4139#
4140# This code is distributed in the hope that it will be useful, but WITHOUT
4141# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4142# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4143# version 2 for more details (a copy is included in the LICENSE file that
4144# accompanied this code).
4145#
4146# You should have received a copy of the GNU General Public License version
4147# 2 along with this work; if not, write to the Free Software Foundation,
4148# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4149#
4150# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4151# or visit www.oracle.com if you need additional information or have any
4152# questions.
4153#
4154
4155# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4156# Converts autoconf style CPU name to OpenJDK style, into
4157# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4158
4159
4160# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4161# Converts autoconf style OS name to OpenJDK style, into
4162# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4163
4164
4165# Expects $host_os $host_cpu $build_os and $build_cpu
4166# and $with_target_bits to have been setup!
4167#
4168# Translate the standard triplet(quadruplet) definition
4169# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4170# OPENJDK_BUILD_OS, etc.
4171
4172
4173# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4174# accordingly. Must be done after setting up build and target system, but before
4175# doing anything else with these values.
4176
4177
4178# Setup the legacy variables, for controlling the old makefiles.
4179#
4180
4181
4182
4183
4184#%%% Build and target systems %%%
4185
4186
4187
4188
4189# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4190# Add -mX to various FLAGS variables.
4191
4192
4193
4194
4195
4196
4197#
4198# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4199# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4200#
4201# This code is free software; you can redistribute it and/or modify it
4202# under the terms of the GNU General Public License version 2 only, as
4203# published by the Free Software Foundation.  Oracle designates this
4204# particular file as subject to the "Classpath" exception as provided
4205# by Oracle in the LICENSE file that accompanied this code.
4206#
4207# This code is distributed in the hope that it will be useful, but WITHOUT
4208# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4209# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4210# version 2 for more details (a copy is included in the LICENSE file that
4211# accompanied this code).
4212#
4213# You should have received a copy of the GNU General Public License version
4214# 2 along with this work; if not, write to the Free Software Foundation,
4215# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4216#
4217# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4218# or visit www.oracle.com if you need additional information or have any
4219# questions.
4220#
4221
4222
4223
4224
4225
4226
4227
4228
4229#
4230# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254########################################################################
4255# This file is responsible for detecting, verifying and setting up the
4256# toolchain, i.e. the compiler, linker and related utilities. It will setup
4257# proper paths to the binaries, but it will not setup any flags.
4258#
4259# The binaries used is determined by the toolchain type, which is the family of
4260# compilers and related tools that are used.
4261########################################################################
4262
4263
4264# All valid toolchains, regardless of platform (used by help.m4)
4265VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4266
4267# These toolchains are valid on different platforms
4268VALID_TOOLCHAINS_linux="gcc clang"
4269VALID_TOOLCHAINS_solaris="solstudio"
4270VALID_TOOLCHAINS_macosx="gcc clang"
4271VALID_TOOLCHAINS_aix="xlc"
4272VALID_TOOLCHAINS_windows="microsoft"
4273
4274# Toolchain descriptions
4275TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4276TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4277TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4278TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4279TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4280
4281# Setup a number of variables describing how native output files are
4282# named on this platform/toolchain.
4283
4284
4285# Determine which toolchain type to use, and make sure it is valid for this
4286# platform. Setup various information about the selected toolchain.
4287
4288
4289# Before we start detecting the toolchain executables, we might need some
4290# special setup, e.g. additional paths etc.
4291
4292
4293# Restore path, etc
4294
4295
4296# Check if a compiler is of the toolchain type we expect, and save the version
4297# information from it. If the compiler does not match the expected type,
4298# this function will abort using AC_MSG_ERROR. If it matches, the version will
4299# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4300# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4301#
4302# $1 = compiler to test (CC or CXX)
4303# $2 = human readable name of compiler (C or C++)
4304
4305
4306# Try to locate the given C or C++ compiler in the path, or otherwise.
4307#
4308# $1 = compiler to test (CC or CXX)
4309# $2 = human readable name of compiler (C or C++)
4310# $3 = list of compiler names to search for
4311
4312
4313# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4314# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4315# archiver (AR). Verify that the compilers are correct according to the
4316# toolchain type.
4317
4318
4319# Setup additional tools that is considered a part of the toolchain, but not the
4320# core part. Many of these are highly platform-specific and do not exist,
4321# and/or are not needed on all platforms.
4322
4323
4324# Setup the build tools (i.e, the compiler and linker used to build programs
4325# that should be run on the build platform, not the target platform, as a build
4326# helper). Since the non-cross-compile case uses the normal, target compilers
4327# for this, we can only do this after these have been setup.
4328
4329
4330# Setup legacy variables that are still needed as alternative ways to refer to
4331# parts of the toolchain.
4332
4333
4334# Do some additional checks on the detected tools.
4335
4336
4337# Setup the JTReg Regression Test Harness.
4338
4339
4340#
4341# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4342# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343#
4344# This code is free software; you can redistribute it and/or modify it
4345# under the terms of the GNU General Public License version 2 only, as
4346# published by the Free Software Foundation.  Oracle designates this
4347# particular file as subject to the "Classpath" exception as provided
4348# by Oracle in the LICENSE file that accompanied this code.
4349#
4350# This code is distributed in the hope that it will be useful, but WITHOUT
4351# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4353# version 2 for more details (a copy is included in the LICENSE file that
4354# accompanied this code).
4355#
4356# You should have received a copy of the GNU General Public License version
4357# 2 along with this work; if not, write to the Free Software Foundation,
4358# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359#
4360# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361# or visit www.oracle.com if you need additional information or have any
4362# questions.
4363#
4364
4365################################################################################
4366# The order of these defines the priority by which we try to find them.
4367VALID_VS_VERSIONS="2013 2012 2010"
4368
4369VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4370VS_VERSION_INTERNAL_2010=100
4371VS_MSVCR_2010=msvcr100.dll
4372# We don't use msvcp on Visual Studio 2010
4373#VS_MSVCP_2010=msvcp100.dll
4374VS_ENVVAR_2010="VS100COMNTOOLS"
4375VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4376VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4377VS_VS_PLATFORM_NAME_2010="v100"
4378VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4379
4380VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4381VS_VERSION_INTERNAL_2012=110
4382VS_MSVCR_2012=msvcr110.dll
4383VS_MSVCP_2012=msvcp110.dll
4384VS_ENVVAR_2012="VS110COMNTOOLS"
4385VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4386VS_SDK_INSTALLDIR_2012=
4387VS_VS_PLATFORM_NAME_2012="v110"
4388VS_SDK_PLATFORM_NAME_2012=
4389
4390VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4391VS_VERSION_INTERNAL_2013=120
4392VS_MSVCR_2013=msvcr120.dll
4393VS_MSVCP_2013=msvcp120.dll
4394VS_ENVVAR_2013="VS120COMNTOOLS"
4395VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4396VS_SDK_INSTALLDIR_2013=
4397VS_VS_PLATFORM_NAME_2013="v120"
4398VS_SDK_PLATFORM_NAME_2013=
4399
4400################################################################################
4401
4402
4403
4404################################################################################
4405
4406
4407
4408################################################################################
4409# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4410# build environment and assigns it to VS_ENV_CMD
4411
4412
4413################################################################################
4414
4415
4416
4417################################################################################
4418# Check if the VS env variables were setup prior to running configure.
4419# If not, then find vcvarsall.bat and run it automatically, and integrate
4420# the set env variables into the spec file.
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435# This line needs to be here, verbatim, after all includes and the dummy hook
4436# definitions. It is replaced with custom functionality when building
4437# custom sources.
4438#CUSTOM_AUTOCONF_INCLUDE
4439
4440# Do not change or remove the following line, it is needed for consistency checks:
4441DATE_WHEN_GENERATED=1442891592
4442
4443###############################################################################
4444#
4445# Initialization / Boot-strapping
4446#
4447# The bootstrapping process needs to solve the "chicken or the egg" problem,
4448# thus it jumps back and forth, each time gaining something needed later on.
4449#
4450###############################################################################
4451
4452# If we are requested to print additional help, do that and then exit.
4453# This must be the very first call.
4454
4455  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4456    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4457    $PRINTF "Which are valid to use depends on the build platform.\n"
4458    for toolchain in $VALID_TOOLCHAINS_all; do
4459      # Use indirect variable referencing
4460      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4461      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4462      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4463    done
4464
4465    # And now exit directly
4466    exit 0
4467  fi
4468
4469
4470# Basic initialization that must happen first of all in the normal process.
4471
4472  # Save the original command line. This is passed to us by the wrapper configure script.
4473
4474  # Save the path variable before it gets changed
4475  ORIGINAL_PATH="$PATH"
4476
4477  DATE_WHEN_CONFIGURED=`LANG=C date`
4478
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4480$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4482$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4483
4484
4485  # Start with tools that do not need have cross compilation support
4486  # and can be expected to be found in the default PATH. These tools are
4487  # used by configure. Nor are these tools expected to be found in the
4488  # devkit from the builddeps server either, since they are
4489  # needed to download the devkit.
4490
4491  # First are all the simple required tools.
4492
4493
4494
4495  # Publish this variable in the help.
4496
4497
4498  if test "x$BASENAME" = x; then
4499    # The variable is not set by user, try to locate tool using the code snippet
4500    for ac_prog in basename
4501do
4502  # Extract the first word of "$ac_prog", so it can be a program name with args.
4503set dummy $ac_prog; ac_word=$2
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4505$as_echo_n "checking for $ac_word... " >&6; }
4506if ${ac_cv_path_BASENAME+:} false; then :
4507  $as_echo_n "(cached) " >&6
4508else
4509  case $BASENAME in
4510  [\\/]* | ?:[\\/]*)
4511  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4512  ;;
4513  *)
4514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH
4516do
4517  IFS=$as_save_IFS
4518  test -z "$as_dir" && as_dir=.
4519    for ac_exec_ext in '' $ac_executable_extensions; do
4520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4521    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523    break 2
4524  fi
4525done
4526  done
4527IFS=$as_save_IFS
4528
4529  ;;
4530esac
4531fi
4532BASENAME=$ac_cv_path_BASENAME
4533if test -n "$BASENAME"; then
4534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4535$as_echo "$BASENAME" >&6; }
4536else
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538$as_echo "no" >&6; }
4539fi
4540
4541
4542  test -n "$BASENAME" && break
4543done
4544
4545  else
4546    # The variable is set, but is it from the command line or the environment?
4547
4548    # Try to remove the string !BASENAME! from our list.
4549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4551      # If it failed, the variable was not from the command line. Ignore it,
4552      # but warn the user (except for BASH, which is always set by the calling BASH).
4553      if test "xBASENAME" != xBASH; then
4554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4555$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4556      fi
4557      # Try to locate tool using the code snippet
4558      for ac_prog in basename
4559do
4560  # Extract the first word of "$ac_prog", so it can be a program name with args.
4561set dummy $ac_prog; ac_word=$2
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563$as_echo_n "checking for $ac_word... " >&6; }
4564if ${ac_cv_path_BASENAME+:} false; then :
4565  $as_echo_n "(cached) " >&6
4566else
4567  case $BASENAME in
4568  [\\/]* | ?:[\\/]*)
4569  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4570  ;;
4571  *)
4572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575  IFS=$as_save_IFS
4576  test -z "$as_dir" && as_dir=.
4577    for ac_exec_ext in '' $ac_executable_extensions; do
4578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4579    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581    break 2
4582  fi
4583done
4584  done
4585IFS=$as_save_IFS
4586
4587  ;;
4588esac
4589fi
4590BASENAME=$ac_cv_path_BASENAME
4591if test -n "$BASENAME"; then
4592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4593$as_echo "$BASENAME" >&6; }
4594else
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596$as_echo "no" >&6; }
4597fi
4598
4599
4600  test -n "$BASENAME" && break
4601done
4602
4603    else
4604      # If it succeeded, then it was overridden by the user. We will use it
4605      # for the tool.
4606
4607      # First remove it from the list of overridden variables, so we can test
4608      # for unknown variables in the end.
4609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4610
4611      # Check if the provided tool contains a complete path.
4612      tool_specified="$BASENAME"
4613      tool_basename="${tool_specified##*/}"
4614      if test "x$tool_basename" = "x$tool_specified"; then
4615        # A command without a complete path is provided, search $PATH.
4616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4617$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4618        # Extract the first word of "$tool_basename", so it can be a program name with args.
4619set dummy $tool_basename; ac_word=$2
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621$as_echo_n "checking for $ac_word... " >&6; }
4622if ${ac_cv_path_BASENAME+:} false; then :
4623  $as_echo_n "(cached) " >&6
4624else
4625  case $BASENAME in
4626  [\\/]* | ?:[\\/]*)
4627  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4628  ;;
4629  *)
4630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631for as_dir in $PATH
4632do
4633  IFS=$as_save_IFS
4634  test -z "$as_dir" && as_dir=.
4635    for ac_exec_ext in '' $ac_executable_extensions; do
4636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4637    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4639    break 2
4640  fi
4641done
4642  done
4643IFS=$as_save_IFS
4644
4645  ;;
4646esac
4647fi
4648BASENAME=$ac_cv_path_BASENAME
4649if test -n "$BASENAME"; then
4650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4651$as_echo "$BASENAME" >&6; }
4652else
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654$as_echo "no" >&6; }
4655fi
4656
4657
4658        if test "x$BASENAME" = x; then
4659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4660        fi
4661      else
4662        # Otherwise we believe it is a complete path. Use it as it is.
4663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4664$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4666$as_echo_n "checking for BASENAME... " >&6; }
4667        if test ! -x "$tool_specified"; then
4668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4669$as_echo "not found" >&6; }
4670          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4671        fi
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4673$as_echo "$tool_specified" >&6; }
4674      fi
4675    fi
4676  fi
4677
4678
4679
4680  if test "x$BASENAME" = x; then
4681    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4682  fi
4683
4684
4685
4686
4687
4688  # Publish this variable in the help.
4689
4690
4691  if test "x$BASH" = x; then
4692    # The variable is not set by user, try to locate tool using the code snippet
4693    for ac_prog in bash
4694do
4695  # Extract the first word of "$ac_prog", so it can be a program name with args.
4696set dummy $ac_prog; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_BASH+:} false; then :
4700  $as_echo_n "(cached) " >&6
4701else
4702  case $BASH in
4703  [\\/]* | ?:[\\/]*)
4704  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4705  ;;
4706  *)
4707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in $PATH
4709do
4710  IFS=$as_save_IFS
4711  test -z "$as_dir" && as_dir=.
4712    for ac_exec_ext in '' $ac_executable_extensions; do
4713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716    break 2
4717  fi
4718done
4719  done
4720IFS=$as_save_IFS
4721
4722  ;;
4723esac
4724fi
4725BASH=$ac_cv_path_BASH
4726if test -n "$BASH"; then
4727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4728$as_echo "$BASH" >&6; }
4729else
4730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735  test -n "$BASH" && break
4736done
4737
4738  else
4739    # The variable is set, but is it from the command line or the environment?
4740
4741    # Try to remove the string !BASH! from our list.
4742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4744      # If it failed, the variable was not from the command line. Ignore it,
4745      # but warn the user (except for BASH, which is always set by the calling BASH).
4746      if test "xBASH" != xBASH; then
4747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4748$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4749      fi
4750      # Try to locate tool using the code snippet
4751      for ac_prog in bash
4752do
4753  # Extract the first word of "$ac_prog", so it can be a program name with args.
4754set dummy $ac_prog; ac_word=$2
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4756$as_echo_n "checking for $ac_word... " >&6; }
4757if ${ac_cv_path_BASH+:} false; then :
4758  $as_echo_n "(cached) " >&6
4759else
4760  case $BASH in
4761  [\\/]* | ?:[\\/]*)
4762  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4763  ;;
4764  *)
4765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766for as_dir in $PATH
4767do
4768  IFS=$as_save_IFS
4769  test -z "$as_dir" && as_dir=.
4770    for ac_exec_ext in '' $ac_executable_extensions; do
4771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4772    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4774    break 2
4775  fi
4776done
4777  done
4778IFS=$as_save_IFS
4779
4780  ;;
4781esac
4782fi
4783BASH=$ac_cv_path_BASH
4784if test -n "$BASH"; then
4785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4786$as_echo "$BASH" >&6; }
4787else
4788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4789$as_echo "no" >&6; }
4790fi
4791
4792
4793  test -n "$BASH" && break
4794done
4795
4796    else
4797      # If it succeeded, then it was overridden by the user. We will use it
4798      # for the tool.
4799
4800      # First remove it from the list of overridden variables, so we can test
4801      # for unknown variables in the end.
4802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4803
4804      # Check if the provided tool contains a complete path.
4805      tool_specified="$BASH"
4806      tool_basename="${tool_specified##*/}"
4807      if test "x$tool_basename" = "x$tool_specified"; then
4808        # A command without a complete path is provided, search $PATH.
4809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4810$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4811        # Extract the first word of "$tool_basename", so it can be a program name with args.
4812set dummy $tool_basename; ac_word=$2
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4814$as_echo_n "checking for $ac_word... " >&6; }
4815if ${ac_cv_path_BASH+:} false; then :
4816  $as_echo_n "(cached) " >&6
4817else
4818  case $BASH in
4819  [\\/]* | ?:[\\/]*)
4820  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4821  ;;
4822  *)
4823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824for as_dir in $PATH
4825do
4826  IFS=$as_save_IFS
4827  test -z "$as_dir" && as_dir=.
4828    for ac_exec_ext in '' $ac_executable_extensions; do
4829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4830    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4832    break 2
4833  fi
4834done
4835  done
4836IFS=$as_save_IFS
4837
4838  ;;
4839esac
4840fi
4841BASH=$ac_cv_path_BASH
4842if test -n "$BASH"; then
4843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4844$as_echo "$BASH" >&6; }
4845else
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850
4851        if test "x$BASH" = x; then
4852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4853        fi
4854      else
4855        # Otherwise we believe it is a complete path. Use it as it is.
4856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4857$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4859$as_echo_n "checking for BASH... " >&6; }
4860        if test ! -x "$tool_specified"; then
4861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4862$as_echo "not found" >&6; }
4863          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4864        fi
4865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4866$as_echo "$tool_specified" >&6; }
4867      fi
4868    fi
4869  fi
4870
4871
4872
4873  if test "x$BASH" = x; then
4874    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4875  fi
4876
4877
4878
4879
4880
4881  # Publish this variable in the help.
4882
4883
4884  if test "x$CAT" = x; then
4885    # The variable is not set by user, try to locate tool using the code snippet
4886    for ac_prog in cat
4887do
4888  # Extract the first word of "$ac_prog", so it can be a program name with args.
4889set dummy $ac_prog; ac_word=$2
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891$as_echo_n "checking for $ac_word... " >&6; }
4892if ${ac_cv_path_CAT+:} false; then :
4893  $as_echo_n "(cached) " >&6
4894else
4895  case $CAT in
4896  [\\/]* | ?:[\\/]*)
4897  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4898  ;;
4899  *)
4900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901for as_dir in $PATH
4902do
4903  IFS=$as_save_IFS
4904  test -z "$as_dir" && as_dir=.
4905    for ac_exec_ext in '' $ac_executable_extensions; do
4906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4907    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909    break 2
4910  fi
4911done
4912  done
4913IFS=$as_save_IFS
4914
4915  ;;
4916esac
4917fi
4918CAT=$ac_cv_path_CAT
4919if test -n "$CAT"; then
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4921$as_echo "$CAT" >&6; }
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928  test -n "$CAT" && break
4929done
4930
4931  else
4932    # The variable is set, but is it from the command line or the environment?
4933
4934    # Try to remove the string !CAT! from our list.
4935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4937      # If it failed, the variable was not from the command line. Ignore it,
4938      # but warn the user (except for BASH, which is always set by the calling BASH).
4939      if test "xCAT" != xBASH; then
4940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4941$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4942      fi
4943      # Try to locate tool using the code snippet
4944      for ac_prog in cat
4945do
4946  # Extract the first word of "$ac_prog", so it can be a program name with args.
4947set dummy $ac_prog; ac_word=$2
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if ${ac_cv_path_CAT+:} false; then :
4951  $as_echo_n "(cached) " >&6
4952else
4953  case $CAT in
4954  [\\/]* | ?:[\\/]*)
4955  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4956  ;;
4957  *)
4958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in $PATH
4960do
4961  IFS=$as_save_IFS
4962  test -z "$as_dir" && as_dir=.
4963    for ac_exec_ext in '' $ac_executable_extensions; do
4964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4965    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967    break 2
4968  fi
4969done
4970  done
4971IFS=$as_save_IFS
4972
4973  ;;
4974esac
4975fi
4976CAT=$ac_cv_path_CAT
4977if test -n "$CAT"; then
4978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4979$as_echo "$CAT" >&6; }
4980else
4981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985
4986  test -n "$CAT" && break
4987done
4988
4989    else
4990      # If it succeeded, then it was overridden by the user. We will use it
4991      # for the tool.
4992
4993      # First remove it from the list of overridden variables, so we can test
4994      # for unknown variables in the end.
4995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4996
4997      # Check if the provided tool contains a complete path.
4998      tool_specified="$CAT"
4999      tool_basename="${tool_specified##*/}"
5000      if test "x$tool_basename" = "x$tool_specified"; then
5001        # A command without a complete path is provided, search $PATH.
5002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5003$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5004        # Extract the first word of "$tool_basename", so it can be a program name with args.
5005set dummy $tool_basename; ac_word=$2
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007$as_echo_n "checking for $ac_word... " >&6; }
5008if ${ac_cv_path_CAT+:} false; then :
5009  $as_echo_n "(cached) " >&6
5010else
5011  case $CAT in
5012  [\\/]* | ?:[\\/]*)
5013  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5014  ;;
5015  *)
5016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017for as_dir in $PATH
5018do
5019  IFS=$as_save_IFS
5020  test -z "$as_dir" && as_dir=.
5021    for ac_exec_ext in '' $ac_executable_extensions; do
5022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5023    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5025    break 2
5026  fi
5027done
5028  done
5029IFS=$as_save_IFS
5030
5031  ;;
5032esac
5033fi
5034CAT=$ac_cv_path_CAT
5035if test -n "$CAT"; then
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5037$as_echo "$CAT" >&6; }
5038else
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040$as_echo "no" >&6; }
5041fi
5042
5043
5044        if test "x$CAT" = x; then
5045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5046        fi
5047      else
5048        # Otherwise we believe it is a complete path. Use it as it is.
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5050$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5052$as_echo_n "checking for CAT... " >&6; }
5053        if test ! -x "$tool_specified"; then
5054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5055$as_echo "not found" >&6; }
5056          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5057        fi
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5059$as_echo "$tool_specified" >&6; }
5060      fi
5061    fi
5062  fi
5063
5064
5065
5066  if test "x$CAT" = x; then
5067    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5068  fi
5069
5070
5071
5072
5073
5074  # Publish this variable in the help.
5075
5076
5077  if test "x$CHMOD" = x; then
5078    # The variable is not set by user, try to locate tool using the code snippet
5079    for ac_prog in chmod
5080do
5081  # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
5085if ${ac_cv_path_CHMOD+:} false; then :
5086  $as_echo_n "(cached) " >&6
5087else
5088  case $CHMOD in
5089  [\\/]* | ?:[\\/]*)
5090  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5091  ;;
5092  *)
5093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096  IFS=$as_save_IFS
5097  test -z "$as_dir" && as_dir=.
5098    for ac_exec_ext in '' $ac_executable_extensions; do
5099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102    break 2
5103  fi
5104done
5105  done
5106IFS=$as_save_IFS
5107
5108  ;;
5109esac
5110fi
5111CHMOD=$ac_cv_path_CHMOD
5112if test -n "$CHMOD"; then
5113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5114$as_echo "$CHMOD" >&6; }
5115else
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
5118fi
5119
5120
5121  test -n "$CHMOD" && break
5122done
5123
5124  else
5125    # The variable is set, but is it from the command line or the environment?
5126
5127    # Try to remove the string !CHMOD! from our list.
5128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5130      # If it failed, the variable was not from the command line. Ignore it,
5131      # but warn the user (except for BASH, which is always set by the calling BASH).
5132      if test "xCHMOD" != xBASH; then
5133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5134$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5135      fi
5136      # Try to locate tool using the code snippet
5137      for ac_prog in chmod
5138do
5139  # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
5143if ${ac_cv_path_CHMOD+:} false; then :
5144  $as_echo_n "(cached) " >&6
5145else
5146  case $CHMOD in
5147  [\\/]* | ?:[\\/]*)
5148  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5149  ;;
5150  *)
5151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154  IFS=$as_save_IFS
5155  test -z "$as_dir" && as_dir=.
5156    for ac_exec_ext in '' $ac_executable_extensions; do
5157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160    break 2
5161  fi
5162done
5163  done
5164IFS=$as_save_IFS
5165
5166  ;;
5167esac
5168fi
5169CHMOD=$ac_cv_path_CHMOD
5170if test -n "$CHMOD"; then
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5172$as_echo "$CHMOD" >&6; }
5173else
5174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179  test -n "$CHMOD" && break
5180done
5181
5182    else
5183      # If it succeeded, then it was overridden by the user. We will use it
5184      # for the tool.
5185
5186      # First remove it from the list of overridden variables, so we can test
5187      # for unknown variables in the end.
5188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5189
5190      # Check if the provided tool contains a complete path.
5191      tool_specified="$CHMOD"
5192      tool_basename="${tool_specified##*/}"
5193      if test "x$tool_basename" = "x$tool_specified"; then
5194        # A command without a complete path is provided, search $PATH.
5195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5196$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5197        # Extract the first word of "$tool_basename", so it can be a program name with args.
5198set dummy $tool_basename; ac_word=$2
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200$as_echo_n "checking for $ac_word... " >&6; }
5201if ${ac_cv_path_CHMOD+:} false; then :
5202  $as_echo_n "(cached) " >&6
5203else
5204  case $CHMOD in
5205  [\\/]* | ?:[\\/]*)
5206  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5207  ;;
5208  *)
5209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212  IFS=$as_save_IFS
5213  test -z "$as_dir" && as_dir=.
5214    for ac_exec_ext in '' $ac_executable_extensions; do
5215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5216    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218    break 2
5219  fi
5220done
5221  done
5222IFS=$as_save_IFS
5223
5224  ;;
5225esac
5226fi
5227CHMOD=$ac_cv_path_CHMOD
5228if test -n "$CHMOD"; then
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5230$as_echo "$CHMOD" >&6; }
5231else
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }
5234fi
5235
5236
5237        if test "x$CHMOD" = x; then
5238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5239        fi
5240      else
5241        # Otherwise we believe it is a complete path. Use it as it is.
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5243$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5245$as_echo_n "checking for CHMOD... " >&6; }
5246        if test ! -x "$tool_specified"; then
5247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5248$as_echo "not found" >&6; }
5249          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5250        fi
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5252$as_echo "$tool_specified" >&6; }
5253      fi
5254    fi
5255  fi
5256
5257
5258
5259  if test "x$CHMOD" = x; then
5260    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5261  fi
5262
5263
5264
5265
5266
5267  # Publish this variable in the help.
5268
5269
5270  if test "x$CMP" = x; then
5271    # The variable is not set by user, try to locate tool using the code snippet
5272    for ac_prog in cmp
5273do
5274  # Extract the first word of "$ac_prog", so it can be a program name with args.
5275set dummy $ac_prog; ac_word=$2
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277$as_echo_n "checking for $ac_word... " >&6; }
5278if ${ac_cv_path_CMP+:} false; then :
5279  $as_echo_n "(cached) " >&6
5280else
5281  case $CMP in
5282  [\\/]* | ?:[\\/]*)
5283  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5284  ;;
5285  *)
5286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287for as_dir in $PATH
5288do
5289  IFS=$as_save_IFS
5290  test -z "$as_dir" && as_dir=.
5291    for ac_exec_ext in '' $ac_executable_extensions; do
5292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295    break 2
5296  fi
5297done
5298  done
5299IFS=$as_save_IFS
5300
5301  ;;
5302esac
5303fi
5304CMP=$ac_cv_path_CMP
5305if test -n "$CMP"; then
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5307$as_echo "$CMP" >&6; }
5308else
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
5311fi
5312
5313
5314  test -n "$CMP" && break
5315done
5316
5317  else
5318    # The variable is set, but is it from the command line or the environment?
5319
5320    # Try to remove the string !CMP! from our list.
5321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5323      # If it failed, the variable was not from the command line. Ignore it,
5324      # but warn the user (except for BASH, which is always set by the calling BASH).
5325      if test "xCMP" != xBASH; then
5326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5327$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5328      fi
5329      # Try to locate tool using the code snippet
5330      for ac_prog in cmp
5331do
5332  # Extract the first word of "$ac_prog", so it can be a program name with args.
5333set dummy $ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_CMP+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $CMP in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362CMP=$ac_cv_path_CMP
5363if test -n "$CMP"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5365$as_echo "$CMP" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372  test -n "$CMP" && break
5373done
5374
5375    else
5376      # If it succeeded, then it was overridden by the user. We will use it
5377      # for the tool.
5378
5379      # First remove it from the list of overridden variables, so we can test
5380      # for unknown variables in the end.
5381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5382
5383      # Check if the provided tool contains a complete path.
5384      tool_specified="$CMP"
5385      tool_basename="${tool_specified##*/}"
5386      if test "x$tool_basename" = "x$tool_specified"; then
5387        # A command without a complete path is provided, search $PATH.
5388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5389$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5390        # Extract the first word of "$tool_basename", so it can be a program name with args.
5391set dummy $tool_basename; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_CMP+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $CMP in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420CMP=$ac_cv_path_CMP
5421if test -n "$CMP"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5423$as_echo "$CMP" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430        if test "x$CMP" = x; then
5431          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5432        fi
5433      else
5434        # Otherwise we believe it is a complete path. Use it as it is.
5435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5436$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5438$as_echo_n "checking for CMP... " >&6; }
5439        if test ! -x "$tool_specified"; then
5440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5441$as_echo "not found" >&6; }
5442          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5443        fi
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5445$as_echo "$tool_specified" >&6; }
5446      fi
5447    fi
5448  fi
5449
5450
5451
5452  if test "x$CMP" = x; then
5453    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5454  fi
5455
5456
5457
5458
5459
5460  # Publish this variable in the help.
5461
5462
5463  if test "x$COMM" = x; then
5464    # The variable is not set by user, try to locate tool using the code snippet
5465    for ac_prog in comm
5466do
5467  # Extract the first word of "$ac_prog", so it can be a program name with args.
5468set dummy $ac_prog; ac_word=$2
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5470$as_echo_n "checking for $ac_word... " >&6; }
5471if ${ac_cv_path_COMM+:} false; then :
5472  $as_echo_n "(cached) " >&6
5473else
5474  case $COMM in
5475  [\\/]* | ?:[\\/]*)
5476  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5477  ;;
5478  *)
5479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480for as_dir in $PATH
5481do
5482  IFS=$as_save_IFS
5483  test -z "$as_dir" && as_dir=.
5484    for ac_exec_ext in '' $ac_executable_extensions; do
5485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5486    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5488    break 2
5489  fi
5490done
5491  done
5492IFS=$as_save_IFS
5493
5494  ;;
5495esac
5496fi
5497COMM=$ac_cv_path_COMM
5498if test -n "$COMM"; then
5499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5500$as_echo "$COMM" >&6; }
5501else
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503$as_echo "no" >&6; }
5504fi
5505
5506
5507  test -n "$COMM" && break
5508done
5509
5510  else
5511    # The variable is set, but is it from the command line or the environment?
5512
5513    # Try to remove the string !COMM! from our list.
5514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5516      # If it failed, the variable was not from the command line. Ignore it,
5517      # but warn the user (except for BASH, which is always set by the calling BASH).
5518      if test "xCOMM" != xBASH; then
5519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5520$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5521      fi
5522      # Try to locate tool using the code snippet
5523      for ac_prog in comm
5524do
5525  # Extract the first word of "$ac_prog", so it can be a program name with args.
5526set dummy $ac_prog; ac_word=$2
5527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5528$as_echo_n "checking for $ac_word... " >&6; }
5529if ${ac_cv_path_COMM+:} false; then :
5530  $as_echo_n "(cached) " >&6
5531else
5532  case $COMM in
5533  [\\/]* | ?:[\\/]*)
5534  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5535  ;;
5536  *)
5537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538for as_dir in $PATH
5539do
5540  IFS=$as_save_IFS
5541  test -z "$as_dir" && as_dir=.
5542    for ac_exec_ext in '' $ac_executable_extensions; do
5543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5544    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546    break 2
5547  fi
5548done
5549  done
5550IFS=$as_save_IFS
5551
5552  ;;
5553esac
5554fi
5555COMM=$ac_cv_path_COMM
5556if test -n "$COMM"; then
5557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5558$as_echo "$COMM" >&6; }
5559else
5560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
5562fi
5563
5564
5565  test -n "$COMM" && break
5566done
5567
5568    else
5569      # If it succeeded, then it was overridden by the user. We will use it
5570      # for the tool.
5571
5572      # First remove it from the list of overridden variables, so we can test
5573      # for unknown variables in the end.
5574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5575
5576      # Check if the provided tool contains a complete path.
5577      tool_specified="$COMM"
5578      tool_basename="${tool_specified##*/}"
5579      if test "x$tool_basename" = "x$tool_specified"; then
5580        # A command without a complete path is provided, search $PATH.
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5582$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5583        # Extract the first word of "$tool_basename", so it can be a program name with args.
5584set dummy $tool_basename; ac_word=$2
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586$as_echo_n "checking for $ac_word... " >&6; }
5587if ${ac_cv_path_COMM+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  case $COMM in
5591  [\\/]* | ?:[\\/]*)
5592  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5593  ;;
5594  *)
5595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598  IFS=$as_save_IFS
5599  test -z "$as_dir" && as_dir=.
5600    for ac_exec_ext in '' $ac_executable_extensions; do
5601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604    break 2
5605  fi
5606done
5607  done
5608IFS=$as_save_IFS
5609
5610  ;;
5611esac
5612fi
5613COMM=$ac_cv_path_COMM
5614if test -n "$COMM"; then
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5616$as_echo "$COMM" >&6; }
5617else
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623        if test "x$COMM" = x; then
5624          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625        fi
5626      else
5627        # Otherwise we believe it is a complete path. Use it as it is.
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5629$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5631$as_echo_n "checking for COMM... " >&6; }
5632        if test ! -x "$tool_specified"; then
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634$as_echo "not found" >&6; }
5635          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5636        fi
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638$as_echo "$tool_specified" >&6; }
5639      fi
5640    fi
5641  fi
5642
5643
5644
5645  if test "x$COMM" = x; then
5646    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5647  fi
5648
5649
5650
5651
5652
5653  # Publish this variable in the help.
5654
5655
5656  if test "x$CP" = x; then
5657    # The variable is not set by user, try to locate tool using the code snippet
5658    for ac_prog in cp
5659do
5660  # Extract the first word of "$ac_prog", so it can be a program name with args.
5661set dummy $ac_prog; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_CP+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $CP in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690CP=$ac_cv_path_CP
5691if test -n "$CP"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5693$as_echo "$CP" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700  test -n "$CP" && break
5701done
5702
5703  else
5704    # The variable is set, but is it from the command line or the environment?
5705
5706    # Try to remove the string !CP! from our list.
5707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5709      # If it failed, the variable was not from the command line. Ignore it,
5710      # but warn the user (except for BASH, which is always set by the calling BASH).
5711      if test "xCP" != xBASH; then
5712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5713$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5714      fi
5715      # Try to locate tool using the code snippet
5716      for ac_prog in cp
5717do
5718  # Extract the first word of "$ac_prog", so it can be a program name with args.
5719set dummy $ac_prog; ac_word=$2
5720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5721$as_echo_n "checking for $ac_word... " >&6; }
5722if ${ac_cv_path_CP+:} false; then :
5723  $as_echo_n "(cached) " >&6
5724else
5725  case $CP in
5726  [\\/]* | ?:[\\/]*)
5727  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5728  ;;
5729  *)
5730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5731for as_dir in $PATH
5732do
5733  IFS=$as_save_IFS
5734  test -z "$as_dir" && as_dir=.
5735    for ac_exec_ext in '' $ac_executable_extensions; do
5736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5737    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5739    break 2
5740  fi
5741done
5742  done
5743IFS=$as_save_IFS
5744
5745  ;;
5746esac
5747fi
5748CP=$ac_cv_path_CP
5749if test -n "$CP"; then
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5751$as_echo "$CP" >&6; }
5752else
5753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5754$as_echo "no" >&6; }
5755fi
5756
5757
5758  test -n "$CP" && break
5759done
5760
5761    else
5762      # If it succeeded, then it was overridden by the user. We will use it
5763      # for the tool.
5764
5765      # First remove it from the list of overridden variables, so we can test
5766      # for unknown variables in the end.
5767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5768
5769      # Check if the provided tool contains a complete path.
5770      tool_specified="$CP"
5771      tool_basename="${tool_specified##*/}"
5772      if test "x$tool_basename" = "x$tool_specified"; then
5773        # A command without a complete path is provided, search $PATH.
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5775$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5776        # Extract the first word of "$tool_basename", so it can be a program name with args.
5777set dummy $tool_basename; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CP+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CP in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CP=$ac_cv_path_CP
5807if test -n "$CP"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5809$as_echo "$CP" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816        if test "x$CP" = x; then
5817          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5818        fi
5819      else
5820        # Otherwise we believe it is a complete path. Use it as it is.
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5822$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5824$as_echo_n "checking for CP... " >&6; }
5825        if test ! -x "$tool_specified"; then
5826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5827$as_echo "not found" >&6; }
5828          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5829        fi
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5831$as_echo "$tool_specified" >&6; }
5832      fi
5833    fi
5834  fi
5835
5836
5837
5838  if test "x$CP" = x; then
5839    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if test "x$CUT" = x; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in cut
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CUT+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CUT in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CUT=$ac_cv_path_CUT
5884if test -n "$CUT"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5886$as_echo "$CUT" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CUT" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CUT! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCUT" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in cut
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CUT+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CUT in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CUT=$ac_cv_path_CUT
5942if test -n "$CUT"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5944$as_echo "$CUT" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CUT" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if the provided tool contains a complete path.
5963      tool_specified="$CUT"
5964      tool_basename="${tool_specified##*/}"
5965      if test "x$tool_basename" = "x$tool_specified"; then
5966        # A command without a complete path is provided, search $PATH.
5967        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5968$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5969        # Extract the first word of "$tool_basename", so it can be a program name with args.
5970set dummy $tool_basename; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CUT+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CUT in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CUT=$ac_cv_path_CUT
6000if test -n "$CUT"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6002$as_echo "$CUT" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009        if test "x$CUT" = x; then
6010          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011        fi
6012      else
6013        # Otherwise we believe it is a complete path. Use it as it is.
6014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6015$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6017$as_echo_n "checking for CUT... " >&6; }
6018        if test ! -x "$tool_specified"; then
6019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020$as_echo "not found" >&6; }
6021          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6022        fi
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024$as_echo "$tool_specified" >&6; }
6025      fi
6026    fi
6027  fi
6028
6029
6030
6031  if test "x$CUT" = x; then
6032    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6033  fi
6034
6035
6036
6037
6038
6039  # Publish this variable in the help.
6040
6041
6042  if test "x$DATE" = x; then
6043    # The variable is not set by user, try to locate tool using the code snippet
6044    for ac_prog in date
6045do
6046  # Extract the first word of "$ac_prog", so it can be a program name with args.
6047set dummy $ac_prog; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_path_DATE+:} false; then :
6051  $as_echo_n "(cached) " >&6
6052else
6053  case $DATE in
6054  [\\/]* | ?:[\\/]*)
6055  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6056  ;;
6057  *)
6058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059for as_dir in $PATH
6060do
6061  IFS=$as_save_IFS
6062  test -z "$as_dir" && as_dir=.
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6065    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067    break 2
6068  fi
6069done
6070  done
6071IFS=$as_save_IFS
6072
6073  ;;
6074esac
6075fi
6076DATE=$ac_cv_path_DATE
6077if test -n "$DATE"; then
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6079$as_echo "$DATE" >&6; }
6080else
6081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086  test -n "$DATE" && break
6087done
6088
6089  else
6090    # The variable is set, but is it from the command line or the environment?
6091
6092    # Try to remove the string !DATE! from our list.
6093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6095      # If it failed, the variable was not from the command line. Ignore it,
6096      # but warn the user (except for BASH, which is always set by the calling BASH).
6097      if test "xDATE" != xBASH; then
6098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6099$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6100      fi
6101      # Try to locate tool using the code snippet
6102      for ac_prog in date
6103do
6104  # Extract the first word of "$ac_prog", so it can be a program name with args.
6105set dummy $ac_prog; ac_word=$2
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
6108if ${ac_cv_path_DATE+:} false; then :
6109  $as_echo_n "(cached) " >&6
6110else
6111  case $DATE in
6112  [\\/]* | ?:[\\/]*)
6113  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6114  ;;
6115  *)
6116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117for as_dir in $PATH
6118do
6119  IFS=$as_save_IFS
6120  test -z "$as_dir" && as_dir=.
6121    for ac_exec_ext in '' $ac_executable_extensions; do
6122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125    break 2
6126  fi
6127done
6128  done
6129IFS=$as_save_IFS
6130
6131  ;;
6132esac
6133fi
6134DATE=$ac_cv_path_DATE
6135if test -n "$DATE"; then
6136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6137$as_echo "$DATE" >&6; }
6138else
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140$as_echo "no" >&6; }
6141fi
6142
6143
6144  test -n "$DATE" && break
6145done
6146
6147    else
6148      # If it succeeded, then it was overridden by the user. We will use it
6149      # for the tool.
6150
6151      # First remove it from the list of overridden variables, so we can test
6152      # for unknown variables in the end.
6153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6154
6155      # Check if the provided tool contains a complete path.
6156      tool_specified="$DATE"
6157      tool_basename="${tool_specified##*/}"
6158      if test "x$tool_basename" = "x$tool_specified"; then
6159        # A command without a complete path is provided, search $PATH.
6160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6161$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6162        # Extract the first word of "$tool_basename", so it can be a program name with args.
6163set dummy $tool_basename; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_path_DATE+:} false; then :
6167  $as_echo_n "(cached) " >&6
6168else
6169  case $DATE in
6170  [\\/]* | ?:[\\/]*)
6171  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6172  ;;
6173  *)
6174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175for as_dir in $PATH
6176do
6177  IFS=$as_save_IFS
6178  test -z "$as_dir" && as_dir=.
6179    for ac_exec_ext in '' $ac_executable_extensions; do
6180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6181    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6183    break 2
6184  fi
6185done
6186  done
6187IFS=$as_save_IFS
6188
6189  ;;
6190esac
6191fi
6192DATE=$ac_cv_path_DATE
6193if test -n "$DATE"; then
6194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6195$as_echo "$DATE" >&6; }
6196else
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
6199fi
6200
6201
6202        if test "x$DATE" = x; then
6203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6204        fi
6205      else
6206        # Otherwise we believe it is a complete path. Use it as it is.
6207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6208$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6210$as_echo_n "checking for DATE... " >&6; }
6211        if test ! -x "$tool_specified"; then
6212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6213$as_echo "not found" >&6; }
6214          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6215        fi
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6217$as_echo "$tool_specified" >&6; }
6218      fi
6219    fi
6220  fi
6221
6222
6223
6224  if test "x$DATE" = x; then
6225    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6226  fi
6227
6228
6229
6230
6231
6232  # Publish this variable in the help.
6233
6234
6235  if test "x$DIFF" = x; then
6236    # The variable is not set by user, try to locate tool using the code snippet
6237    for ac_prog in gdiff diff
6238do
6239  # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_path_DIFF+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246  case $DIFF in
6247  [\\/]* | ?:[\\/]*)
6248  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6249  ;;
6250  *)
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260    break 2
6261  fi
6262done
6263  done
6264IFS=$as_save_IFS
6265
6266  ;;
6267esac
6268fi
6269DIFF=$ac_cv_path_DIFF
6270if test -n "$DIFF"; then
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6272$as_echo "$DIFF" >&6; }
6273else
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279  test -n "$DIFF" && break
6280done
6281
6282  else
6283    # The variable is set, but is it from the command line or the environment?
6284
6285    # Try to remove the string !DIFF! from our list.
6286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288      # If it failed, the variable was not from the command line. Ignore it,
6289      # but warn the user (except for BASH, which is always set by the calling BASH).
6290      if test "xDIFF" != xBASH; then
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6292$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6293      fi
6294      # Try to locate tool using the code snippet
6295      for ac_prog in gdiff diff
6296do
6297  # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_path_DIFF+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  case $DIFF in
6305  [\\/]* | ?:[\\/]*)
6306  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6307  ;;
6308  *)
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_exec_ext in '' $ac_executable_extensions; do
6315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318    break 2
6319  fi
6320done
6321  done
6322IFS=$as_save_IFS
6323
6324  ;;
6325esac
6326fi
6327DIFF=$ac_cv_path_DIFF
6328if test -n "$DIFF"; then
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6330$as_echo "$DIFF" >&6; }
6331else
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
6337  test -n "$DIFF" && break
6338done
6339
6340    else
6341      # If it succeeded, then it was overridden by the user. We will use it
6342      # for the tool.
6343
6344      # First remove it from the list of overridden variables, so we can test
6345      # for unknown variables in the end.
6346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348      # Check if the provided tool contains a complete path.
6349      tool_specified="$DIFF"
6350      tool_basename="${tool_specified##*/}"
6351      if test "x$tool_basename" = "x$tool_specified"; then
6352        # A command without a complete path is provided, search $PATH.
6353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6354$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6355        # Extract the first word of "$tool_basename", so it can be a program name with args.
6356set dummy $tool_basename; ac_word=$2
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6358$as_echo_n "checking for $ac_word... " >&6; }
6359if ${ac_cv_path_DIFF+:} false; then :
6360  $as_echo_n "(cached) " >&6
6361else
6362  case $DIFF in
6363  [\\/]* | ?:[\\/]*)
6364  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6365  ;;
6366  *)
6367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368for as_dir in $PATH
6369do
6370  IFS=$as_save_IFS
6371  test -z "$as_dir" && as_dir=.
6372    for ac_exec_ext in '' $ac_executable_extensions; do
6373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6374    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376    break 2
6377  fi
6378done
6379  done
6380IFS=$as_save_IFS
6381
6382  ;;
6383esac
6384fi
6385DIFF=$ac_cv_path_DIFF
6386if test -n "$DIFF"; then
6387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6388$as_echo "$DIFF" >&6; }
6389else
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394
6395        if test "x$DIFF" = x; then
6396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6397        fi
6398      else
6399        # Otherwise we believe it is a complete path. Use it as it is.
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6401$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6403$as_echo_n "checking for DIFF... " >&6; }
6404        if test ! -x "$tool_specified"; then
6405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6406$as_echo "not found" >&6; }
6407          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6408        fi
6409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6410$as_echo "$tool_specified" >&6; }
6411      fi
6412    fi
6413  fi
6414
6415
6416
6417  if test "x$DIFF" = x; then
6418    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6419  fi
6420
6421
6422
6423
6424
6425  # Publish this variable in the help.
6426
6427
6428  if test "x$DIRNAME" = x; then
6429    # The variable is not set by user, try to locate tool using the code snippet
6430    for ac_prog in dirname
6431do
6432  # Extract the first word of "$ac_prog", so it can be a program name with args.
6433set dummy $ac_prog; ac_word=$2
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435$as_echo_n "checking for $ac_word... " >&6; }
6436if ${ac_cv_path_DIRNAME+:} false; then :
6437  $as_echo_n "(cached) " >&6
6438else
6439  case $DIRNAME in
6440  [\\/]* | ?:[\\/]*)
6441  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6442  ;;
6443  *)
6444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6445for as_dir in $PATH
6446do
6447  IFS=$as_save_IFS
6448  test -z "$as_dir" && as_dir=.
6449    for ac_exec_ext in '' $ac_executable_extensions; do
6450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6451    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6453    break 2
6454  fi
6455done
6456  done
6457IFS=$as_save_IFS
6458
6459  ;;
6460esac
6461fi
6462DIRNAME=$ac_cv_path_DIRNAME
6463if test -n "$DIRNAME"; then
6464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6465$as_echo "$DIRNAME" >&6; }
6466else
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
6469fi
6470
6471
6472  test -n "$DIRNAME" && break
6473done
6474
6475  else
6476    # The variable is set, but is it from the command line or the environment?
6477
6478    # Try to remove the string !DIRNAME! from our list.
6479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6481      # If it failed, the variable was not from the command line. Ignore it,
6482      # but warn the user (except for BASH, which is always set by the calling BASH).
6483      if test "xDIRNAME" != xBASH; then
6484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6485$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6486      fi
6487      # Try to locate tool using the code snippet
6488      for ac_prog in dirname
6489do
6490  # Extract the first word of "$ac_prog", so it can be a program name with args.
6491set dummy $ac_prog; ac_word=$2
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493$as_echo_n "checking for $ac_word... " >&6; }
6494if ${ac_cv_path_DIRNAME+:} false; then :
6495  $as_echo_n "(cached) " >&6
6496else
6497  case $DIRNAME in
6498  [\\/]* | ?:[\\/]*)
6499  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6500  ;;
6501  *)
6502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503for as_dir in $PATH
6504do
6505  IFS=$as_save_IFS
6506  test -z "$as_dir" && as_dir=.
6507    for ac_exec_ext in '' $ac_executable_extensions; do
6508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511    break 2
6512  fi
6513done
6514  done
6515IFS=$as_save_IFS
6516
6517  ;;
6518esac
6519fi
6520DIRNAME=$ac_cv_path_DIRNAME
6521if test -n "$DIRNAME"; then
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6523$as_echo "$DIRNAME" >&6; }
6524else
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529
6530  test -n "$DIRNAME" && break
6531done
6532
6533    else
6534      # If it succeeded, then it was overridden by the user. We will use it
6535      # for the tool.
6536
6537      # First remove it from the list of overridden variables, so we can test
6538      # for unknown variables in the end.
6539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6540
6541      # Check if the provided tool contains a complete path.
6542      tool_specified="$DIRNAME"
6543      tool_basename="${tool_specified##*/}"
6544      if test "x$tool_basename" = "x$tool_specified"; then
6545        # A command without a complete path is provided, search $PATH.
6546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6547$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6548        # Extract the first word of "$tool_basename", so it can be a program name with args.
6549set dummy $tool_basename; ac_word=$2
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551$as_echo_n "checking for $ac_word... " >&6; }
6552if ${ac_cv_path_DIRNAME+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  case $DIRNAME in
6556  [\\/]* | ?:[\\/]*)
6557  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6558  ;;
6559  *)
6560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563  IFS=$as_save_IFS
6564  test -z "$as_dir" && as_dir=.
6565    for ac_exec_ext in '' $ac_executable_extensions; do
6566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569    break 2
6570  fi
6571done
6572  done
6573IFS=$as_save_IFS
6574
6575  ;;
6576esac
6577fi
6578DIRNAME=$ac_cv_path_DIRNAME
6579if test -n "$DIRNAME"; then
6580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6581$as_echo "$DIRNAME" >&6; }
6582else
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587
6588        if test "x$DIRNAME" = x; then
6589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6590        fi
6591      else
6592        # Otherwise we believe it is a complete path. Use it as it is.
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6594$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6596$as_echo_n "checking for DIRNAME... " >&6; }
6597        if test ! -x "$tool_specified"; then
6598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6599$as_echo "not found" >&6; }
6600          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6601        fi
6602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6603$as_echo "$tool_specified" >&6; }
6604      fi
6605    fi
6606  fi
6607
6608
6609
6610  if test "x$DIRNAME" = x; then
6611    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6612  fi
6613
6614
6615
6616
6617
6618  # Publish this variable in the help.
6619
6620
6621  if test "x$ECHO" = x; then
6622    # The variable is not set by user, try to locate tool using the code snippet
6623    for ac_prog in echo
6624do
6625  # Extract the first word of "$ac_prog", so it can be a program name with args.
6626set dummy $ac_prog; ac_word=$2
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628$as_echo_n "checking for $ac_word... " >&6; }
6629if ${ac_cv_path_ECHO+:} false; then :
6630  $as_echo_n "(cached) " >&6
6631else
6632  case $ECHO in
6633  [\\/]* | ?:[\\/]*)
6634  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6635  ;;
6636  *)
6637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638for as_dir in $PATH
6639do
6640  IFS=$as_save_IFS
6641  test -z "$as_dir" && as_dir=.
6642    for ac_exec_ext in '' $ac_executable_extensions; do
6643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6644    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6646    break 2
6647  fi
6648done
6649  done
6650IFS=$as_save_IFS
6651
6652  ;;
6653esac
6654fi
6655ECHO=$ac_cv_path_ECHO
6656if test -n "$ECHO"; then
6657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6658$as_echo "$ECHO" >&6; }
6659else
6660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661$as_echo "no" >&6; }
6662fi
6663
6664
6665  test -n "$ECHO" && break
6666done
6667
6668  else
6669    # The variable is set, but is it from the command line or the environment?
6670
6671    # Try to remove the string !ECHO! from our list.
6672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6674      # If it failed, the variable was not from the command line. Ignore it,
6675      # but warn the user (except for BASH, which is always set by the calling BASH).
6676      if test "xECHO" != xBASH; then
6677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6678$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6679      fi
6680      # Try to locate tool using the code snippet
6681      for ac_prog in echo
6682do
6683  # Extract the first word of "$ac_prog", so it can be a program name with args.
6684set dummy $ac_prog; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_ECHO+:} false; then :
6688  $as_echo_n "(cached) " >&6
6689else
6690  case $ECHO in
6691  [\\/]* | ?:[\\/]*)
6692  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6693  ;;
6694  *)
6695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in $PATH
6697do
6698  IFS=$as_save_IFS
6699  test -z "$as_dir" && as_dir=.
6700    for ac_exec_ext in '' $ac_executable_extensions; do
6701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704    break 2
6705  fi
6706done
6707  done
6708IFS=$as_save_IFS
6709
6710  ;;
6711esac
6712fi
6713ECHO=$ac_cv_path_ECHO
6714if test -n "$ECHO"; then
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6716$as_echo "$ECHO" >&6; }
6717else
6718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
6723  test -n "$ECHO" && break
6724done
6725
6726    else
6727      # If it succeeded, then it was overridden by the user. We will use it
6728      # for the tool.
6729
6730      # First remove it from the list of overridden variables, so we can test
6731      # for unknown variables in the end.
6732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6733
6734      # Check if the provided tool contains a complete path.
6735      tool_specified="$ECHO"
6736      tool_basename="${tool_specified##*/}"
6737      if test "x$tool_basename" = "x$tool_specified"; then
6738        # A command without a complete path is provided, search $PATH.
6739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6740$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6741        # Extract the first word of "$tool_basename", so it can be a program name with args.
6742set dummy $tool_basename; ac_word=$2
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744$as_echo_n "checking for $ac_word... " >&6; }
6745if ${ac_cv_path_ECHO+:} false; then :
6746  $as_echo_n "(cached) " >&6
6747else
6748  case $ECHO in
6749  [\\/]* | ?:[\\/]*)
6750  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6751  ;;
6752  *)
6753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754for as_dir in $PATH
6755do
6756  IFS=$as_save_IFS
6757  test -z "$as_dir" && as_dir=.
6758    for ac_exec_ext in '' $ac_executable_extensions; do
6759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762    break 2
6763  fi
6764done
6765  done
6766IFS=$as_save_IFS
6767
6768  ;;
6769esac
6770fi
6771ECHO=$ac_cv_path_ECHO
6772if test -n "$ECHO"; then
6773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6774$as_echo "$ECHO" >&6; }
6775else
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
6778fi
6779
6780
6781        if test "x$ECHO" = x; then
6782          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783        fi
6784      else
6785        # Otherwise we believe it is a complete path. Use it as it is.
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6787$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6789$as_echo_n "checking for ECHO... " >&6; }
6790        if test ! -x "$tool_specified"; then
6791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792$as_echo "not found" >&6; }
6793          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6794        fi
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796$as_echo "$tool_specified" >&6; }
6797      fi
6798    fi
6799  fi
6800
6801
6802
6803  if test "x$ECHO" = x; then
6804    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6805  fi
6806
6807
6808
6809
6810
6811  # Publish this variable in the help.
6812
6813
6814  if test "x$EXPR" = x; then
6815    # The variable is not set by user, try to locate tool using the code snippet
6816    for ac_prog in expr
6817do
6818  # Extract the first word of "$ac_prog", so it can be a program name with args.
6819set dummy $ac_prog; ac_word=$2
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821$as_echo_n "checking for $ac_word... " >&6; }
6822if ${ac_cv_path_EXPR+:} false; then :
6823  $as_echo_n "(cached) " >&6
6824else
6825  case $EXPR in
6826  [\\/]* | ?:[\\/]*)
6827  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6828  ;;
6829  *)
6830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6831for as_dir in $PATH
6832do
6833  IFS=$as_save_IFS
6834  test -z "$as_dir" && as_dir=.
6835    for ac_exec_ext in '' $ac_executable_extensions; do
6836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6837    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6839    break 2
6840  fi
6841done
6842  done
6843IFS=$as_save_IFS
6844
6845  ;;
6846esac
6847fi
6848EXPR=$ac_cv_path_EXPR
6849if test -n "$EXPR"; then
6850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6851$as_echo "$EXPR" >&6; }
6852else
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854$as_echo "no" >&6; }
6855fi
6856
6857
6858  test -n "$EXPR" && break
6859done
6860
6861  else
6862    # The variable is set, but is it from the command line or the environment?
6863
6864    # Try to remove the string !EXPR! from our list.
6865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6867      # If it failed, the variable was not from the command line. Ignore it,
6868      # but warn the user (except for BASH, which is always set by the calling BASH).
6869      if test "xEXPR" != xBASH; then
6870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6871$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6872      fi
6873      # Try to locate tool using the code snippet
6874      for ac_prog in expr
6875do
6876  # Extract the first word of "$ac_prog", so it can be a program name with args.
6877set dummy $ac_prog; ac_word=$2
6878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6879$as_echo_n "checking for $ac_word... " >&6; }
6880if ${ac_cv_path_EXPR+:} false; then :
6881  $as_echo_n "(cached) " >&6
6882else
6883  case $EXPR in
6884  [\\/]* | ?:[\\/]*)
6885  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6886  ;;
6887  *)
6888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6889for as_dir in $PATH
6890do
6891  IFS=$as_save_IFS
6892  test -z "$as_dir" && as_dir=.
6893    for ac_exec_ext in '' $ac_executable_extensions; do
6894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6895    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6897    break 2
6898  fi
6899done
6900  done
6901IFS=$as_save_IFS
6902
6903  ;;
6904esac
6905fi
6906EXPR=$ac_cv_path_EXPR
6907if test -n "$EXPR"; then
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6909$as_echo "$EXPR" >&6; }
6910else
6911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6912$as_echo "no" >&6; }
6913fi
6914
6915
6916  test -n "$EXPR" && break
6917done
6918
6919    else
6920      # If it succeeded, then it was overridden by the user. We will use it
6921      # for the tool.
6922
6923      # First remove it from the list of overridden variables, so we can test
6924      # for unknown variables in the end.
6925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6926
6927      # Check if the provided tool contains a complete path.
6928      tool_specified="$EXPR"
6929      tool_basename="${tool_specified##*/}"
6930      if test "x$tool_basename" = "x$tool_specified"; then
6931        # A command without a complete path is provided, search $PATH.
6932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6933$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6934        # Extract the first word of "$tool_basename", so it can be a program name with args.
6935set dummy $tool_basename; ac_word=$2
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6937$as_echo_n "checking for $ac_word... " >&6; }
6938if ${ac_cv_path_EXPR+:} false; then :
6939  $as_echo_n "(cached) " >&6
6940else
6941  case $EXPR in
6942  [\\/]* | ?:[\\/]*)
6943  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6944  ;;
6945  *)
6946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6947for as_dir in $PATH
6948do
6949  IFS=$as_save_IFS
6950  test -z "$as_dir" && as_dir=.
6951    for ac_exec_ext in '' $ac_executable_extensions; do
6952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6953    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6955    break 2
6956  fi
6957done
6958  done
6959IFS=$as_save_IFS
6960
6961  ;;
6962esac
6963fi
6964EXPR=$ac_cv_path_EXPR
6965if test -n "$EXPR"; then
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6967$as_echo "$EXPR" >&6; }
6968else
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6970$as_echo "no" >&6; }
6971fi
6972
6973
6974        if test "x$EXPR" = x; then
6975          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6976        fi
6977      else
6978        # Otherwise we believe it is a complete path. Use it as it is.
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6980$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6982$as_echo_n "checking for EXPR... " >&6; }
6983        if test ! -x "$tool_specified"; then
6984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6985$as_echo "not found" >&6; }
6986          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6987        fi
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6989$as_echo "$tool_specified" >&6; }
6990      fi
6991    fi
6992  fi
6993
6994
6995
6996  if test "x$EXPR" = x; then
6997    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6998  fi
6999
7000
7001
7002
7003
7004  # Publish this variable in the help.
7005
7006
7007  if test "x$FILE" = x; then
7008    # The variable is not set by user, try to locate tool using the code snippet
7009    for ac_prog in file
7010do
7011  # Extract the first word of "$ac_prog", so it can be a program name with args.
7012set dummy $ac_prog; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if ${ac_cv_path_FILE+:} false; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $FILE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041FILE=$ac_cv_path_FILE
7042if test -n "$FILE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7044$as_echo "$FILE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051  test -n "$FILE" && break
7052done
7053
7054  else
7055    # The variable is set, but is it from the command line or the environment?
7056
7057    # Try to remove the string !FILE! from our list.
7058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7060      # If it failed, the variable was not from the command line. Ignore it,
7061      # but warn the user (except for BASH, which is always set by the calling BASH).
7062      if test "xFILE" != xBASH; then
7063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7064$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7065      fi
7066      # Try to locate tool using the code snippet
7067      for ac_prog in file
7068do
7069  # Extract the first word of "$ac_prog", so it can be a program name with args.
7070set dummy $ac_prog; ac_word=$2
7071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7072$as_echo_n "checking for $ac_word... " >&6; }
7073if ${ac_cv_path_FILE+:} false; then :
7074  $as_echo_n "(cached) " >&6
7075else
7076  case $FILE in
7077  [\\/]* | ?:[\\/]*)
7078  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7079  ;;
7080  *)
7081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082for as_dir in $PATH
7083do
7084  IFS=$as_save_IFS
7085  test -z "$as_dir" && as_dir=.
7086    for ac_exec_ext in '' $ac_executable_extensions; do
7087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7088    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7090    break 2
7091  fi
7092done
7093  done
7094IFS=$as_save_IFS
7095
7096  ;;
7097esac
7098fi
7099FILE=$ac_cv_path_FILE
7100if test -n "$FILE"; then
7101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7102$as_echo "$FILE" >&6; }
7103else
7104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105$as_echo "no" >&6; }
7106fi
7107
7108
7109  test -n "$FILE" && break
7110done
7111
7112    else
7113      # If it succeeded, then it was overridden by the user. We will use it
7114      # for the tool.
7115
7116      # First remove it from the list of overridden variables, so we can test
7117      # for unknown variables in the end.
7118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7119
7120      # Check if the provided tool contains a complete path.
7121      tool_specified="$FILE"
7122      tool_basename="${tool_specified##*/}"
7123      if test "x$tool_basename" = "x$tool_specified"; then
7124        # A command without a complete path is provided, search $PATH.
7125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7126$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7127        # Extract the first word of "$tool_basename", so it can be a program name with args.
7128set dummy $tool_basename; ac_word=$2
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130$as_echo_n "checking for $ac_word... " >&6; }
7131if ${ac_cv_path_FILE+:} false; then :
7132  $as_echo_n "(cached) " >&6
7133else
7134  case $FILE in
7135  [\\/]* | ?:[\\/]*)
7136  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7137  ;;
7138  *)
7139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  test -z "$as_dir" && as_dir=.
7144    for ac_exec_ext in '' $ac_executable_extensions; do
7145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148    break 2
7149  fi
7150done
7151  done
7152IFS=$as_save_IFS
7153
7154  ;;
7155esac
7156fi
7157FILE=$ac_cv_path_FILE
7158if test -n "$FILE"; then
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7160$as_echo "$FILE" >&6; }
7161else
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
7164fi
7165
7166
7167        if test "x$FILE" = x; then
7168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169        fi
7170      else
7171        # Otherwise we believe it is a complete path. Use it as it is.
7172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7173$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7175$as_echo_n "checking for FILE... " >&6; }
7176        if test ! -x "$tool_specified"; then
7177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178$as_echo "not found" >&6; }
7179          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7180        fi
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182$as_echo "$tool_specified" >&6; }
7183      fi
7184    fi
7185  fi
7186
7187
7188
7189  if test "x$FILE" = x; then
7190    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if test "x$FIND" = x; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in find
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_FIND+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $FIND in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234FIND=$ac_cv_path_FIND
7235if test -n "$FIND"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7237$as_echo "$FIND" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$FIND" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !FIND! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xFIND" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in find
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_FIND+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $FIND in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292FIND=$ac_cv_path_FIND
7293if test -n "$FIND"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7295$as_echo "$FIND" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$FIND" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if the provided tool contains a complete path.
7314      tool_specified="$FIND"
7315      tool_basename="${tool_specified##*/}"
7316      if test "x$tool_basename" = "x$tool_specified"; then
7317        # A command without a complete path is provided, search $PATH.
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7319$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7320        # Extract the first word of "$tool_basename", so it can be a program name with args.
7321set dummy $tool_basename; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_FIND+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $FIND in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350FIND=$ac_cv_path_FIND
7351if test -n "$FIND"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7353$as_echo "$FIND" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360        if test "x$FIND" = x; then
7361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7362        fi
7363      else
7364        # Otherwise we believe it is a complete path. Use it as it is.
7365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7366$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7368$as_echo_n "checking for FIND... " >&6; }
7369        if test ! -x "$tool_specified"; then
7370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7371$as_echo "not found" >&6; }
7372          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7373        fi
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7375$as_echo "$tool_specified" >&6; }
7376      fi
7377    fi
7378  fi
7379
7380
7381
7382  if test "x$FIND" = x; then
7383    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7384  fi
7385
7386
7387
7388
7389
7390  # Publish this variable in the help.
7391
7392
7393  if test "x$HEAD" = x; then
7394    # The variable is not set by user, try to locate tool using the code snippet
7395    for ac_prog in head
7396do
7397  # Extract the first word of "$ac_prog", so it can be a program name with args.
7398set dummy $ac_prog; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_HEAD+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $HEAD in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427HEAD=$ac_cv_path_HEAD
7428if test -n "$HEAD"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7430$as_echo "$HEAD" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437  test -n "$HEAD" && break
7438done
7439
7440  else
7441    # The variable is set, but is it from the command line or the environment?
7442
7443    # Try to remove the string !HEAD! from our list.
7444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7446      # If it failed, the variable was not from the command line. Ignore it,
7447      # but warn the user (except for BASH, which is always set by the calling BASH).
7448      if test "xHEAD" != xBASH; then
7449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7450$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7451      fi
7452      # Try to locate tool using the code snippet
7453      for ac_prog in head
7454do
7455  # Extract the first word of "$ac_prog", so it can be a program name with args.
7456set dummy $ac_prog; ac_word=$2
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7458$as_echo_n "checking for $ac_word... " >&6; }
7459if ${ac_cv_path_HEAD+:} false; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  case $HEAD in
7463  [\\/]* | ?:[\\/]*)
7464  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7465  ;;
7466  *)
7467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468for as_dir in $PATH
7469do
7470  IFS=$as_save_IFS
7471  test -z "$as_dir" && as_dir=.
7472    for ac_exec_ext in '' $ac_executable_extensions; do
7473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7474    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7476    break 2
7477  fi
7478done
7479  done
7480IFS=$as_save_IFS
7481
7482  ;;
7483esac
7484fi
7485HEAD=$ac_cv_path_HEAD
7486if test -n "$HEAD"; then
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7488$as_echo "$HEAD" >&6; }
7489else
7490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
7492fi
7493
7494
7495  test -n "$HEAD" && break
7496done
7497
7498    else
7499      # If it succeeded, then it was overridden by the user. We will use it
7500      # for the tool.
7501
7502      # First remove it from the list of overridden variables, so we can test
7503      # for unknown variables in the end.
7504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7505
7506      # Check if the provided tool contains a complete path.
7507      tool_specified="$HEAD"
7508      tool_basename="${tool_specified##*/}"
7509      if test "x$tool_basename" = "x$tool_specified"; then
7510        # A command without a complete path is provided, search $PATH.
7511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7512$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7513        # Extract the first word of "$tool_basename", so it can be a program name with args.
7514set dummy $tool_basename; ac_word=$2
7515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7516$as_echo_n "checking for $ac_word... " >&6; }
7517if ${ac_cv_path_HEAD+:} false; then :
7518  $as_echo_n "(cached) " >&6
7519else
7520  case $HEAD in
7521  [\\/]* | ?:[\\/]*)
7522  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7523  ;;
7524  *)
7525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526for as_dir in $PATH
7527do
7528  IFS=$as_save_IFS
7529  test -z "$as_dir" && as_dir=.
7530    for ac_exec_ext in '' $ac_executable_extensions; do
7531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7532    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7534    break 2
7535  fi
7536done
7537  done
7538IFS=$as_save_IFS
7539
7540  ;;
7541esac
7542fi
7543HEAD=$ac_cv_path_HEAD
7544if test -n "$HEAD"; then
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7546$as_echo "$HEAD" >&6; }
7547else
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549$as_echo "no" >&6; }
7550fi
7551
7552
7553        if test "x$HEAD" = x; then
7554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7555        fi
7556      else
7557        # Otherwise we believe it is a complete path. Use it as it is.
7558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7559$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7561$as_echo_n "checking for HEAD... " >&6; }
7562        if test ! -x "$tool_specified"; then
7563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7564$as_echo "not found" >&6; }
7565          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7566        fi
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7568$as_echo "$tool_specified" >&6; }
7569      fi
7570    fi
7571  fi
7572
7573
7574
7575  if test "x$HEAD" = x; then
7576    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7577  fi
7578
7579
7580
7581
7582
7583  # Publish this variable in the help.
7584
7585
7586  if test "x$LN" = x; then
7587    # The variable is not set by user, try to locate tool using the code snippet
7588    for ac_prog in ln
7589do
7590  # Extract the first word of "$ac_prog", so it can be a program name with args.
7591set dummy $ac_prog; ac_word=$2
7592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7593$as_echo_n "checking for $ac_word... " >&6; }
7594if ${ac_cv_path_LN+:} false; then :
7595  $as_echo_n "(cached) " >&6
7596else
7597  case $LN in
7598  [\\/]* | ?:[\\/]*)
7599  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7600  ;;
7601  *)
7602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603for as_dir in $PATH
7604do
7605  IFS=$as_save_IFS
7606  test -z "$as_dir" && as_dir=.
7607    for ac_exec_ext in '' $ac_executable_extensions; do
7608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611    break 2
7612  fi
7613done
7614  done
7615IFS=$as_save_IFS
7616
7617  ;;
7618esac
7619fi
7620LN=$ac_cv_path_LN
7621if test -n "$LN"; then
7622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7623$as_echo "$LN" >&6; }
7624else
7625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626$as_echo "no" >&6; }
7627fi
7628
7629
7630  test -n "$LN" && break
7631done
7632
7633  else
7634    # The variable is set, but is it from the command line or the environment?
7635
7636    # Try to remove the string !LN! from our list.
7637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7639      # If it failed, the variable was not from the command line. Ignore it,
7640      # but warn the user (except for BASH, which is always set by the calling BASH).
7641      if test "xLN" != xBASH; then
7642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7643$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7644      fi
7645      # Try to locate tool using the code snippet
7646      for ac_prog in ln
7647do
7648  # Extract the first word of "$ac_prog", so it can be a program name with args.
7649set dummy $ac_prog; ac_word=$2
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7651$as_echo_n "checking for $ac_word... " >&6; }
7652if ${ac_cv_path_LN+:} false; then :
7653  $as_echo_n "(cached) " >&6
7654else
7655  case $LN in
7656  [\\/]* | ?:[\\/]*)
7657  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7658  ;;
7659  *)
7660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661for as_dir in $PATH
7662do
7663  IFS=$as_save_IFS
7664  test -z "$as_dir" && as_dir=.
7665    for ac_exec_ext in '' $ac_executable_extensions; do
7666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7667    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7669    break 2
7670  fi
7671done
7672  done
7673IFS=$as_save_IFS
7674
7675  ;;
7676esac
7677fi
7678LN=$ac_cv_path_LN
7679if test -n "$LN"; then
7680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7681$as_echo "$LN" >&6; }
7682else
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684$as_echo "no" >&6; }
7685fi
7686
7687
7688  test -n "$LN" && break
7689done
7690
7691    else
7692      # If it succeeded, then it was overridden by the user. We will use it
7693      # for the tool.
7694
7695      # First remove it from the list of overridden variables, so we can test
7696      # for unknown variables in the end.
7697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7698
7699      # Check if the provided tool contains a complete path.
7700      tool_specified="$LN"
7701      tool_basename="${tool_specified##*/}"
7702      if test "x$tool_basename" = "x$tool_specified"; then
7703        # A command without a complete path is provided, search $PATH.
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7705$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7706        # Extract the first word of "$tool_basename", so it can be a program name with args.
7707set dummy $tool_basename; ac_word=$2
7708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7709$as_echo_n "checking for $ac_word... " >&6; }
7710if ${ac_cv_path_LN+:} false; then :
7711  $as_echo_n "(cached) " >&6
7712else
7713  case $LN in
7714  [\\/]* | ?:[\\/]*)
7715  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7716  ;;
7717  *)
7718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719for as_dir in $PATH
7720do
7721  IFS=$as_save_IFS
7722  test -z "$as_dir" && as_dir=.
7723    for ac_exec_ext in '' $ac_executable_extensions; do
7724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7725    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7727    break 2
7728  fi
7729done
7730  done
7731IFS=$as_save_IFS
7732
7733  ;;
7734esac
7735fi
7736LN=$ac_cv_path_LN
7737if test -n "$LN"; then
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7739$as_echo "$LN" >&6; }
7740else
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
7743fi
7744
7745
7746        if test "x$LN" = x; then
7747          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7748        fi
7749      else
7750        # Otherwise we believe it is a complete path. Use it as it is.
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7752$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7754$as_echo_n "checking for LN... " >&6; }
7755        if test ! -x "$tool_specified"; then
7756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7757$as_echo "not found" >&6; }
7758          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7759        fi
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7761$as_echo "$tool_specified" >&6; }
7762      fi
7763    fi
7764  fi
7765
7766
7767
7768  if test "x$LN" = x; then
7769    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7770  fi
7771
7772
7773
7774
7775
7776  # Publish this variable in the help.
7777
7778
7779  if test "x$LS" = x; then
7780    # The variable is not set by user, try to locate tool using the code snippet
7781    for ac_prog in ls
7782do
7783  # Extract the first word of "$ac_prog", so it can be a program name with args.
7784set dummy $ac_prog; ac_word=$2
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7786$as_echo_n "checking for $ac_word... " >&6; }
7787if ${ac_cv_path_LS+:} false; then :
7788  $as_echo_n "(cached) " >&6
7789else
7790  case $LS in
7791  [\\/]* | ?:[\\/]*)
7792  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7793  ;;
7794  *)
7795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796for as_dir in $PATH
7797do
7798  IFS=$as_save_IFS
7799  test -z "$as_dir" && as_dir=.
7800    for ac_exec_ext in '' $ac_executable_extensions; do
7801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7802    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7804    break 2
7805  fi
7806done
7807  done
7808IFS=$as_save_IFS
7809
7810  ;;
7811esac
7812fi
7813LS=$ac_cv_path_LS
7814if test -n "$LS"; then
7815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7816$as_echo "$LS" >&6; }
7817else
7818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819$as_echo "no" >&6; }
7820fi
7821
7822
7823  test -n "$LS" && break
7824done
7825
7826  else
7827    # The variable is set, but is it from the command line or the environment?
7828
7829    # Try to remove the string !LS! from our list.
7830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7832      # If it failed, the variable was not from the command line. Ignore it,
7833      # but warn the user (except for BASH, which is always set by the calling BASH).
7834      if test "xLS" != xBASH; then
7835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7836$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7837      fi
7838      # Try to locate tool using the code snippet
7839      for ac_prog in ls
7840do
7841  # Extract the first word of "$ac_prog", so it can be a program name with args.
7842set dummy $ac_prog; ac_word=$2
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7844$as_echo_n "checking for $ac_word... " >&6; }
7845if ${ac_cv_path_LS+:} false; then :
7846  $as_echo_n "(cached) " >&6
7847else
7848  case $LS in
7849  [\\/]* | ?:[\\/]*)
7850  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7851  ;;
7852  *)
7853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854for as_dir in $PATH
7855do
7856  IFS=$as_save_IFS
7857  test -z "$as_dir" && as_dir=.
7858    for ac_exec_ext in '' $ac_executable_extensions; do
7859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862    break 2
7863  fi
7864done
7865  done
7866IFS=$as_save_IFS
7867
7868  ;;
7869esac
7870fi
7871LS=$ac_cv_path_LS
7872if test -n "$LS"; then
7873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7874$as_echo "$LS" >&6; }
7875else
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7877$as_echo "no" >&6; }
7878fi
7879
7880
7881  test -n "$LS" && break
7882done
7883
7884    else
7885      # If it succeeded, then it was overridden by the user. We will use it
7886      # for the tool.
7887
7888      # First remove it from the list of overridden variables, so we can test
7889      # for unknown variables in the end.
7890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7891
7892      # Check if the provided tool contains a complete path.
7893      tool_specified="$LS"
7894      tool_basename="${tool_specified##*/}"
7895      if test "x$tool_basename" = "x$tool_specified"; then
7896        # A command without a complete path is provided, search $PATH.
7897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7898$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7899        # Extract the first word of "$tool_basename", so it can be a program name with args.
7900set dummy $tool_basename; ac_word=$2
7901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902$as_echo_n "checking for $ac_word... " >&6; }
7903if ${ac_cv_path_LS+:} false; then :
7904  $as_echo_n "(cached) " >&6
7905else
7906  case $LS in
7907  [\\/]* | ?:[\\/]*)
7908  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7909  ;;
7910  *)
7911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912for as_dir in $PATH
7913do
7914  IFS=$as_save_IFS
7915  test -z "$as_dir" && as_dir=.
7916    for ac_exec_ext in '' $ac_executable_extensions; do
7917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920    break 2
7921  fi
7922done
7923  done
7924IFS=$as_save_IFS
7925
7926  ;;
7927esac
7928fi
7929LS=$ac_cv_path_LS
7930if test -n "$LS"; then
7931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7932$as_echo "$LS" >&6; }
7933else
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935$as_echo "no" >&6; }
7936fi
7937
7938
7939        if test "x$LS" = x; then
7940          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7941        fi
7942      else
7943        # Otherwise we believe it is a complete path. Use it as it is.
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7945$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7947$as_echo_n "checking for LS... " >&6; }
7948        if test ! -x "$tool_specified"; then
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7950$as_echo "not found" >&6; }
7951          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7952        fi
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7954$as_echo "$tool_specified" >&6; }
7955      fi
7956    fi
7957  fi
7958
7959
7960
7961  if test "x$LS" = x; then
7962    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7963  fi
7964
7965
7966
7967
7968
7969  # Publish this variable in the help.
7970
7971
7972  if test "x$MKDIR" = x; then
7973    # The variable is not set by user, try to locate tool using the code snippet
7974    for ac_prog in mkdir
7975do
7976  # Extract the first word of "$ac_prog", so it can be a program name with args.
7977set dummy $ac_prog; ac_word=$2
7978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7979$as_echo_n "checking for $ac_word... " >&6; }
7980if ${ac_cv_path_MKDIR+:} false; then :
7981  $as_echo_n "(cached) " >&6
7982else
7983  case $MKDIR in
7984  [\\/]* | ?:[\\/]*)
7985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7986  ;;
7987  *)
7988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989for as_dir in $PATH
7990do
7991  IFS=$as_save_IFS
7992  test -z "$as_dir" && as_dir=.
7993    for ac_exec_ext in '' $ac_executable_extensions; do
7994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7997    break 2
7998  fi
7999done
8000  done
8001IFS=$as_save_IFS
8002
8003  ;;
8004esac
8005fi
8006MKDIR=$ac_cv_path_MKDIR
8007if test -n "$MKDIR"; then
8008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8009$as_echo "$MKDIR" >&6; }
8010else
8011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8012$as_echo "no" >&6; }
8013fi
8014
8015
8016  test -n "$MKDIR" && break
8017done
8018
8019  else
8020    # The variable is set, but is it from the command line or the environment?
8021
8022    # Try to remove the string !MKDIR! from our list.
8023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8025      # If it failed, the variable was not from the command line. Ignore it,
8026      # but warn the user (except for BASH, which is always set by the calling BASH).
8027      if test "xMKDIR" != xBASH; then
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8029$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8030      fi
8031      # Try to locate tool using the code snippet
8032      for ac_prog in mkdir
8033do
8034  # Extract the first word of "$ac_prog", so it can be a program name with args.
8035set dummy $ac_prog; ac_word=$2
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037$as_echo_n "checking for $ac_word... " >&6; }
8038if ${ac_cv_path_MKDIR+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  case $MKDIR in
8042  [\\/]* | ?:[\\/]*)
8043  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8044  ;;
8045  *)
8046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049  IFS=$as_save_IFS
8050  test -z "$as_dir" && as_dir=.
8051    for ac_exec_ext in '' $ac_executable_extensions; do
8052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055    break 2
8056  fi
8057done
8058  done
8059IFS=$as_save_IFS
8060
8061  ;;
8062esac
8063fi
8064MKDIR=$ac_cv_path_MKDIR
8065if test -n "$MKDIR"; then
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8067$as_echo "$MKDIR" >&6; }
8068else
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
8071fi
8072
8073
8074  test -n "$MKDIR" && break
8075done
8076
8077    else
8078      # If it succeeded, then it was overridden by the user. We will use it
8079      # for the tool.
8080
8081      # First remove it from the list of overridden variables, so we can test
8082      # for unknown variables in the end.
8083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8084
8085      # Check if the provided tool contains a complete path.
8086      tool_specified="$MKDIR"
8087      tool_basename="${tool_specified##*/}"
8088      if test "x$tool_basename" = "x$tool_specified"; then
8089        # A command without a complete path is provided, search $PATH.
8090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8091$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8092        # Extract the first word of "$tool_basename", so it can be a program name with args.
8093set dummy $tool_basename; ac_word=$2
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095$as_echo_n "checking for $ac_word... " >&6; }
8096if ${ac_cv_path_MKDIR+:} false; then :
8097  $as_echo_n "(cached) " >&6
8098else
8099  case $MKDIR in
8100  [\\/]* | ?:[\\/]*)
8101  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8102  ;;
8103  *)
8104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105for as_dir in $PATH
8106do
8107  IFS=$as_save_IFS
8108  test -z "$as_dir" && as_dir=.
8109    for ac_exec_ext in '' $ac_executable_extensions; do
8110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8111    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113    break 2
8114  fi
8115done
8116  done
8117IFS=$as_save_IFS
8118
8119  ;;
8120esac
8121fi
8122MKDIR=$ac_cv_path_MKDIR
8123if test -n "$MKDIR"; then
8124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8125$as_echo "$MKDIR" >&6; }
8126else
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
8129fi
8130
8131
8132        if test "x$MKDIR" = x; then
8133          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8134        fi
8135      else
8136        # Otherwise we believe it is a complete path. Use it as it is.
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8138$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8140$as_echo_n "checking for MKDIR... " >&6; }
8141        if test ! -x "$tool_specified"; then
8142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8143$as_echo "not found" >&6; }
8144          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8145        fi
8146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8147$as_echo "$tool_specified" >&6; }
8148      fi
8149    fi
8150  fi
8151
8152
8153
8154  if test "x$MKDIR" = x; then
8155    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8156  fi
8157
8158
8159
8160
8161
8162  # Publish this variable in the help.
8163
8164
8165  if test "x$MKTEMP" = x; then
8166    # The variable is not set by user, try to locate tool using the code snippet
8167    for ac_prog in mktemp
8168do
8169  # Extract the first word of "$ac_prog", so it can be a program name with args.
8170set dummy $ac_prog; ac_word=$2
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172$as_echo_n "checking for $ac_word... " >&6; }
8173if ${ac_cv_path_MKTEMP+:} false; then :
8174  $as_echo_n "(cached) " >&6
8175else
8176  case $MKTEMP in
8177  [\\/]* | ?:[\\/]*)
8178  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8179  ;;
8180  *)
8181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182for as_dir in $PATH
8183do
8184  IFS=$as_save_IFS
8185  test -z "$as_dir" && as_dir=.
8186    for ac_exec_ext in '' $ac_executable_extensions; do
8187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190    break 2
8191  fi
8192done
8193  done
8194IFS=$as_save_IFS
8195
8196  ;;
8197esac
8198fi
8199MKTEMP=$ac_cv_path_MKTEMP
8200if test -n "$MKTEMP"; then
8201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8202$as_echo "$MKTEMP" >&6; }
8203else
8204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205$as_echo "no" >&6; }
8206fi
8207
8208
8209  test -n "$MKTEMP" && break
8210done
8211
8212  else
8213    # The variable is set, but is it from the command line or the environment?
8214
8215    # Try to remove the string !MKTEMP! from our list.
8216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8218      # If it failed, the variable was not from the command line. Ignore it,
8219      # but warn the user (except for BASH, which is always set by the calling BASH).
8220      if test "xMKTEMP" != xBASH; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8222$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8223      fi
8224      # Try to locate tool using the code snippet
8225      for ac_prog in mktemp
8226do
8227  # Extract the first word of "$ac_prog", so it can be a program name with args.
8228set dummy $ac_prog; ac_word=$2
8229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8230$as_echo_n "checking for $ac_word... " >&6; }
8231if ${ac_cv_path_MKTEMP+:} false; then :
8232  $as_echo_n "(cached) " >&6
8233else
8234  case $MKTEMP in
8235  [\\/]* | ?:[\\/]*)
8236  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8237  ;;
8238  *)
8239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8240for as_dir in $PATH
8241do
8242  IFS=$as_save_IFS
8243  test -z "$as_dir" && as_dir=.
8244    for ac_exec_ext in '' $ac_executable_extensions; do
8245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8246    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8248    break 2
8249  fi
8250done
8251  done
8252IFS=$as_save_IFS
8253
8254  ;;
8255esac
8256fi
8257MKTEMP=$ac_cv_path_MKTEMP
8258if test -n "$MKTEMP"; then
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8260$as_echo "$MKTEMP" >&6; }
8261else
8262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263$as_echo "no" >&6; }
8264fi
8265
8266
8267  test -n "$MKTEMP" && break
8268done
8269
8270    else
8271      # If it succeeded, then it was overridden by the user. We will use it
8272      # for the tool.
8273
8274      # First remove it from the list of overridden variables, so we can test
8275      # for unknown variables in the end.
8276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8277
8278      # Check if the provided tool contains a complete path.
8279      tool_specified="$MKTEMP"
8280      tool_basename="${tool_specified##*/}"
8281      if test "x$tool_basename" = "x$tool_specified"; then
8282        # A command without a complete path is provided, search $PATH.
8283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8284$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8285        # Extract the first word of "$tool_basename", so it can be a program name with args.
8286set dummy $tool_basename; ac_word=$2
8287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288$as_echo_n "checking for $ac_word... " >&6; }
8289if ${ac_cv_path_MKTEMP+:} false; then :
8290  $as_echo_n "(cached) " >&6
8291else
8292  case $MKTEMP in
8293  [\\/]* | ?:[\\/]*)
8294  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8295  ;;
8296  *)
8297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298for as_dir in $PATH
8299do
8300  IFS=$as_save_IFS
8301  test -z "$as_dir" && as_dir=.
8302    for ac_exec_ext in '' $ac_executable_extensions; do
8303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8304    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8306    break 2
8307  fi
8308done
8309  done
8310IFS=$as_save_IFS
8311
8312  ;;
8313esac
8314fi
8315MKTEMP=$ac_cv_path_MKTEMP
8316if test -n "$MKTEMP"; then
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8318$as_echo "$MKTEMP" >&6; }
8319else
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8321$as_echo "no" >&6; }
8322fi
8323
8324
8325        if test "x$MKTEMP" = x; then
8326          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8327        fi
8328      else
8329        # Otherwise we believe it is a complete path. Use it as it is.
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8331$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8333$as_echo_n "checking for MKTEMP... " >&6; }
8334        if test ! -x "$tool_specified"; then
8335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8336$as_echo "not found" >&6; }
8337          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8338        fi
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8340$as_echo "$tool_specified" >&6; }
8341      fi
8342    fi
8343  fi
8344
8345
8346
8347  if test "x$MKTEMP" = x; then
8348    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8349  fi
8350
8351
8352
8353
8354
8355  # Publish this variable in the help.
8356
8357
8358  if test "x$MV" = x; then
8359    # The variable is not set by user, try to locate tool using the code snippet
8360    for ac_prog in mv
8361do
8362  # Extract the first word of "$ac_prog", so it can be a program name with args.
8363set dummy $ac_prog; ac_word=$2
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365$as_echo_n "checking for $ac_word... " >&6; }
8366if ${ac_cv_path_MV+:} false; then :
8367  $as_echo_n "(cached) " >&6
8368else
8369  case $MV in
8370  [\\/]* | ?:[\\/]*)
8371  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8372  ;;
8373  *)
8374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375for as_dir in $PATH
8376do
8377  IFS=$as_save_IFS
8378  test -z "$as_dir" && as_dir=.
8379    for ac_exec_ext in '' $ac_executable_extensions; do
8380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8381    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8383    break 2
8384  fi
8385done
8386  done
8387IFS=$as_save_IFS
8388
8389  ;;
8390esac
8391fi
8392MV=$ac_cv_path_MV
8393if test -n "$MV"; then
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8395$as_echo "$MV" >&6; }
8396else
8397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
8399fi
8400
8401
8402  test -n "$MV" && break
8403done
8404
8405  else
8406    # The variable is set, but is it from the command line or the environment?
8407
8408    # Try to remove the string !MV! from our list.
8409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8411      # If it failed, the variable was not from the command line. Ignore it,
8412      # but warn the user (except for BASH, which is always set by the calling BASH).
8413      if test "xMV" != xBASH; then
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8415$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8416      fi
8417      # Try to locate tool using the code snippet
8418      for ac_prog in mv
8419do
8420  # Extract the first word of "$ac_prog", so it can be a program name with args.
8421set dummy $ac_prog; ac_word=$2
8422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8423$as_echo_n "checking for $ac_word... " >&6; }
8424if ${ac_cv_path_MV+:} false; then :
8425  $as_echo_n "(cached) " >&6
8426else
8427  case $MV in
8428  [\\/]* | ?:[\\/]*)
8429  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8430  ;;
8431  *)
8432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433for as_dir in $PATH
8434do
8435  IFS=$as_save_IFS
8436  test -z "$as_dir" && as_dir=.
8437    for ac_exec_ext in '' $ac_executable_extensions; do
8438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441    break 2
8442  fi
8443done
8444  done
8445IFS=$as_save_IFS
8446
8447  ;;
8448esac
8449fi
8450MV=$ac_cv_path_MV
8451if test -n "$MV"; then
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8453$as_echo "$MV" >&6; }
8454else
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456$as_echo "no" >&6; }
8457fi
8458
8459
8460  test -n "$MV" && break
8461done
8462
8463    else
8464      # If it succeeded, then it was overridden by the user. We will use it
8465      # for the tool.
8466
8467      # First remove it from the list of overridden variables, so we can test
8468      # for unknown variables in the end.
8469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8470
8471      # Check if the provided tool contains a complete path.
8472      tool_specified="$MV"
8473      tool_basename="${tool_specified##*/}"
8474      if test "x$tool_basename" = "x$tool_specified"; then
8475        # A command without a complete path is provided, search $PATH.
8476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8477$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8478        # Extract the first word of "$tool_basename", so it can be a program name with args.
8479set dummy $tool_basename; ac_word=$2
8480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8481$as_echo_n "checking for $ac_word... " >&6; }
8482if ${ac_cv_path_MV+:} false; then :
8483  $as_echo_n "(cached) " >&6
8484else
8485  case $MV in
8486  [\\/]* | ?:[\\/]*)
8487  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8488  ;;
8489  *)
8490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491for as_dir in $PATH
8492do
8493  IFS=$as_save_IFS
8494  test -z "$as_dir" && as_dir=.
8495    for ac_exec_ext in '' $ac_executable_extensions; do
8496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499    break 2
8500  fi
8501done
8502  done
8503IFS=$as_save_IFS
8504
8505  ;;
8506esac
8507fi
8508MV=$ac_cv_path_MV
8509if test -n "$MV"; then
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8511$as_echo "$MV" >&6; }
8512else
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514$as_echo "no" >&6; }
8515fi
8516
8517
8518        if test "x$MV" = x; then
8519          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8520        fi
8521      else
8522        # Otherwise we believe it is a complete path. Use it as it is.
8523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8524$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8526$as_echo_n "checking for MV... " >&6; }
8527        if test ! -x "$tool_specified"; then
8528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8529$as_echo "not found" >&6; }
8530          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8531        fi
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8533$as_echo "$tool_specified" >&6; }
8534      fi
8535    fi
8536  fi
8537
8538
8539
8540  if test "x$MV" = x; then
8541    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8542  fi
8543
8544
8545
8546
8547
8548  # Publish this variable in the help.
8549
8550
8551  if test "x$NAWK" = x; then
8552    # The variable is not set by user, try to locate tool using the code snippet
8553    for ac_prog in nawk gawk awk
8554do
8555  # Extract the first word of "$ac_prog", so it can be a program name with args.
8556set dummy $ac_prog; ac_word=$2
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if ${ac_cv_path_NAWK+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  case $NAWK in
8563  [\\/]* | ?:[\\/]*)
8564  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8565  ;;
8566  *)
8567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570  IFS=$as_save_IFS
8571  test -z "$as_dir" && as_dir=.
8572    for ac_exec_ext in '' $ac_executable_extensions; do
8573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576    break 2
8577  fi
8578done
8579  done
8580IFS=$as_save_IFS
8581
8582  ;;
8583esac
8584fi
8585NAWK=$ac_cv_path_NAWK
8586if test -n "$NAWK"; then
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8588$as_echo "$NAWK" >&6; }
8589else
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
8592fi
8593
8594
8595  test -n "$NAWK" && break
8596done
8597
8598  else
8599    # The variable is set, but is it from the command line or the environment?
8600
8601    # Try to remove the string !NAWK! from our list.
8602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8604      # If it failed, the variable was not from the command line. Ignore it,
8605      # but warn the user (except for BASH, which is always set by the calling BASH).
8606      if test "xNAWK" != xBASH; then
8607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8608$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8609      fi
8610      # Try to locate tool using the code snippet
8611      for ac_prog in nawk gawk awk
8612do
8613  # Extract the first word of "$ac_prog", so it can be a program name with args.
8614set dummy $ac_prog; ac_word=$2
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8616$as_echo_n "checking for $ac_word... " >&6; }
8617if ${ac_cv_path_NAWK+:} false; then :
8618  $as_echo_n "(cached) " >&6
8619else
8620  case $NAWK in
8621  [\\/]* | ?:[\\/]*)
8622  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8623  ;;
8624  *)
8625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8626for as_dir in $PATH
8627do
8628  IFS=$as_save_IFS
8629  test -z "$as_dir" && as_dir=.
8630    for ac_exec_ext in '' $ac_executable_extensions; do
8631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8632    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8634    break 2
8635  fi
8636done
8637  done
8638IFS=$as_save_IFS
8639
8640  ;;
8641esac
8642fi
8643NAWK=$ac_cv_path_NAWK
8644if test -n "$NAWK"; then
8645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8646$as_echo "$NAWK" >&6; }
8647else
8648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8649$as_echo "no" >&6; }
8650fi
8651
8652
8653  test -n "$NAWK" && break
8654done
8655
8656    else
8657      # If it succeeded, then it was overridden by the user. We will use it
8658      # for the tool.
8659
8660      # First remove it from the list of overridden variables, so we can test
8661      # for unknown variables in the end.
8662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8663
8664      # Check if the provided tool contains a complete path.
8665      tool_specified="$NAWK"
8666      tool_basename="${tool_specified##*/}"
8667      if test "x$tool_basename" = "x$tool_specified"; then
8668        # A command without a complete path is provided, search $PATH.
8669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8670$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8671        # Extract the first word of "$tool_basename", so it can be a program name with args.
8672set dummy $tool_basename; ac_word=$2
8673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8674$as_echo_n "checking for $ac_word... " >&6; }
8675if ${ac_cv_path_NAWK+:} false; then :
8676  $as_echo_n "(cached) " >&6
8677else
8678  case $NAWK in
8679  [\\/]* | ?:[\\/]*)
8680  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8681  ;;
8682  *)
8683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8684for as_dir in $PATH
8685do
8686  IFS=$as_save_IFS
8687  test -z "$as_dir" && as_dir=.
8688    for ac_exec_ext in '' $ac_executable_extensions; do
8689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8690    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8692    break 2
8693  fi
8694done
8695  done
8696IFS=$as_save_IFS
8697
8698  ;;
8699esac
8700fi
8701NAWK=$ac_cv_path_NAWK
8702if test -n "$NAWK"; then
8703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8704$as_echo "$NAWK" >&6; }
8705else
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8707$as_echo "no" >&6; }
8708fi
8709
8710
8711        if test "x$NAWK" = x; then
8712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8713        fi
8714      else
8715        # Otherwise we believe it is a complete path. Use it as it is.
8716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8717$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8719$as_echo_n "checking for NAWK... " >&6; }
8720        if test ! -x "$tool_specified"; then
8721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8722$as_echo "not found" >&6; }
8723          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8724        fi
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8726$as_echo "$tool_specified" >&6; }
8727      fi
8728    fi
8729  fi
8730
8731
8732
8733  if test "x$NAWK" = x; then
8734    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8735  fi
8736
8737
8738
8739
8740
8741  # Publish this variable in the help.
8742
8743
8744  if test "x$PRINTF" = x; then
8745    # The variable is not set by user, try to locate tool using the code snippet
8746    for ac_prog in printf
8747do
8748  # Extract the first word of "$ac_prog", so it can be a program name with args.
8749set dummy $ac_prog; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_PRINTF+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $PRINTF in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778PRINTF=$ac_cv_path_PRINTF
8779if test -n "$PRINTF"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8781$as_echo "$PRINTF" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788  test -n "$PRINTF" && break
8789done
8790
8791  else
8792    # The variable is set, but is it from the command line or the environment?
8793
8794    # Try to remove the string !PRINTF! from our list.
8795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8797      # If it failed, the variable was not from the command line. Ignore it,
8798      # but warn the user (except for BASH, which is always set by the calling BASH).
8799      if test "xPRINTF" != xBASH; then
8800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8801$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8802      fi
8803      # Try to locate tool using the code snippet
8804      for ac_prog in printf
8805do
8806  # Extract the first word of "$ac_prog", so it can be a program name with args.
8807set dummy $ac_prog; ac_word=$2
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809$as_echo_n "checking for $ac_word... " >&6; }
8810if ${ac_cv_path_PRINTF+:} false; then :
8811  $as_echo_n "(cached) " >&6
8812else
8813  case $PRINTF in
8814  [\\/]* | ?:[\\/]*)
8815  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8816  ;;
8817  *)
8818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821  IFS=$as_save_IFS
8822  test -z "$as_dir" && as_dir=.
8823    for ac_exec_ext in '' $ac_executable_extensions; do
8824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8825    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827    break 2
8828  fi
8829done
8830  done
8831IFS=$as_save_IFS
8832
8833  ;;
8834esac
8835fi
8836PRINTF=$ac_cv_path_PRINTF
8837if test -n "$PRINTF"; then
8838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8839$as_echo "$PRINTF" >&6; }
8840else
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842$as_echo "no" >&6; }
8843fi
8844
8845
8846  test -n "$PRINTF" && break
8847done
8848
8849    else
8850      # If it succeeded, then it was overridden by the user. We will use it
8851      # for the tool.
8852
8853      # First remove it from the list of overridden variables, so we can test
8854      # for unknown variables in the end.
8855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8856
8857      # Check if the provided tool contains a complete path.
8858      tool_specified="$PRINTF"
8859      tool_basename="${tool_specified##*/}"
8860      if test "x$tool_basename" = "x$tool_specified"; then
8861        # A command without a complete path is provided, search $PATH.
8862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8863$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8864        # Extract the first word of "$tool_basename", so it can be a program name with args.
8865set dummy $tool_basename; ac_word=$2
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if ${ac_cv_path_PRINTF+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  case $PRINTF in
8872  [\\/]* | ?:[\\/]*)
8873  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8874  ;;
8875  *)
8876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891  ;;
8892esac
8893fi
8894PRINTF=$ac_cv_path_PRINTF
8895if test -n "$PRINTF"; then
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8897$as_echo "$PRINTF" >&6; }
8898else
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900$as_echo "no" >&6; }
8901fi
8902
8903
8904        if test "x$PRINTF" = x; then
8905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906        fi
8907      else
8908        # Otherwise we believe it is a complete path. Use it as it is.
8909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8910$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8912$as_echo_n "checking for PRINTF... " >&6; }
8913        if test ! -x "$tool_specified"; then
8914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915$as_echo "not found" >&6; }
8916          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8917        fi
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919$as_echo "$tool_specified" >&6; }
8920      fi
8921    fi
8922  fi
8923
8924
8925
8926  if test "x$PRINTF" = x; then
8927    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8928  fi
8929
8930
8931
8932
8933
8934  # Publish this variable in the help.
8935
8936
8937  if test "x$RM" = x; then
8938    # The variable is not set by user, try to locate tool using the code snippet
8939    for ac_prog in rm
8940do
8941  # Extract the first word of "$ac_prog", so it can be a program name with args.
8942set dummy $ac_prog; ac_word=$2
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8944$as_echo_n "checking for $ac_word... " >&6; }
8945if ${ac_cv_path_RM+:} false; then :
8946  $as_echo_n "(cached) " >&6
8947else
8948  case $RM in
8949  [\\/]* | ?:[\\/]*)
8950  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8951  ;;
8952  *)
8953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8954for as_dir in $PATH
8955do
8956  IFS=$as_save_IFS
8957  test -z "$as_dir" && as_dir=.
8958    for ac_exec_ext in '' $ac_executable_extensions; do
8959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8962    break 2
8963  fi
8964done
8965  done
8966IFS=$as_save_IFS
8967
8968  ;;
8969esac
8970fi
8971RM=$ac_cv_path_RM
8972if test -n "$RM"; then
8973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8974$as_echo "$RM" >&6; }
8975else
8976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8977$as_echo "no" >&6; }
8978fi
8979
8980
8981  test -n "$RM" && break
8982done
8983
8984  else
8985    # The variable is set, but is it from the command line or the environment?
8986
8987    # Try to remove the string !RM! from our list.
8988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8990      # If it failed, the variable was not from the command line. Ignore it,
8991      # but warn the user (except for BASH, which is always set by the calling BASH).
8992      if test "xRM" != xBASH; then
8993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8994$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8995      fi
8996      # Try to locate tool using the code snippet
8997      for ac_prog in rm
8998do
8999  # Extract the first word of "$ac_prog", so it can be a program name with args.
9000set dummy $ac_prog; ac_word=$2
9001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002$as_echo_n "checking for $ac_word... " >&6; }
9003if ${ac_cv_path_RM+:} false; then :
9004  $as_echo_n "(cached) " >&6
9005else
9006  case $RM in
9007  [\\/]* | ?:[\\/]*)
9008  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9009  ;;
9010  *)
9011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9012for as_dir in $PATH
9013do
9014  IFS=$as_save_IFS
9015  test -z "$as_dir" && as_dir=.
9016    for ac_exec_ext in '' $ac_executable_extensions; do
9017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9018    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9020    break 2
9021  fi
9022done
9023  done
9024IFS=$as_save_IFS
9025
9026  ;;
9027esac
9028fi
9029RM=$ac_cv_path_RM
9030if test -n "$RM"; then
9031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9032$as_echo "$RM" >&6; }
9033else
9034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035$as_echo "no" >&6; }
9036fi
9037
9038
9039  test -n "$RM" && break
9040done
9041
9042    else
9043      # If it succeeded, then it was overridden by the user. We will use it
9044      # for the tool.
9045
9046      # First remove it from the list of overridden variables, so we can test
9047      # for unknown variables in the end.
9048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9049
9050      # Check if the provided tool contains a complete path.
9051      tool_specified="$RM"
9052      tool_basename="${tool_specified##*/}"
9053      if test "x$tool_basename" = "x$tool_specified"; then
9054        # A command without a complete path is provided, search $PATH.
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9056$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9057        # Extract the first word of "$tool_basename", so it can be a program name with args.
9058set dummy $tool_basename; ac_word=$2
9059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060$as_echo_n "checking for $ac_word... " >&6; }
9061if ${ac_cv_path_RM+:} false; then :
9062  $as_echo_n "(cached) " >&6
9063else
9064  case $RM in
9065  [\\/]* | ?:[\\/]*)
9066  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9067  ;;
9068  *)
9069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9070for as_dir in $PATH
9071do
9072  IFS=$as_save_IFS
9073  test -z "$as_dir" && as_dir=.
9074    for ac_exec_ext in '' $ac_executable_extensions; do
9075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9076    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078    break 2
9079  fi
9080done
9081  done
9082IFS=$as_save_IFS
9083
9084  ;;
9085esac
9086fi
9087RM=$ac_cv_path_RM
9088if test -n "$RM"; then
9089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9090$as_echo "$RM" >&6; }
9091else
9092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093$as_echo "no" >&6; }
9094fi
9095
9096
9097        if test "x$RM" = x; then
9098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9099        fi
9100      else
9101        # Otherwise we believe it is a complete path. Use it as it is.
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9103$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9105$as_echo_n "checking for RM... " >&6; }
9106        if test ! -x "$tool_specified"; then
9107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9108$as_echo "not found" >&6; }
9109          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9110        fi
9111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9112$as_echo "$tool_specified" >&6; }
9113      fi
9114    fi
9115  fi
9116
9117
9118
9119  if test "x$RM" = x; then
9120    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9121  fi
9122
9123
9124
9125
9126
9127  # Publish this variable in the help.
9128
9129
9130  if test "x$SH" = x; then
9131    # The variable is not set by user, try to locate tool using the code snippet
9132    for ac_prog in sh
9133do
9134  # Extract the first word of "$ac_prog", so it can be a program name with args.
9135set dummy $ac_prog; ac_word=$2
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9137$as_echo_n "checking for $ac_word... " >&6; }
9138if ${ac_cv_path_SH+:} false; then :
9139  $as_echo_n "(cached) " >&6
9140else
9141  case $SH in
9142  [\\/]* | ?:[\\/]*)
9143  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9144  ;;
9145  *)
9146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9147for as_dir in $PATH
9148do
9149  IFS=$as_save_IFS
9150  test -z "$as_dir" && as_dir=.
9151    for ac_exec_ext in '' $ac_executable_extensions; do
9152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9153    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9155    break 2
9156  fi
9157done
9158  done
9159IFS=$as_save_IFS
9160
9161  ;;
9162esac
9163fi
9164SH=$ac_cv_path_SH
9165if test -n "$SH"; then
9166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9167$as_echo "$SH" >&6; }
9168else
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9170$as_echo "no" >&6; }
9171fi
9172
9173
9174  test -n "$SH" && break
9175done
9176
9177  else
9178    # The variable is set, but is it from the command line or the environment?
9179
9180    # Try to remove the string !SH! from our list.
9181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9183      # If it failed, the variable was not from the command line. Ignore it,
9184      # but warn the user (except for BASH, which is always set by the calling BASH).
9185      if test "xSH" != xBASH; then
9186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9187$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9188      fi
9189      # Try to locate tool using the code snippet
9190      for ac_prog in sh
9191do
9192  # Extract the first word of "$ac_prog", so it can be a program name with args.
9193set dummy $ac_prog; ac_word=$2
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9195$as_echo_n "checking for $ac_word... " >&6; }
9196if ${ac_cv_path_SH+:} false; then :
9197  $as_echo_n "(cached) " >&6
9198else
9199  case $SH in
9200  [\\/]* | ?:[\\/]*)
9201  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9202  ;;
9203  *)
9204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9205for as_dir in $PATH
9206do
9207  IFS=$as_save_IFS
9208  test -z "$as_dir" && as_dir=.
9209    for ac_exec_ext in '' $ac_executable_extensions; do
9210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9211    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9213    break 2
9214  fi
9215done
9216  done
9217IFS=$as_save_IFS
9218
9219  ;;
9220esac
9221fi
9222SH=$ac_cv_path_SH
9223if test -n "$SH"; then
9224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9225$as_echo "$SH" >&6; }
9226else
9227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9228$as_echo "no" >&6; }
9229fi
9230
9231
9232  test -n "$SH" && break
9233done
9234
9235    else
9236      # If it succeeded, then it was overridden by the user. We will use it
9237      # for the tool.
9238
9239      # First remove it from the list of overridden variables, so we can test
9240      # for unknown variables in the end.
9241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9242
9243      # Check if the provided tool contains a complete path.
9244      tool_specified="$SH"
9245      tool_basename="${tool_specified##*/}"
9246      if test "x$tool_basename" = "x$tool_specified"; then
9247        # A command without a complete path is provided, search $PATH.
9248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9249$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9250        # Extract the first word of "$tool_basename", so it can be a program name with args.
9251set dummy $tool_basename; ac_word=$2
9252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9253$as_echo_n "checking for $ac_word... " >&6; }
9254if ${ac_cv_path_SH+:} false; then :
9255  $as_echo_n "(cached) " >&6
9256else
9257  case $SH in
9258  [\\/]* | ?:[\\/]*)
9259  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9260  ;;
9261  *)
9262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9263for as_dir in $PATH
9264do
9265  IFS=$as_save_IFS
9266  test -z "$as_dir" && as_dir=.
9267    for ac_exec_ext in '' $ac_executable_extensions; do
9268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9269    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9271    break 2
9272  fi
9273done
9274  done
9275IFS=$as_save_IFS
9276
9277  ;;
9278esac
9279fi
9280SH=$ac_cv_path_SH
9281if test -n "$SH"; then
9282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9283$as_echo "$SH" >&6; }
9284else
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286$as_echo "no" >&6; }
9287fi
9288
9289
9290        if test "x$SH" = x; then
9291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9292        fi
9293      else
9294        # Otherwise we believe it is a complete path. Use it as it is.
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9296$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9298$as_echo_n "checking for SH... " >&6; }
9299        if test ! -x "$tool_specified"; then
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9301$as_echo "not found" >&6; }
9302          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9303        fi
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9305$as_echo "$tool_specified" >&6; }
9306      fi
9307    fi
9308  fi
9309
9310
9311
9312  if test "x$SH" = x; then
9313    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9314  fi
9315
9316
9317
9318
9319
9320  # Publish this variable in the help.
9321
9322
9323  if test "x$SORT" = x; then
9324    # The variable is not set by user, try to locate tool using the code snippet
9325    for ac_prog in sort
9326do
9327  # Extract the first word of "$ac_prog", so it can be a program name with args.
9328set dummy $ac_prog; ac_word=$2
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330$as_echo_n "checking for $ac_word... " >&6; }
9331if ${ac_cv_path_SORT+:} false; then :
9332  $as_echo_n "(cached) " >&6
9333else
9334  case $SORT in
9335  [\\/]* | ?:[\\/]*)
9336  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9337  ;;
9338  *)
9339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340for as_dir in $PATH
9341do
9342  IFS=$as_save_IFS
9343  test -z "$as_dir" && as_dir=.
9344    for ac_exec_ext in '' $ac_executable_extensions; do
9345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348    break 2
9349  fi
9350done
9351  done
9352IFS=$as_save_IFS
9353
9354  ;;
9355esac
9356fi
9357SORT=$ac_cv_path_SORT
9358if test -n "$SORT"; then
9359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9360$as_echo "$SORT" >&6; }
9361else
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
9364fi
9365
9366
9367  test -n "$SORT" && break
9368done
9369
9370  else
9371    # The variable is set, but is it from the command line or the environment?
9372
9373    # Try to remove the string !SORT! from our list.
9374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9376      # If it failed, the variable was not from the command line. Ignore it,
9377      # but warn the user (except for BASH, which is always set by the calling BASH).
9378      if test "xSORT" != xBASH; then
9379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9380$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9381      fi
9382      # Try to locate tool using the code snippet
9383      for ac_prog in sort
9384do
9385  # Extract the first word of "$ac_prog", so it can be a program name with args.
9386set dummy $ac_prog; ac_word=$2
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388$as_echo_n "checking for $ac_word... " >&6; }
9389if ${ac_cv_path_SORT+:} false; then :
9390  $as_echo_n "(cached) " >&6
9391else
9392  case $SORT in
9393  [\\/]* | ?:[\\/]*)
9394  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9395  ;;
9396  *)
9397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398for as_dir in $PATH
9399do
9400  IFS=$as_save_IFS
9401  test -z "$as_dir" && as_dir=.
9402    for ac_exec_ext in '' $ac_executable_extensions; do
9403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406    break 2
9407  fi
9408done
9409  done
9410IFS=$as_save_IFS
9411
9412  ;;
9413esac
9414fi
9415SORT=$ac_cv_path_SORT
9416if test -n "$SORT"; then
9417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9418$as_echo "$SORT" >&6; }
9419else
9420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
9422fi
9423
9424
9425  test -n "$SORT" && break
9426done
9427
9428    else
9429      # If it succeeded, then it was overridden by the user. We will use it
9430      # for the tool.
9431
9432      # First remove it from the list of overridden variables, so we can test
9433      # for unknown variables in the end.
9434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9435
9436      # Check if the provided tool contains a complete path.
9437      tool_specified="$SORT"
9438      tool_basename="${tool_specified##*/}"
9439      if test "x$tool_basename" = "x$tool_specified"; then
9440        # A command without a complete path is provided, search $PATH.
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9442$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9443        # Extract the first word of "$tool_basename", so it can be a program name with args.
9444set dummy $tool_basename; ac_word=$2
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446$as_echo_n "checking for $ac_word... " >&6; }
9447if ${ac_cv_path_SORT+:} false; then :
9448  $as_echo_n "(cached) " >&6
9449else
9450  case $SORT in
9451  [\\/]* | ?:[\\/]*)
9452  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9453  ;;
9454  *)
9455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456for as_dir in $PATH
9457do
9458  IFS=$as_save_IFS
9459  test -z "$as_dir" && as_dir=.
9460    for ac_exec_ext in '' $ac_executable_extensions; do
9461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464    break 2
9465  fi
9466done
9467  done
9468IFS=$as_save_IFS
9469
9470  ;;
9471esac
9472fi
9473SORT=$ac_cv_path_SORT
9474if test -n "$SORT"; then
9475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9476$as_echo "$SORT" >&6; }
9477else
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
9480fi
9481
9482
9483        if test "x$SORT" = x; then
9484          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9485        fi
9486      else
9487        # Otherwise we believe it is a complete path. Use it as it is.
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9489$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9491$as_echo_n "checking for SORT... " >&6; }
9492        if test ! -x "$tool_specified"; then
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9494$as_echo "not found" >&6; }
9495          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9496        fi
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9498$as_echo "$tool_specified" >&6; }
9499      fi
9500    fi
9501  fi
9502
9503
9504
9505  if test "x$SORT" = x; then
9506    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9507  fi
9508
9509
9510
9511
9512
9513  # Publish this variable in the help.
9514
9515
9516  if test "x$TAIL" = x; then
9517    # The variable is not set by user, try to locate tool using the code snippet
9518    for ac_prog in tail
9519do
9520  # Extract the first word of "$ac_prog", so it can be a program name with args.
9521set dummy $ac_prog; ac_word=$2
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if ${ac_cv_path_TAIL+:} false; then :
9525  $as_echo_n "(cached) " >&6
9526else
9527  case $TAIL in
9528  [\\/]* | ?:[\\/]*)
9529  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9530  ;;
9531  *)
9532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533for as_dir in $PATH
9534do
9535  IFS=$as_save_IFS
9536  test -z "$as_dir" && as_dir=.
9537    for ac_exec_ext in '' $ac_executable_extensions; do
9538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9539    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541    break 2
9542  fi
9543done
9544  done
9545IFS=$as_save_IFS
9546
9547  ;;
9548esac
9549fi
9550TAIL=$ac_cv_path_TAIL
9551if test -n "$TAIL"; then
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9553$as_echo "$TAIL" >&6; }
9554else
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
9557fi
9558
9559
9560  test -n "$TAIL" && break
9561done
9562
9563  else
9564    # The variable is set, but is it from the command line or the environment?
9565
9566    # Try to remove the string !TAIL! from our list.
9567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9569      # If it failed, the variable was not from the command line. Ignore it,
9570      # but warn the user (except for BASH, which is always set by the calling BASH).
9571      if test "xTAIL" != xBASH; then
9572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9573$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9574      fi
9575      # Try to locate tool using the code snippet
9576      for ac_prog in tail
9577do
9578  # Extract the first word of "$ac_prog", so it can be a program name with args.
9579set dummy $ac_prog; ac_word=$2
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9581$as_echo_n "checking for $ac_word... " >&6; }
9582if ${ac_cv_path_TAIL+:} false; then :
9583  $as_echo_n "(cached) " >&6
9584else
9585  case $TAIL in
9586  [\\/]* | ?:[\\/]*)
9587  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9588  ;;
9589  *)
9590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591for as_dir in $PATH
9592do
9593  IFS=$as_save_IFS
9594  test -z "$as_dir" && as_dir=.
9595    for ac_exec_ext in '' $ac_executable_extensions; do
9596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599    break 2
9600  fi
9601done
9602  done
9603IFS=$as_save_IFS
9604
9605  ;;
9606esac
9607fi
9608TAIL=$ac_cv_path_TAIL
9609if test -n "$TAIL"; then
9610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9611$as_echo "$TAIL" >&6; }
9612else
9613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614$as_echo "no" >&6; }
9615fi
9616
9617
9618  test -n "$TAIL" && break
9619done
9620
9621    else
9622      # If it succeeded, then it was overridden by the user. We will use it
9623      # for the tool.
9624
9625      # First remove it from the list of overridden variables, so we can test
9626      # for unknown variables in the end.
9627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9628
9629      # Check if the provided tool contains a complete path.
9630      tool_specified="$TAIL"
9631      tool_basename="${tool_specified##*/}"
9632      if test "x$tool_basename" = "x$tool_specified"; then
9633        # A command without a complete path is provided, search $PATH.
9634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9635$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9636        # Extract the first word of "$tool_basename", so it can be a program name with args.
9637set dummy $tool_basename; ac_word=$2
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639$as_echo_n "checking for $ac_word... " >&6; }
9640if ${ac_cv_path_TAIL+:} false; then :
9641  $as_echo_n "(cached) " >&6
9642else
9643  case $TAIL in
9644  [\\/]* | ?:[\\/]*)
9645  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9646  ;;
9647  *)
9648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649for as_dir in $PATH
9650do
9651  IFS=$as_save_IFS
9652  test -z "$as_dir" && as_dir=.
9653    for ac_exec_ext in '' $ac_executable_extensions; do
9654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9655    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9657    break 2
9658  fi
9659done
9660  done
9661IFS=$as_save_IFS
9662
9663  ;;
9664esac
9665fi
9666TAIL=$ac_cv_path_TAIL
9667if test -n "$TAIL"; then
9668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9669$as_echo "$TAIL" >&6; }
9670else
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672$as_echo "no" >&6; }
9673fi
9674
9675
9676        if test "x$TAIL" = x; then
9677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9678        fi
9679      else
9680        # Otherwise we believe it is a complete path. Use it as it is.
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9682$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9684$as_echo_n "checking for TAIL... " >&6; }
9685        if test ! -x "$tool_specified"; then
9686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9687$as_echo "not found" >&6; }
9688          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9689        fi
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9691$as_echo "$tool_specified" >&6; }
9692      fi
9693    fi
9694  fi
9695
9696
9697
9698  if test "x$TAIL" = x; then
9699    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9700  fi
9701
9702
9703
9704
9705
9706  # Publish this variable in the help.
9707
9708
9709  if test "x$TAR" = x; then
9710    # The variable is not set by user, try to locate tool using the code snippet
9711    for ac_prog in tar
9712do
9713  # Extract the first word of "$ac_prog", so it can be a program name with args.
9714set dummy $ac_prog; ac_word=$2
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9716$as_echo_n "checking for $ac_word... " >&6; }
9717if ${ac_cv_path_TAR+:} false; then :
9718  $as_echo_n "(cached) " >&6
9719else
9720  case $TAR in
9721  [\\/]* | ?:[\\/]*)
9722  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9723  ;;
9724  *)
9725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726for as_dir in $PATH
9727do
9728  IFS=$as_save_IFS
9729  test -z "$as_dir" && as_dir=.
9730    for ac_exec_ext in '' $ac_executable_extensions; do
9731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9732    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734    break 2
9735  fi
9736done
9737  done
9738IFS=$as_save_IFS
9739
9740  ;;
9741esac
9742fi
9743TAR=$ac_cv_path_TAR
9744if test -n "$TAR"; then
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9746$as_echo "$TAR" >&6; }
9747else
9748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
9750fi
9751
9752
9753  test -n "$TAR" && break
9754done
9755
9756  else
9757    # The variable is set, but is it from the command line or the environment?
9758
9759    # Try to remove the string !TAR! from our list.
9760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9762      # If it failed, the variable was not from the command line. Ignore it,
9763      # but warn the user (except for BASH, which is always set by the calling BASH).
9764      if test "xTAR" != xBASH; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9766$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9767      fi
9768      # Try to locate tool using the code snippet
9769      for ac_prog in tar
9770do
9771  # Extract the first word of "$ac_prog", so it can be a program name with args.
9772set dummy $ac_prog; ac_word=$2
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774$as_echo_n "checking for $ac_word... " >&6; }
9775if ${ac_cv_path_TAR+:} false; then :
9776  $as_echo_n "(cached) " >&6
9777else
9778  case $TAR in
9779  [\\/]* | ?:[\\/]*)
9780  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9781  ;;
9782  *)
9783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786  IFS=$as_save_IFS
9787  test -z "$as_dir" && as_dir=.
9788    for ac_exec_ext in '' $ac_executable_extensions; do
9789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792    break 2
9793  fi
9794done
9795  done
9796IFS=$as_save_IFS
9797
9798  ;;
9799esac
9800fi
9801TAR=$ac_cv_path_TAR
9802if test -n "$TAR"; then
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9804$as_echo "$TAR" >&6; }
9805else
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
9811  test -n "$TAR" && break
9812done
9813
9814    else
9815      # If it succeeded, then it was overridden by the user. We will use it
9816      # for the tool.
9817
9818      # First remove it from the list of overridden variables, so we can test
9819      # for unknown variables in the end.
9820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9821
9822      # Check if the provided tool contains a complete path.
9823      tool_specified="$TAR"
9824      tool_basename="${tool_specified##*/}"
9825      if test "x$tool_basename" = "x$tool_specified"; then
9826        # A command without a complete path is provided, search $PATH.
9827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9828$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9829        # Extract the first word of "$tool_basename", so it can be a program name with args.
9830set dummy $tool_basename; ac_word=$2
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832$as_echo_n "checking for $ac_word... " >&6; }
9833if ${ac_cv_path_TAR+:} false; then :
9834  $as_echo_n "(cached) " >&6
9835else
9836  case $TAR in
9837  [\\/]* | ?:[\\/]*)
9838  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9839  ;;
9840  *)
9841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842for as_dir in $PATH
9843do
9844  IFS=$as_save_IFS
9845  test -z "$as_dir" && as_dir=.
9846    for ac_exec_ext in '' $ac_executable_extensions; do
9847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850    break 2
9851  fi
9852done
9853  done
9854IFS=$as_save_IFS
9855
9856  ;;
9857esac
9858fi
9859TAR=$ac_cv_path_TAR
9860if test -n "$TAR"; then
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9862$as_echo "$TAR" >&6; }
9863else
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866fi
9867
9868
9869        if test "x$TAR" = x; then
9870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9871        fi
9872      else
9873        # Otherwise we believe it is a complete path. Use it as it is.
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9875$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9877$as_echo_n "checking for TAR... " >&6; }
9878        if test ! -x "$tool_specified"; then
9879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9880$as_echo "not found" >&6; }
9881          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9882        fi
9883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9884$as_echo "$tool_specified" >&6; }
9885      fi
9886    fi
9887  fi
9888
9889
9890
9891  if test "x$TAR" = x; then
9892    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9893  fi
9894
9895
9896
9897
9898
9899  # Publish this variable in the help.
9900
9901
9902  if test "x$TEE" = x; then
9903    # The variable is not set by user, try to locate tool using the code snippet
9904    for ac_prog in tee
9905do
9906  # Extract the first word of "$ac_prog", so it can be a program name with args.
9907set dummy $ac_prog; ac_word=$2
9908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909$as_echo_n "checking for $ac_word... " >&6; }
9910if ${ac_cv_path_TEE+:} false; then :
9911  $as_echo_n "(cached) " >&6
9912else
9913  case $TEE in
9914  [\\/]* | ?:[\\/]*)
9915  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9916  ;;
9917  *)
9918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919for as_dir in $PATH
9920do
9921  IFS=$as_save_IFS
9922  test -z "$as_dir" && as_dir=.
9923    for ac_exec_ext in '' $ac_executable_extensions; do
9924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9925    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927    break 2
9928  fi
9929done
9930  done
9931IFS=$as_save_IFS
9932
9933  ;;
9934esac
9935fi
9936TEE=$ac_cv_path_TEE
9937if test -n "$TEE"; then
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9939$as_echo "$TEE" >&6; }
9940else
9941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942$as_echo "no" >&6; }
9943fi
9944
9945
9946  test -n "$TEE" && break
9947done
9948
9949  else
9950    # The variable is set, but is it from the command line or the environment?
9951
9952    # Try to remove the string !TEE! from our list.
9953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9955      # If it failed, the variable was not from the command line. Ignore it,
9956      # but warn the user (except for BASH, which is always set by the calling BASH).
9957      if test "xTEE" != xBASH; then
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9959$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9960      fi
9961      # Try to locate tool using the code snippet
9962      for ac_prog in tee
9963do
9964  # Extract the first word of "$ac_prog", so it can be a program name with args.
9965set dummy $ac_prog; ac_word=$2
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
9968if ${ac_cv_path_TEE+:} false; then :
9969  $as_echo_n "(cached) " >&6
9970else
9971  case $TEE in
9972  [\\/]* | ?:[\\/]*)
9973  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9974  ;;
9975  *)
9976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979  IFS=$as_save_IFS
9980  test -z "$as_dir" && as_dir=.
9981    for ac_exec_ext in '' $ac_executable_extensions; do
9982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985    break 2
9986  fi
9987done
9988  done
9989IFS=$as_save_IFS
9990
9991  ;;
9992esac
9993fi
9994TEE=$ac_cv_path_TEE
9995if test -n "$TEE"; then
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9997$as_echo "$TEE" >&6; }
9998else
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
10001fi
10002
10003
10004  test -n "$TEE" && break
10005done
10006
10007    else
10008      # If it succeeded, then it was overridden by the user. We will use it
10009      # for the tool.
10010
10011      # First remove it from the list of overridden variables, so we can test
10012      # for unknown variables in the end.
10013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10014
10015      # Check if the provided tool contains a complete path.
10016      tool_specified="$TEE"
10017      tool_basename="${tool_specified##*/}"
10018      if test "x$tool_basename" = "x$tool_specified"; then
10019        # A command without a complete path is provided, search $PATH.
10020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10021$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10022        # Extract the first word of "$tool_basename", so it can be a program name with args.
10023set dummy $tool_basename; ac_word=$2
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10025$as_echo_n "checking for $ac_word... " >&6; }
10026if ${ac_cv_path_TEE+:} false; then :
10027  $as_echo_n "(cached) " >&6
10028else
10029  case $TEE in
10030  [\\/]* | ?:[\\/]*)
10031  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10032  ;;
10033  *)
10034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10035for as_dir in $PATH
10036do
10037  IFS=$as_save_IFS
10038  test -z "$as_dir" && as_dir=.
10039    for ac_exec_ext in '' $ac_executable_extensions; do
10040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10041    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10043    break 2
10044  fi
10045done
10046  done
10047IFS=$as_save_IFS
10048
10049  ;;
10050esac
10051fi
10052TEE=$ac_cv_path_TEE
10053if test -n "$TEE"; then
10054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10055$as_echo "$TEE" >&6; }
10056else
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
10059fi
10060
10061
10062        if test "x$TEE" = x; then
10063          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10064        fi
10065      else
10066        # Otherwise we believe it is a complete path. Use it as it is.
10067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10068$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10070$as_echo_n "checking for TEE... " >&6; }
10071        if test ! -x "$tool_specified"; then
10072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10073$as_echo "not found" >&6; }
10074          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10075        fi
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10077$as_echo "$tool_specified" >&6; }
10078      fi
10079    fi
10080  fi
10081
10082
10083
10084  if test "x$TEE" = x; then
10085    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10086  fi
10087
10088
10089
10090
10091
10092  # Publish this variable in the help.
10093
10094
10095  if test "x$TOUCH" = x; then
10096    # The variable is not set by user, try to locate tool using the code snippet
10097    for ac_prog in touch
10098do
10099  # Extract the first word of "$ac_prog", so it can be a program name with args.
10100set dummy $ac_prog; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if ${ac_cv_path_TOUCH+:} false; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $TOUCH in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129TOUCH=$ac_cv_path_TOUCH
10130if test -n "$TOUCH"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10132$as_echo "$TOUCH" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139  test -n "$TOUCH" && break
10140done
10141
10142  else
10143    # The variable is set, but is it from the command line or the environment?
10144
10145    # Try to remove the string !TOUCH! from our list.
10146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10148      # If it failed, the variable was not from the command line. Ignore it,
10149      # but warn the user (except for BASH, which is always set by the calling BASH).
10150      if test "xTOUCH" != xBASH; then
10151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10152$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10153      fi
10154      # Try to locate tool using the code snippet
10155      for ac_prog in touch
10156do
10157  # Extract the first word of "$ac_prog", so it can be a program name with args.
10158set dummy $ac_prog; ac_word=$2
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160$as_echo_n "checking for $ac_word... " >&6; }
10161if ${ac_cv_path_TOUCH+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  case $TOUCH in
10165  [\\/]* | ?:[\\/]*)
10166  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10167  ;;
10168  *)
10169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170for as_dir in $PATH
10171do
10172  IFS=$as_save_IFS
10173  test -z "$as_dir" && as_dir=.
10174    for ac_exec_ext in '' $ac_executable_extensions; do
10175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178    break 2
10179  fi
10180done
10181  done
10182IFS=$as_save_IFS
10183
10184  ;;
10185esac
10186fi
10187TOUCH=$ac_cv_path_TOUCH
10188if test -n "$TOUCH"; then
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10190$as_echo "$TOUCH" >&6; }
10191else
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194fi
10195
10196
10197  test -n "$TOUCH" && break
10198done
10199
10200    else
10201      # If it succeeded, then it was overridden by the user. We will use it
10202      # for the tool.
10203
10204      # First remove it from the list of overridden variables, so we can test
10205      # for unknown variables in the end.
10206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10207
10208      # Check if the provided tool contains a complete path.
10209      tool_specified="$TOUCH"
10210      tool_basename="${tool_specified##*/}"
10211      if test "x$tool_basename" = "x$tool_specified"; then
10212        # A command without a complete path is provided, search $PATH.
10213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10214$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10215        # Extract the first word of "$tool_basename", so it can be a program name with args.
10216set dummy $tool_basename; ac_word=$2
10217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218$as_echo_n "checking for $ac_word... " >&6; }
10219if ${ac_cv_path_TOUCH+:} false; then :
10220  $as_echo_n "(cached) " >&6
10221else
10222  case $TOUCH in
10223  [\\/]* | ?:[\\/]*)
10224  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10225  ;;
10226  *)
10227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228for as_dir in $PATH
10229do
10230  IFS=$as_save_IFS
10231  test -z "$as_dir" && as_dir=.
10232    for ac_exec_ext in '' $ac_executable_extensions; do
10233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10234    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236    break 2
10237  fi
10238done
10239  done
10240IFS=$as_save_IFS
10241
10242  ;;
10243esac
10244fi
10245TOUCH=$ac_cv_path_TOUCH
10246if test -n "$TOUCH"; then
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10248$as_echo "$TOUCH" >&6; }
10249else
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252fi
10253
10254
10255        if test "x$TOUCH" = x; then
10256          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10257        fi
10258      else
10259        # Otherwise we believe it is a complete path. Use it as it is.
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10261$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10263$as_echo_n "checking for TOUCH... " >&6; }
10264        if test ! -x "$tool_specified"; then
10265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10266$as_echo "not found" >&6; }
10267          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10268        fi
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10270$as_echo "$tool_specified" >&6; }
10271      fi
10272    fi
10273  fi
10274
10275
10276
10277  if test "x$TOUCH" = x; then
10278    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10279  fi
10280
10281
10282
10283
10284
10285  # Publish this variable in the help.
10286
10287
10288  if test "x$TR" = x; then
10289    # The variable is not set by user, try to locate tool using the code snippet
10290    for ac_prog in tr
10291do
10292  # Extract the first word of "$ac_prog", so it can be a program name with args.
10293set dummy $ac_prog; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_TR+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $TR in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322TR=$ac_cv_path_TR
10323if test -n "$TR"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10325$as_echo "$TR" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  test -n "$TR" && break
10333done
10334
10335  else
10336    # The variable is set, but is it from the command line or the environment?
10337
10338    # Try to remove the string !TR! from our list.
10339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10341      # If it failed, the variable was not from the command line. Ignore it,
10342      # but warn the user (except for BASH, which is always set by the calling BASH).
10343      if test "xTR" != xBASH; then
10344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10345$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10346      fi
10347      # Try to locate tool using the code snippet
10348      for ac_prog in tr
10349do
10350  # Extract the first word of "$ac_prog", so it can be a program name with args.
10351set dummy $ac_prog; ac_word=$2
10352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10353$as_echo_n "checking for $ac_word... " >&6; }
10354if ${ac_cv_path_TR+:} false; then :
10355  $as_echo_n "(cached) " >&6
10356else
10357  case $TR in
10358  [\\/]* | ?:[\\/]*)
10359  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10360  ;;
10361  *)
10362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363for as_dir in $PATH
10364do
10365  IFS=$as_save_IFS
10366  test -z "$as_dir" && as_dir=.
10367    for ac_exec_ext in '' $ac_executable_extensions; do
10368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10369    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371    break 2
10372  fi
10373done
10374  done
10375IFS=$as_save_IFS
10376
10377  ;;
10378esac
10379fi
10380TR=$ac_cv_path_TR
10381if test -n "$TR"; then
10382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10383$as_echo "$TR" >&6; }
10384else
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386$as_echo "no" >&6; }
10387fi
10388
10389
10390  test -n "$TR" && break
10391done
10392
10393    else
10394      # If it succeeded, then it was overridden by the user. We will use it
10395      # for the tool.
10396
10397      # First remove it from the list of overridden variables, so we can test
10398      # for unknown variables in the end.
10399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10400
10401      # Check if the provided tool contains a complete path.
10402      tool_specified="$TR"
10403      tool_basename="${tool_specified##*/}"
10404      if test "x$tool_basename" = "x$tool_specified"; then
10405        # A command without a complete path is provided, search $PATH.
10406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10407$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10408        # Extract the first word of "$tool_basename", so it can be a program name with args.
10409set dummy $tool_basename; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if ${ac_cv_path_TR+:} false; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $TR in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10427    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438TR=$ac_cv_path_TR
10439if test -n "$TR"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10441$as_echo "$TR" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448        if test "x$TR" = x; then
10449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10450        fi
10451      else
10452        # Otherwise we believe it is a complete path. Use it as it is.
10453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10454$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10456$as_echo_n "checking for TR... " >&6; }
10457        if test ! -x "$tool_specified"; then
10458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10459$as_echo "not found" >&6; }
10460          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10461        fi
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10463$as_echo "$tool_specified" >&6; }
10464      fi
10465    fi
10466  fi
10467
10468
10469
10470  if test "x$TR" = x; then
10471    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10472  fi
10473
10474
10475
10476
10477
10478  # Publish this variable in the help.
10479
10480
10481  if test "x$UNAME" = x; then
10482    # The variable is not set by user, try to locate tool using the code snippet
10483    for ac_prog in uname
10484do
10485  # Extract the first word of "$ac_prog", so it can be a program name with args.
10486set dummy $ac_prog; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if ${ac_cv_path_UNAME+:} false; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $UNAME in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515UNAME=$ac_cv_path_UNAME
10516if test -n "$UNAME"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10518$as_echo "$UNAME" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$UNAME" && break
10526done
10527
10528  else
10529    # The variable is set, but is it from the command line or the environment?
10530
10531    # Try to remove the string !UNAME! from our list.
10532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10534      # If it failed, the variable was not from the command line. Ignore it,
10535      # but warn the user (except for BASH, which is always set by the calling BASH).
10536      if test "xUNAME" != xBASH; then
10537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10538$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10539      fi
10540      # Try to locate tool using the code snippet
10541      for ac_prog in uname
10542do
10543  # Extract the first word of "$ac_prog", so it can be a program name with args.
10544set dummy $ac_prog; ac_word=$2
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546$as_echo_n "checking for $ac_word... " >&6; }
10547if ${ac_cv_path_UNAME+:} false; then :
10548  $as_echo_n "(cached) " >&6
10549else
10550  case $UNAME in
10551  [\\/]* | ?:[\\/]*)
10552  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10553  ;;
10554  *)
10555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570  ;;
10571esac
10572fi
10573UNAME=$ac_cv_path_UNAME
10574if test -n "$UNAME"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10576$as_echo "$UNAME" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583  test -n "$UNAME" && break
10584done
10585
10586    else
10587      # If it succeeded, then it was overridden by the user. We will use it
10588      # for the tool.
10589
10590      # First remove it from the list of overridden variables, so we can test
10591      # for unknown variables in the end.
10592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10593
10594      # Check if the provided tool contains a complete path.
10595      tool_specified="$UNAME"
10596      tool_basename="${tool_specified##*/}"
10597      if test "x$tool_basename" = "x$tool_specified"; then
10598        # A command without a complete path is provided, search $PATH.
10599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10600$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10601        # Extract the first word of "$tool_basename", so it can be a program name with args.
10602set dummy $tool_basename; ac_word=$2
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10604$as_echo_n "checking for $ac_word... " >&6; }
10605if ${ac_cv_path_UNAME+:} false; then :
10606  $as_echo_n "(cached) " >&6
10607else
10608  case $UNAME in
10609  [\\/]* | ?:[\\/]*)
10610  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10611  ;;
10612  *)
10613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10614for as_dir in $PATH
10615do
10616  IFS=$as_save_IFS
10617  test -z "$as_dir" && as_dir=.
10618    for ac_exec_ext in '' $ac_executable_extensions; do
10619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10620    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10622    break 2
10623  fi
10624done
10625  done
10626IFS=$as_save_IFS
10627
10628  ;;
10629esac
10630fi
10631UNAME=$ac_cv_path_UNAME
10632if test -n "$UNAME"; then
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10634$as_echo "$UNAME" >&6; }
10635else
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
10638fi
10639
10640
10641        if test "x$UNAME" = x; then
10642          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10643        fi
10644      else
10645        # Otherwise we believe it is a complete path. Use it as it is.
10646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10647$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10649$as_echo_n "checking for UNAME... " >&6; }
10650        if test ! -x "$tool_specified"; then
10651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10652$as_echo "not found" >&6; }
10653          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10654        fi
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10656$as_echo "$tool_specified" >&6; }
10657      fi
10658    fi
10659  fi
10660
10661
10662
10663  if test "x$UNAME" = x; then
10664    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10665  fi
10666
10667
10668
10669
10670
10671  # Publish this variable in the help.
10672
10673
10674  if test "x$UNIQ" = x; then
10675    # The variable is not set by user, try to locate tool using the code snippet
10676    for ac_prog in uniq
10677do
10678  # Extract the first word of "$ac_prog", so it can be a program name with args.
10679set dummy $ac_prog; ac_word=$2
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681$as_echo_n "checking for $ac_word... " >&6; }
10682if ${ac_cv_path_UNIQ+:} false; then :
10683  $as_echo_n "(cached) " >&6
10684else
10685  case $UNIQ in
10686  [\\/]* | ?:[\\/]*)
10687  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10688  ;;
10689  *)
10690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10691for as_dir in $PATH
10692do
10693  IFS=$as_save_IFS
10694  test -z "$as_dir" && as_dir=.
10695    for ac_exec_ext in '' $ac_executable_extensions; do
10696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10697    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10699    break 2
10700  fi
10701done
10702  done
10703IFS=$as_save_IFS
10704
10705  ;;
10706esac
10707fi
10708UNIQ=$ac_cv_path_UNIQ
10709if test -n "$UNIQ"; then
10710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10711$as_echo "$UNIQ" >&6; }
10712else
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715fi
10716
10717
10718  test -n "$UNIQ" && break
10719done
10720
10721  else
10722    # The variable is set, but is it from the command line or the environment?
10723
10724    # Try to remove the string !UNIQ! from our list.
10725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10727      # If it failed, the variable was not from the command line. Ignore it,
10728      # but warn the user (except for BASH, which is always set by the calling BASH).
10729      if test "xUNIQ" != xBASH; then
10730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10731$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10732      fi
10733      # Try to locate tool using the code snippet
10734      for ac_prog in uniq
10735do
10736  # Extract the first word of "$ac_prog", so it can be a program name with args.
10737set dummy $ac_prog; ac_word=$2
10738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10739$as_echo_n "checking for $ac_word... " >&6; }
10740if ${ac_cv_path_UNIQ+:} false; then :
10741  $as_echo_n "(cached) " >&6
10742else
10743  case $UNIQ in
10744  [\\/]* | ?:[\\/]*)
10745  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10746  ;;
10747  *)
10748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10749for as_dir in $PATH
10750do
10751  IFS=$as_save_IFS
10752  test -z "$as_dir" && as_dir=.
10753    for ac_exec_ext in '' $ac_executable_extensions; do
10754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10755    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10757    break 2
10758  fi
10759done
10760  done
10761IFS=$as_save_IFS
10762
10763  ;;
10764esac
10765fi
10766UNIQ=$ac_cv_path_UNIQ
10767if test -n "$UNIQ"; then
10768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10769$as_echo "$UNIQ" >&6; }
10770else
10771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773fi
10774
10775
10776  test -n "$UNIQ" && break
10777done
10778
10779    else
10780      # If it succeeded, then it was overridden by the user. We will use it
10781      # for the tool.
10782
10783      # First remove it from the list of overridden variables, so we can test
10784      # for unknown variables in the end.
10785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10786
10787      # Check if the provided tool contains a complete path.
10788      tool_specified="$UNIQ"
10789      tool_basename="${tool_specified##*/}"
10790      if test "x$tool_basename" = "x$tool_specified"; then
10791        # A command without a complete path is provided, search $PATH.
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10793$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10794        # Extract the first word of "$tool_basename", so it can be a program name with args.
10795set dummy $tool_basename; ac_word=$2
10796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10797$as_echo_n "checking for $ac_word... " >&6; }
10798if ${ac_cv_path_UNIQ+:} false; then :
10799  $as_echo_n "(cached) " >&6
10800else
10801  case $UNIQ in
10802  [\\/]* | ?:[\\/]*)
10803  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10804  ;;
10805  *)
10806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10807for as_dir in $PATH
10808do
10809  IFS=$as_save_IFS
10810  test -z "$as_dir" && as_dir=.
10811    for ac_exec_ext in '' $ac_executable_extensions; do
10812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10813    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10815    break 2
10816  fi
10817done
10818  done
10819IFS=$as_save_IFS
10820
10821  ;;
10822esac
10823fi
10824UNIQ=$ac_cv_path_UNIQ
10825if test -n "$UNIQ"; then
10826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10827$as_echo "$UNIQ" >&6; }
10828else
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10830$as_echo "no" >&6; }
10831fi
10832
10833
10834        if test "x$UNIQ" = x; then
10835          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10836        fi
10837      else
10838        # Otherwise we believe it is a complete path. Use it as it is.
10839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10840$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10842$as_echo_n "checking for UNIQ... " >&6; }
10843        if test ! -x "$tool_specified"; then
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10845$as_echo "not found" >&6; }
10846          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10847        fi
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10849$as_echo "$tool_specified" >&6; }
10850      fi
10851    fi
10852  fi
10853
10854
10855
10856  if test "x$UNIQ" = x; then
10857    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10858  fi
10859
10860
10861
10862
10863
10864  # Publish this variable in the help.
10865
10866
10867  if test "x$WC" = x; then
10868    # The variable is not set by user, try to locate tool using the code snippet
10869    for ac_prog in wc
10870do
10871  # Extract the first word of "$ac_prog", so it can be a program name with args.
10872set dummy $ac_prog; ac_word=$2
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874$as_echo_n "checking for $ac_word... " >&6; }
10875if ${ac_cv_path_WC+:} false; then :
10876  $as_echo_n "(cached) " >&6
10877else
10878  case $WC in
10879  [\\/]* | ?:[\\/]*)
10880  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10881  ;;
10882  *)
10883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884for as_dir in $PATH
10885do
10886  IFS=$as_save_IFS
10887  test -z "$as_dir" && as_dir=.
10888    for ac_exec_ext in '' $ac_executable_extensions; do
10889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892    break 2
10893  fi
10894done
10895  done
10896IFS=$as_save_IFS
10897
10898  ;;
10899esac
10900fi
10901WC=$ac_cv_path_WC
10902if test -n "$WC"; then
10903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10904$as_echo "$WC" >&6; }
10905else
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908fi
10909
10910
10911  test -n "$WC" && break
10912done
10913
10914  else
10915    # The variable is set, but is it from the command line or the environment?
10916
10917    # Try to remove the string !WC! from our list.
10918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10920      # If it failed, the variable was not from the command line. Ignore it,
10921      # but warn the user (except for BASH, which is always set by the calling BASH).
10922      if test "xWC" != xBASH; then
10923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10924$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10925      fi
10926      # Try to locate tool using the code snippet
10927      for ac_prog in wc
10928do
10929  # Extract the first word of "$ac_prog", so it can be a program name with args.
10930set dummy $ac_prog; ac_word=$2
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10932$as_echo_n "checking for $ac_word... " >&6; }
10933if ${ac_cv_path_WC+:} false; then :
10934  $as_echo_n "(cached) " >&6
10935else
10936  case $WC in
10937  [\\/]* | ?:[\\/]*)
10938  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10939  ;;
10940  *)
10941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10942for as_dir in $PATH
10943do
10944  IFS=$as_save_IFS
10945  test -z "$as_dir" && as_dir=.
10946    for ac_exec_ext in '' $ac_executable_extensions; do
10947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10948    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10950    break 2
10951  fi
10952done
10953  done
10954IFS=$as_save_IFS
10955
10956  ;;
10957esac
10958fi
10959WC=$ac_cv_path_WC
10960if test -n "$WC"; then
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10962$as_echo "$WC" >&6; }
10963else
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966fi
10967
10968
10969  test -n "$WC" && break
10970done
10971
10972    else
10973      # If it succeeded, then it was overridden by the user. We will use it
10974      # for the tool.
10975
10976      # First remove it from the list of overridden variables, so we can test
10977      # for unknown variables in the end.
10978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10979
10980      # Check if the provided tool contains a complete path.
10981      tool_specified="$WC"
10982      tool_basename="${tool_specified##*/}"
10983      if test "x$tool_basename" = "x$tool_specified"; then
10984        # A command without a complete path is provided, search $PATH.
10985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10986$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10987        # Extract the first word of "$tool_basename", so it can be a program name with args.
10988set dummy $tool_basename; ac_word=$2
10989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10990$as_echo_n "checking for $ac_word... " >&6; }
10991if ${ac_cv_path_WC+:} false; then :
10992  $as_echo_n "(cached) " >&6
10993else
10994  case $WC in
10995  [\\/]* | ?:[\\/]*)
10996  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10997  ;;
10998  *)
10999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11000for as_dir in $PATH
11001do
11002  IFS=$as_save_IFS
11003  test -z "$as_dir" && as_dir=.
11004    for ac_exec_ext in '' $ac_executable_extensions; do
11005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11006    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11008    break 2
11009  fi
11010done
11011  done
11012IFS=$as_save_IFS
11013
11014  ;;
11015esac
11016fi
11017WC=$ac_cv_path_WC
11018if test -n "$WC"; then
11019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11020$as_echo "$WC" >&6; }
11021else
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023$as_echo "no" >&6; }
11024fi
11025
11026
11027        if test "x$WC" = x; then
11028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11029        fi
11030      else
11031        # Otherwise we believe it is a complete path. Use it as it is.
11032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11033$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11035$as_echo_n "checking for WC... " >&6; }
11036        if test ! -x "$tool_specified"; then
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11038$as_echo "not found" >&6; }
11039          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11040        fi
11041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11042$as_echo "$tool_specified" >&6; }
11043      fi
11044    fi
11045  fi
11046
11047
11048
11049  if test "x$WC" = x; then
11050    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11051  fi
11052
11053
11054
11055
11056
11057  # Publish this variable in the help.
11058
11059
11060  if test "x$WHICH" = x; then
11061    # The variable is not set by user, try to locate tool using the code snippet
11062    for ac_prog in which
11063do
11064  # Extract the first word of "$ac_prog", so it can be a program name with args.
11065set dummy $ac_prog; ac_word=$2
11066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11067$as_echo_n "checking for $ac_word... " >&6; }
11068if ${ac_cv_path_WHICH+:} false; then :
11069  $as_echo_n "(cached) " >&6
11070else
11071  case $WHICH in
11072  [\\/]* | ?:[\\/]*)
11073  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11074  ;;
11075  *)
11076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11077for as_dir in $PATH
11078do
11079  IFS=$as_save_IFS
11080  test -z "$as_dir" && as_dir=.
11081    for ac_exec_ext in '' $ac_executable_extensions; do
11082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11083    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11085    break 2
11086  fi
11087done
11088  done
11089IFS=$as_save_IFS
11090
11091  ;;
11092esac
11093fi
11094WHICH=$ac_cv_path_WHICH
11095if test -n "$WHICH"; then
11096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11097$as_echo "$WHICH" >&6; }
11098else
11099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11100$as_echo "no" >&6; }
11101fi
11102
11103
11104  test -n "$WHICH" && break
11105done
11106
11107  else
11108    # The variable is set, but is it from the command line or the environment?
11109
11110    # Try to remove the string !WHICH! from our list.
11111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11113      # If it failed, the variable was not from the command line. Ignore it,
11114      # but warn the user (except for BASH, which is always set by the calling BASH).
11115      if test "xWHICH" != xBASH; then
11116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11117$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11118      fi
11119      # Try to locate tool using the code snippet
11120      for ac_prog in which
11121do
11122  # Extract the first word of "$ac_prog", so it can be a program name with args.
11123set dummy $ac_prog; ac_word=$2
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11125$as_echo_n "checking for $ac_word... " >&6; }
11126if ${ac_cv_path_WHICH+:} false; then :
11127  $as_echo_n "(cached) " >&6
11128else
11129  case $WHICH in
11130  [\\/]* | ?:[\\/]*)
11131  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11132  ;;
11133  *)
11134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11135for as_dir in $PATH
11136do
11137  IFS=$as_save_IFS
11138  test -z "$as_dir" && as_dir=.
11139    for ac_exec_ext in '' $ac_executable_extensions; do
11140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11141    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11143    break 2
11144  fi
11145done
11146  done
11147IFS=$as_save_IFS
11148
11149  ;;
11150esac
11151fi
11152WHICH=$ac_cv_path_WHICH
11153if test -n "$WHICH"; then
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11155$as_echo "$WHICH" >&6; }
11156else
11157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
11159fi
11160
11161
11162  test -n "$WHICH" && break
11163done
11164
11165    else
11166      # If it succeeded, then it was overridden by the user. We will use it
11167      # for the tool.
11168
11169      # First remove it from the list of overridden variables, so we can test
11170      # for unknown variables in the end.
11171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11172
11173      # Check if the provided tool contains a complete path.
11174      tool_specified="$WHICH"
11175      tool_basename="${tool_specified##*/}"
11176      if test "x$tool_basename" = "x$tool_specified"; then
11177        # A command without a complete path is provided, search $PATH.
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11179$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11180        # Extract the first word of "$tool_basename", so it can be a program name with args.
11181set dummy $tool_basename; ac_word=$2
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11183$as_echo_n "checking for $ac_word... " >&6; }
11184if ${ac_cv_path_WHICH+:} false; then :
11185  $as_echo_n "(cached) " >&6
11186else
11187  case $WHICH in
11188  [\\/]* | ?:[\\/]*)
11189  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11190  ;;
11191  *)
11192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11193for as_dir in $PATH
11194do
11195  IFS=$as_save_IFS
11196  test -z "$as_dir" && as_dir=.
11197    for ac_exec_ext in '' $ac_executable_extensions; do
11198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11199    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11201    break 2
11202  fi
11203done
11204  done
11205IFS=$as_save_IFS
11206
11207  ;;
11208esac
11209fi
11210WHICH=$ac_cv_path_WHICH
11211if test -n "$WHICH"; then
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11213$as_echo "$WHICH" >&6; }
11214else
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216$as_echo "no" >&6; }
11217fi
11218
11219
11220        if test "x$WHICH" = x; then
11221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11222        fi
11223      else
11224        # Otherwise we believe it is a complete path. Use it as it is.
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11226$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11228$as_echo_n "checking for WHICH... " >&6; }
11229        if test ! -x "$tool_specified"; then
11230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11231$as_echo "not found" >&6; }
11232          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11233        fi
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11235$as_echo "$tool_specified" >&6; }
11236      fi
11237    fi
11238  fi
11239
11240
11241
11242  if test "x$WHICH" = x; then
11243    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11244  fi
11245
11246
11247
11248
11249
11250  # Publish this variable in the help.
11251
11252
11253  if test "x$XARGS" = x; then
11254    # The variable is not set by user, try to locate tool using the code snippet
11255    for ac_prog in xargs
11256do
11257  # Extract the first word of "$ac_prog", so it can be a program name with args.
11258set dummy $ac_prog; ac_word=$2
11259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260$as_echo_n "checking for $ac_word... " >&6; }
11261if ${ac_cv_path_XARGS+:} false; then :
11262  $as_echo_n "(cached) " >&6
11263else
11264  case $XARGS in
11265  [\\/]* | ?:[\\/]*)
11266  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11267  ;;
11268  *)
11269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11270for as_dir in $PATH
11271do
11272  IFS=$as_save_IFS
11273  test -z "$as_dir" && as_dir=.
11274    for ac_exec_ext in '' $ac_executable_extensions; do
11275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11276    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11278    break 2
11279  fi
11280done
11281  done
11282IFS=$as_save_IFS
11283
11284  ;;
11285esac
11286fi
11287XARGS=$ac_cv_path_XARGS
11288if test -n "$XARGS"; then
11289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11290$as_echo "$XARGS" >&6; }
11291else
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
11294fi
11295
11296
11297  test -n "$XARGS" && break
11298done
11299
11300  else
11301    # The variable is set, but is it from the command line or the environment?
11302
11303    # Try to remove the string !XARGS! from our list.
11304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11306      # If it failed, the variable was not from the command line. Ignore it,
11307      # but warn the user (except for BASH, which is always set by the calling BASH).
11308      if test "xXARGS" != xBASH; then
11309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11310$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11311      fi
11312      # Try to locate tool using the code snippet
11313      for ac_prog in xargs
11314do
11315  # Extract the first word of "$ac_prog", so it can be a program name with args.
11316set dummy $ac_prog; ac_word=$2
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11318$as_echo_n "checking for $ac_word... " >&6; }
11319if ${ac_cv_path_XARGS+:} false; then :
11320  $as_echo_n "(cached) " >&6
11321else
11322  case $XARGS in
11323  [\\/]* | ?:[\\/]*)
11324  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11325  ;;
11326  *)
11327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11328for as_dir in $PATH
11329do
11330  IFS=$as_save_IFS
11331  test -z "$as_dir" && as_dir=.
11332    for ac_exec_ext in '' $ac_executable_extensions; do
11333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11334    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11336    break 2
11337  fi
11338done
11339  done
11340IFS=$as_save_IFS
11341
11342  ;;
11343esac
11344fi
11345XARGS=$ac_cv_path_XARGS
11346if test -n "$XARGS"; then
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11348$as_echo "$XARGS" >&6; }
11349else
11350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
11352fi
11353
11354
11355  test -n "$XARGS" && break
11356done
11357
11358    else
11359      # If it succeeded, then it was overridden by the user. We will use it
11360      # for the tool.
11361
11362      # First remove it from the list of overridden variables, so we can test
11363      # for unknown variables in the end.
11364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11365
11366      # Check if the provided tool contains a complete path.
11367      tool_specified="$XARGS"
11368      tool_basename="${tool_specified##*/}"
11369      if test "x$tool_basename" = "x$tool_specified"; then
11370        # A command without a complete path is provided, search $PATH.
11371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11372$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11373        # Extract the first word of "$tool_basename", so it can be a program name with args.
11374set dummy $tool_basename; ac_word=$2
11375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11376$as_echo_n "checking for $ac_word... " >&6; }
11377if ${ac_cv_path_XARGS+:} false; then :
11378  $as_echo_n "(cached) " >&6
11379else
11380  case $XARGS in
11381  [\\/]* | ?:[\\/]*)
11382  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11383  ;;
11384  *)
11385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388  IFS=$as_save_IFS
11389  test -z "$as_dir" && as_dir=.
11390    for ac_exec_ext in '' $ac_executable_extensions; do
11391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394    break 2
11395  fi
11396done
11397  done
11398IFS=$as_save_IFS
11399
11400  ;;
11401esac
11402fi
11403XARGS=$ac_cv_path_XARGS
11404if test -n "$XARGS"; then
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11406$as_echo "$XARGS" >&6; }
11407else
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
11410fi
11411
11412
11413        if test "x$XARGS" = x; then
11414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11415        fi
11416      else
11417        # Otherwise we believe it is a complete path. Use it as it is.
11418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11419$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11421$as_echo_n "checking for XARGS... " >&6; }
11422        if test ! -x "$tool_specified"; then
11423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11424$as_echo "not found" >&6; }
11425          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11426        fi
11427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11428$as_echo "$tool_specified" >&6; }
11429      fi
11430    fi
11431  fi
11432
11433
11434
11435  if test "x$XARGS" = x; then
11436    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11437  fi
11438
11439
11440
11441  # Then required tools that require some special treatment.
11442
11443
11444  # Publish this variable in the help.
11445
11446
11447  if test "x$AWK" = x; then
11448    # The variable is not set by user, try to locate tool using the code snippet
11449    for ac_prog in gawk mawk nawk awk
11450do
11451  # Extract the first word of "$ac_prog", so it can be a program name with args.
11452set dummy $ac_prog; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_prog_AWK+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  if test -n "$AWK"; then
11459  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11460else
11461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_prog_AWK="$ac_prog"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476fi
11477fi
11478AWK=$ac_cv_prog_AWK
11479if test -n "$AWK"; then
11480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11481$as_echo "$AWK" >&6; }
11482else
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
11485fi
11486
11487
11488  test -n "$AWK" && break
11489done
11490
11491  else
11492    # The variable is set, but is it from the command line or the environment?
11493
11494    # Try to remove the string !AWK! from our list.
11495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11497      # If it failed, the variable was not from the command line. Ignore it,
11498      # but warn the user (except for BASH, which is always set by the calling BASH).
11499      if test "xAWK" != xBASH; then
11500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11501$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11502      fi
11503      # Try to locate tool using the code snippet
11504      for ac_prog in gawk mawk nawk awk
11505do
11506  # Extract the first word of "$ac_prog", so it can be a program name with args.
11507set dummy $ac_prog; ac_word=$2
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11509$as_echo_n "checking for $ac_word... " >&6; }
11510if ${ac_cv_prog_AWK+:} false; then :
11511  $as_echo_n "(cached) " >&6
11512else
11513  if test -n "$AWK"; then
11514  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11515else
11516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11517for as_dir in $PATH
11518do
11519  IFS=$as_save_IFS
11520  test -z "$as_dir" && as_dir=.
11521    for ac_exec_ext in '' $ac_executable_extensions; do
11522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11523    ac_cv_prog_AWK="$ac_prog"
11524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11525    break 2
11526  fi
11527done
11528  done
11529IFS=$as_save_IFS
11530
11531fi
11532fi
11533AWK=$ac_cv_prog_AWK
11534if test -n "$AWK"; then
11535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11536$as_echo "$AWK" >&6; }
11537else
11538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
11540fi
11541
11542
11543  test -n "$AWK" && break
11544done
11545
11546    else
11547      # If it succeeded, then it was overridden by the user. We will use it
11548      # for the tool.
11549
11550      # First remove it from the list of overridden variables, so we can test
11551      # for unknown variables in the end.
11552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11553
11554      # Check if the provided tool contains a complete path.
11555      tool_specified="$AWK"
11556      tool_basename="${tool_specified##*/}"
11557      if test "x$tool_basename" = "x$tool_specified"; then
11558        # A command without a complete path is provided, search $PATH.
11559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11560$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11561        # Extract the first word of "$tool_basename", so it can be a program name with args.
11562set dummy $tool_basename; ac_word=$2
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11564$as_echo_n "checking for $ac_word... " >&6; }
11565if ${ac_cv_path_AWK+:} false; then :
11566  $as_echo_n "(cached) " >&6
11567else
11568  case $AWK in
11569  [\\/]* | ?:[\\/]*)
11570  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11571  ;;
11572  *)
11573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574for as_dir in $PATH
11575do
11576  IFS=$as_save_IFS
11577  test -z "$as_dir" && as_dir=.
11578    for ac_exec_ext in '' $ac_executable_extensions; do
11579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11580    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11582    break 2
11583  fi
11584done
11585  done
11586IFS=$as_save_IFS
11587
11588  ;;
11589esac
11590fi
11591AWK=$ac_cv_path_AWK
11592if test -n "$AWK"; then
11593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11594$as_echo "$AWK" >&6; }
11595else
11596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
11598fi
11599
11600
11601        if test "x$AWK" = x; then
11602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11603        fi
11604      else
11605        # Otherwise we believe it is a complete path. Use it as it is.
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11607$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11609$as_echo_n "checking for AWK... " >&6; }
11610        if test ! -x "$tool_specified"; then
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11612$as_echo "not found" >&6; }
11613          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11614        fi
11615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11616$as_echo "$tool_specified" >&6; }
11617      fi
11618    fi
11619  fi
11620
11621
11622  if test "x$AWK" = x; then
11623    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11624  fi
11625
11626
11627
11628
11629  # Publish this variable in the help.
11630
11631
11632  if test "x$GREP" = x; then
11633    # The variable is not set by user, try to locate tool using the code snippet
11634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636if ${ac_cv_path_GREP+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  if test -z "$GREP"; then
11640  ac_path_GREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in grep ggrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_GREP" || continue
11651# Check for GNU ac_path_GREP and select it if it is found.
11652  # Check for GNU $ac_path_GREP
11653case `"$ac_path_GREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'GREP' >> "conftest.nl"
11665    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_GREP="$ac_path_GREP"
11671      ac_path_GREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_GREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_GREP"; then
11685    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_GREP=$GREP
11689fi
11690
11691fi
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693$as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697  else
11698    # The variable is set, but is it from the command line or the environment?
11699
11700    # Try to remove the string !GREP! from our list.
11701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11703      # If it failed, the variable was not from the command line. Ignore it,
11704      # but warn the user (except for BASH, which is always set by the calling BASH).
11705      if test "xGREP" != xBASH; then
11706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11707$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11708      fi
11709      # Try to locate tool using the code snippet
11710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11711$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11712if ${ac_cv_path_GREP+:} false; then :
11713  $as_echo_n "(cached) " >&6
11714else
11715  if test -z "$GREP"; then
11716  ac_path_GREP_found=false
11717  # Loop through the user's path and test for each of PROGNAME-LIST
11718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11720do
11721  IFS=$as_save_IFS
11722  test -z "$as_dir" && as_dir=.
11723    for ac_prog in grep ggrep; do
11724    for ac_exec_ext in '' $ac_executable_extensions; do
11725      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11726      as_fn_executable_p "$ac_path_GREP" || continue
11727# Check for GNU ac_path_GREP and select it if it is found.
11728  # Check for GNU $ac_path_GREP
11729case `"$ac_path_GREP" --version 2>&1` in
11730*GNU*)
11731  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11732*)
11733  ac_count=0
11734  $as_echo_n 0123456789 >"conftest.in"
11735  while :
11736  do
11737    cat "conftest.in" "conftest.in" >"conftest.tmp"
11738    mv "conftest.tmp" "conftest.in"
11739    cp "conftest.in" "conftest.nl"
11740    $as_echo 'GREP' >> "conftest.nl"
11741    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11742    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11743    as_fn_arith $ac_count + 1 && ac_count=$as_val
11744    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11745      # Best one so far, save it but keep looking for a better one
11746      ac_cv_path_GREP="$ac_path_GREP"
11747      ac_path_GREP_max=$ac_count
11748    fi
11749    # 10*(2^10) chars as input seems more than enough
11750    test $ac_count -gt 10 && break
11751  done
11752  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11753esac
11754
11755      $ac_path_GREP_found && break 3
11756    done
11757  done
11758  done
11759IFS=$as_save_IFS
11760  if test -z "$ac_cv_path_GREP"; then
11761    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11762  fi
11763else
11764  ac_cv_path_GREP=$GREP
11765fi
11766
11767fi
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11769$as_echo "$ac_cv_path_GREP" >&6; }
11770 GREP="$ac_cv_path_GREP"
11771
11772
11773    else
11774      # If it succeeded, then it was overridden by the user. We will use it
11775      # for the tool.
11776
11777      # First remove it from the list of overridden variables, so we can test
11778      # for unknown variables in the end.
11779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11780
11781      # Check if the provided tool contains a complete path.
11782      tool_specified="$GREP"
11783      tool_basename="${tool_specified##*/}"
11784      if test "x$tool_basename" = "x$tool_specified"; then
11785        # A command without a complete path is provided, search $PATH.
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11787$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11788        # Extract the first word of "$tool_basename", so it can be a program name with args.
11789set dummy $tool_basename; ac_word=$2
11790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11791$as_echo_n "checking for $ac_word... " >&6; }
11792if ${ac_cv_path_GREP+:} false; then :
11793  $as_echo_n "(cached) " >&6
11794else
11795  case $GREP in
11796  [\\/]* | ?:[\\/]*)
11797  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11798  ;;
11799  *)
11800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11801for as_dir in $PATH
11802do
11803  IFS=$as_save_IFS
11804  test -z "$as_dir" && as_dir=.
11805    for ac_exec_ext in '' $ac_executable_extensions; do
11806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11807    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11809    break 2
11810  fi
11811done
11812  done
11813IFS=$as_save_IFS
11814
11815  ;;
11816esac
11817fi
11818GREP=$ac_cv_path_GREP
11819if test -n "$GREP"; then
11820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11821$as_echo "$GREP" >&6; }
11822else
11823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825fi
11826
11827
11828        if test "x$GREP" = x; then
11829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11830        fi
11831      else
11832        # Otherwise we believe it is a complete path. Use it as it is.
11833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11834$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11836$as_echo_n "checking for GREP... " >&6; }
11837        if test ! -x "$tool_specified"; then
11838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11839$as_echo "not found" >&6; }
11840          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11841        fi
11842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11843$as_echo "$tool_specified" >&6; }
11844      fi
11845    fi
11846  fi
11847
11848
11849  if test "x$GREP" = x; then
11850    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11851  fi
11852
11853
11854
11855
11856  # Publish this variable in the help.
11857
11858
11859  if test "x$EGREP" = x; then
11860    # The variable is not set by user, try to locate tool using the code snippet
11861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11862$as_echo_n "checking for egrep... " >&6; }
11863if ${ac_cv_path_EGREP+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11867   then ac_cv_path_EGREP="$GREP -E"
11868   else
11869     if test -z "$EGREP"; then
11870  ac_path_EGREP_found=false
11871  # Loop through the user's path and test for each of PROGNAME-LIST
11872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11874do
11875  IFS=$as_save_IFS
11876  test -z "$as_dir" && as_dir=.
11877    for ac_prog in egrep; do
11878    for ac_exec_ext in '' $ac_executable_extensions; do
11879      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11880      as_fn_executable_p "$ac_path_EGREP" || continue
11881# Check for GNU ac_path_EGREP and select it if it is found.
11882  # Check for GNU $ac_path_EGREP
11883case `"$ac_path_EGREP" --version 2>&1` in
11884*GNU*)
11885  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11886*)
11887  ac_count=0
11888  $as_echo_n 0123456789 >"conftest.in"
11889  while :
11890  do
11891    cat "conftest.in" "conftest.in" >"conftest.tmp"
11892    mv "conftest.tmp" "conftest.in"
11893    cp "conftest.in" "conftest.nl"
11894    $as_echo 'EGREP' >> "conftest.nl"
11895    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11896    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11897    as_fn_arith $ac_count + 1 && ac_count=$as_val
11898    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11899      # Best one so far, save it but keep looking for a better one
11900      ac_cv_path_EGREP="$ac_path_EGREP"
11901      ac_path_EGREP_max=$ac_count
11902    fi
11903    # 10*(2^10) chars as input seems more than enough
11904    test $ac_count -gt 10 && break
11905  done
11906  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11907esac
11908
11909      $ac_path_EGREP_found && break 3
11910    done
11911  done
11912  done
11913IFS=$as_save_IFS
11914  if test -z "$ac_cv_path_EGREP"; then
11915    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11916  fi
11917else
11918  ac_cv_path_EGREP=$EGREP
11919fi
11920
11921   fi
11922fi
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11924$as_echo "$ac_cv_path_EGREP" >&6; }
11925 EGREP="$ac_cv_path_EGREP"
11926
11927
11928  else
11929    # The variable is set, but is it from the command line or the environment?
11930
11931    # Try to remove the string !EGREP! from our list.
11932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11934      # If it failed, the variable was not from the command line. Ignore it,
11935      # but warn the user (except for BASH, which is always set by the calling BASH).
11936      if test "xEGREP" != xBASH; then
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11938$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11939      fi
11940      # Try to locate tool using the code snippet
11941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11942$as_echo_n "checking for egrep... " >&6; }
11943if ${ac_cv_path_EGREP+:} false; then :
11944  $as_echo_n "(cached) " >&6
11945else
11946  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11947   then ac_cv_path_EGREP="$GREP -E"
11948   else
11949     if test -z "$EGREP"; then
11950  ac_path_EGREP_found=false
11951  # Loop through the user's path and test for each of PROGNAME-LIST
11952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11954do
11955  IFS=$as_save_IFS
11956  test -z "$as_dir" && as_dir=.
11957    for ac_prog in egrep; do
11958    for ac_exec_ext in '' $ac_executable_extensions; do
11959      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11960      as_fn_executable_p "$ac_path_EGREP" || continue
11961# Check for GNU ac_path_EGREP and select it if it is found.
11962  # Check for GNU $ac_path_EGREP
11963case `"$ac_path_EGREP" --version 2>&1` in
11964*GNU*)
11965  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11966*)
11967  ac_count=0
11968  $as_echo_n 0123456789 >"conftest.in"
11969  while :
11970  do
11971    cat "conftest.in" "conftest.in" >"conftest.tmp"
11972    mv "conftest.tmp" "conftest.in"
11973    cp "conftest.in" "conftest.nl"
11974    $as_echo 'EGREP' >> "conftest.nl"
11975    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11976    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11977    as_fn_arith $ac_count + 1 && ac_count=$as_val
11978    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11979      # Best one so far, save it but keep looking for a better one
11980      ac_cv_path_EGREP="$ac_path_EGREP"
11981      ac_path_EGREP_max=$ac_count
11982    fi
11983    # 10*(2^10) chars as input seems more than enough
11984    test $ac_count -gt 10 && break
11985  done
11986  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11987esac
11988
11989      $ac_path_EGREP_found && break 3
11990    done
11991  done
11992  done
11993IFS=$as_save_IFS
11994  if test -z "$ac_cv_path_EGREP"; then
11995    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11996  fi
11997else
11998  ac_cv_path_EGREP=$EGREP
11999fi
12000
12001   fi
12002fi
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12004$as_echo "$ac_cv_path_EGREP" >&6; }
12005 EGREP="$ac_cv_path_EGREP"
12006
12007
12008    else
12009      # If it succeeded, then it was overridden by the user. We will use it
12010      # for the tool.
12011
12012      # First remove it from the list of overridden variables, so we can test
12013      # for unknown variables in the end.
12014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12015
12016      # Check if the provided tool contains a complete path.
12017      tool_specified="$EGREP"
12018      tool_basename="${tool_specified##*/}"
12019      if test "x$tool_basename" = "x$tool_specified"; then
12020        # A command without a complete path is provided, search $PATH.
12021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12022$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12023        # Extract the first word of "$tool_basename", so it can be a program name with args.
12024set dummy $tool_basename; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if ${ac_cv_path_EGREP+:} false; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $EGREP in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050  ;;
12051esac
12052fi
12053EGREP=$ac_cv_path_EGREP
12054if test -n "$EGREP"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12056$as_echo "$EGREP" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063        if test "x$EGREP" = x; then
12064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065        fi
12066      else
12067        # Otherwise we believe it is a complete path. Use it as it is.
12068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12069$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12071$as_echo_n "checking for EGREP... " >&6; }
12072        if test ! -x "$tool_specified"; then
12073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074$as_echo "not found" >&6; }
12075          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12076        fi
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078$as_echo "$tool_specified" >&6; }
12079      fi
12080    fi
12081  fi
12082
12083
12084  if test "x$EGREP" = x; then
12085    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12086  fi
12087
12088
12089
12090
12091  # Publish this variable in the help.
12092
12093
12094  if test "x$FGREP" = x; then
12095    # The variable is not set by user, try to locate tool using the code snippet
12096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12097$as_echo_n "checking for fgrep... " >&6; }
12098if ${ac_cv_path_FGREP+:} false; then :
12099  $as_echo_n "(cached) " >&6
12100else
12101  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12102   then ac_cv_path_FGREP="$GREP -F"
12103   else
12104     if test -z "$FGREP"; then
12105  ac_path_FGREP_found=false
12106  # Loop through the user's path and test for each of PROGNAME-LIST
12107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12109do
12110  IFS=$as_save_IFS
12111  test -z "$as_dir" && as_dir=.
12112    for ac_prog in fgrep; do
12113    for ac_exec_ext in '' $ac_executable_extensions; do
12114      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12115      as_fn_executable_p "$ac_path_FGREP" || continue
12116# Check for GNU ac_path_FGREP and select it if it is found.
12117  # Check for GNU $ac_path_FGREP
12118case `"$ac_path_FGREP" --version 2>&1` in
12119*GNU*)
12120  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12121*)
12122  ac_count=0
12123  $as_echo_n 0123456789 >"conftest.in"
12124  while :
12125  do
12126    cat "conftest.in" "conftest.in" >"conftest.tmp"
12127    mv "conftest.tmp" "conftest.in"
12128    cp "conftest.in" "conftest.nl"
12129    $as_echo 'FGREP' >> "conftest.nl"
12130    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12131    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12132    as_fn_arith $ac_count + 1 && ac_count=$as_val
12133    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12134      # Best one so far, save it but keep looking for a better one
12135      ac_cv_path_FGREP="$ac_path_FGREP"
12136      ac_path_FGREP_max=$ac_count
12137    fi
12138    # 10*(2^10) chars as input seems more than enough
12139    test $ac_count -gt 10 && break
12140  done
12141  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12142esac
12143
12144      $ac_path_FGREP_found && break 3
12145    done
12146  done
12147  done
12148IFS=$as_save_IFS
12149  if test -z "$ac_cv_path_FGREP"; then
12150    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12151  fi
12152else
12153  ac_cv_path_FGREP=$FGREP
12154fi
12155
12156   fi
12157fi
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12159$as_echo "$ac_cv_path_FGREP" >&6; }
12160 FGREP="$ac_cv_path_FGREP"
12161
12162
12163  else
12164    # The variable is set, but is it from the command line or the environment?
12165
12166    # Try to remove the string !FGREP! from our list.
12167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12169      # If it failed, the variable was not from the command line. Ignore it,
12170      # but warn the user (except for BASH, which is always set by the calling BASH).
12171      if test "xFGREP" != xBASH; then
12172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12173$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12174      fi
12175      # Try to locate tool using the code snippet
12176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12177$as_echo_n "checking for fgrep... " >&6; }
12178if ${ac_cv_path_FGREP+:} false; then :
12179  $as_echo_n "(cached) " >&6
12180else
12181  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12182   then ac_cv_path_FGREP="$GREP -F"
12183   else
12184     if test -z "$FGREP"; then
12185  ac_path_FGREP_found=false
12186  # Loop through the user's path and test for each of PROGNAME-LIST
12187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12188for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12189do
12190  IFS=$as_save_IFS
12191  test -z "$as_dir" && as_dir=.
12192    for ac_prog in fgrep; do
12193    for ac_exec_ext in '' $ac_executable_extensions; do
12194      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12195      as_fn_executable_p "$ac_path_FGREP" || continue
12196# Check for GNU ac_path_FGREP and select it if it is found.
12197  # Check for GNU $ac_path_FGREP
12198case `"$ac_path_FGREP" --version 2>&1` in
12199*GNU*)
12200  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12201*)
12202  ac_count=0
12203  $as_echo_n 0123456789 >"conftest.in"
12204  while :
12205  do
12206    cat "conftest.in" "conftest.in" >"conftest.tmp"
12207    mv "conftest.tmp" "conftest.in"
12208    cp "conftest.in" "conftest.nl"
12209    $as_echo 'FGREP' >> "conftest.nl"
12210    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12211    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12212    as_fn_arith $ac_count + 1 && ac_count=$as_val
12213    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12214      # Best one so far, save it but keep looking for a better one
12215      ac_cv_path_FGREP="$ac_path_FGREP"
12216      ac_path_FGREP_max=$ac_count
12217    fi
12218    # 10*(2^10) chars as input seems more than enough
12219    test $ac_count -gt 10 && break
12220  done
12221  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12222esac
12223
12224      $ac_path_FGREP_found && break 3
12225    done
12226  done
12227  done
12228IFS=$as_save_IFS
12229  if test -z "$ac_cv_path_FGREP"; then
12230    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12231  fi
12232else
12233  ac_cv_path_FGREP=$FGREP
12234fi
12235
12236   fi
12237fi
12238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12239$as_echo "$ac_cv_path_FGREP" >&6; }
12240 FGREP="$ac_cv_path_FGREP"
12241
12242
12243    else
12244      # If it succeeded, then it was overridden by the user. We will use it
12245      # for the tool.
12246
12247      # First remove it from the list of overridden variables, so we can test
12248      # for unknown variables in the end.
12249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12250
12251      # Check if the provided tool contains a complete path.
12252      tool_specified="$FGREP"
12253      tool_basename="${tool_specified##*/}"
12254      if test "x$tool_basename" = "x$tool_specified"; then
12255        # A command without a complete path is provided, search $PATH.
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12257$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12258        # Extract the first word of "$tool_basename", so it can be a program name with args.
12259set dummy $tool_basename; ac_word=$2
12260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12261$as_echo_n "checking for $ac_word... " >&6; }
12262if ${ac_cv_path_FGREP+:} false; then :
12263  $as_echo_n "(cached) " >&6
12264else
12265  case $FGREP in
12266  [\\/]* | ?:[\\/]*)
12267  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12268  ;;
12269  *)
12270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271for as_dir in $PATH
12272do
12273  IFS=$as_save_IFS
12274  test -z "$as_dir" && as_dir=.
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12277    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12279    break 2
12280  fi
12281done
12282  done
12283IFS=$as_save_IFS
12284
12285  ;;
12286esac
12287fi
12288FGREP=$ac_cv_path_FGREP
12289if test -n "$FGREP"; then
12290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12291$as_echo "$FGREP" >&6; }
12292else
12293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12294$as_echo "no" >&6; }
12295fi
12296
12297
12298        if test "x$FGREP" = x; then
12299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12300        fi
12301      else
12302        # Otherwise we believe it is a complete path. Use it as it is.
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12304$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12306$as_echo_n "checking for FGREP... " >&6; }
12307        if test ! -x "$tool_specified"; then
12308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12309$as_echo "not found" >&6; }
12310          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12311        fi
12312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12313$as_echo "$tool_specified" >&6; }
12314      fi
12315    fi
12316  fi
12317
12318
12319  if test "x$FGREP" = x; then
12320    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12321  fi
12322
12323
12324
12325
12326  # Publish this variable in the help.
12327
12328
12329  if test "x$SED" = x; then
12330    # The variable is not set by user, try to locate tool using the code snippet
12331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12332$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12333if ${ac_cv_path_SED+:} false; then :
12334  $as_echo_n "(cached) " >&6
12335else
12336            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12337     for ac_i in 1 2 3 4 5 6 7; do
12338       ac_script="$ac_script$as_nl$ac_script"
12339     done
12340     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12341     { ac_script=; unset ac_script;}
12342     if test -z "$SED"; then
12343  ac_path_SED_found=false
12344  # Loop through the user's path and test for each of PROGNAME-LIST
12345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12346for as_dir in $PATH
12347do
12348  IFS=$as_save_IFS
12349  test -z "$as_dir" && as_dir=.
12350    for ac_prog in sed gsed; do
12351    for ac_exec_ext in '' $ac_executable_extensions; do
12352      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12353      as_fn_executable_p "$ac_path_SED" || continue
12354# Check for GNU ac_path_SED and select it if it is found.
12355  # Check for GNU $ac_path_SED
12356case `"$ac_path_SED" --version 2>&1` in
12357*GNU*)
12358  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12359*)
12360  ac_count=0
12361  $as_echo_n 0123456789 >"conftest.in"
12362  while :
12363  do
12364    cat "conftest.in" "conftest.in" >"conftest.tmp"
12365    mv "conftest.tmp" "conftest.in"
12366    cp "conftest.in" "conftest.nl"
12367    $as_echo '' >> "conftest.nl"
12368    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12369    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12370    as_fn_arith $ac_count + 1 && ac_count=$as_val
12371    if test $ac_count -gt ${ac_path_SED_max-0}; then
12372      # Best one so far, save it but keep looking for a better one
12373      ac_cv_path_SED="$ac_path_SED"
12374      ac_path_SED_max=$ac_count
12375    fi
12376    # 10*(2^10) chars as input seems more than enough
12377    test $ac_count -gt 10 && break
12378  done
12379  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12380esac
12381
12382      $ac_path_SED_found && break 3
12383    done
12384  done
12385  done
12386IFS=$as_save_IFS
12387  if test -z "$ac_cv_path_SED"; then
12388    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12389  fi
12390else
12391  ac_cv_path_SED=$SED
12392fi
12393
12394fi
12395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12396$as_echo "$ac_cv_path_SED" >&6; }
12397 SED="$ac_cv_path_SED"
12398  rm -f conftest.sed
12399
12400  else
12401    # The variable is set, but is it from the command line or the environment?
12402
12403    # Try to remove the string !SED! from our list.
12404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12406      # If it failed, the variable was not from the command line. Ignore it,
12407      # but warn the user (except for BASH, which is always set by the calling BASH).
12408      if test "xSED" != xBASH; then
12409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12410$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12411      fi
12412      # Try to locate tool using the code snippet
12413      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12414$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12415if ${ac_cv_path_SED+:} false; then :
12416  $as_echo_n "(cached) " >&6
12417else
12418            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12419     for ac_i in 1 2 3 4 5 6 7; do
12420       ac_script="$ac_script$as_nl$ac_script"
12421     done
12422     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12423     { ac_script=; unset ac_script;}
12424     if test -z "$SED"; then
12425  ac_path_SED_found=false
12426  # Loop through the user's path and test for each of PROGNAME-LIST
12427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12428for as_dir in $PATH
12429do
12430  IFS=$as_save_IFS
12431  test -z "$as_dir" && as_dir=.
12432    for ac_prog in sed gsed; do
12433    for ac_exec_ext in '' $ac_executable_extensions; do
12434      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12435      as_fn_executable_p "$ac_path_SED" || continue
12436# Check for GNU ac_path_SED and select it if it is found.
12437  # Check for GNU $ac_path_SED
12438case `"$ac_path_SED" --version 2>&1` in
12439*GNU*)
12440  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12441*)
12442  ac_count=0
12443  $as_echo_n 0123456789 >"conftest.in"
12444  while :
12445  do
12446    cat "conftest.in" "conftest.in" >"conftest.tmp"
12447    mv "conftest.tmp" "conftest.in"
12448    cp "conftest.in" "conftest.nl"
12449    $as_echo '' >> "conftest.nl"
12450    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12451    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12452    as_fn_arith $ac_count + 1 && ac_count=$as_val
12453    if test $ac_count -gt ${ac_path_SED_max-0}; then
12454      # Best one so far, save it but keep looking for a better one
12455      ac_cv_path_SED="$ac_path_SED"
12456      ac_path_SED_max=$ac_count
12457    fi
12458    # 10*(2^10) chars as input seems more than enough
12459    test $ac_count -gt 10 && break
12460  done
12461  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12462esac
12463
12464      $ac_path_SED_found && break 3
12465    done
12466  done
12467  done
12468IFS=$as_save_IFS
12469  if test -z "$ac_cv_path_SED"; then
12470    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12471  fi
12472else
12473  ac_cv_path_SED=$SED
12474fi
12475
12476fi
12477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12478$as_echo "$ac_cv_path_SED" >&6; }
12479 SED="$ac_cv_path_SED"
12480  rm -f conftest.sed
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if the provided tool contains a complete path.
12491      tool_specified="$SED"
12492      tool_basename="${tool_specified##*/}"
12493      if test "x$tool_basename" = "x$tool_specified"; then
12494        # A command without a complete path is provided, search $PATH.
12495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12496$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12497        # Extract the first word of "$tool_basename", so it can be a program name with args.
12498set dummy $tool_basename; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_SED+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $SED in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527SED=$ac_cv_path_SED
12528if test -n "$SED"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12530$as_echo "$SED" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537        if test "x$SED" = x; then
12538          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539        fi
12540      else
12541        # Otherwise we believe it is a complete path. Use it as it is.
12542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12543$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12545$as_echo_n "checking for SED... " >&6; }
12546        if test ! -x "$tool_specified"; then
12547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548$as_echo "not found" >&6; }
12549          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12550        fi
12551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552$as_echo "$tool_specified" >&6; }
12553      fi
12554    fi
12555  fi
12556
12557
12558  if test "x$SED" = x; then
12559    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12560  fi
12561
12562
12563
12564  # Always force rm.
12565  RM="$RM -f"
12566
12567  # pwd behaves differently on various platforms and some don't support the -L flag.
12568  # Always use the bash builtin pwd to get uniform behavior.
12569  THEPWDCMD=pwd
12570
12571  # These are not required on all platforms
12572
12573
12574  # Publish this variable in the help.
12575
12576
12577  if test "x$CYGPATH" = x; then
12578    # The variable is not set by user, try to locate tool using the code snippet
12579    for ac_prog in cygpath
12580do
12581  # Extract the first word of "$ac_prog", so it can be a program name with args.
12582set dummy $ac_prog; ac_word=$2
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584$as_echo_n "checking for $ac_word... " >&6; }
12585if ${ac_cv_path_CYGPATH+:} false; then :
12586  $as_echo_n "(cached) " >&6
12587else
12588  case $CYGPATH in
12589  [\\/]* | ?:[\\/]*)
12590  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12591  ;;
12592  *)
12593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594for as_dir in $PATH
12595do
12596  IFS=$as_save_IFS
12597  test -z "$as_dir" && as_dir=.
12598    for ac_exec_ext in '' $ac_executable_extensions; do
12599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12600    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12602    break 2
12603  fi
12604done
12605  done
12606IFS=$as_save_IFS
12607
12608  ;;
12609esac
12610fi
12611CYGPATH=$ac_cv_path_CYGPATH
12612if test -n "$CYGPATH"; then
12613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12614$as_echo "$CYGPATH" >&6; }
12615else
12616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617$as_echo "no" >&6; }
12618fi
12619
12620
12621  test -n "$CYGPATH" && break
12622done
12623
12624  else
12625    # The variable is set, but is it from the command line or the environment?
12626
12627    # Try to remove the string !CYGPATH! from our list.
12628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12630      # If it failed, the variable was not from the command line. Ignore it,
12631      # but warn the user (except for BASH, which is always set by the calling BASH).
12632      if test "xCYGPATH" != xBASH; then
12633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12634$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12635      fi
12636      # Try to locate tool using the code snippet
12637      for ac_prog in cygpath
12638do
12639  # Extract the first word of "$ac_prog", so it can be a program name with args.
12640set dummy $ac_prog; ac_word=$2
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12642$as_echo_n "checking for $ac_word... " >&6; }
12643if ${ac_cv_path_CYGPATH+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  case $CYGPATH in
12647  [\\/]* | ?:[\\/]*)
12648  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12649  ;;
12650  *)
12651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652for as_dir in $PATH
12653do
12654  IFS=$as_save_IFS
12655  test -z "$as_dir" && as_dir=.
12656    for ac_exec_ext in '' $ac_executable_extensions; do
12657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12660    break 2
12661  fi
12662done
12663  done
12664IFS=$as_save_IFS
12665
12666  ;;
12667esac
12668fi
12669CYGPATH=$ac_cv_path_CYGPATH
12670if test -n "$CYGPATH"; then
12671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12672$as_echo "$CYGPATH" >&6; }
12673else
12674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675$as_echo "no" >&6; }
12676fi
12677
12678
12679  test -n "$CYGPATH" && break
12680done
12681
12682    else
12683      # If it succeeded, then it was overridden by the user. We will use it
12684      # for the tool.
12685
12686      # First remove it from the list of overridden variables, so we can test
12687      # for unknown variables in the end.
12688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12689
12690      # Check if the provided tool contains a complete path.
12691      tool_specified="$CYGPATH"
12692      tool_basename="${tool_specified##*/}"
12693      if test "x$tool_basename" = "x$tool_specified"; then
12694        # A command without a complete path is provided, search $PATH.
12695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12696$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12697        # Extract the first word of "$tool_basename", so it can be a program name with args.
12698set dummy $tool_basename; ac_word=$2
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700$as_echo_n "checking for $ac_word... " >&6; }
12701if ${ac_cv_path_CYGPATH+:} false; then :
12702  $as_echo_n "(cached) " >&6
12703else
12704  case $CYGPATH in
12705  [\\/]* | ?:[\\/]*)
12706  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12707  ;;
12708  *)
12709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712  IFS=$as_save_IFS
12713  test -z "$as_dir" && as_dir=.
12714    for ac_exec_ext in '' $ac_executable_extensions; do
12715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718    break 2
12719  fi
12720done
12721  done
12722IFS=$as_save_IFS
12723
12724  ;;
12725esac
12726fi
12727CYGPATH=$ac_cv_path_CYGPATH
12728if test -n "$CYGPATH"; then
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12730$as_echo "$CYGPATH" >&6; }
12731else
12732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734fi
12735
12736
12737        if test "x$CYGPATH" = x; then
12738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12739        fi
12740      else
12741        # Otherwise we believe it is a complete path. Use it as it is.
12742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12743$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12745$as_echo_n "checking for CYGPATH... " >&6; }
12746        if test ! -x "$tool_specified"; then
12747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12748$as_echo "not found" >&6; }
12749          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12750        fi
12751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12752$as_echo "$tool_specified" >&6; }
12753      fi
12754    fi
12755  fi
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if test "x$READLINK" = x; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in greadlink readlink
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_READLINK+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $READLINK in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797READLINK=$ac_cv_path_READLINK
12798if test -n "$READLINK"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12800$as_echo "$READLINK" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$READLINK" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !READLINK! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xREADLINK" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in greadlink readlink
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_READLINK+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $READLINK in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855READLINK=$ac_cv_path_READLINK
12856if test -n "$READLINK"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12858$as_echo "$READLINK" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$READLINK" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if the provided tool contains a complete path.
12877      tool_specified="$READLINK"
12878      tool_basename="${tool_specified##*/}"
12879      if test "x$tool_basename" = "x$tool_specified"; then
12880        # A command without a complete path is provided, search $PATH.
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12882$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12883        # Extract the first word of "$tool_basename", so it can be a program name with args.
12884set dummy $tool_basename; ac_word=$2
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886$as_echo_n "checking for $ac_word... " >&6; }
12887if ${ac_cv_path_READLINK+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  case $READLINK in
12891  [\\/]* | ?:[\\/]*)
12892  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12893  ;;
12894  *)
12895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896for as_dir in $PATH
12897do
12898  IFS=$as_save_IFS
12899  test -z "$as_dir" && as_dir=.
12900    for ac_exec_ext in '' $ac_executable_extensions; do
12901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904    break 2
12905  fi
12906done
12907  done
12908IFS=$as_save_IFS
12909
12910  ;;
12911esac
12912fi
12913READLINK=$ac_cv_path_READLINK
12914if test -n "$READLINK"; then
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12916$as_echo "$READLINK" >&6; }
12917else
12918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
12920fi
12921
12922
12923        if test "x$READLINK" = x; then
12924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12925        fi
12926      else
12927        # Otherwise we believe it is a complete path. Use it as it is.
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12929$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12931$as_echo_n "checking for READLINK... " >&6; }
12932        if test ! -x "$tool_specified"; then
12933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934$as_echo "not found" >&6; }
12935          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12936        fi
12937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12938$as_echo "$tool_specified" >&6; }
12939      fi
12940    fi
12941  fi
12942
12943
12944
12945
12946  # Publish this variable in the help.
12947
12948
12949  if test "x$DF" = x; then
12950    # The variable is not set by user, try to locate tool using the code snippet
12951    for ac_prog in df
12952do
12953  # Extract the first word of "$ac_prog", so it can be a program name with args.
12954set dummy $ac_prog; ac_word=$2
12955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12956$as_echo_n "checking for $ac_word... " >&6; }
12957if ${ac_cv_path_DF+:} false; then :
12958  $as_echo_n "(cached) " >&6
12959else
12960  case $DF in
12961  [\\/]* | ?:[\\/]*)
12962  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12963  ;;
12964  *)
12965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966for as_dir in $PATH
12967do
12968  IFS=$as_save_IFS
12969  test -z "$as_dir" && as_dir=.
12970    for ac_exec_ext in '' $ac_executable_extensions; do
12971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12974    break 2
12975  fi
12976done
12977  done
12978IFS=$as_save_IFS
12979
12980  ;;
12981esac
12982fi
12983DF=$ac_cv_path_DF
12984if test -n "$DF"; then
12985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12986$as_echo "$DF" >&6; }
12987else
12988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989$as_echo "no" >&6; }
12990fi
12991
12992
12993  test -n "$DF" && break
12994done
12995
12996  else
12997    # The variable is set, but is it from the command line or the environment?
12998
12999    # Try to remove the string !DF! from our list.
13000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13002      # If it failed, the variable was not from the command line. Ignore it,
13003      # but warn the user (except for BASH, which is always set by the calling BASH).
13004      if test "xDF" != xBASH; then
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13006$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13007      fi
13008      # Try to locate tool using the code snippet
13009      for ac_prog in df
13010do
13011  # Extract the first word of "$ac_prog", so it can be a program name with args.
13012set dummy $ac_prog; ac_word=$2
13013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13014$as_echo_n "checking for $ac_word... " >&6; }
13015if ${ac_cv_path_DF+:} false; then :
13016  $as_echo_n "(cached) " >&6
13017else
13018  case $DF in
13019  [\\/]* | ?:[\\/]*)
13020  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13021  ;;
13022  *)
13023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13024for as_dir in $PATH
13025do
13026  IFS=$as_save_IFS
13027  test -z "$as_dir" && as_dir=.
13028    for ac_exec_ext in '' $ac_executable_extensions; do
13029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13030    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13032    break 2
13033  fi
13034done
13035  done
13036IFS=$as_save_IFS
13037
13038  ;;
13039esac
13040fi
13041DF=$ac_cv_path_DF
13042if test -n "$DF"; then
13043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13044$as_echo "$DF" >&6; }
13045else
13046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047$as_echo "no" >&6; }
13048fi
13049
13050
13051  test -n "$DF" && break
13052done
13053
13054    else
13055      # If it succeeded, then it was overridden by the user. We will use it
13056      # for the tool.
13057
13058      # First remove it from the list of overridden variables, so we can test
13059      # for unknown variables in the end.
13060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13061
13062      # Check if the provided tool contains a complete path.
13063      tool_specified="$DF"
13064      tool_basename="${tool_specified##*/}"
13065      if test "x$tool_basename" = "x$tool_specified"; then
13066        # A command without a complete path is provided, search $PATH.
13067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13068$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13069        # Extract the first word of "$tool_basename", so it can be a program name with args.
13070set dummy $tool_basename; ac_word=$2
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072$as_echo_n "checking for $ac_word... " >&6; }
13073if ${ac_cv_path_DF+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  case $DF in
13077  [\\/]* | ?:[\\/]*)
13078  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13079  ;;
13080  *)
13081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082for as_dir in $PATH
13083do
13084  IFS=$as_save_IFS
13085  test -z "$as_dir" && as_dir=.
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096  ;;
13097esac
13098fi
13099DF=$ac_cv_path_DF
13100if test -n "$DF"; then
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13102$as_echo "$DF" >&6; }
13103else
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
13106fi
13107
13108
13109        if test "x$DF" = x; then
13110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13111        fi
13112      else
13113        # Otherwise we believe it is a complete path. Use it as it is.
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13115$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13117$as_echo_n "checking for DF... " >&6; }
13118        if test ! -x "$tool_specified"; then
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13120$as_echo "not found" >&6; }
13121          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13122        fi
13123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13124$as_echo "$tool_specified" >&6; }
13125      fi
13126    fi
13127  fi
13128
13129
13130
13131
13132  # Publish this variable in the help.
13133
13134
13135  if test "x$CPIO" = x; then
13136    # The variable is not set by user, try to locate tool using the code snippet
13137    for ac_prog in cpio bsdcpio
13138do
13139  # Extract the first word of "$ac_prog", so it can be a program name with args.
13140set dummy $ac_prog; ac_word=$2
13141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13142$as_echo_n "checking for $ac_word... " >&6; }
13143if ${ac_cv_path_CPIO+:} false; then :
13144  $as_echo_n "(cached) " >&6
13145else
13146  case $CPIO in
13147  [\\/]* | ?:[\\/]*)
13148  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13149  ;;
13150  *)
13151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13152for as_dir in $PATH
13153do
13154  IFS=$as_save_IFS
13155  test -z "$as_dir" && as_dir=.
13156    for ac_exec_ext in '' $ac_executable_extensions; do
13157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13158    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13160    break 2
13161  fi
13162done
13163  done
13164IFS=$as_save_IFS
13165
13166  ;;
13167esac
13168fi
13169CPIO=$ac_cv_path_CPIO
13170if test -n "$CPIO"; then
13171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13172$as_echo "$CPIO" >&6; }
13173else
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175$as_echo "no" >&6; }
13176fi
13177
13178
13179  test -n "$CPIO" && break
13180done
13181
13182  else
13183    # The variable is set, but is it from the command line or the environment?
13184
13185    # Try to remove the string !CPIO! from our list.
13186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13188      # If it failed, the variable was not from the command line. Ignore it,
13189      # but warn the user (except for BASH, which is always set by the calling BASH).
13190      if test "xCPIO" != xBASH; then
13191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13192$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13193      fi
13194      # Try to locate tool using the code snippet
13195      for ac_prog in cpio bsdcpio
13196do
13197  # Extract the first word of "$ac_prog", so it can be a program name with args.
13198set dummy $ac_prog; ac_word=$2
13199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13200$as_echo_n "checking for $ac_word... " >&6; }
13201if ${ac_cv_path_CPIO+:} false; then :
13202  $as_echo_n "(cached) " >&6
13203else
13204  case $CPIO in
13205  [\\/]* | ?:[\\/]*)
13206  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13207  ;;
13208  *)
13209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210for as_dir in $PATH
13211do
13212  IFS=$as_save_IFS
13213  test -z "$as_dir" && as_dir=.
13214    for ac_exec_ext in '' $ac_executable_extensions; do
13215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218    break 2
13219  fi
13220done
13221  done
13222IFS=$as_save_IFS
13223
13224  ;;
13225esac
13226fi
13227CPIO=$ac_cv_path_CPIO
13228if test -n "$CPIO"; then
13229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13230$as_echo "$CPIO" >&6; }
13231else
13232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233$as_echo "no" >&6; }
13234fi
13235
13236
13237  test -n "$CPIO" && break
13238done
13239
13240    else
13241      # If it succeeded, then it was overridden by the user. We will use it
13242      # for the tool.
13243
13244      # First remove it from the list of overridden variables, so we can test
13245      # for unknown variables in the end.
13246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247
13248      # Check if the provided tool contains a complete path.
13249      tool_specified="$CPIO"
13250      tool_basename="${tool_specified##*/}"
13251      if test "x$tool_basename" = "x$tool_specified"; then
13252        # A command without a complete path is provided, search $PATH.
13253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13254$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13255        # Extract the first word of "$tool_basename", so it can be a program name with args.
13256set dummy $tool_basename; ac_word=$2
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258$as_echo_n "checking for $ac_word... " >&6; }
13259if ${ac_cv_path_CPIO+:} false; then :
13260  $as_echo_n "(cached) " >&6
13261else
13262  case $CPIO in
13263  [\\/]* | ?:[\\/]*)
13264  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13265  ;;
13266  *)
13267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268for as_dir in $PATH
13269do
13270  IFS=$as_save_IFS
13271  test -z "$as_dir" && as_dir=.
13272    for ac_exec_ext in '' $ac_executable_extensions; do
13273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276    break 2
13277  fi
13278done
13279  done
13280IFS=$as_save_IFS
13281
13282  ;;
13283esac
13284fi
13285CPIO=$ac_cv_path_CPIO
13286if test -n "$CPIO"; then
13287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13288$as_echo "$CPIO" >&6; }
13289else
13290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
13292fi
13293
13294
13295        if test "x$CPIO" = x; then
13296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13297        fi
13298      else
13299        # Otherwise we believe it is a complete path. Use it as it is.
13300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13301$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13303$as_echo_n "checking for CPIO... " >&6; }
13304        if test ! -x "$tool_specified"; then
13305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13306$as_echo "not found" >&6; }
13307          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13308        fi
13309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13310$as_echo "$tool_specified" >&6; }
13311      fi
13312    fi
13313  fi
13314
13315
13316
13317
13318# Now we can determine OpenJDK build and target platforms. This is required to
13319# have early on.
13320# Make sure we can run config.sub.
13321$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13322  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13323
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13325$as_echo_n "checking build system type... " >&6; }
13326if ${ac_cv_build+:} false; then :
13327  $as_echo_n "(cached) " >&6
13328else
13329  ac_build_alias=$build_alias
13330test "x$ac_build_alias" = x &&
13331  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13332test "x$ac_build_alias" = x &&
13333  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13334ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13335  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13336
13337fi
13338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13339$as_echo "$ac_cv_build" >&6; }
13340case $ac_cv_build in
13341*-*-*) ;;
13342*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13343esac
13344build=$ac_cv_build
13345ac_save_IFS=$IFS; IFS='-'
13346set x $ac_cv_build
13347shift
13348build_cpu=$1
13349build_vendor=$2
13350shift; shift
13351# Remember, the first character of IFS is used to create $*,
13352# except with old shells:
13353build_os=$*
13354IFS=$ac_save_IFS
13355case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13356
13357
13358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13359$as_echo_n "checking host system type... " >&6; }
13360if ${ac_cv_host+:} false; then :
13361  $as_echo_n "(cached) " >&6
13362else
13363  if test "x$host_alias" = x; then
13364  ac_cv_host=$ac_cv_build
13365else
13366  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13367    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13368fi
13369
13370fi
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13372$as_echo "$ac_cv_host" >&6; }
13373case $ac_cv_host in
13374*-*-*) ;;
13375*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13376esac
13377host=$ac_cv_host
13378ac_save_IFS=$IFS; IFS='-'
13379set x $ac_cv_host
13380shift
13381host_cpu=$1
13382host_vendor=$2
13383shift; shift
13384# Remember, the first character of IFS is used to create $*,
13385# except with old shells:
13386host_os=$*
13387IFS=$ac_save_IFS
13388case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13389
13390
13391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13392$as_echo_n "checking target system type... " >&6; }
13393if ${ac_cv_target+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  if test "x$target_alias" = x; then
13397  ac_cv_target=$ac_cv_host
13398else
13399  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13400    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13401fi
13402
13403fi
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13405$as_echo "$ac_cv_target" >&6; }
13406case $ac_cv_target in
13407*-*-*) ;;
13408*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13409esac
13410target=$ac_cv_target
13411ac_save_IFS=$IFS; IFS='-'
13412set x $ac_cv_target
13413shift
13414target_cpu=$1
13415target_vendor=$2
13416shift; shift
13417# Remember, the first character of IFS is used to create $*,
13418# except with old shells:
13419target_os=$*
13420IFS=$ac_save_IFS
13421case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13422
13423
13424# The aliases save the names the user supplied, while $host etc.
13425# will get canonicalized.
13426test -n "$target_alias" &&
13427  test "$program_prefix$program_suffix$program_transform_name" = \
13428    NONENONEs,x,x, &&
13429  program_prefix=${target_alias}-
13430
13431  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13432  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13433  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13434  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13435  # to use the configure naming style.
13436
13437
13438
13439
13440
13441  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13442  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13443  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13444  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13445  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13446  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13447
13448
13449
13450  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13451
13452  case "$build_os" in
13453    *linux*)
13454      VAR_OS=linux
13455      VAR_OS_TYPE=unix
13456      ;;
13457    *solaris*)
13458      VAR_OS=solaris
13459      VAR_OS_TYPE=unix
13460      ;;
13461    *darwin*)
13462      VAR_OS=macosx
13463      VAR_OS_TYPE=unix
13464      ;;
13465    *bsd*)
13466      VAR_OS=bsd
13467      VAR_OS_TYPE=unix
13468      ;;
13469    *cygwin*)
13470      VAR_OS=windows
13471      VAR_OS_ENV=windows.cygwin
13472      ;;
13473    *mingw*)
13474      VAR_OS=windows
13475      VAR_OS_ENV=windows.msys
13476      ;;
13477    *aix*)
13478      VAR_OS=aix
13479      VAR_OS_TYPE=unix
13480      ;;
13481    *)
13482      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13483      ;;
13484  esac
13485
13486
13487  # First argument is the cpu name from the trip/quad
13488  case "$build_cpu" in
13489    x86_64)
13490      VAR_CPU=x86_64
13491      VAR_CPU_ARCH=x86
13492      VAR_CPU_BITS=64
13493      VAR_CPU_ENDIAN=little
13494      ;;
13495    i?86)
13496      VAR_CPU=x86
13497      VAR_CPU_ARCH=x86
13498      VAR_CPU_BITS=32
13499      VAR_CPU_ENDIAN=little
13500      ;;
13501    arm*)
13502      VAR_CPU=arm
13503      VAR_CPU_ARCH=arm
13504      VAR_CPU_BITS=32
13505      VAR_CPU_ENDIAN=little
13506      ;;
13507    aarch64)
13508      VAR_CPU=aarch64
13509      VAR_CPU_ARCH=aarch64
13510      VAR_CPU_BITS=64
13511      VAR_CPU_ENDIAN=little
13512      ;;
13513    powerpc)
13514      VAR_CPU=ppc
13515      VAR_CPU_ARCH=ppc
13516      VAR_CPU_BITS=32
13517      VAR_CPU_ENDIAN=big
13518      ;;
13519    powerpc64)
13520      VAR_CPU=ppc64
13521      VAR_CPU_ARCH=ppc
13522      VAR_CPU_BITS=64
13523      VAR_CPU_ENDIAN=big
13524      ;;
13525    powerpc64le)
13526      VAR_CPU=ppc64
13527      VAR_CPU_ARCH=ppc
13528      VAR_CPU_BITS=64
13529      VAR_CPU_ENDIAN=little
13530      ;;
13531    s390)
13532      VAR_CPU=s390
13533      VAR_CPU_ARCH=s390
13534      VAR_CPU_BITS=32
13535      VAR_CPU_ENDIAN=big
13536      ;;
13537    s390x)
13538      VAR_CPU=s390x
13539      VAR_CPU_ARCH=s390
13540      VAR_CPU_BITS=64
13541      VAR_CPU_ENDIAN=big
13542      ;;
13543    sparc)
13544      VAR_CPU=sparc
13545      VAR_CPU_ARCH=sparc
13546      VAR_CPU_BITS=32
13547      VAR_CPU_ENDIAN=big
13548      ;;
13549    sparcv9|sparc64)
13550      VAR_CPU=sparcv9
13551      VAR_CPU_ARCH=sparc
13552      VAR_CPU_BITS=64
13553      VAR_CPU_ENDIAN=big
13554      ;;
13555    *)
13556      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13557      ;;
13558  esac
13559
13560  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13561  OPENJDK_BUILD_OS="$VAR_OS"
13562  if test "x$VAR_OS_TYPE" != x; then
13563    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13564  else
13565    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13566  fi
13567  if test "x$VAR_OS_ENV" != x; then
13568    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13569  else
13570    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13571  fi
13572  OPENJDK_BUILD_CPU="$VAR_CPU"
13573  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13574  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13575  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13576
13577
13578
13579
13580
13581
13582
13583
13584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13585$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13587$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13588
13589  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13590
13591  case "$host_os" in
13592    *linux*)
13593      VAR_OS=linux
13594      VAR_OS_TYPE=unix
13595      ;;
13596    *solaris*)
13597      VAR_OS=solaris
13598      VAR_OS_TYPE=unix
13599      ;;
13600    *darwin*)
13601      VAR_OS=macosx
13602      VAR_OS_TYPE=unix
13603      ;;
13604    *bsd*)
13605      VAR_OS=bsd
13606      VAR_OS_TYPE=unix
13607      ;;
13608    *cygwin*)
13609      VAR_OS=windows
13610      VAR_OS_ENV=windows.cygwin
13611      ;;
13612    *mingw*)
13613      VAR_OS=windows
13614      VAR_OS_ENV=windows.msys
13615      ;;
13616    *aix*)
13617      VAR_OS=aix
13618      VAR_OS_TYPE=unix
13619      ;;
13620    *)
13621      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13622      ;;
13623  esac
13624
13625
13626  # First argument is the cpu name from the trip/quad
13627  case "$host_cpu" in
13628    x86_64)
13629      VAR_CPU=x86_64
13630      VAR_CPU_ARCH=x86
13631      VAR_CPU_BITS=64
13632      VAR_CPU_ENDIAN=little
13633      ;;
13634    i?86)
13635      VAR_CPU=x86
13636      VAR_CPU_ARCH=x86
13637      VAR_CPU_BITS=32
13638      VAR_CPU_ENDIAN=little
13639      ;;
13640    arm*)
13641      VAR_CPU=arm
13642      VAR_CPU_ARCH=arm
13643      VAR_CPU_BITS=32
13644      VAR_CPU_ENDIAN=little
13645      ;;
13646    aarch64)
13647      VAR_CPU=aarch64
13648      VAR_CPU_ARCH=aarch64
13649      VAR_CPU_BITS=64
13650      VAR_CPU_ENDIAN=little
13651      ;;
13652    powerpc)
13653      VAR_CPU=ppc
13654      VAR_CPU_ARCH=ppc
13655      VAR_CPU_BITS=32
13656      VAR_CPU_ENDIAN=big
13657      ;;
13658    powerpc64)
13659      VAR_CPU=ppc64
13660      VAR_CPU_ARCH=ppc
13661      VAR_CPU_BITS=64
13662      VAR_CPU_ENDIAN=big
13663      ;;
13664    powerpc64le)
13665      VAR_CPU=ppc64
13666      VAR_CPU_ARCH=ppc
13667      VAR_CPU_BITS=64
13668      VAR_CPU_ENDIAN=little
13669      ;;
13670    s390)
13671      VAR_CPU=s390
13672      VAR_CPU_ARCH=s390
13673      VAR_CPU_BITS=32
13674      VAR_CPU_ENDIAN=big
13675      ;;
13676    s390x)
13677      VAR_CPU=s390x
13678      VAR_CPU_ARCH=s390
13679      VAR_CPU_BITS=64
13680      VAR_CPU_ENDIAN=big
13681      ;;
13682    sparc)
13683      VAR_CPU=sparc
13684      VAR_CPU_ARCH=sparc
13685      VAR_CPU_BITS=32
13686      VAR_CPU_ENDIAN=big
13687      ;;
13688    sparcv9|sparc64)
13689      VAR_CPU=sparcv9
13690      VAR_CPU_ARCH=sparc
13691      VAR_CPU_BITS=64
13692      VAR_CPU_ENDIAN=big
13693      ;;
13694    *)
13695      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13696      ;;
13697  esac
13698
13699  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13700  OPENJDK_TARGET_OS="$VAR_OS"
13701  if test "x$VAR_OS_TYPE" != x; then
13702    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13703  else
13704    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13705  fi
13706  if test "x$VAR_OS_ENV" != x; then
13707    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13708  else
13709    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13710  fi
13711  OPENJDK_TARGET_CPU="$VAR_CPU"
13712  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13713  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13714  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13715
13716
13717
13718
13719
13720
13721
13722
13723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13724$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13726$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13727
13728
13729
13730# Check whether --with-target-bits was given.
13731if test "${with_target_bits+set}" = set; then :
13732  withval=$with_target_bits;
13733fi
13734
13735
13736  # We have three types of compiles:
13737  # native  == normal compilation, target system == build system
13738  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13739  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13740  #
13741  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13742    # We're doing a proper cross-compilation
13743    COMPILE_TYPE="cross"
13744  else
13745    COMPILE_TYPE="native"
13746  fi
13747
13748  if test "x$with_target_bits" != x; then
13749    if test "x$COMPILE_TYPE" = "xcross"; then
13750      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13751    fi
13752
13753    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13754      # A reduced build is requested
13755      COMPILE_TYPE="reduced"
13756      OPENJDK_TARGET_CPU_BITS=32
13757      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13758        OPENJDK_TARGET_CPU=x86
13759      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13760        OPENJDK_TARGET_CPU=sparc
13761      else
13762        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13763      fi
13764    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13765      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
13766    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13767      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13768$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13769    else
13770      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13771    fi
13772  fi
13773
13774
13775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13776$as_echo_n "checking compilation type... " >&6; }
13777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13778$as_echo "$COMPILE_TYPE" >&6; }
13779
13780
13781  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13782    REQUIRED_OS_NAME=SunOS
13783    REQUIRED_OS_VERSION=5.10
13784  fi
13785  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13786    REQUIRED_OS_NAME=Linux
13787    REQUIRED_OS_VERSION=2.6
13788  fi
13789  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13790    REQUIRED_OS_NAME=Windows
13791    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13792      REQUIRED_OS_VERSION=5.2
13793    else
13794      REQUIRED_OS_VERSION=5.1
13795    fi
13796  fi
13797  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13798    REQUIRED_OS_NAME=Darwin
13799    REQUIRED_OS_VERSION=11.2
13800  fi
13801
13802
13803
13804
13805
13806  # Also store the legacy naming of the cpu.
13807  # Ie i586 and amd64 instead of x86 and x86_64
13808  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13809  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13810    OPENJDK_TARGET_CPU_LEGACY="i586"
13811  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13812    # On all platforms except MacOSX replace x86_64 with amd64.
13813    OPENJDK_TARGET_CPU_LEGACY="amd64"
13814  fi
13815
13816
13817  # And the second legacy naming of the cpu.
13818  # Ie i386 and amd64 instead of x86 and x86_64.
13819  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13820  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13821    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13822  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13823    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13824  fi
13825
13826
13827  # This is the name of the cpu (but using i386 and amd64 instead of
13828  # x86 and x86_64, respectively), preceeded by a /, to be used when
13829  # locating libraries. On macosx, it's empty, though.
13830  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13831  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13832    OPENJDK_TARGET_CPU_LIBDIR=""
13833  fi
13834
13835
13836  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13837  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13838  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13839  OPENJDK_TARGET_CPU_ISADIR=""
13840  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13841    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13842      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13843    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13844      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13845    fi
13846  fi
13847
13848
13849  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13850  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13851  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13852    # On linux only, we replace x86 with i386.
13853    OPENJDK_TARGET_CPU_OSARCH="i386"
13854  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13855    # On all platforms except macosx, we replace x86_64 with amd64.
13856    OPENJDK_TARGET_CPU_OSARCH="amd64"
13857  fi
13858
13859
13860  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13861  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13862    OPENJDK_TARGET_CPU_JLI="i386"
13863  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13864    # On all platforms except macosx, we replace x86_64 with amd64.
13865    OPENJDK_TARGET_CPU_JLI="amd64"
13866  fi
13867  # Now setup the -D flags for building libjli.
13868  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13869  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13870    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13871      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13872    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13873      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13874    fi
13875  fi
13876
13877
13878  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13879      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13880  else
13881      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13882  fi
13883
13884
13885  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13886    A_LP64="LP64:="
13887    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13888    # unpack200.exe
13889    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13890      ADD_LP64="-D_LP64=1"
13891    fi
13892  fi
13893  LP64=$A_LP64
13894
13895
13896  if test "x$COMPILE_TYPE" = "xcross"; then
13897    # FIXME: ... or should this include reduced builds..?
13898    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13899  else
13900    DEFINE_CROSS_COMPILE_ARCH=""
13901  fi
13902
13903
13904  # ZERO_ARCHDEF is used to enable architecture-specific code
13905  case "${OPENJDK_TARGET_CPU}" in
13906    ppc)     ZERO_ARCHDEF=PPC32 ;;
13907    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13908    s390*)   ZERO_ARCHDEF=S390  ;;
13909    sparc*)  ZERO_ARCHDEF=SPARC ;;
13910    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13911    x86)     ZERO_ARCHDEF=IA32  ;;
13912    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13913  esac
13914
13915
13916
13917
13918# Continue setting up basic stuff. Most remaining code require fundamental tools.
13919
13920  # Save the current directory this script was started from
13921  CURDIR="$PWD"
13922
13923  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13924    PATH_SEP=";"
13925
13926  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13927  if test $SRC_ROOT_LENGTH -gt 100; then
13928    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13929  fi
13930
13931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13933$as_echo_n "checking cygwin release... " >&6; }
13934    CYGWIN_VERSION=`$UNAME -r`
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13936$as_echo "$CYGWIN_VERSION" >&6; }
13937    WINDOWS_ENV_VENDOR='cygwin'
13938    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13939
13940    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13941    if test "x$CYGWIN_VERSION_OLD" != x; then
13942      { $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
13943$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;}
13944      as_fn_error $? "Cannot continue" "$LINENO" 5
13945    fi
13946    if test "x$CYGPATH" = x; then
13947      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13948    fi
13949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13950$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13951    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13952    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13953    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13954    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13956$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13957    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13958    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13959    if test "x$test_cygdrive_prefix" = x; then
13960      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13961    fi
13962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13964$as_echo_n "checking msys release... " >&6; }
13965    MSYS_VERSION=`$UNAME -r`
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13967$as_echo "$MSYS_VERSION" >&6; }
13968
13969    WINDOWS_ENV_VENDOR='msys'
13970    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13971
13972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13973$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13974    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13975    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13976
13977  windows_path="$MSYS_ROOT_PATH"
13978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979    unix_path=`$CYGPATH -u "$windows_path"`
13980    MSYS_ROOT_PATH="$unix_path"
13981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13983    MSYS_ROOT_PATH="$unix_path"
13984  fi
13985
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13987$as_echo "$MSYS_ROOT_PATH" >&6; }
13988    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13989  else
13990    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13991  fi
13992
13993  # Test if windows or unix (cygwin/msys) find is first in path.
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13995$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13996  FIND_BINARY_OUTPUT=`find --version 2>&1`
13997  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13999$as_echo "unix style" >&6; }
14000  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14002$as_echo "Windows" >&6; }
14003    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14004$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14005    { $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
14006$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14007    as_fn_error $? "Cannot continue" "$LINENO" 5
14008  else
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14010$as_echo "unknown" >&6; }
14011    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14012$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14013  fi
14014
14015  else
14016    PATH_SEP=":"
14017  fi
14018
14019
14020  # We get the top-level directory from the supporting wrappers.
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14022$as_echo_n "checking for top-level directory... " >&6; }
14023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14024$as_echo "$TOPDIR" >&6; }
14025
14026
14027  # Save the original version of TOPDIR for string comparisons
14028  ORIGINAL_TOPDIR="$TOPDIR"
14029
14030
14031  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14032
14033  # Only process if variable expands to non-empty
14034
14035  if test "x$CURDIR" != x; then
14036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14037
14038  # Input might be given as Windows format, start by converting to
14039  # unix format.
14040  path="$CURDIR"
14041  new_path=`$CYGPATH -u "$path"`
14042
14043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14046  # "foo.exe" is OK but "foo" is an error.
14047  #
14048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14049  # It is also a way to make sure we got the proper file name for the real test later on.
14050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14051  if test "x$test_shortpath" = x; then
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14053$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14054    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14055  fi
14056
14057  # Call helper function which possibly converts this using DOS-style short mode.
14058  # If so, the updated path is stored in $new_path.
14059
14060  input_path="$new_path"
14061  # Check if we need to convert this using DOS-style short mode. If the path
14062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14063  # take no chances and rewrite it.
14064  # Note: m4 eats our [], so we need to use [ and ] instead.
14065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14066  if test "x$has_forbidden_chars" != x; then
14067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14071      # Going to short mode and back again did indeed matter. Since short mode is
14072      # case insensitive, let's make it lowercase to improve readability.
14073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14074      # Now convert it back to Unix-style (cygpath)
14075      input_path=`$CYGPATH -u "$shortmode_path"`
14076      new_path="$input_path"
14077    fi
14078  fi
14079
14080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14081  if test "x$test_cygdrive_prefix" = x; then
14082    # As a simple fix, exclude /usr/bin since it's not a real path.
14083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14085      # a path prefixed by /cygdrive for fixpath to work.
14086      new_path="$CYGWIN_ROOT_PATH$input_path"
14087    fi
14088  fi
14089
14090
14091  if test "x$path" != "x$new_path"; then
14092    CURDIR="$new_path"
14093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14094$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14095  fi
14096
14097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14098
14099  path="$CURDIR"
14100  has_colon=`$ECHO $path | $GREP ^.:`
14101  new_path="$path"
14102  if test "x$has_colon" = x; then
14103    # Not in mixed or Windows style, start by that.
14104    new_path=`cmd //c echo $path`
14105  fi
14106
14107
14108  input_path="$new_path"
14109  # Check if we need to convert this using DOS-style short mode. If the path
14110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14111  # take no chances and rewrite it.
14112  # Note: m4 eats our [], so we need to use [ and ] instead.
14113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14114  if test "x$has_forbidden_chars" != x; then
14115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14117  fi
14118
14119
14120  windows_path="$new_path"
14121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14122    unix_path=`$CYGPATH -u "$windows_path"`
14123    new_path="$unix_path"
14124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14126    new_path="$unix_path"
14127  fi
14128
14129  if test "x$path" != "x$new_path"; then
14130    CURDIR="$new_path"
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14132$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14133  fi
14134
14135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14137
14138    else
14139      # We're on a unix platform. Hooray! :)
14140      path="$CURDIR"
14141      has_space=`$ECHO "$path" | $GREP " "`
14142      if test "x$has_space" != x; then
14143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14144$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14146      fi
14147
14148      # Use eval to expand a potential ~
14149      eval path="$path"
14150      if test ! -f "$path" && test ! -d "$path"; then
14151        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14152      fi
14153
14154      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14155    fi
14156  fi
14157
14158
14159  # Only process if variable expands to non-empty
14160
14161  if test "x$TOPDIR" != x; then
14162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14163
14164  # Input might be given as Windows format, start by converting to
14165  # unix format.
14166  path="$TOPDIR"
14167  new_path=`$CYGPATH -u "$path"`
14168
14169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14172  # "foo.exe" is OK but "foo" is an error.
14173  #
14174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14175  # It is also a way to make sure we got the proper file name for the real test later on.
14176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14177  if test "x$test_shortpath" = x; then
14178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14179$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14180    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14181  fi
14182
14183  # Call helper function which possibly converts this using DOS-style short mode.
14184  # If so, the updated path is stored in $new_path.
14185
14186  input_path="$new_path"
14187  # Check if we need to convert this using DOS-style short mode. If the path
14188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14189  # take no chances and rewrite it.
14190  # Note: m4 eats our [], so we need to use [ and ] instead.
14191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14192  if test "x$has_forbidden_chars" != x; then
14193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14197      # Going to short mode and back again did indeed matter. Since short mode is
14198      # case insensitive, let's make it lowercase to improve readability.
14199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14200      # Now convert it back to Unix-style (cygpath)
14201      input_path=`$CYGPATH -u "$shortmode_path"`
14202      new_path="$input_path"
14203    fi
14204  fi
14205
14206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14207  if test "x$test_cygdrive_prefix" = x; then
14208    # As a simple fix, exclude /usr/bin since it's not a real path.
14209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14211      # a path prefixed by /cygdrive for fixpath to work.
14212      new_path="$CYGWIN_ROOT_PATH$input_path"
14213    fi
14214  fi
14215
14216
14217  if test "x$path" != "x$new_path"; then
14218    TOPDIR="$new_path"
14219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14220$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14221  fi
14222
14223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14224
14225  path="$TOPDIR"
14226  has_colon=`$ECHO $path | $GREP ^.:`
14227  new_path="$path"
14228  if test "x$has_colon" = x; then
14229    # Not in mixed or Windows style, start by that.
14230    new_path=`cmd //c echo $path`
14231  fi
14232
14233
14234  input_path="$new_path"
14235  # Check if we need to convert this using DOS-style short mode. If the path
14236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14237  # take no chances and rewrite it.
14238  # Note: m4 eats our [], so we need to use [ and ] instead.
14239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14240  if test "x$has_forbidden_chars" != x; then
14241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14243  fi
14244
14245
14246  windows_path="$new_path"
14247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14248    unix_path=`$CYGPATH -u "$windows_path"`
14249    new_path="$unix_path"
14250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14252    new_path="$unix_path"
14253  fi
14254
14255  if test "x$path" != "x$new_path"; then
14256    TOPDIR="$new_path"
14257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14258$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14259  fi
14260
14261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14263
14264    else
14265      # We're on a unix platform. Hooray! :)
14266      path="$TOPDIR"
14267      has_space=`$ECHO "$path" | $GREP " "`
14268      if test "x$has_space" != x; then
14269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14270$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14272      fi
14273
14274      # Use eval to expand a potential ~
14275      eval path="$path"
14276      if test ! -f "$path" && test ! -d "$path"; then
14277        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14278      fi
14279
14280      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14281    fi
14282  fi
14283
14284  # SRC_ROOT is a traditional alias for TOPDIR.
14285  SRC_ROOT=$TOPDIR
14286
14287  # Calculate a canonical version of TOPDIR for string comparisons
14288  CANONICAL_TOPDIR=$TOPDIR
14289
14290  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14291    # Follow a chain of symbolic links. Use readlink
14292    # where it exists, else fall back to horribly
14293    # complicated shell code.
14294    if test "x$READLINK_TESTED" != yes; then
14295      # On MacOSX there is a readlink tool with a different
14296      # purpose than the GNU readlink tool. Check the found readlink.
14297      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14298      if test "x$ISGNU" = x; then
14299        # A readlink that we do not know how to use.
14300        # Are there other non-GNU readlinks out there?
14301        READLINK_TESTED=yes
14302        READLINK=
14303      fi
14304    fi
14305
14306    if test "x$READLINK" != x; then
14307      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14308    else
14309      # Save the current directory for restoring afterwards
14310      STARTDIR=$PWD
14311      COUNTER=0
14312      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14313      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14314      cd $sym_link_dir
14315      # Use -P flag to resolve symlinks in directories.
14316      cd `$THEPWDCMD -P`
14317      sym_link_dir=`$THEPWDCMD -P`
14318      # Resolve file symlinks
14319      while test $COUNTER -lt 20; do
14320        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14321        if test "x$ISLINK" == x; then
14322          # This is not a symbolic link! We are done!
14323          break
14324        fi
14325        # Again resolve directory symlinks since the target of the just found
14326        # link could be in a different directory
14327        cd `$DIRNAME $ISLINK`
14328        sym_link_dir=`$THEPWDCMD -P`
14329        sym_link_file=`$BASENAME $ISLINK`
14330        let COUNTER=COUNTER+1
14331      done
14332      cd $STARTDIR
14333      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14334    fi
14335  fi
14336
14337
14338
14339  # Locate the directory of this script.
14340  AUTOCONF_DIR=$TOPDIR/common/autoconf
14341
14342
14343# Check if it's a pure open build or if custom sources are to be used.
14344
14345  # Check whether --enable-openjdk-only was given.
14346if test "${enable_openjdk_only+set}" = set; then :
14347  enableval=$enable_openjdk_only;
14348else
14349  enable_openjdk_only="no"
14350fi
14351
14352
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14354$as_echo_n "checking for presence of closed sources... " >&6; }
14355  if test -d "$SRC_ROOT/jdk/src/closed"; then
14356    CLOSED_SOURCE_PRESENT=yes
14357  else
14358    CLOSED_SOURCE_PRESENT=no
14359  fi
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14361$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14362
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14364$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14365  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14367$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14368
14369  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14370    OPENJDK=true
14371    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14372      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14373$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14374    fi
14375  else
14376    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14377      OPENJDK=true
14378    else
14379      OPENJDK=false
14380    fi
14381  fi
14382
14383  if test "x$OPENJDK" = "xtrue"; then
14384    SET_OPENJDK="OPENJDK=true"
14385  fi
14386
14387
14388
14389  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14390  # the IncludeCustomExtension macro.
14391
14392
14393# Check whether --with-custom-make-dir was given.
14394if test "${with_custom_make_dir+set}" = set; then :
14395  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
14396$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14397fi
14398
14399
14400
14401
14402# These are needed to be able to create a configuration name (and thus the output directory)
14403
14404  ###############################################################################
14405  #
14406  # Check which variant of the JDK that we want to build.
14407  # Currently we have:
14408  #    normal:   standard edition
14409  # but the custom make system may add other variants
14410  #
14411  # Effectively the JDK variant gives a name to a specific set of
14412  # modules to compile into the JDK. In the future, these modules
14413  # might even be Jigsaw modules.
14414  #
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14416$as_echo_n "checking which variant of the JDK to build... " >&6; }
14417
14418# Check whether --with-jdk-variant was given.
14419if test "${with_jdk_variant+set}" = set; then :
14420  withval=$with_jdk_variant;
14421fi
14422
14423
14424  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14425    JDK_VARIANT="normal"
14426  else
14427    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14428  fi
14429
14430
14431
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14433$as_echo "$JDK_VARIANT" >&6; }
14434
14435
14436###############################################################################
14437#
14438# Check which interpreter of the JVM we want to build.
14439# Currently we have:
14440#    template: Template interpreter (the default)
14441#    cpp     : C++ interpreter
14442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14443$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14444
14445# Check whether --with-jvm-interpreter was given.
14446if test "${with_jvm_interpreter+set}" = set; then :
14447  withval=$with_jvm_interpreter;
14448fi
14449
14450
14451if test "x$with_jvm_interpreter" = x; then
14452     with_jvm_interpreter="template"
14453fi
14454
14455JVM_INTERPRETER="$with_jvm_interpreter"
14456
14457if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14458   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14459fi
14460
14461
14462
14463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14464$as_echo "$with_jvm_interpreter" >&6; }
14465
14466
14467
14468  ###############################################################################
14469  #
14470  # Check which variants of the JVM that we want to build.
14471  # Currently we have:
14472  #    server: normal interpreter and a tiered C1/C2 compiler
14473  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14474  #    minimal1: reduced form of client with optional VM services and features stripped out
14475  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14476  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14477  #    zero: no machine code interpreter, no compiler
14478  #    zeroshark: zero interpreter and shark/llvm compiler backend
14479#    core: interpreter only, no compiler (only works on some platforms)
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14481$as_echo_n "checking which variants of the JVM to build... " >&6; }
14482
14483# Check whether --with-jvm-variants was given.
14484if test "${with_jvm_variants+set}" = set; then :
14485  withval=$with_jvm_variants;
14486fi
14487
14488
14489  if test "x$with_jvm_variants" = x; then
14490    with_jvm_variants="server"
14491  fi
14492
14493  JVM_VARIANTS=",$with_jvm_variants,"
14494  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,//'`
14495
14496  if test "x$TEST_VARIANTS" != "x,"; then
14497     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14498  fi
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14500$as_echo "$with_jvm_variants" >&6; }
14501
14502  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14503  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14504  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14505  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14506  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14507  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14508  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14509
14510  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14511    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14512      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14513    fi
14514  fi
14515  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14516    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14517      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14518    fi
14519  fi
14520  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14521    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14522      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14523    fi
14524  fi
14525
14526  # Replace the commas with AND for use in the build directory name.
14527  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14528  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/'`
14529  if test "x$COUNT_VARIANTS" != "x,1"; then
14530    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14531  else
14532    BUILDING_MULTIPLE_JVM_VARIANTS=no
14533  fi
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544  INCLUDE_SA=true
14545  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14546    INCLUDE_SA=false
14547  fi
14548  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14549    INCLUDE_SA=false
14550  fi
14551  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14552    INCLUDE_SA=false
14553  fi
14554  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14555    INCLUDE_SA=false
14556  fi
14557
14558
14559  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14560    MACOSX_UNIVERSAL="true"
14561  fi
14562
14563
14564
14565
14566  ###############################################################################
14567  #
14568  # Set the debug level
14569  #    release: no debug information, all optimizations, no asserts.
14570  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14571  #    fastdebug: debug information (-g), all optimizations, all asserts
14572  #    slowdebug: debug information (-g), no optimizations, all asserts
14573  #
14574  DEBUG_LEVEL="release"
14575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14576$as_echo_n "checking which debug level to use... " >&6; }
14577  # Check whether --enable-debug was given.
14578if test "${enable_debug+set}" = set; then :
14579  enableval=$enable_debug;
14580        ENABLE_DEBUG="${enableval}"
14581        DEBUG_LEVEL="fastdebug"
14582
14583else
14584  ENABLE_DEBUG="no"
14585fi
14586
14587
14588
14589# Check whether --with-debug-level was given.
14590if test "${with_debug_level+set}" = set; then :
14591  withval=$with_debug_level;
14592        DEBUG_LEVEL="${withval}"
14593        if test "x$ENABLE_DEBUG" = xyes; then
14594          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14595        fi
14596
14597fi
14598
14599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14600$as_echo "$DEBUG_LEVEL" >&6; }
14601
14602  if test "x$DEBUG_LEVEL" != xrelease && \
14603      test "x$DEBUG_LEVEL" != xoptimized && \
14604      test "x$DEBUG_LEVEL" != xfastdebug && \
14605      test "x$DEBUG_LEVEL" != xslowdebug; then
14606    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14607  fi
14608
14609
14610  ###############################################################################
14611  #
14612  # Setup legacy vars/targets and new vars to deal with different debug levels.
14613  #
14614
14615  case $DEBUG_LEVEL in
14616    release )
14617      VARIANT="OPT"
14618      FASTDEBUG="false"
14619      DEBUG_CLASSFILES="false"
14620      BUILD_VARIANT_RELEASE=""
14621      HOTSPOT_DEBUG_LEVEL="product"
14622      HOTSPOT_EXPORT="product"
14623      ;;
14624    fastdebug )
14625      VARIANT="DBG"
14626      FASTDEBUG="true"
14627      DEBUG_CLASSFILES="true"
14628      BUILD_VARIANT_RELEASE="-fastdebug"
14629      HOTSPOT_DEBUG_LEVEL="fastdebug"
14630      HOTSPOT_EXPORT="fastdebug"
14631      ;;
14632    slowdebug )
14633      VARIANT="DBG"
14634      FASTDEBUG="false"
14635      DEBUG_CLASSFILES="true"
14636      BUILD_VARIANT_RELEASE="-debug"
14637      HOTSPOT_DEBUG_LEVEL="debug"
14638      HOTSPOT_EXPORT="debug"
14639      ;;
14640    optimized )
14641      VARIANT="OPT"
14642      FASTDEBUG="false"
14643      DEBUG_CLASSFILES="false"
14644      BUILD_VARIANT_RELEASE="-optimized"
14645      HOTSPOT_DEBUG_LEVEL="optimized"
14646      HOTSPOT_EXPORT="optimized"
14647      ;;
14648  esac
14649
14650  # The debug level 'optimized' is a little special because it is currently only
14651  # applicable to the HotSpot build where it means to build a completely
14652  # optimized version of the VM without any debugging code (like for the
14653  # 'release' debug level which is called 'product' in the HotSpot build) but
14654  # with the exception that it can contain additional code which is otherwise
14655  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14656  # test new and/or experimental features which are not intended for customer
14657  # shipment. Because these new features need to be tested and benchmarked in
14658  # real world scenarios, we want to build the containing JDK at the 'release'
14659  # debug level.
14660  if test "x$DEBUG_LEVEL" = xoptimized; then
14661    DEBUG_LEVEL="release"
14662  fi
14663
14664  #####
14665  # Generate the legacy makefile targets for hotspot.
14666  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14667  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14668  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14669  # But until then ...
14670  HOTSPOT_TARGET=""
14671
14672  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14673    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14674  fi
14675
14676  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14677    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14678  fi
14679
14680  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14681    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14682  fi
14683
14684  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14685    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14686  fi
14687
14688  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14689    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14690  fi
14691
14692  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14694  fi
14695
14696  if test "x$JVM_VARIANT_CORE" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14698  fi
14699
14700  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14701
14702  # On Macosx universal binaries are produced, but they only contain
14703  # 64 bit intel. This invalidates control of which jvms are built
14704  # from configure, but only server is valid anyway. Fix this
14705  # when hotspot makefiles are rewritten.
14706  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14707    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14708  fi
14709
14710  #####
14711
14712
14713
14714
14715
14716
14717
14718
14719# With basic setup done, call the custom early hook.
14720
14721
14722# Check if we have devkits, extra paths or sysroot set.
14723
14724
14725# Check whether --with-devkit was given.
14726if test "${with_devkit+set}" = set; then :
14727  withval=$with_devkit;
14728
14729  # Only process if variable expands to non-empty
14730
14731  if test "x$with_devkit" != x; then
14732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14733
14734  # Input might be given as Windows format, start by converting to
14735  # unix format.
14736  path="$with_devkit"
14737  new_path=`$CYGPATH -u "$path"`
14738
14739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14742  # "foo.exe" is OK but "foo" is an error.
14743  #
14744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14745  # It is also a way to make sure we got the proper file name for the real test later on.
14746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14747  if test "x$test_shortpath" = x; then
14748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14749$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14750    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14751  fi
14752
14753  # Call helper function which possibly converts this using DOS-style short mode.
14754  # If so, the updated path is stored in $new_path.
14755
14756  input_path="$new_path"
14757  # Check if we need to convert this using DOS-style short mode. If the path
14758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14759  # take no chances and rewrite it.
14760  # Note: m4 eats our [], so we need to use [ and ] instead.
14761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14762  if test "x$has_forbidden_chars" != x; then
14763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14767      # Going to short mode and back again did indeed matter. Since short mode is
14768      # case insensitive, let's make it lowercase to improve readability.
14769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14770      # Now convert it back to Unix-style (cygpath)
14771      input_path=`$CYGPATH -u "$shortmode_path"`
14772      new_path="$input_path"
14773    fi
14774  fi
14775
14776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14777  if test "x$test_cygdrive_prefix" = x; then
14778    # As a simple fix, exclude /usr/bin since it's not a real path.
14779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14781      # a path prefixed by /cygdrive for fixpath to work.
14782      new_path="$CYGWIN_ROOT_PATH$input_path"
14783    fi
14784  fi
14785
14786
14787  if test "x$path" != "x$new_path"; then
14788    with_devkit="$new_path"
14789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14790$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14791  fi
14792
14793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794
14795  path="$with_devkit"
14796  has_colon=`$ECHO $path | $GREP ^.:`
14797  new_path="$path"
14798  if test "x$has_colon" = x; then
14799    # Not in mixed or Windows style, start by that.
14800    new_path=`cmd //c echo $path`
14801  fi
14802
14803
14804  input_path="$new_path"
14805  # Check if we need to convert this using DOS-style short mode. If the path
14806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14807  # take no chances and rewrite it.
14808  # Note: m4 eats our [], so we need to use [ and ] instead.
14809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14810  if test "x$has_forbidden_chars" != x; then
14811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14813  fi
14814
14815
14816  windows_path="$new_path"
14817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14818    unix_path=`$CYGPATH -u "$windows_path"`
14819    new_path="$unix_path"
14820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14822    new_path="$unix_path"
14823  fi
14824
14825  if test "x$path" != "x$new_path"; then
14826    with_devkit="$new_path"
14827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14828$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14829  fi
14830
14831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14833
14834    else
14835      # We're on a unix platform. Hooray! :)
14836      path="$with_devkit"
14837      has_space=`$ECHO "$path" | $GREP " "`
14838      if test "x$has_space" != x; then
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14840$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14842      fi
14843
14844      # Use eval to expand a potential ~
14845      eval path="$path"
14846      if test ! -f "$path" && test ! -d "$path"; then
14847        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14848      fi
14849
14850      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14851    fi
14852  fi
14853
14854        DEVKIT_ROOT="$with_devkit"
14855        # Check for a meta data info file in the root of the devkit
14856        if test -f "$DEVKIT_ROOT/devkit.info"; then
14857          . $DEVKIT_ROOT/devkit.info
14858          # This potentially sets the following:
14859          # A descriptive name of the devkit
14860
14861  if test "x$DEVKIT_NAME" = x; then
14862    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14863  fi
14864
14865          # Corresponds to --with-extra-path
14866
14867  if test "x$DEVKIT_EXTRA_PATH" = x; then
14868    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14869  fi
14870
14871          # Corresponds to --with-toolchain-path
14872
14873  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14874    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14875  fi
14876
14877          # Corresponds to --with-sysroot
14878
14879  if test "x$DEVKIT_SYSROOT" = x; then
14880    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14881  fi
14882
14883
14884          # Identifies the Visual Studio version in the devkit
14885
14886  if test "x$DEVKIT_VS_VERSION" = x; then
14887    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14888  fi
14889
14890          # The Visual Studio include environment variable
14891
14892  if test "x$DEVKIT_VS_INCLUDE" = x; then
14893    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14894  fi
14895
14896          # The Visual Studio lib environment variable
14897
14898  if test "x$DEVKIT_VS_LIB" = x; then
14899    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14900  fi
14901
14902          # Corresponds to --with-msvcr-dll
14903
14904  if test "x$DEVKIT_MSVCR_DLL" = x; then
14905    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14906  fi
14907
14908          # Corresponds to --with-msvcp-dll
14909
14910  if test "x$DEVKIT_MSVCP_DLL" = x; then
14911    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14912  fi
14913
14914        fi
14915
14916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14917$as_echo_n "checking for devkit... " >&6; }
14918        if test "x$DEVKIT_NAME" != x; then
14919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14920$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14921        else
14922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14923$as_echo "$DEVKIT_ROOT" >&6; }
14924        fi
14925
14926
14927  if test "x$DEVKIT_EXTRA_PATH" != x; then
14928    if test "x$EXTRA_PATH" = x; then
14929      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14930    else
14931      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14932    fi
14933  fi
14934
14935
14936        # Fallback default of just /bin if DEVKIT_PATH is not defined
14937        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14938          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14939        fi
14940
14941  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14942    if test "x$TOOLCHAIN_PATH" = x; then
14943      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14944    else
14945      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14946    fi
14947  fi
14948
14949
14950        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14951        # places for backwards compatiblity.
14952        if test "x$DEVKIT_SYSROOT" != x; then
14953          SYSROOT="$DEVKIT_SYSROOT"
14954        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14955          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14956        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14957          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14958        fi
14959
14960
14961fi
14962
14963
14964  # You can force the sysroot if the sysroot encoded into the compiler tools
14965  # is not correct.
14966
14967# Check whether --with-sys-root was given.
14968if test "${with_sys_root+set}" = set; then :
14969  withval=$with_sys_root; SYSROOT=$with_sys_root
14970
14971fi
14972
14973
14974
14975# Check whether --with-sysroot was given.
14976if test "${with_sysroot+set}" = set; then :
14977  withval=$with_sysroot; SYSROOT=$with_sysroot
14978
14979fi
14980
14981
14982
14983# Check whether --with-tools-dir was given.
14984if test "${with_tools_dir+set}" = set; then :
14985  withval=$with_tools_dir;
14986  if test "x$with_tools_dir" != x; then
14987    if test "x$TOOLCHAIN_PATH" = x; then
14988      TOOLCHAIN_PATH="$with_tools_dir"
14989    else
14990      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14991    fi
14992  fi
14993
14994
14995fi
14996
14997
14998
14999# Check whether --with-toolchain-path was given.
15000if test "${with_toolchain_path+set}" = set; then :
15001  withval=$with_toolchain_path;
15002  if test "x$with_toolchain_path" != x; then
15003    if test "x$TOOLCHAIN_PATH" = x; then
15004      TOOLCHAIN_PATH="$with_toolchain_path"
15005    else
15006      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15007    fi
15008  fi
15009
15010
15011fi
15012
15013
15014
15015# Check whether --with-extra-path was given.
15016if test "${with_extra_path+set}" = set; then :
15017  withval=$with_extra_path;
15018  if test "x$with_extra_path" != x; then
15019    if test "x$EXTRA_PATH" = x; then
15020      EXTRA_PATH="$with_extra_path"
15021    else
15022      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15023    fi
15024  fi
15025
15026
15027fi
15028
15029
15030  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15031    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15032    # If not, detect if Xcode is installed by running xcodebuild -version
15033    # if no Xcode installed, xcodebuild exits with 1
15034    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15035    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15036      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15037      # fall back on the stub binary in /usr/bin/xcodebuild
15038      # Extract the first word of "xcodebuild", so it can be a program name with args.
15039set dummy xcodebuild; ac_word=$2
15040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15041$as_echo_n "checking for $ac_word... " >&6; }
15042if ${ac_cv_path_XCODEBUILD+:} false; then :
15043  $as_echo_n "(cached) " >&6
15044else
15045  case $XCODEBUILD in
15046  [\\/]* | ?:[\\/]*)
15047  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15048  ;;
15049  *)
15050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15051for as_dir in $TOOLCHAIN_PATH
15052do
15053  IFS=$as_save_IFS
15054  test -z "$as_dir" && as_dir=.
15055    for ac_exec_ext in '' $ac_executable_extensions; do
15056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15057    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15059    break 2
15060  fi
15061done
15062  done
15063IFS=$as_save_IFS
15064
15065  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15066  ;;
15067esac
15068fi
15069XCODEBUILD=$ac_cv_path_XCODEBUILD
15070if test -n "$XCODEBUILD"; then
15071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15072$as_echo "$XCODEBUILD" >&6; }
15073else
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15075$as_echo "no" >&6; }
15076fi
15077
15078
15079    else
15080      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15081      # when only the command line tools are installed there are no SDKs, so headers
15082      # are copied into the system frameworks
15083      XCODEBUILD=
15084
15085    fi
15086
15087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15088$as_echo_n "checking for sdk name... " >&6; }
15089
15090# Check whether --with-sdk-name was given.
15091if test "${with_sdk_name+set}" = set; then :
15092  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15093
15094fi
15095
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15097$as_echo "$SDKNAME" >&6; }
15098
15099    # if toolchain path is specified then don't rely on system headers, they may not compile
15100    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15101    test -z "$TOOLCHAIN_PATH" && \
15102      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15103
15104    if test -z "$SYSROOT"; then
15105      if test -n "$XCODEBUILD"; then
15106        # if we don't have system headers, use default SDK name (last resort)
15107        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15108          SDKNAME=${SDKNAME:-macosx}
15109        fi
15110
15111        if test -n "$SDKNAME"; then
15112          # Call xcodebuild to determine SYSROOT
15113          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15114        fi
15115      else
15116        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15117          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
15118        fi
15119      fi
15120    else
15121      # warn user if --with-sdk-name was also set
15122      if test -n "$with_sdk_name"; then
15123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15124$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15125      fi
15126    fi
15127
15128    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15129      # If no system framework headers, then SYSROOT must be set, or we won't build
15130      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
15131    fi
15132
15133    # Perform a basic sanity test
15134    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15135      if test -z "$SYSROOT"; then
15136        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
15137      else
15138        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15139      fi
15140    fi
15141
15142    # set SDKROOT too, Xcode tools will pick it up
15143    SDKROOT=$SYSROOT
15144
15145  fi
15146
15147  # Prepend the extra path to the global path
15148
15149  if test "x$EXTRA_PATH" != x; then
15150    if test "x$PATH" = x; then
15151      PATH="$EXTRA_PATH"
15152    else
15153      PATH="$EXTRA_PATH:$PATH"
15154    fi
15155  fi
15156
15157
15158  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15159    # Add extra search paths on solaris for utilities like ar and as etc...
15160    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15161  fi
15162
15163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15164$as_echo_n "checking for sysroot... " >&6; }
15165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15166$as_echo "$SYSROOT" >&6; }
15167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15168$as_echo_n "checking for toolchain path... " >&6; }
15169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15170$as_echo "$TOOLCHAIN_PATH" >&6; }
15171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15172$as_echo_n "checking for extra path... " >&6; }
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15174$as_echo "$EXTRA_PATH" >&6; }
15175
15176
15177# To properly create a configuration name, we need to have the OpenJDK target
15178# and options (variants and debug level) parsed.
15179
15180
15181
15182# Check whether --with-conf-name was given.
15183if test "${with_conf_name+set}" = set; then :
15184  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15185fi
15186
15187
15188  # Test from where we are running configure, in or outside of src root.
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15190$as_echo_n "checking where to store configuration... " >&6; }
15191  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15192      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15193      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15194    # We are running configure from the src root.
15195    # Create a default ./build/target-variant-debuglevel output root.
15196    if test "x${CONF_NAME}" = x; then
15197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15198$as_echo "in default location" >&6; }
15199      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15200    else
15201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15202$as_echo "in build directory with custom name" >&6; }
15203    fi
15204    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15205    $MKDIR -p "$OUTPUT_ROOT"
15206    if test ! -d "$OUTPUT_ROOT"; then
15207      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15208    fi
15209  else
15210    # We are running configure from outside of the src dir.
15211    # Then use the current directory as output dir!
15212    # If configuration is situated in normal build directory, just use the build
15213    # directory name as configuration name, otherwise use the complete path.
15214    if test "x${CONF_NAME}" = x; then
15215      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15216    fi
15217    OUTPUT_ROOT="$CURDIR"
15218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15219$as_echo "in current directory" >&6; }
15220
15221    # WARNING: This might be a bad thing to do. You need to be sure you want to
15222    # have a configuration in this directory. Do some sanity checks!
15223
15224    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15225      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15226      # other files
15227      files_present=`$LS $OUTPUT_ROOT`
15228      # Configure has already touched config.log and confdefs.h in the current dir when this check
15229      # is performed.
15230      filtered_files=`$ECHO "$files_present" \
15231          | $SED -e 's/config.log//g' \
15232              -e 's/configure.log//g' \
15233              -e 's/confdefs.h//g' \
15234              -e 's/ //g' \
15235          | $TR -d '\n'`
15236      if test "x$filtered_files" != x; then
15237        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15238$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15239        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15240$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15241        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15242$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15243        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15244$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15245        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15246$as_echo "$as_me: seriously mess up just about everything." >&6;}
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15248$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15250$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15251        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15252      fi
15253    fi
15254  fi
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15256$as_echo_n "checking what configuration name to use... " >&6; }
15257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15258$as_echo "$CONF_NAME" >&6; }
15259
15260
15261  # Only process if variable expands to non-empty
15262
15263  if test "x$OUTPUT_ROOT" != x; then
15264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15265
15266  # Input might be given as Windows format, start by converting to
15267  # unix format.
15268  path="$OUTPUT_ROOT"
15269  new_path=`$CYGPATH -u "$path"`
15270
15271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15274  # "foo.exe" is OK but "foo" is an error.
15275  #
15276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15277  # It is also a way to make sure we got the proper file name for the real test later on.
15278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15279  if test "x$test_shortpath" = x; then
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15281$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15282    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15283  fi
15284
15285  # Call helper function which possibly converts this using DOS-style short mode.
15286  # If so, the updated path is stored in $new_path.
15287
15288  input_path="$new_path"
15289  # Check if we need to convert this using DOS-style short mode. If the path
15290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15291  # take no chances and rewrite it.
15292  # Note: m4 eats our [], so we need to use [ and ] instead.
15293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15294  if test "x$has_forbidden_chars" != x; then
15295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15299      # Going to short mode and back again did indeed matter. Since short mode is
15300      # case insensitive, let's make it lowercase to improve readability.
15301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15302      # Now convert it back to Unix-style (cygpath)
15303      input_path=`$CYGPATH -u "$shortmode_path"`
15304      new_path="$input_path"
15305    fi
15306  fi
15307
15308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15309  if test "x$test_cygdrive_prefix" = x; then
15310    # As a simple fix, exclude /usr/bin since it's not a real path.
15311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15313      # a path prefixed by /cygdrive for fixpath to work.
15314      new_path="$CYGWIN_ROOT_PATH$input_path"
15315    fi
15316  fi
15317
15318
15319  if test "x$path" != "x$new_path"; then
15320    OUTPUT_ROOT="$new_path"
15321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15322$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15323  fi
15324
15325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15326
15327  path="$OUTPUT_ROOT"
15328  has_colon=`$ECHO $path | $GREP ^.:`
15329  new_path="$path"
15330  if test "x$has_colon" = x; then
15331    # Not in mixed or Windows style, start by that.
15332    new_path=`cmd //c echo $path`
15333  fi
15334
15335
15336  input_path="$new_path"
15337  # Check if we need to convert this using DOS-style short mode. If the path
15338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15339  # take no chances and rewrite it.
15340  # Note: m4 eats our [], so we need to use [ and ] instead.
15341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15342  if test "x$has_forbidden_chars" != x; then
15343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15345  fi
15346
15347
15348  windows_path="$new_path"
15349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15350    unix_path=`$CYGPATH -u "$windows_path"`
15351    new_path="$unix_path"
15352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15354    new_path="$unix_path"
15355  fi
15356
15357  if test "x$path" != "x$new_path"; then
15358    OUTPUT_ROOT="$new_path"
15359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15360$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15361  fi
15362
15363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15365
15366    else
15367      # We're on a unix platform. Hooray! :)
15368      path="$OUTPUT_ROOT"
15369      has_space=`$ECHO "$path" | $GREP " "`
15370      if test "x$has_space" != x; then
15371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15372$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15374      fi
15375
15376      # Use eval to expand a potential ~
15377      eval path="$path"
15378      if test ! -f "$path" && test ! -d "$path"; then
15379        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15380      fi
15381
15382      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15383    fi
15384  fi
15385
15386
15387  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15388  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15389
15390  SPEC=$OUTPUT_ROOT/spec.gmk
15391
15392  CONF_NAME=$CONF_NAME
15393
15394  OUTPUT_ROOT=$OUTPUT_ROOT
15395
15396
15397
15398  # The spec.gmk file contains all variables for the make system.
15399  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15400
15401  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15402  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15403
15404  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15405  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15406
15407  # The compare.sh is used to compare the build output to other builds.
15408  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15409
15410  # The generated Makefile knows where the spec.gmk is and where the source is.
15411  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15412  # which will look for generated configurations
15413  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15414
15415
15416
15417# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15418
15419  for ac_prog in apt-get yum port pkgutil pkgadd
15420do
15421  # Extract the first word of "$ac_prog", so it can be a program name with args.
15422set dummy $ac_prog; ac_word=$2
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15424$as_echo_n "checking for $ac_word... " >&6; }
15425if ${ac_cv_prog_PKGHANDLER+:} false; then :
15426  $as_echo_n "(cached) " >&6
15427else
15428  if test -n "$PKGHANDLER"; then
15429  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15430else
15431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15432for as_dir in $PATH
15433do
15434  IFS=$as_save_IFS
15435  test -z "$as_dir" && as_dir=.
15436    for ac_exec_ext in '' $ac_executable_extensions; do
15437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15438    ac_cv_prog_PKGHANDLER="$ac_prog"
15439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15440    break 2
15441  fi
15442done
15443  done
15444IFS=$as_save_IFS
15445
15446fi
15447fi
15448PKGHANDLER=$ac_cv_prog_PKGHANDLER
15449if test -n "$PKGHANDLER"; then
15450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15451$as_echo "$PKGHANDLER" >&6; }
15452else
15453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15454$as_echo "no" >&6; }
15455fi
15456
15457
15458  test -n "$PKGHANDLER" && break
15459done
15460
15461
15462
15463# Setup tools that requires more complex handling, or that is not needed by the configure script.
15464
15465
15466  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15467  if test "x$MAKE" != x; then
15468    # User has supplied a make, test it.
15469    if test ! -f "$MAKE"; then
15470      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15471    fi
15472
15473  MAKE_CANDIDATE=""$MAKE""
15474  DESCRIPTION="user supplied MAKE=$MAKE"
15475
15476  # On Cygwin, we require a newer version of make than on other platforms
15477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15478    MAKE_VERSION_EXPR="-e 4\."
15479    MAKE_REQUIRED_VERSION="4.0"
15480   else
15481    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15482    MAKE_REQUIRED_VERSION="3.81"
15483  fi
15484
15485  if test "x$MAKE_CANDIDATE" != x; then
15486    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15487$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15488    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15489    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15490    if test "x$IS_GNU_MAKE" = x; then
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15492$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15493    else
15494      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15495      if test "x$IS_MODERN_MAKE" = x; then
15496        { $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
15497$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;}
15498      else
15499        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15500          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15501            MAKE_EXPECTED_ENV='cygwin'
15502          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15503            MAKE_EXPECTED_ENV='msys'
15504          else
15505            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15506          fi
15507          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15508          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15509        else
15510          # Not relevant for non-Windows
15511          IS_MAKE_CORRECT_ENV=true
15512        fi
15513        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15514          { $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
15515$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;}
15516        else
15517          FOUND_MAKE=$MAKE_CANDIDATE
15518
15519  # Only process if variable expands to non-empty
15520
15521  if test "x$FOUND_MAKE" != x; then
15522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15523
15524  # First separate the path from the arguments. This will split at the first
15525  # space.
15526  complete="$FOUND_MAKE"
15527  path="${complete%% *}"
15528  tmp="$complete EOL"
15529  arguments="${tmp#* }"
15530
15531  # Input might be given as Windows format, start by converting to
15532  # unix format.
15533  new_path=`$CYGPATH -u "$path"`
15534
15535  # Now try to locate executable using which
15536  new_path=`$WHICH "$new_path" 2> /dev/null`
15537  # bat and cmd files are not always considered executable in cygwin causing which
15538  # to not find them
15539  if test "x$new_path" = x \
15540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15542    new_path=`$CYGPATH -u "$path"`
15543  fi
15544  if test "x$new_path" = x; then
15545    # Oops. Which didn't find the executable.
15546    # The splitting of arguments from the executable at a space might have been incorrect,
15547    # since paths with space are more likely in Windows. Give it another try with the whole
15548    # argument.
15549    path="$complete"
15550    arguments="EOL"
15551    new_path=`$CYGPATH -u "$path"`
15552    new_path=`$WHICH "$new_path" 2> /dev/null`
15553    # bat and cmd files are not always considered executable in cygwin causing which
15554    # to not find them
15555    if test "x$new_path" = x \
15556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15558      new_path=`$CYGPATH -u "$path"`
15559    fi
15560    if test "x$new_path" = x; then
15561      # It's still not found. Now this is an unrecoverable error.
15562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15563$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15564      has_space=`$ECHO "$complete" | $GREP " "`
15565      if test "x$has_space" != x; then
15566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15568      fi
15569      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15570    fi
15571  fi
15572
15573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15576  # "foo.exe" is OK but "foo" is an error.
15577  #
15578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15579  # It is also a way to make sure we got the proper file name for the real test later on.
15580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15581  if test "x$test_shortpath" = x; then
15582    # Short path failed, file does not exist as specified.
15583    # Try adding .exe or .cmd
15584    if test -f "${new_path}.exe"; then
15585      input_to_shortpath="${new_path}.exe"
15586    elif test -f "${new_path}.cmd"; then
15587      input_to_shortpath="${new_path}.cmd"
15588    else
15589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15594    fi
15595  else
15596    input_to_shortpath="$new_path"
15597  fi
15598
15599  # Call helper function which possibly converts this using DOS-style short mode.
15600  # If so, the updated path is stored in $new_path.
15601  new_path="$input_to_shortpath"
15602
15603  input_path="$input_to_shortpath"
15604  # Check if we need to convert this using DOS-style short mode. If the path
15605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15606  # take no chances and rewrite it.
15607  # Note: m4 eats our [], so we need to use [ and ] instead.
15608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15609  if test "x$has_forbidden_chars" != x; then
15610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15614      # Going to short mode and back again did indeed matter. Since short mode is
15615      # case insensitive, let's make it lowercase to improve readability.
15616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15617      # Now convert it back to Unix-style (cygpath)
15618      input_path=`$CYGPATH -u "$shortmode_path"`
15619      new_path="$input_path"
15620    fi
15621  fi
15622
15623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15624  if test "x$test_cygdrive_prefix" = x; then
15625    # As a simple fix, exclude /usr/bin since it's not a real path.
15626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15628      # a path prefixed by /cygdrive for fixpath to work.
15629      new_path="$CYGWIN_ROOT_PATH$input_path"
15630    fi
15631  fi
15632
15633  # remove trailing .exe if any
15634  new_path="${new_path/%.exe/}"
15635
15636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15637
15638  # First separate the path from the arguments. This will split at the first
15639  # space.
15640  complete="$FOUND_MAKE"
15641  path="${complete%% *}"
15642  tmp="$complete EOL"
15643  arguments="${tmp#* }"
15644
15645  # Input might be given as Windows format, start by converting to
15646  # unix format.
15647  new_path="$path"
15648
15649  windows_path="$new_path"
15650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15651    unix_path=`$CYGPATH -u "$windows_path"`
15652    new_path="$unix_path"
15653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15655    new_path="$unix_path"
15656  fi
15657
15658
15659  # Now try to locate executable using which
15660  new_path=`$WHICH "$new_path" 2> /dev/null`
15661
15662  if test "x$new_path" = x; then
15663    # Oops. Which didn't find the executable.
15664    # The splitting of arguments from the executable at a space might have been incorrect,
15665    # since paths with space are more likely in Windows. Give it another try with the whole
15666    # argument.
15667    path="$complete"
15668    arguments="EOL"
15669    new_path="$path"
15670
15671  windows_path="$new_path"
15672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15673    unix_path=`$CYGPATH -u "$windows_path"`
15674    new_path="$unix_path"
15675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15677    new_path="$unix_path"
15678  fi
15679
15680
15681    new_path=`$WHICH "$new_path" 2> /dev/null`
15682    # bat and cmd files are not always considered executable in MSYS causing which
15683    # to not find them
15684    if test "x$new_path" = x \
15685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15687      new_path="$path"
15688
15689  windows_path="$new_path"
15690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15691    unix_path=`$CYGPATH -u "$windows_path"`
15692    new_path="$unix_path"
15693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15695    new_path="$unix_path"
15696  fi
15697
15698    fi
15699
15700    if test "x$new_path" = x; then
15701      # It's still not found. Now this is an unrecoverable error.
15702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15703$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15704      has_space=`$ECHO "$complete" | $GREP " "`
15705      if test "x$has_space" != x; then
15706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15708      fi
15709      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15710    fi
15711  fi
15712
15713  # Now new_path has a complete unix path to the binary
15714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15715    # Keep paths in /bin as-is, but remove trailing .exe if any
15716    new_path="${new_path/%.exe/}"
15717    # Do not save /bin paths to all_fixpath_prefixes!
15718  else
15719    # Not in mixed or Windows style, start by that.
15720    new_path=`cmd //c echo $new_path`
15721
15722  input_path="$new_path"
15723  # Check if we need to convert this using DOS-style short mode. If the path
15724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15725  # take no chances and rewrite it.
15726  # Note: m4 eats our [], so we need to use [ and ] instead.
15727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15728  if test "x$has_forbidden_chars" != x; then
15729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15731  fi
15732
15733    # Output is in $new_path
15734
15735  windows_path="$new_path"
15736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15737    unix_path=`$CYGPATH -u "$windows_path"`
15738    new_path="$unix_path"
15739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15741    new_path="$unix_path"
15742  fi
15743
15744    # remove trailing .exe if any
15745    new_path="${new_path/%.exe/}"
15746
15747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15749  fi
15750
15751    else
15752      # We're on a unix platform. Hooray! :)
15753      # First separate the path from the arguments. This will split at the first
15754      # space.
15755      complete="$FOUND_MAKE"
15756      path="${complete%% *}"
15757      tmp="$complete EOL"
15758      arguments="${tmp#* }"
15759
15760      # Cannot rely on the command "which" here since it doesn't always work.
15761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15762      if test -z "$is_absolute_path"; then
15763        # Path to executable is not absolute. Find it.
15764        IFS_save="$IFS"
15765        IFS=:
15766        for p in $PATH; do
15767          if test -f "$p/$path" && test -x "$p/$path"; then
15768            new_path="$p/$path"
15769            break
15770          fi
15771        done
15772        IFS="$IFS_save"
15773      else
15774        # This is an absolute path, we can use it without further modifications.
15775        new_path="$path"
15776      fi
15777
15778      if test "x$new_path" = x; then
15779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15780$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15781        has_space=`$ECHO "$complete" | $GREP " "`
15782        if test "x$has_space" != x; then
15783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15785        fi
15786        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15787      fi
15788    fi
15789
15790    # Now join together the path and the arguments once again
15791    if test "x$arguments" != xEOL; then
15792      new_complete="$new_path ${arguments% *}"
15793    else
15794      new_complete="$new_path"
15795    fi
15796
15797    if test "x$complete" != "x$new_complete"; then
15798      FOUND_MAKE="$new_complete"
15799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15800$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15801    fi
15802  fi
15803
15804        fi
15805      fi
15806    fi
15807  fi
15808
15809    if test "x$FOUND_MAKE" = x; then
15810      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15811    fi
15812  else
15813    # Try our hardest to locate a correct version of GNU make
15814    for ac_prog in gmake
15815do
15816  # Extract the first word of "$ac_prog", so it can be a program name with args.
15817set dummy $ac_prog; ac_word=$2
15818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15819$as_echo_n "checking for $ac_word... " >&6; }
15820if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15821  $as_echo_n "(cached) " >&6
15822else
15823  case $CHECK_GMAKE in
15824  [\\/]* | ?:[\\/]*)
15825  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15826  ;;
15827  *)
15828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15829for as_dir in $PATH
15830do
15831  IFS=$as_save_IFS
15832  test -z "$as_dir" && as_dir=.
15833    for ac_exec_ext in '' $ac_executable_extensions; do
15834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15835    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15837    break 2
15838  fi
15839done
15840  done
15841IFS=$as_save_IFS
15842
15843  ;;
15844esac
15845fi
15846CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15847if test -n "$CHECK_GMAKE"; then
15848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15849$as_echo "$CHECK_GMAKE" >&6; }
15850else
15851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15852$as_echo "no" >&6; }
15853fi
15854
15855
15856  test -n "$CHECK_GMAKE" && break
15857done
15858
15859
15860  MAKE_CANDIDATE=""$CHECK_GMAKE""
15861  DESCRIPTION="gmake in PATH"
15862
15863  # On Cygwin, we require a newer version of make than on other platforms
15864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15865    MAKE_VERSION_EXPR="-e 4\."
15866    MAKE_REQUIRED_VERSION="4.0"
15867   else
15868    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15869    MAKE_REQUIRED_VERSION="3.81"
15870  fi
15871
15872  if test "x$MAKE_CANDIDATE" != x; then
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15874$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15875    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15876    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15877    if test "x$IS_GNU_MAKE" = x; then
15878      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15879$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15880    else
15881      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15882      if test "x$IS_MODERN_MAKE" = x; then
15883        { $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
15884$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;}
15885      else
15886        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15887          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15888            MAKE_EXPECTED_ENV='cygwin'
15889          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15890            MAKE_EXPECTED_ENV='msys'
15891          else
15892            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15893          fi
15894          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15895          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15896        else
15897          # Not relevant for non-Windows
15898          IS_MAKE_CORRECT_ENV=true
15899        fi
15900        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15901          { $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
15902$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;}
15903        else
15904          FOUND_MAKE=$MAKE_CANDIDATE
15905
15906  # Only process if variable expands to non-empty
15907
15908  if test "x$FOUND_MAKE" != x; then
15909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15910
15911  # First separate the path from the arguments. This will split at the first
15912  # space.
15913  complete="$FOUND_MAKE"
15914  path="${complete%% *}"
15915  tmp="$complete EOL"
15916  arguments="${tmp#* }"
15917
15918  # Input might be given as Windows format, start by converting to
15919  # unix format.
15920  new_path=`$CYGPATH -u "$path"`
15921
15922  # Now try to locate executable using which
15923  new_path=`$WHICH "$new_path" 2> /dev/null`
15924  # bat and cmd files are not always considered executable in cygwin causing which
15925  # to not find them
15926  if test "x$new_path" = x \
15927      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15928      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15929    new_path=`$CYGPATH -u "$path"`
15930  fi
15931  if test "x$new_path" = x; then
15932    # Oops. Which didn't find the executable.
15933    # The splitting of arguments from the executable at a space might have been incorrect,
15934    # since paths with space are more likely in Windows. Give it another try with the whole
15935    # argument.
15936    path="$complete"
15937    arguments="EOL"
15938    new_path=`$CYGPATH -u "$path"`
15939    new_path=`$WHICH "$new_path" 2> /dev/null`
15940    # bat and cmd files are not always considered executable in cygwin causing which
15941    # to not find them
15942    if test "x$new_path" = x \
15943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15945      new_path=`$CYGPATH -u "$path"`
15946    fi
15947    if test "x$new_path" = x; then
15948      # It's still not found. Now this is an unrecoverable error.
15949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15950$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15951      has_space=`$ECHO "$complete" | $GREP " "`
15952      if test "x$has_space" != x; then
15953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15955      fi
15956      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15957    fi
15958  fi
15959
15960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15963  # "foo.exe" is OK but "foo" is an error.
15964  #
15965  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15966  # It is also a way to make sure we got the proper file name for the real test later on.
15967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15968  if test "x$test_shortpath" = x; then
15969    # Short path failed, file does not exist as specified.
15970    # Try adding .exe or .cmd
15971    if test -f "${new_path}.exe"; then
15972      input_to_shortpath="${new_path}.exe"
15973    elif test -f "${new_path}.cmd"; then
15974      input_to_shortpath="${new_path}.cmd"
15975    else
15976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15978      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15979$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15981    fi
15982  else
15983    input_to_shortpath="$new_path"
15984  fi
15985
15986  # Call helper function which possibly converts this using DOS-style short mode.
15987  # If so, the updated path is stored in $new_path.
15988  new_path="$input_to_shortpath"
15989
15990  input_path="$input_to_shortpath"
15991  # Check if we need to convert this using DOS-style short mode. If the path
15992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15993  # take no chances and rewrite it.
15994  # Note: m4 eats our [], so we need to use [ and ] instead.
15995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15996  if test "x$has_forbidden_chars" != x; then
15997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16001      # Going to short mode and back again did indeed matter. Since short mode is
16002      # case insensitive, let's make it lowercase to improve readability.
16003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16004      # Now convert it back to Unix-style (cygpath)
16005      input_path=`$CYGPATH -u "$shortmode_path"`
16006      new_path="$input_path"
16007    fi
16008  fi
16009
16010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16011  if test "x$test_cygdrive_prefix" = x; then
16012    # As a simple fix, exclude /usr/bin since it's not a real path.
16013    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16015      # a path prefixed by /cygdrive for fixpath to work.
16016      new_path="$CYGWIN_ROOT_PATH$input_path"
16017    fi
16018  fi
16019
16020  # remove trailing .exe if any
16021  new_path="${new_path/%.exe/}"
16022
16023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16024
16025  # First separate the path from the arguments. This will split at the first
16026  # space.
16027  complete="$FOUND_MAKE"
16028  path="${complete%% *}"
16029  tmp="$complete EOL"
16030  arguments="${tmp#* }"
16031
16032  # Input might be given as Windows format, start by converting to
16033  # unix format.
16034  new_path="$path"
16035
16036  windows_path="$new_path"
16037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16038    unix_path=`$CYGPATH -u "$windows_path"`
16039    new_path="$unix_path"
16040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16042    new_path="$unix_path"
16043  fi
16044
16045
16046  # Now try to locate executable using which
16047  new_path=`$WHICH "$new_path" 2> /dev/null`
16048
16049  if test "x$new_path" = x; then
16050    # Oops. Which didn't find the executable.
16051    # The splitting of arguments from the executable at a space might have been incorrect,
16052    # since paths with space are more likely in Windows. Give it another try with the whole
16053    # argument.
16054    path="$complete"
16055    arguments="EOL"
16056    new_path="$path"
16057
16058  windows_path="$new_path"
16059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16060    unix_path=`$CYGPATH -u "$windows_path"`
16061    new_path="$unix_path"
16062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16064    new_path="$unix_path"
16065  fi
16066
16067
16068    new_path=`$WHICH "$new_path" 2> /dev/null`
16069    # bat and cmd files are not always considered executable in MSYS causing which
16070    # to not find them
16071    if test "x$new_path" = x \
16072        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16073        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16074      new_path="$path"
16075
16076  windows_path="$new_path"
16077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16078    unix_path=`$CYGPATH -u "$windows_path"`
16079    new_path="$unix_path"
16080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16082    new_path="$unix_path"
16083  fi
16084
16085    fi
16086
16087    if test "x$new_path" = x; then
16088      # It's still not found. Now this is an unrecoverable error.
16089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16091      has_space=`$ECHO "$complete" | $GREP " "`
16092      if test "x$has_space" != x; then
16093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16095      fi
16096      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16097    fi
16098  fi
16099
16100  # Now new_path has a complete unix path to the binary
16101  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16102    # Keep paths in /bin as-is, but remove trailing .exe if any
16103    new_path="${new_path/%.exe/}"
16104    # Do not save /bin paths to all_fixpath_prefixes!
16105  else
16106    # Not in mixed or Windows style, start by that.
16107    new_path=`cmd //c echo $new_path`
16108
16109  input_path="$new_path"
16110  # Check if we need to convert this using DOS-style short mode. If the path
16111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16112  # take no chances and rewrite it.
16113  # Note: m4 eats our [], so we need to use [ and ] instead.
16114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16115  if test "x$has_forbidden_chars" != x; then
16116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16118  fi
16119
16120    # Output is in $new_path
16121
16122  windows_path="$new_path"
16123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16124    unix_path=`$CYGPATH -u "$windows_path"`
16125    new_path="$unix_path"
16126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16128    new_path="$unix_path"
16129  fi
16130
16131    # remove trailing .exe if any
16132    new_path="${new_path/%.exe/}"
16133
16134    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16135    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16136  fi
16137
16138    else
16139      # We're on a unix platform. Hooray! :)
16140      # First separate the path from the arguments. This will split at the first
16141      # space.
16142      complete="$FOUND_MAKE"
16143      path="${complete%% *}"
16144      tmp="$complete EOL"
16145      arguments="${tmp#* }"
16146
16147      # Cannot rely on the command "which" here since it doesn't always work.
16148      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16149      if test -z "$is_absolute_path"; then
16150        # Path to executable is not absolute. Find it.
16151        IFS_save="$IFS"
16152        IFS=:
16153        for p in $PATH; do
16154          if test -f "$p/$path" && test -x "$p/$path"; then
16155            new_path="$p/$path"
16156            break
16157          fi
16158        done
16159        IFS="$IFS_save"
16160      else
16161        # This is an absolute path, we can use it without further modifications.
16162        new_path="$path"
16163      fi
16164
16165      if test "x$new_path" = x; then
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16167$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16168        has_space=`$ECHO "$complete" | $GREP " "`
16169        if test "x$has_space" != x; then
16170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16172        fi
16173        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16174      fi
16175    fi
16176
16177    # Now join together the path and the arguments once again
16178    if test "x$arguments" != xEOL; then
16179      new_complete="$new_path ${arguments% *}"
16180    else
16181      new_complete="$new_path"
16182    fi
16183
16184    if test "x$complete" != "x$new_complete"; then
16185      FOUND_MAKE="$new_complete"
16186      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16187$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16188    fi
16189  fi
16190
16191        fi
16192      fi
16193    fi
16194  fi
16195
16196
16197    if test "x$FOUND_MAKE" = x; then
16198      for ac_prog in make
16199do
16200  # Extract the first word of "$ac_prog", so it can be a program name with args.
16201set dummy $ac_prog; ac_word=$2
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16203$as_echo_n "checking for $ac_word... " >&6; }
16204if ${ac_cv_path_CHECK_MAKE+:} false; then :
16205  $as_echo_n "(cached) " >&6
16206else
16207  case $CHECK_MAKE in
16208  [\\/]* | ?:[\\/]*)
16209  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16210  ;;
16211  *)
16212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16213for as_dir in $PATH
16214do
16215  IFS=$as_save_IFS
16216  test -z "$as_dir" && as_dir=.
16217    for ac_exec_ext in '' $ac_executable_extensions; do
16218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16219    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16221    break 2
16222  fi
16223done
16224  done
16225IFS=$as_save_IFS
16226
16227  ;;
16228esac
16229fi
16230CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16231if test -n "$CHECK_MAKE"; then
16232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16233$as_echo "$CHECK_MAKE" >&6; }
16234else
16235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16236$as_echo "no" >&6; }
16237fi
16238
16239
16240  test -n "$CHECK_MAKE" && break
16241done
16242
16243
16244  MAKE_CANDIDATE=""$CHECK_MAKE""
16245  DESCRIPTION="make in PATH"
16246
16247  # On Cygwin, we require a newer version of make than on other platforms
16248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16249    MAKE_VERSION_EXPR="-e 4\."
16250    MAKE_REQUIRED_VERSION="4.0"
16251   else
16252    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16253    MAKE_REQUIRED_VERSION="3.81"
16254  fi
16255
16256  if test "x$MAKE_CANDIDATE" != x; then
16257    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16258$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16259    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16260    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16261    if test "x$IS_GNU_MAKE" = x; then
16262      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16263$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16264    else
16265      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16266      if test "x$IS_MODERN_MAKE" = x; then
16267        { $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
16268$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;}
16269      else
16270        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16271          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16272            MAKE_EXPECTED_ENV='cygwin'
16273          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16274            MAKE_EXPECTED_ENV='msys'
16275          else
16276            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16277          fi
16278          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16279          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16280        else
16281          # Not relevant for non-Windows
16282          IS_MAKE_CORRECT_ENV=true
16283        fi
16284        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16285          { $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
16286$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;}
16287        else
16288          FOUND_MAKE=$MAKE_CANDIDATE
16289
16290  # Only process if variable expands to non-empty
16291
16292  if test "x$FOUND_MAKE" != x; then
16293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16294
16295  # First separate the path from the arguments. This will split at the first
16296  # space.
16297  complete="$FOUND_MAKE"
16298  path="${complete%% *}"
16299  tmp="$complete EOL"
16300  arguments="${tmp#* }"
16301
16302  # Input might be given as Windows format, start by converting to
16303  # unix format.
16304  new_path=`$CYGPATH -u "$path"`
16305
16306  # Now try to locate executable using which
16307  new_path=`$WHICH "$new_path" 2> /dev/null`
16308  # bat and cmd files are not always considered executable in cygwin causing which
16309  # to not find them
16310  if test "x$new_path" = x \
16311      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16312      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16313    new_path=`$CYGPATH -u "$path"`
16314  fi
16315  if test "x$new_path" = x; then
16316    # Oops. Which didn't find the executable.
16317    # The splitting of arguments from the executable at a space might have been incorrect,
16318    # since paths with space are more likely in Windows. Give it another try with the whole
16319    # argument.
16320    path="$complete"
16321    arguments="EOL"
16322    new_path=`$CYGPATH -u "$path"`
16323    new_path=`$WHICH "$new_path" 2> /dev/null`
16324    # bat and cmd files are not always considered executable in cygwin causing which
16325    # to not find them
16326    if test "x$new_path" = x \
16327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16329      new_path=`$CYGPATH -u "$path"`
16330    fi
16331    if test "x$new_path" = x; then
16332      # It's still not found. Now this is an unrecoverable error.
16333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16334$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16335      has_space=`$ECHO "$complete" | $GREP " "`
16336      if test "x$has_space" != x; then
16337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16339      fi
16340      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16341    fi
16342  fi
16343
16344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16347  # "foo.exe" is OK but "foo" is an error.
16348  #
16349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16350  # It is also a way to make sure we got the proper file name for the real test later on.
16351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16352  if test "x$test_shortpath" = x; then
16353    # Short path failed, file does not exist as specified.
16354    # Try adding .exe or .cmd
16355    if test -f "${new_path}.exe"; then
16356      input_to_shortpath="${new_path}.exe"
16357    elif test -f "${new_path}.cmd"; then
16358      input_to_shortpath="${new_path}.cmd"
16359    else
16360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16361$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16365    fi
16366  else
16367    input_to_shortpath="$new_path"
16368  fi
16369
16370  # Call helper function which possibly converts this using DOS-style short mode.
16371  # If so, the updated path is stored in $new_path.
16372  new_path="$input_to_shortpath"
16373
16374  input_path="$input_to_shortpath"
16375  # Check if we need to convert this using DOS-style short mode. If the path
16376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16377  # take no chances and rewrite it.
16378  # Note: m4 eats our [], so we need to use [ and ] instead.
16379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16380  if test "x$has_forbidden_chars" != x; then
16381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16385      # Going to short mode and back again did indeed matter. Since short mode is
16386      # case insensitive, let's make it lowercase to improve readability.
16387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16388      # Now convert it back to Unix-style (cygpath)
16389      input_path=`$CYGPATH -u "$shortmode_path"`
16390      new_path="$input_path"
16391    fi
16392  fi
16393
16394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16395  if test "x$test_cygdrive_prefix" = x; then
16396    # As a simple fix, exclude /usr/bin since it's not a real path.
16397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16399      # a path prefixed by /cygdrive for fixpath to work.
16400      new_path="$CYGWIN_ROOT_PATH$input_path"
16401    fi
16402  fi
16403
16404  # remove trailing .exe if any
16405  new_path="${new_path/%.exe/}"
16406
16407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408
16409  # First separate the path from the arguments. This will split at the first
16410  # space.
16411  complete="$FOUND_MAKE"
16412  path="${complete%% *}"
16413  tmp="$complete EOL"
16414  arguments="${tmp#* }"
16415
16416  # Input might be given as Windows format, start by converting to
16417  # unix format.
16418  new_path="$path"
16419
16420  windows_path="$new_path"
16421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16422    unix_path=`$CYGPATH -u "$windows_path"`
16423    new_path="$unix_path"
16424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16426    new_path="$unix_path"
16427  fi
16428
16429
16430  # Now try to locate executable using which
16431  new_path=`$WHICH "$new_path" 2> /dev/null`
16432
16433  if test "x$new_path" = x; then
16434    # Oops. Which didn't find the executable.
16435    # The splitting of arguments from the executable at a space might have been incorrect,
16436    # since paths with space are more likely in Windows. Give it another try with the whole
16437    # argument.
16438    path="$complete"
16439    arguments="EOL"
16440    new_path="$path"
16441
16442  windows_path="$new_path"
16443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16444    unix_path=`$CYGPATH -u "$windows_path"`
16445    new_path="$unix_path"
16446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16448    new_path="$unix_path"
16449  fi
16450
16451
16452    new_path=`$WHICH "$new_path" 2> /dev/null`
16453    # bat and cmd files are not always considered executable in MSYS causing which
16454    # to not find them
16455    if test "x$new_path" = x \
16456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16458      new_path="$path"
16459
16460  windows_path="$new_path"
16461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16462    unix_path=`$CYGPATH -u "$windows_path"`
16463    new_path="$unix_path"
16464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16466    new_path="$unix_path"
16467  fi
16468
16469    fi
16470
16471    if test "x$new_path" = x; then
16472      # It's still not found. Now this is an unrecoverable error.
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16474$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16475      has_space=`$ECHO "$complete" | $GREP " "`
16476      if test "x$has_space" != x; then
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16479      fi
16480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16481    fi
16482  fi
16483
16484  # Now new_path has a complete unix path to the binary
16485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16486    # Keep paths in /bin as-is, but remove trailing .exe if any
16487    new_path="${new_path/%.exe/}"
16488    # Do not save /bin paths to all_fixpath_prefixes!
16489  else
16490    # Not in mixed or Windows style, start by that.
16491    new_path=`cmd //c echo $new_path`
16492
16493  input_path="$new_path"
16494  # Check if we need to convert this using DOS-style short mode. If the path
16495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16496  # take no chances and rewrite it.
16497  # Note: m4 eats our [], so we need to use [ and ] instead.
16498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16499  if test "x$has_forbidden_chars" != x; then
16500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16502  fi
16503
16504    # Output is in $new_path
16505
16506  windows_path="$new_path"
16507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16508    unix_path=`$CYGPATH -u "$windows_path"`
16509    new_path="$unix_path"
16510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16512    new_path="$unix_path"
16513  fi
16514
16515    # remove trailing .exe if any
16516    new_path="${new_path/%.exe/}"
16517
16518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16520  fi
16521
16522    else
16523      # We're on a unix platform. Hooray! :)
16524      # First separate the path from the arguments. This will split at the first
16525      # space.
16526      complete="$FOUND_MAKE"
16527      path="${complete%% *}"
16528      tmp="$complete EOL"
16529      arguments="${tmp#* }"
16530
16531      # Cannot rely on the command "which" here since it doesn't always work.
16532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16533      if test -z "$is_absolute_path"; then
16534        # Path to executable is not absolute. Find it.
16535        IFS_save="$IFS"
16536        IFS=:
16537        for p in $PATH; do
16538          if test -f "$p/$path" && test -x "$p/$path"; then
16539            new_path="$p/$path"
16540            break
16541          fi
16542        done
16543        IFS="$IFS_save"
16544      else
16545        # This is an absolute path, we can use it without further modifications.
16546        new_path="$path"
16547      fi
16548
16549      if test "x$new_path" = x; then
16550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16552        has_space=`$ECHO "$complete" | $GREP " "`
16553        if test "x$has_space" != x; then
16554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16556        fi
16557        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16558      fi
16559    fi
16560
16561    # Now join together the path and the arguments once again
16562    if test "x$arguments" != xEOL; then
16563      new_complete="$new_path ${arguments% *}"
16564    else
16565      new_complete="$new_path"
16566    fi
16567
16568    if test "x$complete" != "x$new_complete"; then
16569      FOUND_MAKE="$new_complete"
16570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16571$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16572    fi
16573  fi
16574
16575        fi
16576      fi
16577    fi
16578  fi
16579
16580    fi
16581
16582    if test "x$FOUND_MAKE" = x; then
16583      if test "x$TOOLCHAIN_PATH" != x; then
16584        # We have a toolchain path, check that as well before giving up.
16585        OLD_PATH=$PATH
16586        PATH=$TOOLCHAIN_PATH:$PATH
16587        for ac_prog in gmake
16588do
16589  # Extract the first word of "$ac_prog", so it can be a program name with args.
16590set dummy $ac_prog; ac_word=$2
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16592$as_echo_n "checking for $ac_word... " >&6; }
16593if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16594  $as_echo_n "(cached) " >&6
16595else
16596  case $CHECK_TOOLSDIR_GMAKE in
16597  [\\/]* | ?:[\\/]*)
16598  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16599  ;;
16600  *)
16601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16602for as_dir in $PATH
16603do
16604  IFS=$as_save_IFS
16605  test -z "$as_dir" && as_dir=.
16606    for ac_exec_ext in '' $ac_executable_extensions; do
16607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16608    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16610    break 2
16611  fi
16612done
16613  done
16614IFS=$as_save_IFS
16615
16616  ;;
16617esac
16618fi
16619CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16620if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16622$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16623else
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16625$as_echo "no" >&6; }
16626fi
16627
16628
16629  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16630done
16631
16632
16633  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16634  DESCRIPTION="gmake in tools-dir"
16635
16636  # On Cygwin, we require a newer version of make than on other platforms
16637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16638    MAKE_VERSION_EXPR="-e 4\."
16639    MAKE_REQUIRED_VERSION="4.0"
16640   else
16641    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16642    MAKE_REQUIRED_VERSION="3.81"
16643  fi
16644
16645  if test "x$MAKE_CANDIDATE" != x; then
16646    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16647$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16648    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16649    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16650    if test "x$IS_GNU_MAKE" = x; then
16651      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16652$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16653    else
16654      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16655      if test "x$IS_MODERN_MAKE" = x; then
16656        { $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
16657$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;}
16658      else
16659        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16660          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16661            MAKE_EXPECTED_ENV='cygwin'
16662          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16663            MAKE_EXPECTED_ENV='msys'
16664          else
16665            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16666          fi
16667          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16668          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16669        else
16670          # Not relevant for non-Windows
16671          IS_MAKE_CORRECT_ENV=true
16672        fi
16673        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16674          { $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
16675$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;}
16676        else
16677          FOUND_MAKE=$MAKE_CANDIDATE
16678
16679  # Only process if variable expands to non-empty
16680
16681  if test "x$FOUND_MAKE" != x; then
16682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16683
16684  # First separate the path from the arguments. This will split at the first
16685  # space.
16686  complete="$FOUND_MAKE"
16687  path="${complete%% *}"
16688  tmp="$complete EOL"
16689  arguments="${tmp#* }"
16690
16691  # Input might be given as Windows format, start by converting to
16692  # unix format.
16693  new_path=`$CYGPATH -u "$path"`
16694
16695  # Now try to locate executable using which
16696  new_path=`$WHICH "$new_path" 2> /dev/null`
16697  # bat and cmd files are not always considered executable in cygwin causing which
16698  # to not find them
16699  if test "x$new_path" = x \
16700      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16701      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16702    new_path=`$CYGPATH -u "$path"`
16703  fi
16704  if test "x$new_path" = x; then
16705    # Oops. Which didn't find the executable.
16706    # The splitting of arguments from the executable at a space might have been incorrect,
16707    # since paths with space are more likely in Windows. Give it another try with the whole
16708    # argument.
16709    path="$complete"
16710    arguments="EOL"
16711    new_path=`$CYGPATH -u "$path"`
16712    new_path=`$WHICH "$new_path" 2> /dev/null`
16713    # bat and cmd files are not always considered executable in cygwin causing which
16714    # to not find them
16715    if test "x$new_path" = x \
16716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16718      new_path=`$CYGPATH -u "$path"`
16719    fi
16720    if test "x$new_path" = x; then
16721      # It's still not found. Now this is an unrecoverable error.
16722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16723$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16724      has_space=`$ECHO "$complete" | $GREP " "`
16725      if test "x$has_space" != x; then
16726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16728      fi
16729      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16730    fi
16731  fi
16732
16733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16736  # "foo.exe" is OK but "foo" is an error.
16737  #
16738  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16739  # It is also a way to make sure we got the proper file name for the real test later on.
16740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16741  if test "x$test_shortpath" = x; then
16742    # Short path failed, file does not exist as specified.
16743    # Try adding .exe or .cmd
16744    if test -f "${new_path}.exe"; then
16745      input_to_shortpath="${new_path}.exe"
16746    elif test -f "${new_path}.cmd"; then
16747      input_to_shortpath="${new_path}.cmd"
16748    else
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16753      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16754    fi
16755  else
16756    input_to_shortpath="$new_path"
16757  fi
16758
16759  # Call helper function which possibly converts this using DOS-style short mode.
16760  # If so, the updated path is stored in $new_path.
16761  new_path="$input_to_shortpath"
16762
16763  input_path="$input_to_shortpath"
16764  # Check if we need to convert this using DOS-style short mode. If the path
16765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16766  # take no chances and rewrite it.
16767  # Note: m4 eats our [], so we need to use [ and ] instead.
16768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16769  if test "x$has_forbidden_chars" != x; then
16770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16774      # Going to short mode and back again did indeed matter. Since short mode is
16775      # case insensitive, let's make it lowercase to improve readability.
16776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16777      # Now convert it back to Unix-style (cygpath)
16778      input_path=`$CYGPATH -u "$shortmode_path"`
16779      new_path="$input_path"
16780    fi
16781  fi
16782
16783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16784  if test "x$test_cygdrive_prefix" = x; then
16785    # As a simple fix, exclude /usr/bin since it's not a real path.
16786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16788      # a path prefixed by /cygdrive for fixpath to work.
16789      new_path="$CYGWIN_ROOT_PATH$input_path"
16790    fi
16791  fi
16792
16793  # remove trailing .exe if any
16794  new_path="${new_path/%.exe/}"
16795
16796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16797
16798  # First separate the path from the arguments. This will split at the first
16799  # space.
16800  complete="$FOUND_MAKE"
16801  path="${complete%% *}"
16802  tmp="$complete EOL"
16803  arguments="${tmp#* }"
16804
16805  # Input might be given as Windows format, start by converting to
16806  # unix format.
16807  new_path="$path"
16808
16809  windows_path="$new_path"
16810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16811    unix_path=`$CYGPATH -u "$windows_path"`
16812    new_path="$unix_path"
16813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16815    new_path="$unix_path"
16816  fi
16817
16818
16819  # Now try to locate executable using which
16820  new_path=`$WHICH "$new_path" 2> /dev/null`
16821
16822  if test "x$new_path" = x; then
16823    # Oops. Which didn't find the executable.
16824    # The splitting of arguments from the executable at a space might have been incorrect,
16825    # since paths with space are more likely in Windows. Give it another try with the whole
16826    # argument.
16827    path="$complete"
16828    arguments="EOL"
16829    new_path="$path"
16830
16831  windows_path="$new_path"
16832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16833    unix_path=`$CYGPATH -u "$windows_path"`
16834    new_path="$unix_path"
16835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16837    new_path="$unix_path"
16838  fi
16839
16840
16841    new_path=`$WHICH "$new_path" 2> /dev/null`
16842    # bat and cmd files are not always considered executable in MSYS causing which
16843    # to not find them
16844    if test "x$new_path" = x \
16845        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16846        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16847      new_path="$path"
16848
16849  windows_path="$new_path"
16850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16851    unix_path=`$CYGPATH -u "$windows_path"`
16852    new_path="$unix_path"
16853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16855    new_path="$unix_path"
16856  fi
16857
16858    fi
16859
16860    if test "x$new_path" = x; then
16861      # It's still not found. Now this is an unrecoverable error.
16862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16864      has_space=`$ECHO "$complete" | $GREP " "`
16865      if test "x$has_space" != x; then
16866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16868      fi
16869      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16870    fi
16871  fi
16872
16873  # Now new_path has a complete unix path to the binary
16874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16875    # Keep paths in /bin as-is, but remove trailing .exe if any
16876    new_path="${new_path/%.exe/}"
16877    # Do not save /bin paths to all_fixpath_prefixes!
16878  else
16879    # Not in mixed or Windows style, start by that.
16880    new_path=`cmd //c echo $new_path`
16881
16882  input_path="$new_path"
16883  # Check if we need to convert this using DOS-style short mode. If the path
16884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16885  # take no chances and rewrite it.
16886  # Note: m4 eats our [], so we need to use [ and ] instead.
16887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16888  if test "x$has_forbidden_chars" != x; then
16889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16891  fi
16892
16893    # Output is in $new_path
16894
16895  windows_path="$new_path"
16896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16897    unix_path=`$CYGPATH -u "$windows_path"`
16898    new_path="$unix_path"
16899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16901    new_path="$unix_path"
16902  fi
16903
16904    # remove trailing .exe if any
16905    new_path="${new_path/%.exe/}"
16906
16907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16909  fi
16910
16911    else
16912      # We're on a unix platform. Hooray! :)
16913      # First separate the path from the arguments. This will split at the first
16914      # space.
16915      complete="$FOUND_MAKE"
16916      path="${complete%% *}"
16917      tmp="$complete EOL"
16918      arguments="${tmp#* }"
16919
16920      # Cannot rely on the command "which" here since it doesn't always work.
16921      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16922      if test -z "$is_absolute_path"; then
16923        # Path to executable is not absolute. Find it.
16924        IFS_save="$IFS"
16925        IFS=:
16926        for p in $PATH; do
16927          if test -f "$p/$path" && test -x "$p/$path"; then
16928            new_path="$p/$path"
16929            break
16930          fi
16931        done
16932        IFS="$IFS_save"
16933      else
16934        # This is an absolute path, we can use it without further modifications.
16935        new_path="$path"
16936      fi
16937
16938      if test "x$new_path" = x; then
16939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16940$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16941        has_space=`$ECHO "$complete" | $GREP " "`
16942        if test "x$has_space" != x; then
16943          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16945        fi
16946        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16947      fi
16948    fi
16949
16950    # Now join together the path and the arguments once again
16951    if test "x$arguments" != xEOL; then
16952      new_complete="$new_path ${arguments% *}"
16953    else
16954      new_complete="$new_path"
16955    fi
16956
16957    if test "x$complete" != "x$new_complete"; then
16958      FOUND_MAKE="$new_complete"
16959      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16960$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16961    fi
16962  fi
16963
16964        fi
16965      fi
16966    fi
16967  fi
16968
16969        if test "x$FOUND_MAKE" = x; then
16970          for ac_prog in make
16971do
16972  # Extract the first word of "$ac_prog", so it can be a program name with args.
16973set dummy $ac_prog; ac_word=$2
16974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16975$as_echo_n "checking for $ac_word... " >&6; }
16976if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16977  $as_echo_n "(cached) " >&6
16978else
16979  case $CHECK_TOOLSDIR_MAKE in
16980  [\\/]* | ?:[\\/]*)
16981  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16982  ;;
16983  *)
16984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16985for as_dir in $PATH
16986do
16987  IFS=$as_save_IFS
16988  test -z "$as_dir" && as_dir=.
16989    for ac_exec_ext in '' $ac_executable_extensions; do
16990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16991    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16993    break 2
16994  fi
16995done
16996  done
16997IFS=$as_save_IFS
16998
16999  ;;
17000esac
17001fi
17002CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17003if test -n "$CHECK_TOOLSDIR_MAKE"; then
17004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17005$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17006else
17007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17008$as_echo "no" >&6; }
17009fi
17010
17011
17012  test -n "$CHECK_TOOLSDIR_MAKE" && break
17013done
17014
17015
17016  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17017  DESCRIPTION="make in tools-dir"
17018
17019  # On Cygwin, we require a newer version of make than on other platforms
17020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17021    MAKE_VERSION_EXPR="-e 4\."
17022    MAKE_REQUIRED_VERSION="4.0"
17023   else
17024    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17025    MAKE_REQUIRED_VERSION="3.81"
17026  fi
17027
17028  if test "x$MAKE_CANDIDATE" != x; then
17029    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17030$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17031    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17032    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17033    if test "x$IS_GNU_MAKE" = x; then
17034      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17035$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17036    else
17037      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17038      if test "x$IS_MODERN_MAKE" = x; then
17039        { $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
17040$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;}
17041      else
17042        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17043          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17044            MAKE_EXPECTED_ENV='cygwin'
17045          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17046            MAKE_EXPECTED_ENV='msys'
17047          else
17048            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17049          fi
17050          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17051          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17052        else
17053          # Not relevant for non-Windows
17054          IS_MAKE_CORRECT_ENV=true
17055        fi
17056        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17057          { $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
17058$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;}
17059        else
17060          FOUND_MAKE=$MAKE_CANDIDATE
17061
17062  # Only process if variable expands to non-empty
17063
17064  if test "x$FOUND_MAKE" != x; then
17065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17066
17067  # First separate the path from the arguments. This will split at the first
17068  # space.
17069  complete="$FOUND_MAKE"
17070  path="${complete%% *}"
17071  tmp="$complete EOL"
17072  arguments="${tmp#* }"
17073
17074  # Input might be given as Windows format, start by converting to
17075  # unix format.
17076  new_path=`$CYGPATH -u "$path"`
17077
17078  # Now try to locate executable using which
17079  new_path=`$WHICH "$new_path" 2> /dev/null`
17080  # bat and cmd files are not always considered executable in cygwin causing which
17081  # to not find them
17082  if test "x$new_path" = x \
17083      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17084      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17085    new_path=`$CYGPATH -u "$path"`
17086  fi
17087  if test "x$new_path" = x; then
17088    # Oops. Which didn't find the executable.
17089    # The splitting of arguments from the executable at a space might have been incorrect,
17090    # since paths with space are more likely in Windows. Give it another try with the whole
17091    # argument.
17092    path="$complete"
17093    arguments="EOL"
17094    new_path=`$CYGPATH -u "$path"`
17095    new_path=`$WHICH "$new_path" 2> /dev/null`
17096    # bat and cmd files are not always considered executable in cygwin causing which
17097    # to not find them
17098    if test "x$new_path" = x \
17099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17101      new_path=`$CYGPATH -u "$path"`
17102    fi
17103    if test "x$new_path" = x; then
17104      # It's still not found. Now this is an unrecoverable error.
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17106$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17107      has_space=`$ECHO "$complete" | $GREP " "`
17108      if test "x$has_space" != x; then
17109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17111      fi
17112      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17113    fi
17114  fi
17115
17116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17119  # "foo.exe" is OK but "foo" is an error.
17120  #
17121  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17122  # It is also a way to make sure we got the proper file name for the real test later on.
17123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17124  if test "x$test_shortpath" = x; then
17125    # Short path failed, file does not exist as specified.
17126    # Try adding .exe or .cmd
17127    if test -f "${new_path}.exe"; then
17128      input_to_shortpath="${new_path}.exe"
17129    elif test -f "${new_path}.cmd"; then
17130      input_to_shortpath="${new_path}.cmd"
17131    else
17132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17134      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17135$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17136      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17137    fi
17138  else
17139    input_to_shortpath="$new_path"
17140  fi
17141
17142  # Call helper function which possibly converts this using DOS-style short mode.
17143  # If so, the updated path is stored in $new_path.
17144  new_path="$input_to_shortpath"
17145
17146  input_path="$input_to_shortpath"
17147  # Check if we need to convert this using DOS-style short mode. If the path
17148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17149  # take no chances and rewrite it.
17150  # Note: m4 eats our [], so we need to use [ and ] instead.
17151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17152  if test "x$has_forbidden_chars" != x; then
17153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17157      # Going to short mode and back again did indeed matter. Since short mode is
17158      # case insensitive, let's make it lowercase to improve readability.
17159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17160      # Now convert it back to Unix-style (cygpath)
17161      input_path=`$CYGPATH -u "$shortmode_path"`
17162      new_path="$input_path"
17163    fi
17164  fi
17165
17166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17167  if test "x$test_cygdrive_prefix" = x; then
17168    # As a simple fix, exclude /usr/bin since it's not a real path.
17169    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17171      # a path prefixed by /cygdrive for fixpath to work.
17172      new_path="$CYGWIN_ROOT_PATH$input_path"
17173    fi
17174  fi
17175
17176  # remove trailing .exe if any
17177  new_path="${new_path/%.exe/}"
17178
17179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17180
17181  # First separate the path from the arguments. This will split at the first
17182  # space.
17183  complete="$FOUND_MAKE"
17184  path="${complete%% *}"
17185  tmp="$complete EOL"
17186  arguments="${tmp#* }"
17187
17188  # Input might be given as Windows format, start by converting to
17189  # unix format.
17190  new_path="$path"
17191
17192  windows_path="$new_path"
17193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17194    unix_path=`$CYGPATH -u "$windows_path"`
17195    new_path="$unix_path"
17196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17198    new_path="$unix_path"
17199  fi
17200
17201
17202  # Now try to locate executable using which
17203  new_path=`$WHICH "$new_path" 2> /dev/null`
17204
17205  if test "x$new_path" = x; then
17206    # Oops. Which didn't find the executable.
17207    # The splitting of arguments from the executable at a space might have been incorrect,
17208    # since paths with space are more likely in Windows. Give it another try with the whole
17209    # argument.
17210    path="$complete"
17211    arguments="EOL"
17212    new_path="$path"
17213
17214  windows_path="$new_path"
17215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17216    unix_path=`$CYGPATH -u "$windows_path"`
17217    new_path="$unix_path"
17218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17220    new_path="$unix_path"
17221  fi
17222
17223
17224    new_path=`$WHICH "$new_path" 2> /dev/null`
17225    # bat and cmd files are not always considered executable in MSYS causing which
17226    # to not find them
17227    if test "x$new_path" = x \
17228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17230      new_path="$path"
17231
17232  windows_path="$new_path"
17233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234    unix_path=`$CYGPATH -u "$windows_path"`
17235    new_path="$unix_path"
17236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17238    new_path="$unix_path"
17239  fi
17240
17241    fi
17242
17243    if test "x$new_path" = x; then
17244      # It's still not found. Now this is an unrecoverable error.
17245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17247      has_space=`$ECHO "$complete" | $GREP " "`
17248      if test "x$has_space" != x; then
17249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17251      fi
17252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17253    fi
17254  fi
17255
17256  # Now new_path has a complete unix path to the binary
17257  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17258    # Keep paths in /bin as-is, but remove trailing .exe if any
17259    new_path="${new_path/%.exe/}"
17260    # Do not save /bin paths to all_fixpath_prefixes!
17261  else
17262    # Not in mixed or Windows style, start by that.
17263    new_path=`cmd //c echo $new_path`
17264
17265  input_path="$new_path"
17266  # Check if we need to convert this using DOS-style short mode. If the path
17267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17268  # take no chances and rewrite it.
17269  # Note: m4 eats our [], so we need to use [ and ] instead.
17270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17271  if test "x$has_forbidden_chars" != x; then
17272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17274  fi
17275
17276    # Output is in $new_path
17277
17278  windows_path="$new_path"
17279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17280    unix_path=`$CYGPATH -u "$windows_path"`
17281    new_path="$unix_path"
17282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17284    new_path="$unix_path"
17285  fi
17286
17287    # remove trailing .exe if any
17288    new_path="${new_path/%.exe/}"
17289
17290    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17291    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17292  fi
17293
17294    else
17295      # We're on a unix platform. Hooray! :)
17296      # First separate the path from the arguments. This will split at the first
17297      # space.
17298      complete="$FOUND_MAKE"
17299      path="${complete%% *}"
17300      tmp="$complete EOL"
17301      arguments="${tmp#* }"
17302
17303      # Cannot rely on the command "which" here since it doesn't always work.
17304      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17305      if test -z "$is_absolute_path"; then
17306        # Path to executable is not absolute. Find it.
17307        IFS_save="$IFS"
17308        IFS=:
17309        for p in $PATH; do
17310          if test -f "$p/$path" && test -x "$p/$path"; then
17311            new_path="$p/$path"
17312            break
17313          fi
17314        done
17315        IFS="$IFS_save"
17316      else
17317        # This is an absolute path, we can use it without further modifications.
17318        new_path="$path"
17319      fi
17320
17321      if test "x$new_path" = x; then
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17323$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17324        has_space=`$ECHO "$complete" | $GREP " "`
17325        if test "x$has_space" != x; then
17326          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17328        fi
17329        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17330      fi
17331    fi
17332
17333    # Now join together the path and the arguments once again
17334    if test "x$arguments" != xEOL; then
17335      new_complete="$new_path ${arguments% *}"
17336    else
17337      new_complete="$new_path"
17338    fi
17339
17340    if test "x$complete" != "x$new_complete"; then
17341      FOUND_MAKE="$new_complete"
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17343$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17344    fi
17345  fi
17346
17347        fi
17348      fi
17349    fi
17350  fi
17351
17352        fi
17353        PATH=$OLD_PATH
17354      fi
17355    fi
17356
17357    if test "x$FOUND_MAKE" = x; then
17358      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
17359    fi
17360  fi
17361
17362  MAKE=$FOUND_MAKE
17363
17364  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17365$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17366
17367
17368  # Check if make supports the output sync option and if so, setup using it.
17369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17370$as_echo_n "checking if make --output-sync is supported... " >&6; }
17371  if $MAKE --version -O > /dev/null 2>&1; then
17372    OUTPUT_SYNC_SUPPORTED=true
17373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17374$as_echo "yes" >&6; }
17375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17376$as_echo_n "checking for output-sync value... " >&6; }
17377
17378# Check whether --with-output-sync was given.
17379if test "${with_output_sync+set}" = set; then :
17380  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17381fi
17382
17383    if test "x$OUTPUT_SYNC" = "x"; then
17384      OUTPUT_SYNC=none
17385    fi
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17387$as_echo "$OUTPUT_SYNC" >&6; }
17388    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17389      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17390    fi
17391  else
17392    OUTPUT_SYNC_SUPPORTED=false
17393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17394$as_echo "no" >&6; }
17395  fi
17396
17397
17398
17399
17400
17401
17402  # Test if find supports -delete
17403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17404$as_echo_n "checking if find supports -delete... " >&6; }
17405  FIND_DELETE="-delete"
17406
17407  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17408
17409  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17410
17411  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17412  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17413    # No, it does not.
17414    rm $DELETEDIR/TestIfFindSupportsDelete
17415    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17416      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17417      FIND_DELETE="-print | xargs rm"
17418    else
17419      FIND_DELETE="-exec rm \{\} \+"
17420    fi
17421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17422$as_echo "no" >&6; }
17423  else
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17425$as_echo "yes" >&6; }
17426  fi
17427  rmdir $DELETEDIR
17428
17429
17430
17431  # These tools might not be installed by default,
17432  # need hint on how to install them.
17433
17434
17435
17436  # Publish this variable in the help.
17437
17438
17439  if test "x$UNZIP" = x; then
17440    # The variable is not set by user, try to locate tool using the code snippet
17441    for ac_prog in unzip
17442do
17443  # Extract the first word of "$ac_prog", so it can be a program name with args.
17444set dummy $ac_prog; ac_word=$2
17445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17446$as_echo_n "checking for $ac_word... " >&6; }
17447if ${ac_cv_path_UNZIP+:} false; then :
17448  $as_echo_n "(cached) " >&6
17449else
17450  case $UNZIP in
17451  [\\/]* | ?:[\\/]*)
17452  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17453  ;;
17454  *)
17455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17456for as_dir in $PATH
17457do
17458  IFS=$as_save_IFS
17459  test -z "$as_dir" && as_dir=.
17460    for ac_exec_ext in '' $ac_executable_extensions; do
17461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17462    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17464    break 2
17465  fi
17466done
17467  done
17468IFS=$as_save_IFS
17469
17470  ;;
17471esac
17472fi
17473UNZIP=$ac_cv_path_UNZIP
17474if test -n "$UNZIP"; then
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17476$as_echo "$UNZIP" >&6; }
17477else
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17479$as_echo "no" >&6; }
17480fi
17481
17482
17483  test -n "$UNZIP" && break
17484done
17485
17486  else
17487    # The variable is set, but is it from the command line or the environment?
17488
17489    # Try to remove the string !UNZIP! from our list.
17490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17492      # If it failed, the variable was not from the command line. Ignore it,
17493      # but warn the user (except for BASH, which is always set by the calling BASH).
17494      if test "xUNZIP" != xBASH; then
17495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17496$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17497      fi
17498      # Try to locate tool using the code snippet
17499      for ac_prog in unzip
17500do
17501  # Extract the first word of "$ac_prog", so it can be a program name with args.
17502set dummy $ac_prog; ac_word=$2
17503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17504$as_echo_n "checking for $ac_word... " >&6; }
17505if ${ac_cv_path_UNZIP+:} false; then :
17506  $as_echo_n "(cached) " >&6
17507else
17508  case $UNZIP in
17509  [\\/]* | ?:[\\/]*)
17510  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17511  ;;
17512  *)
17513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17514for as_dir in $PATH
17515do
17516  IFS=$as_save_IFS
17517  test -z "$as_dir" && as_dir=.
17518    for ac_exec_ext in '' $ac_executable_extensions; do
17519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17520    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17522    break 2
17523  fi
17524done
17525  done
17526IFS=$as_save_IFS
17527
17528  ;;
17529esac
17530fi
17531UNZIP=$ac_cv_path_UNZIP
17532if test -n "$UNZIP"; then
17533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17534$as_echo "$UNZIP" >&6; }
17535else
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17537$as_echo "no" >&6; }
17538fi
17539
17540
17541  test -n "$UNZIP" && break
17542done
17543
17544    else
17545      # If it succeeded, then it was overridden by the user. We will use it
17546      # for the tool.
17547
17548      # First remove it from the list of overridden variables, so we can test
17549      # for unknown variables in the end.
17550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17551
17552      # Check if the provided tool contains a complete path.
17553      tool_specified="$UNZIP"
17554      tool_basename="${tool_specified##*/}"
17555      if test "x$tool_basename" = "x$tool_specified"; then
17556        # A command without a complete path is provided, search $PATH.
17557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17558$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17559        # Extract the first word of "$tool_basename", so it can be a program name with args.
17560set dummy $tool_basename; ac_word=$2
17561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17562$as_echo_n "checking for $ac_word... " >&6; }
17563if ${ac_cv_path_UNZIP+:} false; then :
17564  $as_echo_n "(cached) " >&6
17565else
17566  case $UNZIP in
17567  [\\/]* | ?:[\\/]*)
17568  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17569  ;;
17570  *)
17571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17572for as_dir in $PATH
17573do
17574  IFS=$as_save_IFS
17575  test -z "$as_dir" && as_dir=.
17576    for ac_exec_ext in '' $ac_executable_extensions; do
17577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17578    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17580    break 2
17581  fi
17582done
17583  done
17584IFS=$as_save_IFS
17585
17586  ;;
17587esac
17588fi
17589UNZIP=$ac_cv_path_UNZIP
17590if test -n "$UNZIP"; then
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17592$as_echo "$UNZIP" >&6; }
17593else
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595$as_echo "no" >&6; }
17596fi
17597
17598
17599        if test "x$UNZIP" = x; then
17600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17601        fi
17602      else
17603        # Otherwise we believe it is a complete path. Use it as it is.
17604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17605$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17607$as_echo_n "checking for UNZIP... " >&6; }
17608        if test ! -x "$tool_specified"; then
17609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17610$as_echo "not found" >&6; }
17611          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17612        fi
17613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17614$as_echo "$tool_specified" >&6; }
17615      fi
17616    fi
17617  fi
17618
17619
17620
17621  if test "x$UNZIP" = x; then
17622    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17623  fi
17624
17625
17626
17627
17628
17629  # Publish this variable in the help.
17630
17631
17632  if test "x$ZIP" = x; then
17633    # The variable is not set by user, try to locate tool using the code snippet
17634    for ac_prog in zip
17635do
17636  # Extract the first word of "$ac_prog", so it can be a program name with args.
17637set dummy $ac_prog; ac_word=$2
17638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17639$as_echo_n "checking for $ac_word... " >&6; }
17640if ${ac_cv_path_ZIP+:} false; then :
17641  $as_echo_n "(cached) " >&6
17642else
17643  case $ZIP in
17644  [\\/]* | ?:[\\/]*)
17645  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17646  ;;
17647  *)
17648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17649for as_dir in $PATH
17650do
17651  IFS=$as_save_IFS
17652  test -z "$as_dir" && as_dir=.
17653    for ac_exec_ext in '' $ac_executable_extensions; do
17654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17655    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17657    break 2
17658  fi
17659done
17660  done
17661IFS=$as_save_IFS
17662
17663  ;;
17664esac
17665fi
17666ZIP=$ac_cv_path_ZIP
17667if test -n "$ZIP"; then
17668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17669$as_echo "$ZIP" >&6; }
17670else
17671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17672$as_echo "no" >&6; }
17673fi
17674
17675
17676  test -n "$ZIP" && break
17677done
17678
17679  else
17680    # The variable is set, but is it from the command line or the environment?
17681
17682    # Try to remove the string !ZIP! from our list.
17683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17685      # If it failed, the variable was not from the command line. Ignore it,
17686      # but warn the user (except for BASH, which is always set by the calling BASH).
17687      if test "xZIP" != xBASH; then
17688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17689$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17690      fi
17691      # Try to locate tool using the code snippet
17692      for ac_prog in zip
17693do
17694  # Extract the first word of "$ac_prog", so it can be a program name with args.
17695set dummy $ac_prog; ac_word=$2
17696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17697$as_echo_n "checking for $ac_word... " >&6; }
17698if ${ac_cv_path_ZIP+:} false; then :
17699  $as_echo_n "(cached) " >&6
17700else
17701  case $ZIP in
17702  [\\/]* | ?:[\\/]*)
17703  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17704  ;;
17705  *)
17706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17707for as_dir in $PATH
17708do
17709  IFS=$as_save_IFS
17710  test -z "$as_dir" && as_dir=.
17711    for ac_exec_ext in '' $ac_executable_extensions; do
17712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17713    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17715    break 2
17716  fi
17717done
17718  done
17719IFS=$as_save_IFS
17720
17721  ;;
17722esac
17723fi
17724ZIP=$ac_cv_path_ZIP
17725if test -n "$ZIP"; then
17726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17727$as_echo "$ZIP" >&6; }
17728else
17729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17730$as_echo "no" >&6; }
17731fi
17732
17733
17734  test -n "$ZIP" && break
17735done
17736
17737    else
17738      # If it succeeded, then it was overridden by the user. We will use it
17739      # for the tool.
17740
17741      # First remove it from the list of overridden variables, so we can test
17742      # for unknown variables in the end.
17743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17744
17745      # Check if the provided tool contains a complete path.
17746      tool_specified="$ZIP"
17747      tool_basename="${tool_specified##*/}"
17748      if test "x$tool_basename" = "x$tool_specified"; then
17749        # A command without a complete path is provided, search $PATH.
17750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17751$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17752        # Extract the first word of "$tool_basename", so it can be a program name with args.
17753set dummy $tool_basename; ac_word=$2
17754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17755$as_echo_n "checking for $ac_word... " >&6; }
17756if ${ac_cv_path_ZIP+:} false; then :
17757  $as_echo_n "(cached) " >&6
17758else
17759  case $ZIP in
17760  [\\/]* | ?:[\\/]*)
17761  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17762  ;;
17763  *)
17764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17765for as_dir in $PATH
17766do
17767  IFS=$as_save_IFS
17768  test -z "$as_dir" && as_dir=.
17769    for ac_exec_ext in '' $ac_executable_extensions; do
17770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17771    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17773    break 2
17774  fi
17775done
17776  done
17777IFS=$as_save_IFS
17778
17779  ;;
17780esac
17781fi
17782ZIP=$ac_cv_path_ZIP
17783if test -n "$ZIP"; then
17784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17785$as_echo "$ZIP" >&6; }
17786else
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17788$as_echo "no" >&6; }
17789fi
17790
17791
17792        if test "x$ZIP" = x; then
17793          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17794        fi
17795      else
17796        # Otherwise we believe it is a complete path. Use it as it is.
17797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17798$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17800$as_echo_n "checking for ZIP... " >&6; }
17801        if test ! -x "$tool_specified"; then
17802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17803$as_echo "not found" >&6; }
17804          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17805        fi
17806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17807$as_echo "$tool_specified" >&6; }
17808      fi
17809    fi
17810  fi
17811
17812
17813
17814  if test "x$ZIP" = x; then
17815    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17816  fi
17817
17818
17819
17820  # Non-required basic tools
17821
17822
17823
17824  # Publish this variable in the help.
17825
17826
17827  if test "x$LDD" = x; then
17828    # The variable is not set by user, try to locate tool using the code snippet
17829    for ac_prog in ldd
17830do
17831  # Extract the first word of "$ac_prog", so it can be a program name with args.
17832set dummy $ac_prog; ac_word=$2
17833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17834$as_echo_n "checking for $ac_word... " >&6; }
17835if ${ac_cv_path_LDD+:} false; then :
17836  $as_echo_n "(cached) " >&6
17837else
17838  case $LDD in
17839  [\\/]* | ?:[\\/]*)
17840  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17841  ;;
17842  *)
17843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17844for as_dir in $PATH
17845do
17846  IFS=$as_save_IFS
17847  test -z "$as_dir" && as_dir=.
17848    for ac_exec_ext in '' $ac_executable_extensions; do
17849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17850    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17852    break 2
17853  fi
17854done
17855  done
17856IFS=$as_save_IFS
17857
17858  ;;
17859esac
17860fi
17861LDD=$ac_cv_path_LDD
17862if test -n "$LDD"; then
17863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17864$as_echo "$LDD" >&6; }
17865else
17866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17867$as_echo "no" >&6; }
17868fi
17869
17870
17871  test -n "$LDD" && break
17872done
17873
17874  else
17875    # The variable is set, but is it from the command line or the environment?
17876
17877    # Try to remove the string !LDD! from our list.
17878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17880      # If it failed, the variable was not from the command line. Ignore it,
17881      # but warn the user (except for BASH, which is always set by the calling BASH).
17882      if test "xLDD" != xBASH; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17884$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17885      fi
17886      # Try to locate tool using the code snippet
17887      for ac_prog in ldd
17888do
17889  # Extract the first word of "$ac_prog", so it can be a program name with args.
17890set dummy $ac_prog; ac_word=$2
17891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17892$as_echo_n "checking for $ac_word... " >&6; }
17893if ${ac_cv_path_LDD+:} false; then :
17894  $as_echo_n "(cached) " >&6
17895else
17896  case $LDD in
17897  [\\/]* | ?:[\\/]*)
17898  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17899  ;;
17900  *)
17901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17902for as_dir in $PATH
17903do
17904  IFS=$as_save_IFS
17905  test -z "$as_dir" && as_dir=.
17906    for ac_exec_ext in '' $ac_executable_extensions; do
17907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17908    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17910    break 2
17911  fi
17912done
17913  done
17914IFS=$as_save_IFS
17915
17916  ;;
17917esac
17918fi
17919LDD=$ac_cv_path_LDD
17920if test -n "$LDD"; then
17921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17922$as_echo "$LDD" >&6; }
17923else
17924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17925$as_echo "no" >&6; }
17926fi
17927
17928
17929  test -n "$LDD" && break
17930done
17931
17932    else
17933      # If it succeeded, then it was overridden by the user. We will use it
17934      # for the tool.
17935
17936      # First remove it from the list of overridden variables, so we can test
17937      # for unknown variables in the end.
17938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17939
17940      # Check if the provided tool contains a complete path.
17941      tool_specified="$LDD"
17942      tool_basename="${tool_specified##*/}"
17943      if test "x$tool_basename" = "x$tool_specified"; then
17944        # A command without a complete path is provided, search $PATH.
17945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17946$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17947        # Extract the first word of "$tool_basename", so it can be a program name with args.
17948set dummy $tool_basename; ac_word=$2
17949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17950$as_echo_n "checking for $ac_word... " >&6; }
17951if ${ac_cv_path_LDD+:} false; then :
17952  $as_echo_n "(cached) " >&6
17953else
17954  case $LDD in
17955  [\\/]* | ?:[\\/]*)
17956  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17957  ;;
17958  *)
17959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17960for as_dir in $PATH
17961do
17962  IFS=$as_save_IFS
17963  test -z "$as_dir" && as_dir=.
17964    for ac_exec_ext in '' $ac_executable_extensions; do
17965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17966    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17968    break 2
17969  fi
17970done
17971  done
17972IFS=$as_save_IFS
17973
17974  ;;
17975esac
17976fi
17977LDD=$ac_cv_path_LDD
17978if test -n "$LDD"; then
17979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17980$as_echo "$LDD" >&6; }
17981else
17982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17983$as_echo "no" >&6; }
17984fi
17985
17986
17987        if test "x$LDD" = x; then
17988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17989        fi
17990      else
17991        # Otherwise we believe it is a complete path. Use it as it is.
17992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17993$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17995$as_echo_n "checking for LDD... " >&6; }
17996        if test ! -x "$tool_specified"; then
17997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17998$as_echo "not found" >&6; }
17999          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18000        fi
18001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18002$as_echo "$tool_specified" >&6; }
18003      fi
18004    fi
18005  fi
18006
18007
18008  if test "x$LDD" = "x"; then
18009    # List shared lib dependencies is used for
18010    # debug output and checking for forbidden dependencies.
18011    # We can build without it.
18012    LDD="true"
18013  fi
18014
18015
18016  # Publish this variable in the help.
18017
18018
18019  if test "x$OTOOL" = x; then
18020    # The variable is not set by user, try to locate tool using the code snippet
18021    for ac_prog in otool
18022do
18023  # Extract the first word of "$ac_prog", so it can be a program name with args.
18024set dummy $ac_prog; ac_word=$2
18025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18026$as_echo_n "checking for $ac_word... " >&6; }
18027if ${ac_cv_path_OTOOL+:} false; then :
18028  $as_echo_n "(cached) " >&6
18029else
18030  case $OTOOL in
18031  [\\/]* | ?:[\\/]*)
18032  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18033  ;;
18034  *)
18035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18036for as_dir in $PATH
18037do
18038  IFS=$as_save_IFS
18039  test -z "$as_dir" && as_dir=.
18040    for ac_exec_ext in '' $ac_executable_extensions; do
18041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18042    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18044    break 2
18045  fi
18046done
18047  done
18048IFS=$as_save_IFS
18049
18050  ;;
18051esac
18052fi
18053OTOOL=$ac_cv_path_OTOOL
18054if test -n "$OTOOL"; then
18055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18056$as_echo "$OTOOL" >&6; }
18057else
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18059$as_echo "no" >&6; }
18060fi
18061
18062
18063  test -n "$OTOOL" && break
18064done
18065
18066  else
18067    # The variable is set, but is it from the command line or the environment?
18068
18069    # Try to remove the string !OTOOL! from our list.
18070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18072      # If it failed, the variable was not from the command line. Ignore it,
18073      # but warn the user (except for BASH, which is always set by the calling BASH).
18074      if test "xOTOOL" != xBASH; then
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18076$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18077      fi
18078      # Try to locate tool using the code snippet
18079      for ac_prog in otool
18080do
18081  # Extract the first word of "$ac_prog", so it can be a program name with args.
18082set dummy $ac_prog; ac_word=$2
18083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18084$as_echo_n "checking for $ac_word... " >&6; }
18085if ${ac_cv_path_OTOOL+:} false; then :
18086  $as_echo_n "(cached) " >&6
18087else
18088  case $OTOOL in
18089  [\\/]* | ?:[\\/]*)
18090  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18091  ;;
18092  *)
18093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18094for as_dir in $PATH
18095do
18096  IFS=$as_save_IFS
18097  test -z "$as_dir" && as_dir=.
18098    for ac_exec_ext in '' $ac_executable_extensions; do
18099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18100    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18102    break 2
18103  fi
18104done
18105  done
18106IFS=$as_save_IFS
18107
18108  ;;
18109esac
18110fi
18111OTOOL=$ac_cv_path_OTOOL
18112if test -n "$OTOOL"; then
18113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18114$as_echo "$OTOOL" >&6; }
18115else
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18117$as_echo "no" >&6; }
18118fi
18119
18120
18121  test -n "$OTOOL" && break
18122done
18123
18124    else
18125      # If it succeeded, then it was overridden by the user. We will use it
18126      # for the tool.
18127
18128      # First remove it from the list of overridden variables, so we can test
18129      # for unknown variables in the end.
18130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18131
18132      # Check if the provided tool contains a complete path.
18133      tool_specified="$OTOOL"
18134      tool_basename="${tool_specified##*/}"
18135      if test "x$tool_basename" = "x$tool_specified"; then
18136        # A command without a complete path is provided, search $PATH.
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18138$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18139        # Extract the first word of "$tool_basename", so it can be a program name with args.
18140set dummy $tool_basename; ac_word=$2
18141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142$as_echo_n "checking for $ac_word... " >&6; }
18143if ${ac_cv_path_OTOOL+:} false; then :
18144  $as_echo_n "(cached) " >&6
18145else
18146  case $OTOOL in
18147  [\\/]* | ?:[\\/]*)
18148  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18149  ;;
18150  *)
18151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18152for as_dir in $PATH
18153do
18154  IFS=$as_save_IFS
18155  test -z "$as_dir" && as_dir=.
18156    for ac_exec_ext in '' $ac_executable_extensions; do
18157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18158    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18160    break 2
18161  fi
18162done
18163  done
18164IFS=$as_save_IFS
18165
18166  ;;
18167esac
18168fi
18169OTOOL=$ac_cv_path_OTOOL
18170if test -n "$OTOOL"; then
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18172$as_echo "$OTOOL" >&6; }
18173else
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175$as_echo "no" >&6; }
18176fi
18177
18178
18179        if test "x$OTOOL" = x; then
18180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18181        fi
18182      else
18183        # Otherwise we believe it is a complete path. Use it as it is.
18184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18185$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18187$as_echo_n "checking for OTOOL... " >&6; }
18188        if test ! -x "$tool_specified"; then
18189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18190$as_echo "not found" >&6; }
18191          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18192        fi
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18194$as_echo "$tool_specified" >&6; }
18195      fi
18196    fi
18197  fi
18198
18199
18200  if test "x$OTOOL" = "x"; then
18201    OTOOL="true"
18202  fi
18203
18204
18205  # Publish this variable in the help.
18206
18207
18208  if test "x$READELF" = x; then
18209    # The variable is not set by user, try to locate tool using the code snippet
18210    for ac_prog in greadelf readelf
18211do
18212  # Extract the first word of "$ac_prog", so it can be a program name with args.
18213set dummy $ac_prog; ac_word=$2
18214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18215$as_echo_n "checking for $ac_word... " >&6; }
18216if ${ac_cv_path_READELF+:} false; then :
18217  $as_echo_n "(cached) " >&6
18218else
18219  case $READELF in
18220  [\\/]* | ?:[\\/]*)
18221  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18222  ;;
18223  *)
18224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18225for as_dir in $PATH
18226do
18227  IFS=$as_save_IFS
18228  test -z "$as_dir" && as_dir=.
18229    for ac_exec_ext in '' $ac_executable_extensions; do
18230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18231    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18233    break 2
18234  fi
18235done
18236  done
18237IFS=$as_save_IFS
18238
18239  ;;
18240esac
18241fi
18242READELF=$ac_cv_path_READELF
18243if test -n "$READELF"; then
18244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18245$as_echo "$READELF" >&6; }
18246else
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18248$as_echo "no" >&6; }
18249fi
18250
18251
18252  test -n "$READELF" && break
18253done
18254
18255  else
18256    # The variable is set, but is it from the command line or the environment?
18257
18258    # Try to remove the string !READELF! from our list.
18259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18261      # If it failed, the variable was not from the command line. Ignore it,
18262      # but warn the user (except for BASH, which is always set by the calling BASH).
18263      if test "xREADELF" != xBASH; then
18264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18265$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18266      fi
18267      # Try to locate tool using the code snippet
18268      for ac_prog in greadelf readelf
18269do
18270  # Extract the first word of "$ac_prog", so it can be a program name with args.
18271set dummy $ac_prog; ac_word=$2
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18273$as_echo_n "checking for $ac_word... " >&6; }
18274if ${ac_cv_path_READELF+:} false; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  case $READELF in
18278  [\\/]* | ?:[\\/]*)
18279  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18280  ;;
18281  *)
18282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285  IFS=$as_save_IFS
18286  test -z "$as_dir" && as_dir=.
18287    for ac_exec_ext in '' $ac_executable_extensions; do
18288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18289    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18291    break 2
18292  fi
18293done
18294  done
18295IFS=$as_save_IFS
18296
18297  ;;
18298esac
18299fi
18300READELF=$ac_cv_path_READELF
18301if test -n "$READELF"; then
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18303$as_echo "$READELF" >&6; }
18304else
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18306$as_echo "no" >&6; }
18307fi
18308
18309
18310  test -n "$READELF" && break
18311done
18312
18313    else
18314      # If it succeeded, then it was overridden by the user. We will use it
18315      # for the tool.
18316
18317      # First remove it from the list of overridden variables, so we can test
18318      # for unknown variables in the end.
18319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18320
18321      # Check if the provided tool contains a complete path.
18322      tool_specified="$READELF"
18323      tool_basename="${tool_specified##*/}"
18324      if test "x$tool_basename" = "x$tool_specified"; then
18325        # A command without a complete path is provided, search $PATH.
18326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18327$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18328        # Extract the first word of "$tool_basename", so it can be a program name with args.
18329set dummy $tool_basename; ac_word=$2
18330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18331$as_echo_n "checking for $ac_word... " >&6; }
18332if ${ac_cv_path_READELF+:} false; then :
18333  $as_echo_n "(cached) " >&6
18334else
18335  case $READELF in
18336  [\\/]* | ?:[\\/]*)
18337  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18338  ;;
18339  *)
18340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18341for as_dir in $PATH
18342do
18343  IFS=$as_save_IFS
18344  test -z "$as_dir" && as_dir=.
18345    for ac_exec_ext in '' $ac_executable_extensions; do
18346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18347    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18349    break 2
18350  fi
18351done
18352  done
18353IFS=$as_save_IFS
18354
18355  ;;
18356esac
18357fi
18358READELF=$ac_cv_path_READELF
18359if test -n "$READELF"; then
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18361$as_echo "$READELF" >&6; }
18362else
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364$as_echo "no" >&6; }
18365fi
18366
18367
18368        if test "x$READELF" = x; then
18369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18370        fi
18371      else
18372        # Otherwise we believe it is a complete path. Use it as it is.
18373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18374$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18376$as_echo_n "checking for READELF... " >&6; }
18377        if test ! -x "$tool_specified"; then
18378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18379$as_echo "not found" >&6; }
18380          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18381        fi
18382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18383$as_echo "$tool_specified" >&6; }
18384      fi
18385    fi
18386  fi
18387
18388
18389
18390
18391  # Publish this variable in the help.
18392
18393
18394  if test "x$HG" = x; then
18395    # The variable is not set by user, try to locate tool using the code snippet
18396    for ac_prog in hg
18397do
18398  # Extract the first word of "$ac_prog", so it can be a program name with args.
18399set dummy $ac_prog; ac_word=$2
18400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18401$as_echo_n "checking for $ac_word... " >&6; }
18402if ${ac_cv_path_HG+:} false; then :
18403  $as_echo_n "(cached) " >&6
18404else
18405  case $HG in
18406  [\\/]* | ?:[\\/]*)
18407  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18408  ;;
18409  *)
18410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18411for as_dir in $PATH
18412do
18413  IFS=$as_save_IFS
18414  test -z "$as_dir" && as_dir=.
18415    for ac_exec_ext in '' $ac_executable_extensions; do
18416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18417    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18419    break 2
18420  fi
18421done
18422  done
18423IFS=$as_save_IFS
18424
18425  ;;
18426esac
18427fi
18428HG=$ac_cv_path_HG
18429if test -n "$HG"; then
18430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18431$as_echo "$HG" >&6; }
18432else
18433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18434$as_echo "no" >&6; }
18435fi
18436
18437
18438  test -n "$HG" && break
18439done
18440
18441  else
18442    # The variable is set, but is it from the command line or the environment?
18443
18444    # Try to remove the string !HG! from our list.
18445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18447      # If it failed, the variable was not from the command line. Ignore it,
18448      # but warn the user (except for BASH, which is always set by the calling BASH).
18449      if test "xHG" != xBASH; then
18450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18451$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18452      fi
18453      # Try to locate tool using the code snippet
18454      for ac_prog in hg
18455do
18456  # Extract the first word of "$ac_prog", so it can be a program name with args.
18457set dummy $ac_prog; ac_word=$2
18458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18459$as_echo_n "checking for $ac_word... " >&6; }
18460if ${ac_cv_path_HG+:} false; then :
18461  $as_echo_n "(cached) " >&6
18462else
18463  case $HG in
18464  [\\/]* | ?:[\\/]*)
18465  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18466  ;;
18467  *)
18468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471  IFS=$as_save_IFS
18472  test -z "$as_dir" && as_dir=.
18473    for ac_exec_ext in '' $ac_executable_extensions; do
18474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18475    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18477    break 2
18478  fi
18479done
18480  done
18481IFS=$as_save_IFS
18482
18483  ;;
18484esac
18485fi
18486HG=$ac_cv_path_HG
18487if test -n "$HG"; then
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18489$as_echo "$HG" >&6; }
18490else
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18492$as_echo "no" >&6; }
18493fi
18494
18495
18496  test -n "$HG" && break
18497done
18498
18499    else
18500      # If it succeeded, then it was overridden by the user. We will use it
18501      # for the tool.
18502
18503      # First remove it from the list of overridden variables, so we can test
18504      # for unknown variables in the end.
18505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18506
18507      # Check if the provided tool contains a complete path.
18508      tool_specified="$HG"
18509      tool_basename="${tool_specified##*/}"
18510      if test "x$tool_basename" = "x$tool_specified"; then
18511        # A command without a complete path is provided, search $PATH.
18512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18513$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18514        # Extract the first word of "$tool_basename", so it can be a program name with args.
18515set dummy $tool_basename; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_HG+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $HG in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544HG=$ac_cv_path_HG
18545if test -n "$HG"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18547$as_echo "$HG" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554        if test "x$HG" = x; then
18555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18556        fi
18557      else
18558        # Otherwise we believe it is a complete path. Use it as it is.
18559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18560$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18562$as_echo_n "checking for HG... " >&6; }
18563        if test ! -x "$tool_specified"; then
18564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18565$as_echo "not found" >&6; }
18566          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18567        fi
18568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18569$as_echo "$tool_specified" >&6; }
18570      fi
18571    fi
18572  fi
18573
18574
18575
18576
18577  # Publish this variable in the help.
18578
18579
18580  if test "x$STAT" = x; then
18581    # The variable is not set by user, try to locate tool using the code snippet
18582    for ac_prog in stat
18583do
18584  # Extract the first word of "$ac_prog", so it can be a program name with args.
18585set dummy $ac_prog; ac_word=$2
18586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18587$as_echo_n "checking for $ac_word... " >&6; }
18588if ${ac_cv_path_STAT+:} false; then :
18589  $as_echo_n "(cached) " >&6
18590else
18591  case $STAT in
18592  [\\/]* | ?:[\\/]*)
18593  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18594  ;;
18595  *)
18596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597for as_dir in $PATH
18598do
18599  IFS=$as_save_IFS
18600  test -z "$as_dir" && as_dir=.
18601    for ac_exec_ext in '' $ac_executable_extensions; do
18602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18603    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605    break 2
18606  fi
18607done
18608  done
18609IFS=$as_save_IFS
18610
18611  ;;
18612esac
18613fi
18614STAT=$ac_cv_path_STAT
18615if test -n "$STAT"; then
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18617$as_echo "$STAT" >&6; }
18618else
18619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18620$as_echo "no" >&6; }
18621fi
18622
18623
18624  test -n "$STAT" && break
18625done
18626
18627  else
18628    # The variable is set, but is it from the command line or the environment?
18629
18630    # Try to remove the string !STAT! from our list.
18631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18633      # If it failed, the variable was not from the command line. Ignore it,
18634      # but warn the user (except for BASH, which is always set by the calling BASH).
18635      if test "xSTAT" != xBASH; then
18636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18637$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18638      fi
18639      # Try to locate tool using the code snippet
18640      for ac_prog in stat
18641do
18642  # Extract the first word of "$ac_prog", so it can be a program name with args.
18643set dummy $ac_prog; ac_word=$2
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18645$as_echo_n "checking for $ac_word... " >&6; }
18646if ${ac_cv_path_STAT+:} false; then :
18647  $as_echo_n "(cached) " >&6
18648else
18649  case $STAT in
18650  [\\/]* | ?:[\\/]*)
18651  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18652  ;;
18653  *)
18654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18655for as_dir in $PATH
18656do
18657  IFS=$as_save_IFS
18658  test -z "$as_dir" && as_dir=.
18659    for ac_exec_ext in '' $ac_executable_extensions; do
18660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18661    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18663    break 2
18664  fi
18665done
18666  done
18667IFS=$as_save_IFS
18668
18669  ;;
18670esac
18671fi
18672STAT=$ac_cv_path_STAT
18673if test -n "$STAT"; then
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18675$as_echo "$STAT" >&6; }
18676else
18677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18678$as_echo "no" >&6; }
18679fi
18680
18681
18682  test -n "$STAT" && break
18683done
18684
18685    else
18686      # If it succeeded, then it was overridden by the user. We will use it
18687      # for the tool.
18688
18689      # First remove it from the list of overridden variables, so we can test
18690      # for unknown variables in the end.
18691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18692
18693      # Check if the provided tool contains a complete path.
18694      tool_specified="$STAT"
18695      tool_basename="${tool_specified##*/}"
18696      if test "x$tool_basename" = "x$tool_specified"; then
18697        # A command without a complete path is provided, search $PATH.
18698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18699$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18700        # Extract the first word of "$tool_basename", so it can be a program name with args.
18701set dummy $tool_basename; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_STAT+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $STAT in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730STAT=$ac_cv_path_STAT
18731if test -n "$STAT"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18733$as_echo "$STAT" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740        if test "x$STAT" = x; then
18741          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18742        fi
18743      else
18744        # Otherwise we believe it is a complete path. Use it as it is.
18745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18746$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18748$as_echo_n "checking for STAT... " >&6; }
18749        if test ! -x "$tool_specified"; then
18750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18751$as_echo "not found" >&6; }
18752          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18753        fi
18754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18755$as_echo "$tool_specified" >&6; }
18756      fi
18757    fi
18758  fi
18759
18760
18761
18762
18763  # Publish this variable in the help.
18764
18765
18766  if test "x$TIME" = x; then
18767    # The variable is not set by user, try to locate tool using the code snippet
18768    for ac_prog in time
18769do
18770  # Extract the first word of "$ac_prog", so it can be a program name with args.
18771set dummy $ac_prog; ac_word=$2
18772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18773$as_echo_n "checking for $ac_word... " >&6; }
18774if ${ac_cv_path_TIME+:} false; then :
18775  $as_echo_n "(cached) " >&6
18776else
18777  case $TIME in
18778  [\\/]* | ?:[\\/]*)
18779  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18780  ;;
18781  *)
18782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18783for as_dir in $PATH
18784do
18785  IFS=$as_save_IFS
18786  test -z "$as_dir" && as_dir=.
18787    for ac_exec_ext in '' $ac_executable_extensions; do
18788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18789    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18791    break 2
18792  fi
18793done
18794  done
18795IFS=$as_save_IFS
18796
18797  ;;
18798esac
18799fi
18800TIME=$ac_cv_path_TIME
18801if test -n "$TIME"; then
18802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18803$as_echo "$TIME" >&6; }
18804else
18805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18806$as_echo "no" >&6; }
18807fi
18808
18809
18810  test -n "$TIME" && break
18811done
18812
18813  else
18814    # The variable is set, but is it from the command line or the environment?
18815
18816    # Try to remove the string !TIME! from our list.
18817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18819      # If it failed, the variable was not from the command line. Ignore it,
18820      # but warn the user (except for BASH, which is always set by the calling BASH).
18821      if test "xTIME" != xBASH; then
18822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18823$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18824      fi
18825      # Try to locate tool using the code snippet
18826      for ac_prog in time
18827do
18828  # Extract the first word of "$ac_prog", so it can be a program name with args.
18829set dummy $ac_prog; ac_word=$2
18830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18831$as_echo_n "checking for $ac_word... " >&6; }
18832if ${ac_cv_path_TIME+:} false; then :
18833  $as_echo_n "(cached) " >&6
18834else
18835  case $TIME in
18836  [\\/]* | ?:[\\/]*)
18837  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18838  ;;
18839  *)
18840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18841for as_dir in $PATH
18842do
18843  IFS=$as_save_IFS
18844  test -z "$as_dir" && as_dir=.
18845    for ac_exec_ext in '' $ac_executable_extensions; do
18846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18847    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18849    break 2
18850  fi
18851done
18852  done
18853IFS=$as_save_IFS
18854
18855  ;;
18856esac
18857fi
18858TIME=$ac_cv_path_TIME
18859if test -n "$TIME"; then
18860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18861$as_echo "$TIME" >&6; }
18862else
18863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18864$as_echo "no" >&6; }
18865fi
18866
18867
18868  test -n "$TIME" && break
18869done
18870
18871    else
18872      # If it succeeded, then it was overridden by the user. We will use it
18873      # for the tool.
18874
18875      # First remove it from the list of overridden variables, so we can test
18876      # for unknown variables in the end.
18877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18878
18879      # Check if the provided tool contains a complete path.
18880      tool_specified="$TIME"
18881      tool_basename="${tool_specified##*/}"
18882      if test "x$tool_basename" = "x$tool_specified"; then
18883        # A command without a complete path is provided, search $PATH.
18884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18885$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18886        # Extract the first word of "$tool_basename", so it can be a program name with args.
18887set dummy $tool_basename; ac_word=$2
18888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18889$as_echo_n "checking for $ac_word... " >&6; }
18890if ${ac_cv_path_TIME+:} false; then :
18891  $as_echo_n "(cached) " >&6
18892else
18893  case $TIME in
18894  [\\/]* | ?:[\\/]*)
18895  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18896  ;;
18897  *)
18898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18899for as_dir in $PATH
18900do
18901  IFS=$as_save_IFS
18902  test -z "$as_dir" && as_dir=.
18903    for ac_exec_ext in '' $ac_executable_extensions; do
18904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18905    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18907    break 2
18908  fi
18909done
18910  done
18911IFS=$as_save_IFS
18912
18913  ;;
18914esac
18915fi
18916TIME=$ac_cv_path_TIME
18917if test -n "$TIME"; then
18918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18919$as_echo "$TIME" >&6; }
18920else
18921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18922$as_echo "no" >&6; }
18923fi
18924
18925
18926        if test "x$TIME" = x; then
18927          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18928        fi
18929      else
18930        # Otherwise we believe it is a complete path. Use it as it is.
18931        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18932$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18934$as_echo_n "checking for TIME... " >&6; }
18935        if test ! -x "$tool_specified"; then
18936          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18937$as_echo "not found" >&6; }
18938          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18939        fi
18940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18941$as_echo "$tool_specified" >&6; }
18942      fi
18943    fi
18944  fi
18945
18946
18947  # Check if it's GNU time
18948  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18949  if test "x$IS_GNU_TIME" != x; then
18950    IS_GNU_TIME=yes
18951  else
18952    IS_GNU_TIME=no
18953  fi
18954
18955
18956  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18957
18958
18959
18960  # Publish this variable in the help.
18961
18962
18963  if test "x$DSYMUTIL" = x; then
18964    # The variable is not set by user, try to locate tool using the code snippet
18965    for ac_prog in dsymutil
18966do
18967  # Extract the first word of "$ac_prog", so it can be a program name with args.
18968set dummy $ac_prog; ac_word=$2
18969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18970$as_echo_n "checking for $ac_word... " >&6; }
18971if ${ac_cv_path_DSYMUTIL+:} false; then :
18972  $as_echo_n "(cached) " >&6
18973else
18974  case $DSYMUTIL in
18975  [\\/]* | ?:[\\/]*)
18976  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18977  ;;
18978  *)
18979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18980for as_dir in $PATH
18981do
18982  IFS=$as_save_IFS
18983  test -z "$as_dir" && as_dir=.
18984    for ac_exec_ext in '' $ac_executable_extensions; do
18985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18986    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18988    break 2
18989  fi
18990done
18991  done
18992IFS=$as_save_IFS
18993
18994  ;;
18995esac
18996fi
18997DSYMUTIL=$ac_cv_path_DSYMUTIL
18998if test -n "$DSYMUTIL"; then
18999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19000$as_echo "$DSYMUTIL" >&6; }
19001else
19002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19003$as_echo "no" >&6; }
19004fi
19005
19006
19007  test -n "$DSYMUTIL" && break
19008done
19009
19010  else
19011    # The variable is set, but is it from the command line or the environment?
19012
19013    # Try to remove the string !DSYMUTIL! from our list.
19014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19016      # If it failed, the variable was not from the command line. Ignore it,
19017      # but warn the user (except for BASH, which is always set by the calling BASH).
19018      if test "xDSYMUTIL" != xBASH; then
19019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19020$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19021      fi
19022      # Try to locate tool using the code snippet
19023      for ac_prog in dsymutil
19024do
19025  # Extract the first word of "$ac_prog", so it can be a program name with args.
19026set dummy $ac_prog; ac_word=$2
19027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19028$as_echo_n "checking for $ac_word... " >&6; }
19029if ${ac_cv_path_DSYMUTIL+:} false; then :
19030  $as_echo_n "(cached) " >&6
19031else
19032  case $DSYMUTIL in
19033  [\\/]* | ?:[\\/]*)
19034  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19035  ;;
19036  *)
19037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19038for as_dir in $PATH
19039do
19040  IFS=$as_save_IFS
19041  test -z "$as_dir" && as_dir=.
19042    for ac_exec_ext in '' $ac_executable_extensions; do
19043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19044    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19046    break 2
19047  fi
19048done
19049  done
19050IFS=$as_save_IFS
19051
19052  ;;
19053esac
19054fi
19055DSYMUTIL=$ac_cv_path_DSYMUTIL
19056if test -n "$DSYMUTIL"; then
19057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19058$as_echo "$DSYMUTIL" >&6; }
19059else
19060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19061$as_echo "no" >&6; }
19062fi
19063
19064
19065  test -n "$DSYMUTIL" && break
19066done
19067
19068    else
19069      # If it succeeded, then it was overridden by the user. We will use it
19070      # for the tool.
19071
19072      # First remove it from the list of overridden variables, so we can test
19073      # for unknown variables in the end.
19074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19075
19076      # Check if the provided tool contains a complete path.
19077      tool_specified="$DSYMUTIL"
19078      tool_basename="${tool_specified##*/}"
19079      if test "x$tool_basename" = "x$tool_specified"; then
19080        # A command without a complete path is provided, search $PATH.
19081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19082$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19083        # Extract the first word of "$tool_basename", so it can be a program name with args.
19084set dummy $tool_basename; ac_word=$2
19085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19086$as_echo_n "checking for $ac_word... " >&6; }
19087if ${ac_cv_path_DSYMUTIL+:} false; then :
19088  $as_echo_n "(cached) " >&6
19089else
19090  case $DSYMUTIL in
19091  [\\/]* | ?:[\\/]*)
19092  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19093  ;;
19094  *)
19095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19096for as_dir in $PATH
19097do
19098  IFS=$as_save_IFS
19099  test -z "$as_dir" && as_dir=.
19100    for ac_exec_ext in '' $ac_executable_extensions; do
19101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19102    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19104    break 2
19105  fi
19106done
19107  done
19108IFS=$as_save_IFS
19109
19110  ;;
19111esac
19112fi
19113DSYMUTIL=$ac_cv_path_DSYMUTIL
19114if test -n "$DSYMUTIL"; then
19115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19116$as_echo "$DSYMUTIL" >&6; }
19117else
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19119$as_echo "no" >&6; }
19120fi
19121
19122
19123        if test "x$DSYMUTIL" = x; then
19124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19125        fi
19126      else
19127        # Otherwise we believe it is a complete path. Use it as it is.
19128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19129$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19131$as_echo_n "checking for DSYMUTIL... " >&6; }
19132        if test ! -x "$tool_specified"; then
19133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19134$as_echo "not found" >&6; }
19135          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19136        fi
19137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19138$as_echo "$tool_specified" >&6; }
19139      fi
19140    fi
19141  fi
19142
19143
19144
19145  if test "x$DSYMUTIL" = x; then
19146    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19147  fi
19148
19149
19150
19151
19152
19153  # Publish this variable in the help.
19154
19155
19156  if test "x$XATTR" = x; then
19157    # The variable is not set by user, try to locate tool using the code snippet
19158    for ac_prog in xattr
19159do
19160  # Extract the first word of "$ac_prog", so it can be a program name with args.
19161set dummy $ac_prog; ac_word=$2
19162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19163$as_echo_n "checking for $ac_word... " >&6; }
19164if ${ac_cv_path_XATTR+:} false; then :
19165  $as_echo_n "(cached) " >&6
19166else
19167  case $XATTR in
19168  [\\/]* | ?:[\\/]*)
19169  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19170  ;;
19171  *)
19172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19173for as_dir in $PATH
19174do
19175  IFS=$as_save_IFS
19176  test -z "$as_dir" && as_dir=.
19177    for ac_exec_ext in '' $ac_executable_extensions; do
19178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19179    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19181    break 2
19182  fi
19183done
19184  done
19185IFS=$as_save_IFS
19186
19187  ;;
19188esac
19189fi
19190XATTR=$ac_cv_path_XATTR
19191if test -n "$XATTR"; then
19192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19193$as_echo "$XATTR" >&6; }
19194else
19195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19196$as_echo "no" >&6; }
19197fi
19198
19199
19200  test -n "$XATTR" && break
19201done
19202
19203  else
19204    # The variable is set, but is it from the command line or the environment?
19205
19206    # Try to remove the string !XATTR! from our list.
19207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19209      # If it failed, the variable was not from the command line. Ignore it,
19210      # but warn the user (except for BASH, which is always set by the calling BASH).
19211      if test "xXATTR" != xBASH; then
19212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19213$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19214      fi
19215      # Try to locate tool using the code snippet
19216      for ac_prog in xattr
19217do
19218  # Extract the first word of "$ac_prog", so it can be a program name with args.
19219set dummy $ac_prog; ac_word=$2
19220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19221$as_echo_n "checking for $ac_word... " >&6; }
19222if ${ac_cv_path_XATTR+:} false; then :
19223  $as_echo_n "(cached) " >&6
19224else
19225  case $XATTR in
19226  [\\/]* | ?:[\\/]*)
19227  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19228  ;;
19229  *)
19230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19231for as_dir in $PATH
19232do
19233  IFS=$as_save_IFS
19234  test -z "$as_dir" && as_dir=.
19235    for ac_exec_ext in '' $ac_executable_extensions; do
19236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19237    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19239    break 2
19240  fi
19241done
19242  done
19243IFS=$as_save_IFS
19244
19245  ;;
19246esac
19247fi
19248XATTR=$ac_cv_path_XATTR
19249if test -n "$XATTR"; then
19250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19251$as_echo "$XATTR" >&6; }
19252else
19253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19254$as_echo "no" >&6; }
19255fi
19256
19257
19258  test -n "$XATTR" && break
19259done
19260
19261    else
19262      # If it succeeded, then it was overridden by the user. We will use it
19263      # for the tool.
19264
19265      # First remove it from the list of overridden variables, so we can test
19266      # for unknown variables in the end.
19267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19268
19269      # Check if the provided tool contains a complete path.
19270      tool_specified="$XATTR"
19271      tool_basename="${tool_specified##*/}"
19272      if test "x$tool_basename" = "x$tool_specified"; then
19273        # A command without a complete path is provided, search $PATH.
19274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19275$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19276        # Extract the first word of "$tool_basename", so it can be a program name with args.
19277set dummy $tool_basename; ac_word=$2
19278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19279$as_echo_n "checking for $ac_word... " >&6; }
19280if ${ac_cv_path_XATTR+:} false; then :
19281  $as_echo_n "(cached) " >&6
19282else
19283  case $XATTR in
19284  [\\/]* | ?:[\\/]*)
19285  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19286  ;;
19287  *)
19288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19289for as_dir in $PATH
19290do
19291  IFS=$as_save_IFS
19292  test -z "$as_dir" && as_dir=.
19293    for ac_exec_ext in '' $ac_executable_extensions; do
19294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19295    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19297    break 2
19298  fi
19299done
19300  done
19301IFS=$as_save_IFS
19302
19303  ;;
19304esac
19305fi
19306XATTR=$ac_cv_path_XATTR
19307if test -n "$XATTR"; then
19308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19309$as_echo "$XATTR" >&6; }
19310else
19311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19312$as_echo "no" >&6; }
19313fi
19314
19315
19316        if test "x$XATTR" = x; then
19317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19318        fi
19319      else
19320        # Otherwise we believe it is a complete path. Use it as it is.
19321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19322$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19324$as_echo_n "checking for XATTR... " >&6; }
19325        if test ! -x "$tool_specified"; then
19326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19327$as_echo "not found" >&6; }
19328          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19329        fi
19330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19331$as_echo "$tool_specified" >&6; }
19332      fi
19333    fi
19334  fi
19335
19336
19337
19338  if test "x$XATTR" = x; then
19339    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19340  fi
19341
19342
19343
19344
19345  # Publish this variable in the help.
19346
19347
19348  if test "x$CODESIGN" = x; then
19349    # The variable is not set by user, try to locate tool using the code snippet
19350    for ac_prog in codesign
19351do
19352  # Extract the first word of "$ac_prog", so it can be a program name with args.
19353set dummy $ac_prog; ac_word=$2
19354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19355$as_echo_n "checking for $ac_word... " >&6; }
19356if ${ac_cv_path_CODESIGN+:} false; then :
19357  $as_echo_n "(cached) " >&6
19358else
19359  case $CODESIGN in
19360  [\\/]* | ?:[\\/]*)
19361  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19362  ;;
19363  *)
19364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19365for as_dir in $PATH
19366do
19367  IFS=$as_save_IFS
19368  test -z "$as_dir" && as_dir=.
19369    for ac_exec_ext in '' $ac_executable_extensions; do
19370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19371    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19373    break 2
19374  fi
19375done
19376  done
19377IFS=$as_save_IFS
19378
19379  ;;
19380esac
19381fi
19382CODESIGN=$ac_cv_path_CODESIGN
19383if test -n "$CODESIGN"; then
19384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19385$as_echo "$CODESIGN" >&6; }
19386else
19387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19388$as_echo "no" >&6; }
19389fi
19390
19391
19392  test -n "$CODESIGN" && break
19393done
19394
19395  else
19396    # The variable is set, but is it from the command line or the environment?
19397
19398    # Try to remove the string !CODESIGN! from our list.
19399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19401      # If it failed, the variable was not from the command line. Ignore it,
19402      # but warn the user (except for BASH, which is always set by the calling BASH).
19403      if test "xCODESIGN" != xBASH; then
19404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19405$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19406      fi
19407      # Try to locate tool using the code snippet
19408      for ac_prog in codesign
19409do
19410  # Extract the first word of "$ac_prog", so it can be a program name with args.
19411set dummy $ac_prog; ac_word=$2
19412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19413$as_echo_n "checking for $ac_word... " >&6; }
19414if ${ac_cv_path_CODESIGN+:} false; then :
19415  $as_echo_n "(cached) " >&6
19416else
19417  case $CODESIGN in
19418  [\\/]* | ?:[\\/]*)
19419  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19420  ;;
19421  *)
19422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19423for as_dir in $PATH
19424do
19425  IFS=$as_save_IFS
19426  test -z "$as_dir" && as_dir=.
19427    for ac_exec_ext in '' $ac_executable_extensions; do
19428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19429    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19431    break 2
19432  fi
19433done
19434  done
19435IFS=$as_save_IFS
19436
19437  ;;
19438esac
19439fi
19440CODESIGN=$ac_cv_path_CODESIGN
19441if test -n "$CODESIGN"; then
19442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19443$as_echo "$CODESIGN" >&6; }
19444else
19445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19446$as_echo "no" >&6; }
19447fi
19448
19449
19450  test -n "$CODESIGN" && break
19451done
19452
19453    else
19454      # If it succeeded, then it was overridden by the user. We will use it
19455      # for the tool.
19456
19457      # First remove it from the list of overridden variables, so we can test
19458      # for unknown variables in the end.
19459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19460
19461      # Check if the provided tool contains a complete path.
19462      tool_specified="$CODESIGN"
19463      tool_basename="${tool_specified##*/}"
19464      if test "x$tool_basename" = "x$tool_specified"; then
19465        # A command without a complete path is provided, search $PATH.
19466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19467$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19468        # Extract the first word of "$tool_basename", so it can be a program name with args.
19469set dummy $tool_basename; ac_word=$2
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19471$as_echo_n "checking for $ac_word... " >&6; }
19472if ${ac_cv_path_CODESIGN+:} false; then :
19473  $as_echo_n "(cached) " >&6
19474else
19475  case $CODESIGN in
19476  [\\/]* | ?:[\\/]*)
19477  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19478  ;;
19479  *)
19480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19481for as_dir in $PATH
19482do
19483  IFS=$as_save_IFS
19484  test -z "$as_dir" && as_dir=.
19485    for ac_exec_ext in '' $ac_executable_extensions; do
19486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19487    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19489    break 2
19490  fi
19491done
19492  done
19493IFS=$as_save_IFS
19494
19495  ;;
19496esac
19497fi
19498CODESIGN=$ac_cv_path_CODESIGN
19499if test -n "$CODESIGN"; then
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19501$as_echo "$CODESIGN" >&6; }
19502else
19503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19504$as_echo "no" >&6; }
19505fi
19506
19507
19508        if test "x$CODESIGN" = x; then
19509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19510        fi
19511      else
19512        # Otherwise we believe it is a complete path. Use it as it is.
19513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19514$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19516$as_echo_n "checking for CODESIGN... " >&6; }
19517        if test ! -x "$tool_specified"; then
19518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19519$as_echo "not found" >&6; }
19520          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19521        fi
19522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19523$as_echo "$tool_specified" >&6; }
19524      fi
19525    fi
19526  fi
19527
19528
19529    if test "x$CODESIGN" != "x"; then
19530      # Verify that the openjdk_codesign certificate is present
19531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19532$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19533      rm -f codesign-testfile
19534      touch codesign-testfile
19535      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19536      rm -f codesign-testfile
19537      if test "x$CODESIGN" = x; then
19538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19539$as_echo "no" >&6; }
19540      else
19541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19542$as_echo "yes" >&6; }
19543      fi
19544    fi
19545
19546
19547
19548  # Publish this variable in the help.
19549
19550
19551  if test "x$SETFILE" = x; then
19552    # The variable is not set by user, try to locate tool using the code snippet
19553    for ac_prog in SetFile
19554do
19555  # Extract the first word of "$ac_prog", so it can be a program name with args.
19556set dummy $ac_prog; ac_word=$2
19557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19558$as_echo_n "checking for $ac_word... " >&6; }
19559if ${ac_cv_path_SETFILE+:} false; then :
19560  $as_echo_n "(cached) " >&6
19561else
19562  case $SETFILE in
19563  [\\/]* | ?:[\\/]*)
19564  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19565  ;;
19566  *)
19567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19568for as_dir in $PATH
19569do
19570  IFS=$as_save_IFS
19571  test -z "$as_dir" && as_dir=.
19572    for ac_exec_ext in '' $ac_executable_extensions; do
19573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19574    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19576    break 2
19577  fi
19578done
19579  done
19580IFS=$as_save_IFS
19581
19582  ;;
19583esac
19584fi
19585SETFILE=$ac_cv_path_SETFILE
19586if test -n "$SETFILE"; then
19587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19588$as_echo "$SETFILE" >&6; }
19589else
19590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19591$as_echo "no" >&6; }
19592fi
19593
19594
19595  test -n "$SETFILE" && break
19596done
19597
19598  else
19599    # The variable is set, but is it from the command line or the environment?
19600
19601    # Try to remove the string !SETFILE! from our list.
19602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19604      # If it failed, the variable was not from the command line. Ignore it,
19605      # but warn the user (except for BASH, which is always set by the calling BASH).
19606      if test "xSETFILE" != xBASH; then
19607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19608$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19609      fi
19610      # Try to locate tool using the code snippet
19611      for ac_prog in SetFile
19612do
19613  # Extract the first word of "$ac_prog", so it can be a program name with args.
19614set dummy $ac_prog; ac_word=$2
19615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19616$as_echo_n "checking for $ac_word... " >&6; }
19617if ${ac_cv_path_SETFILE+:} false; then :
19618  $as_echo_n "(cached) " >&6
19619else
19620  case $SETFILE in
19621  [\\/]* | ?:[\\/]*)
19622  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19623  ;;
19624  *)
19625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19626for as_dir in $PATH
19627do
19628  IFS=$as_save_IFS
19629  test -z "$as_dir" && as_dir=.
19630    for ac_exec_ext in '' $ac_executable_extensions; do
19631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19632    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19634    break 2
19635  fi
19636done
19637  done
19638IFS=$as_save_IFS
19639
19640  ;;
19641esac
19642fi
19643SETFILE=$ac_cv_path_SETFILE
19644if test -n "$SETFILE"; then
19645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19646$as_echo "$SETFILE" >&6; }
19647else
19648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19649$as_echo "no" >&6; }
19650fi
19651
19652
19653  test -n "$SETFILE" && break
19654done
19655
19656    else
19657      # If it succeeded, then it was overridden by the user. We will use it
19658      # for the tool.
19659
19660      # First remove it from the list of overridden variables, so we can test
19661      # for unknown variables in the end.
19662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19663
19664      # Check if the provided tool contains a complete path.
19665      tool_specified="$SETFILE"
19666      tool_basename="${tool_specified##*/}"
19667      if test "x$tool_basename" = "x$tool_specified"; then
19668        # A command without a complete path is provided, search $PATH.
19669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19670$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19671        # Extract the first word of "$tool_basename", so it can be a program name with args.
19672set dummy $tool_basename; ac_word=$2
19673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19674$as_echo_n "checking for $ac_word... " >&6; }
19675if ${ac_cv_path_SETFILE+:} false; then :
19676  $as_echo_n "(cached) " >&6
19677else
19678  case $SETFILE in
19679  [\\/]* | ?:[\\/]*)
19680  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19681  ;;
19682  *)
19683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19684for as_dir in $PATH
19685do
19686  IFS=$as_save_IFS
19687  test -z "$as_dir" && as_dir=.
19688    for ac_exec_ext in '' $ac_executable_extensions; do
19689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19690    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19692    break 2
19693  fi
19694done
19695  done
19696IFS=$as_save_IFS
19697
19698  ;;
19699esac
19700fi
19701SETFILE=$ac_cv_path_SETFILE
19702if test -n "$SETFILE"; then
19703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19704$as_echo "$SETFILE" >&6; }
19705else
19706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19707$as_echo "no" >&6; }
19708fi
19709
19710
19711        if test "x$SETFILE" = x; then
19712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19713        fi
19714      else
19715        # Otherwise we believe it is a complete path. Use it as it is.
19716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19717$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19719$as_echo_n "checking for SETFILE... " >&6; }
19720        if test ! -x "$tool_specified"; then
19721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19722$as_echo "not found" >&6; }
19723          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19724        fi
19725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19726$as_echo "$tool_specified" >&6; }
19727      fi
19728    fi
19729  fi
19730
19731
19732
19733  if test "x$SETFILE" = x; then
19734    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19735  fi
19736
19737
19738  fi
19739
19740
19741  # Test if bash supports pipefail.
19742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19743$as_echo_n "checking if bash supports pipefail... " >&6; }
19744  if ${BASH} -c 'set -o pipefail'; then
19745    BASH_ARGS="$BASH_ARGS -o pipefail"
19746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19747$as_echo "yes" >&6; }
19748  else
19749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19750$as_echo "no" >&6; }
19751  fi
19752
19753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19754$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19755  if ${BASH} -e -c 'true'; then
19756    BASH_ARGS="$BASH_ARGS -e"
19757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19758$as_echo "yes" >&6; }
19759  else
19760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19761$as_echo "no" >&6; }
19762  fi
19763
19764
19765
19766
19767# Check if pkg-config is available.
19768
19769
19770if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19771	if test -n "$ac_tool_prefix"; then
19772  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19773set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19775$as_echo_n "checking for $ac_word... " >&6; }
19776if ${ac_cv_path_PKG_CONFIG+:} false; then :
19777  $as_echo_n "(cached) " >&6
19778else
19779  case $PKG_CONFIG in
19780  [\\/]* | ?:[\\/]*)
19781  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19782  ;;
19783  *)
19784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19785for as_dir in $PATH
19786do
19787  IFS=$as_save_IFS
19788  test -z "$as_dir" && as_dir=.
19789    for ac_exec_ext in '' $ac_executable_extensions; do
19790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19791    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19793    break 2
19794  fi
19795done
19796  done
19797IFS=$as_save_IFS
19798
19799  ;;
19800esac
19801fi
19802PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19803if test -n "$PKG_CONFIG"; then
19804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19805$as_echo "$PKG_CONFIG" >&6; }
19806else
19807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19808$as_echo "no" >&6; }
19809fi
19810
19811
19812fi
19813if test -z "$ac_cv_path_PKG_CONFIG"; then
19814  ac_pt_PKG_CONFIG=$PKG_CONFIG
19815  # Extract the first word of "pkg-config", so it can be a program name with args.
19816set dummy pkg-config; ac_word=$2
19817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19818$as_echo_n "checking for $ac_word... " >&6; }
19819if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19820  $as_echo_n "(cached) " >&6
19821else
19822  case $ac_pt_PKG_CONFIG in
19823  [\\/]* | ?:[\\/]*)
19824  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19825  ;;
19826  *)
19827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19828for as_dir in $PATH
19829do
19830  IFS=$as_save_IFS
19831  test -z "$as_dir" && as_dir=.
19832    for ac_exec_ext in '' $ac_executable_extensions; do
19833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19834    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19836    break 2
19837  fi
19838done
19839  done
19840IFS=$as_save_IFS
19841
19842  ;;
19843esac
19844fi
19845ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19846if test -n "$ac_pt_PKG_CONFIG"; then
19847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19848$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19849else
19850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19851$as_echo "no" >&6; }
19852fi
19853
19854  if test "x$ac_pt_PKG_CONFIG" = x; then
19855    PKG_CONFIG=""
19856  else
19857    case $cross_compiling:$ac_tool_warned in
19858yes:)
19859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19861ac_tool_warned=yes ;;
19862esac
19863    PKG_CONFIG=$ac_pt_PKG_CONFIG
19864  fi
19865else
19866  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19867fi
19868
19869fi
19870if test -n "$PKG_CONFIG"; then
19871	_pkg_min_version=0.9.0
19872	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19873$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19874	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19875		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19876$as_echo "yes" >&6; }
19877	else
19878		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19879$as_echo "no" >&6; }
19880		PKG_CONFIG=""
19881	fi
19882
19883fi
19884
19885# After basic tools have been setup, we can check build os specific details.
19886
19887  ###############################################################################
19888
19889  # Note that this is the build platform OS version!
19890
19891  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19892  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19893  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19894  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19895
19896
19897
19898
19899
19900# Setup builddeps, for automatic downloading of tools we need.
19901# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19902# boot-jdk setup, but we need to have basic tools setup first.
19903
19904
19905# Check whether --with-builddeps-conf was given.
19906if test "${with_builddeps_conf+set}" = set; then :
19907  withval=$with_builddeps_conf;
19908fi
19909
19910
19911
19912# Check whether --with-builddeps-server was given.
19913if test "${with_builddeps_server+set}" = set; then :
19914  withval=$with_builddeps_server;
19915fi
19916
19917
19918
19919# Check whether --with-builddeps-dir was given.
19920if test "${with_builddeps_dir+set}" = set; then :
19921  withval=$with_builddeps_dir;
19922else
19923  with_builddeps_dir=/localhome/builddeps
19924fi
19925
19926
19927
19928# Check whether --with-builddeps-group was given.
19929if test "${with_builddeps_group+set}" = set; then :
19930  withval=$with_builddeps_group;
19931fi
19932
19933
19934
19935
19936  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19937    if test "x$with_builddeps_conf" != x; then
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19939$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19940      builddepsfile=$with_builddeps_conf
19941      if test -s $builddepsfile; then
19942        . $builddepsfile
19943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19944$as_echo "loaded!" >&6; }
19945      else
19946        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19947      fi
19948    else
19949      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19950$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19951      builddepsfile=`mktemp`
19952      touch $builddepsfile
19953      # Put all found confs into a single file.
19954      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19955      # Source the file to acquire the variables
19956      if test -s $builddepsfile; then
19957        . $builddepsfile
19958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19959$as_echo "found at least one!" >&6; }
19960      else
19961        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19962      fi
19963    fi
19964    # Create build and target names that use _ instead of "-" and ".".
19965    # This is necessary to use them in variable names.
19966    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19967    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19968    # Extract rewrite information for build and target
19969    eval rewritten_build=\${REWRITE_${build_var}}
19970    if test "x$rewritten_build" = x; then
19971      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19972      echo Build stays the same $rewritten_build
19973    else
19974      echo Rewriting build for builddeps into $rewritten_build
19975    fi
19976    eval rewritten_target=\${REWRITE_${target_var}}
19977    if test "x$rewritten_target" = x; then
19978      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19979      echo Target stays the same $rewritten_target
19980    else
19981      echo Rewriting target for builddeps into $rewritten_target
19982    fi
19983    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19984    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19985  fi
19986  for ac_prog in 7z unzip
19987do
19988  # Extract the first word of "$ac_prog", so it can be a program name with args.
19989set dummy $ac_prog; ac_word=$2
19990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19991$as_echo_n "checking for $ac_word... " >&6; }
19992if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19993  $as_echo_n "(cached) " >&6
19994else
19995  if test -n "$BDEPS_UNZIP"; then
19996  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19997else
19998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19999for as_dir in $PATH
20000do
20001  IFS=$as_save_IFS
20002  test -z "$as_dir" && as_dir=.
20003    for ac_exec_ext in '' $ac_executable_extensions; do
20004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20005    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20007    break 2
20008  fi
20009done
20010  done
20011IFS=$as_save_IFS
20012
20013fi
20014fi
20015BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20016if test -n "$BDEPS_UNZIP"; then
20017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20018$as_echo "$BDEPS_UNZIP" >&6; }
20019else
20020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20021$as_echo "no" >&6; }
20022fi
20023
20024
20025  test -n "$BDEPS_UNZIP" && break
20026done
20027
20028  if test "x$BDEPS_UNZIP" = x7z; then
20029    BDEPS_UNZIP="7z x"
20030  fi
20031
20032  for ac_prog in wget lftp ftp
20033do
20034  # Extract the first word of "$ac_prog", so it can be a program name with args.
20035set dummy $ac_prog; ac_word=$2
20036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20037$as_echo_n "checking for $ac_word... " >&6; }
20038if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20039  $as_echo_n "(cached) " >&6
20040else
20041  if test -n "$BDEPS_FTP"; then
20042  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20043else
20044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20045for as_dir in $PATH
20046do
20047  IFS=$as_save_IFS
20048  test -z "$as_dir" && as_dir=.
20049    for ac_exec_ext in '' $ac_executable_extensions; do
20050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20051    ac_cv_prog_BDEPS_FTP="$ac_prog"
20052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20053    break 2
20054  fi
20055done
20056  done
20057IFS=$as_save_IFS
20058
20059fi
20060fi
20061BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20062if test -n "$BDEPS_FTP"; then
20063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20064$as_echo "$BDEPS_FTP" >&6; }
20065else
20066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20067$as_echo "no" >&6; }
20068fi
20069
20070
20071  test -n "$BDEPS_FTP" && break
20072done
20073
20074
20075
20076###############################################################################
20077#
20078# Determine OpenJDK variants, options and version numbers.
20079#
20080###############################################################################
20081
20082# We need build & target for this.
20083
20084
20085  ###############################################################################
20086  #
20087  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20088  # We always build headless support.
20089  #
20090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20091$as_echo_n "checking headful support... " >&6; }
20092  # Check whether --enable-headful was given.
20093if test "${enable_headful+set}" = set; then :
20094  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20095else
20096  SUPPORT_HEADFUL=yes
20097fi
20098
20099
20100  SUPPORT_HEADLESS=yes
20101  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20102
20103  if test "x$SUPPORT_HEADFUL" = xyes; then
20104    # We are building both headful and headless.
20105    headful_msg="include support for both headful and headless"
20106  fi
20107
20108  if test "x$SUPPORT_HEADFUL" = xno; then
20109    # Thus we are building headless only.
20110    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20111    headful_msg="headless only"
20112  fi
20113
20114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20115$as_echo "$headful_msg" >&6; }
20116
20117
20118
20119
20120
20121  # Control wether Hotspot runs Queens test after build.
20122  # Check whether --enable-hotspot-test-in-build was given.
20123if test "${enable_hotspot_test_in_build+set}" = set; then :
20124  enableval=$enable_hotspot_test_in_build;
20125else
20126  enable_hotspot_test_in_build=no
20127fi
20128
20129  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20130    TEST_IN_BUILD=true
20131  else
20132    TEST_IN_BUILD=false
20133  fi
20134
20135
20136  ###############################################################################
20137  #
20138  # Choose cacerts source file
20139  #
20140
20141# Check whether --with-cacerts-file was given.
20142if test "${with_cacerts_file+set}" = set; then :
20143  withval=$with_cacerts_file;
20144fi
20145
20146  if test "x$with_cacerts_file" != x; then
20147    CACERTS_FILE=$with_cacerts_file
20148  fi
20149
20150
20151  ###############################################################################
20152  #
20153  # Enable or disable unlimited crypto
20154  #
20155  # Check whether --enable-unlimited-crypto was given.
20156if test "${enable_unlimited_crypto+set}" = set; then :
20157  enableval=$enable_unlimited_crypto;
20158else
20159  enable_unlimited_crypto=no
20160fi
20161
20162  if test "x$enable_unlimited_crypto" = "xyes"; then
20163    UNLIMITED_CRYPTO=true
20164  else
20165    UNLIMITED_CRYPTO=false
20166  fi
20167
20168
20169  ###############################################################################
20170  #
20171  # --enable-rmiconnector-iiop
20172  #
20173  # Check whether --enable-rmiconnector-iiop was given.
20174if test "${enable_rmiconnector_iiop+set}" = set; then :
20175  enableval=$enable_rmiconnector_iiop;
20176fi
20177
20178  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20179    RMICONNECTOR_IIOP=true
20180  else
20181    RMICONNECTOR_IIOP=false
20182  fi
20183
20184
20185  ###############################################################################
20186  #
20187  # Compress jars
20188  #
20189  COMPRESS_JARS=false
20190
20191
20192
20193  # Setup default copyright year. Mostly overridden when building close to a new year.
20194
20195# Check whether --with-copyright-year was given.
20196if test "${with_copyright_year+set}" = set; then :
20197  withval=$with_copyright_year;
20198fi
20199
20200  if test "x$with_copyright_year" = xyes; then
20201    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20202  elif test "x$with_copyright_year" != x; then
20203    COPYRIGHT_YEAR="$with_copyright_year"
20204  else
20205    COPYRIGHT_YEAR=`date +'%Y'`
20206  fi
20207
20208
20209
20210  # Warn user that old version arguments are deprecated.
20211
20212
20213# Check whether --with-milestone was given.
20214if test "${with_milestone+set}" = set; then :
20215  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20216$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20217fi
20218
20219
20220
20221
20222# Check whether --with-update-version was given.
20223if test "${with_update_version+set}" = set; then :
20224  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20225$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20226fi
20227
20228
20229
20230
20231# Check whether --with-user-release-suffix was given.
20232if test "${with_user_release_suffix+set}" = set; then :
20233  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
20234$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20235fi
20236
20237
20238
20239
20240# Check whether --with-build-number was given.
20241if test "${with_build_number+set}" = set; then :
20242  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20243$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20244fi
20245
20246
20247
20248  # Source the version numbers file
20249  . $AUTOCONF_DIR/version-numbers
20250
20251  # Some non-version number information is set in that file
20252
20253
20254
20255
20256
20257
20258
20259
20260  # Override version from arguments
20261
20262  # If --with-version-string is set, process it first. It is possible to
20263  # override parts with more specific flags, since these are processed later.
20264
20265# Check whether --with-version-string was given.
20266if test "${with_version_string+set}" = set; then :
20267  withval=$with_version_string;
20268fi
20269
20270  if test "x$with_version_string" = xyes; then
20271    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20272  elif test "x$with_version_string" != x; then
20273    # Additional [] needed to keep m4 from mangling shell constructs.
20274    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
20275      VERSION_MAJOR=${BASH_REMATCH[1]}
20276      VERSION_MINOR=${BASH_REMATCH[3]}
20277      VERSION_SECURITY=${BASH_REMATCH[5]}
20278      VERSION_PATCH=${BASH_REMATCH[7]}
20279      VERSION_PRE=${BASH_REMATCH[9]}
20280      version_plus_separator=${BASH_REMATCH[11]}
20281      VERSION_BUILD=${BASH_REMATCH[12]}
20282      VERSION_OPT_BASE=${BASH_REMATCH[14]}
20283      VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[16]}
20284      # Unspecified numerical fields are interpreted as 0.
20285      if test "x$VERSION_MINOR" = x; then
20286        VERSION_MINOR=0
20287      fi
20288      if test "x$VERSION_SECURITY" = x; then
20289        VERSION_SECURITY=0
20290      fi
20291      if test "x$VERSION_PATCH" = x; then
20292        VERSION_PATCH=0
20293      fi
20294      if test "x$version_plus_separator" != x \
20295          && test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then
20296        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20297      fi
20298      # Stop the version part process from setting default values.
20299      # We still allow them to explicitely override though.
20300      NO_DEFAULT_VERSION_PARTS=true
20301    else
20302      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20303    fi
20304  fi
20305
20306
20307# Check whether --with-version-pre was given.
20308if test "${with_version_pre+set}" = set; then :
20309  withval=$with_version_pre; with_version_pre_present=true
20310else
20311  with_version_pre_present=false
20312fi
20313
20314
20315  if test "x$with_version_pre_present" = xtrue; then
20316    if test "x$with_version_pre" = xyes; then
20317      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
20318    elif test "x$with_version_pre" = xno; then
20319      # Interpret --without-* as empty string instead of the literal "no"
20320      VERSION_PRE=
20321    else
20322      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20323       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
20324      if test "x$VERSION_PRE" != "x$with_version_pre"; then
20325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
20326$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
20327      fi
20328    fi
20329  else
20330    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20331      # Default is to use "internal" as pre
20332      VERSION_PRE="internal"
20333    fi
20334  fi
20335
20336
20337# Check whether --with-version-opt-base was given.
20338if test "${with_version_opt_base+set}" = set; then :
20339  withval=$with_version_opt_base; with_version_opt_base_present=true
20340else
20341  with_version_opt_base_present=false
20342fi
20343
20344
20345  if test "x$with_version_opt_base_present" = xtrue; then
20346    if test "x$with_version_opt_base" = xyes; then
20347      as_fn_error $? "--with-version-opt-base must have a value" "$LINENO" 5
20348    elif test "x$with_version_opt_base" = xno; then
20349      # Interpret --without-* as empty string instead of the literal "no"
20350      VERSION_OPT_BASE=
20351    else
20352      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4.
20353       VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'`
20354      if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then
20355        { $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
20356$as_echo "$as_me: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&2;}
20357      fi
20358    fi
20359  else
20360    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20361      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20362      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20363      # Outer [ ] to quote m4.
20364       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20365       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20366      VERSION_OPT_BASE="$timestamp.$username.$basedirname"
20367    fi
20368  fi
20369
20370
20371# Check whether --with-version-opt-debuglevel was given.
20372if test "${with_version_opt_debuglevel+set}" = set; then :
20373  withval=$with_version_opt_debuglevel; with_version_opt_debuglevel_present=true
20374else
20375  with_version_opt_debuglevel_present=false
20376fi
20377
20378
20379  if test "x$with_version_opt_debuglevel_present" = xtrue; then
20380    if test "x$with_version_opt_debuglevel" = xyes; then
20381      as_fn_error $? "--with-version-opt-debuglevel must have a value" "$LINENO" 5
20382    elif test "x$with_version_opt_debuglevel" = xno; then
20383      # Interpret --without-* as empty string instead of the literal "no"
20384      VERSION_OPT_DEBUGLEVEL=
20385    else
20386      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4.
20387       VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'`
20388      if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then
20389        { $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
20390$as_echo "$as_me: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&2;}
20391      fi
20392    fi
20393  else
20394    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20395      # Default is to use the debug level name, except for release which is empty.
20396      if test "x$DEBUG_LEVEL" != "xrelease"; then
20397        VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL"
20398      else
20399        VERSION_OPT_DEBUGLEVEL=""
20400      fi
20401    fi
20402  fi
20403
20404# Check whether --with-version-build was given.
20405if test "${with_version_build+set}" = set; then :
20406  withval=$with_version_build; with_version_build_present=true
20407else
20408  with_version_build_present=false
20409fi
20410
20411
20412  if test "x$with_version_build_present" = xtrue; then
20413    if test "x$with_version_build" = xyes; then
20414      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20415    elif test "x$with_version_build" = xno; then
20416      # Interpret --without-* as empty string instead of the literal "no"
20417      VERSION_BUILD=
20418    elif test "x$with_version_build" = x; then
20419      VERSION_BUILD=
20420    else
20421
20422  # Additional [] needed to keep m4 from mangling shell constructs.
20423  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20424    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20425  fi
20426  # Extract the version number without leading zeros.
20427  cleaned_value=${BASH_REMATCH[1]}
20428  if test "x$cleaned_value" = x; then
20429    # Special case for zero
20430    cleaned_value=${BASH_REMATCH[2]}
20431  fi
20432
20433  if test $cleaned_value -gt 255; then
20434    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20435  fi
20436  if test "x$cleaned_value" != "x$with_version_build"; then
20437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20438$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20439  fi
20440  VERSION_BUILD=$cleaned_value
20441
20442    fi
20443  else
20444    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20445      # Default is to not have a build number.
20446      VERSION_BUILD=""
20447      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20448      VERSION_BUILD=0
20449    fi
20450  fi
20451
20452
20453# Check whether --with-version-major was given.
20454if test "${with_version_major+set}" = set; then :
20455  withval=$with_version_major; with_version_major_present=true
20456else
20457  with_version_major_present=false
20458fi
20459
20460
20461  if test "x$with_version_major_present" = xtrue; then
20462    if test "x$with_version_major" = xyes; then
20463      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20464    else
20465
20466  # Additional [] needed to keep m4 from mangling shell constructs.
20467  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20468    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20469  fi
20470  # Extract the version number without leading zeros.
20471  cleaned_value=${BASH_REMATCH[1]}
20472  if test "x$cleaned_value" = x; then
20473    # Special case for zero
20474    cleaned_value=${BASH_REMATCH[2]}
20475  fi
20476
20477  if test $cleaned_value -gt 255; then
20478    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20479  fi
20480  if test "x$cleaned_value" != "x$with_version_major"; then
20481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20482$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20483  fi
20484  VERSION_MAJOR=$cleaned_value
20485
20486    fi
20487  else
20488    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20489      # Default is to get value from version-numbers
20490      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20491    fi
20492  fi
20493
20494
20495# Check whether --with-version-minor was given.
20496if test "${with_version_minor+set}" = set; then :
20497  withval=$with_version_minor; with_version_minor_present=true
20498else
20499  with_version_minor_present=false
20500fi
20501
20502
20503  if test "x$with_version_minor_present" = xtrue; then
20504    if test "x$with_version_minor" = xyes; then
20505      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20506    elif test "x$with_version_minor" = xno; then
20507      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20508      VERSION_MINOR=0
20509    elif test "x$with_version_minor" = x; then
20510      VERSION_MINOR=0
20511    else
20512
20513  # Additional [] needed to keep m4 from mangling shell constructs.
20514  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20515    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20516  fi
20517  # Extract the version number without leading zeros.
20518  cleaned_value=${BASH_REMATCH[1]}
20519  if test "x$cleaned_value" = x; then
20520    # Special case for zero
20521    cleaned_value=${BASH_REMATCH[2]}
20522  fi
20523
20524  if test $cleaned_value -gt 255; then
20525    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20526  fi
20527  if test "x$cleaned_value" != "x$with_version_minor"; then
20528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20529$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20530  fi
20531  VERSION_MINOR=$cleaned_value
20532
20533    fi
20534  else
20535    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20536      # Default is 0, if unspecified
20537      VERSION_MINOR=0
20538    fi
20539  fi
20540
20541
20542# Check whether --with-version-security was given.
20543if test "${with_version_security+set}" = set; then :
20544  withval=$with_version_security; with_version_security_present=true
20545else
20546  with_version_security_present=false
20547fi
20548
20549
20550  if test "x$with_version_security_present" = xtrue; then
20551    if test "x$with_version_security" = xyes; then
20552      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20553    elif test "x$with_version_security" = xno; then
20554      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20555      VERSION_SECURITY=0
20556    elif test "x$with_version_security" = x; then
20557      VERSION_SECURITY=0
20558    else
20559
20560  # Additional [] needed to keep m4 from mangling shell constructs.
20561  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20562    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20563  fi
20564  # Extract the version number without leading zeros.
20565  cleaned_value=${BASH_REMATCH[1]}
20566  if test "x$cleaned_value" = x; then
20567    # Special case for zero
20568    cleaned_value=${BASH_REMATCH[2]}
20569  fi
20570
20571  if test $cleaned_value -gt 255; then
20572    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20573  fi
20574  if test "x$cleaned_value" != "x$with_version_security"; then
20575    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20576$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20577  fi
20578  VERSION_SECURITY=$cleaned_value
20579
20580    fi
20581  else
20582    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20583      # Default is 0, if unspecified
20584      VERSION_SECURITY=0
20585    fi
20586  fi
20587
20588
20589# Check whether --with-version-patch was given.
20590if test "${with_version_patch+set}" = set; then :
20591  withval=$with_version_patch; with_version_patch_present=true
20592else
20593  with_version_patch_present=false
20594fi
20595
20596
20597  if test "x$with_version_patch_present" = xtrue; then
20598    if test "x$with_version_patch" = xyes; then
20599      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20600    elif test "x$with_version_patch" = xno; then
20601      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20602      VERSION_PATCH=0
20603    elif test "x$with_version_patch" = x; then
20604      VERSION_PATCH=0
20605    else
20606
20607  # Additional [] needed to keep m4 from mangling shell constructs.
20608  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20609    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20610  fi
20611  # Extract the version number without leading zeros.
20612  cleaned_value=${BASH_REMATCH[1]}
20613  if test "x$cleaned_value" = x; then
20614    # Special case for zero
20615    cleaned_value=${BASH_REMATCH[2]}
20616  fi
20617
20618  if test $cleaned_value -gt 255; then
20619    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20620  fi
20621  if test "x$cleaned_value" != "x$with_version_patch"; then
20622    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20623$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20624  fi
20625  VERSION_PATCH=$cleaned_value
20626
20627    fi
20628  else
20629    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20630      # Default is 0, if unspecified
20631      VERSION_PATCH=0
20632    fi
20633  fi
20634
20635  # Calculate derived version properties
20636
20637  # Set opt to "opt-base" if debug level is empty (i.e. release), or
20638  # "opt-base_debug-level" otherwise.
20639  VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL}
20640
20641  # Set VERSION_IS_GA based on if VERSION_PRE has a value
20642  if test "x$VERSION_PRE" = x; then
20643    VERSION_IS_GA=true
20644  else
20645    VERSION_IS_GA=false
20646  fi
20647
20648  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20649  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20650
20651  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20652  # Strip trailing zeroes from stripped_version_number
20653  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20654  VERSION_NUMBER=$stripped_version_number
20655
20656  # The complete version string, with additional build information
20657  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20658    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20659  else
20660    # If either build or opt is set, we need a + separator
20661    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20662  fi
20663
20664  # The short version string, just VERSION_NUMBER and PRE, if present.
20665  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20666
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20668$as_echo_n "checking for version string... " >&6; }
20669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20670$as_echo "$VERSION_STRING" >&6; }
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686###############################################################################
20687#
20688# Setup BootJDK, used to bootstrap the build.
20689#
20690###############################################################################
20691
20692
20693  BOOT_JDK_FOUND=no
20694
20695# Check whether --with-boot-jdk was given.
20696if test "${with_boot_jdk+set}" = set; then :
20697  withval=$with_boot_jdk;
20698fi
20699
20700
20701  # We look for the Boot JDK through various means, going from more certain to
20702  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20703  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20704  # must check if this is indeed valid; otherwise we'll continue looking.
20705
20706  # Test: Is bootjdk explicitely set by command line arguments?
20707
20708  if test "x$BOOT_JDK_FOUND" = xno; then
20709    # Now execute the test
20710
20711  if test "x$with_boot_jdk" != x; then
20712    BOOT_JDK=$with_boot_jdk
20713    BOOT_JDK_FOUND=maybe
20714    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20715$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20716  fi
20717
20718
20719    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20720    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20721      # Do we have a bin/java?
20722      if test ! -x "$BOOT_JDK/bin/java"; then
20723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20725        BOOT_JDK_FOUND=no
20726      else
20727        # Do we have a bin/javac?
20728        if test ! -x "$BOOT_JDK/bin/javac"; then
20729          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20731          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20732$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20733          BOOT_JDK_FOUND=no
20734        else
20735          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20736          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20737
20738          # Extra M4 quote needed to protect [] in grep expression.
20739          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20740          if test "x$FOUND_CORRECT_VERSION" = x; then
20741            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20743            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20744$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20745            BOOT_JDK_FOUND=no
20746          else
20747            # We're done! :-)
20748            BOOT_JDK_FOUND=yes
20749
20750  # Only process if variable expands to non-empty
20751
20752  if test "x$BOOT_JDK" != x; then
20753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754
20755  # Input might be given as Windows format, start by converting to
20756  # unix format.
20757  path="$BOOT_JDK"
20758  new_path=`$CYGPATH -u "$path"`
20759
20760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20763  # "foo.exe" is OK but "foo" is an error.
20764  #
20765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20766  # It is also a way to make sure we got the proper file name for the real test later on.
20767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20768  if test "x$test_shortpath" = x; then
20769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20772  fi
20773
20774  # Call helper function which possibly converts this using DOS-style short mode.
20775  # If so, the updated path is stored in $new_path.
20776
20777  input_path="$new_path"
20778  # Check if we need to convert this using DOS-style short mode. If the path
20779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20780  # take no chances and rewrite it.
20781  # Note: m4 eats our [], so we need to use [ and ] instead.
20782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20783  if test "x$has_forbidden_chars" != x; then
20784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20788      # Going to short mode and back again did indeed matter. Since short mode is
20789      # case insensitive, let's make it lowercase to improve readability.
20790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20791      # Now convert it back to Unix-style (cygpath)
20792      input_path=`$CYGPATH -u "$shortmode_path"`
20793      new_path="$input_path"
20794    fi
20795  fi
20796
20797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20798  if test "x$test_cygdrive_prefix" = x; then
20799    # As a simple fix, exclude /usr/bin since it's not a real path.
20800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20802      # a path prefixed by /cygdrive for fixpath to work.
20803      new_path="$CYGWIN_ROOT_PATH$input_path"
20804    fi
20805  fi
20806
20807
20808  if test "x$path" != "x$new_path"; then
20809    BOOT_JDK="$new_path"
20810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20812  fi
20813
20814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20815
20816  path="$BOOT_JDK"
20817  has_colon=`$ECHO $path | $GREP ^.:`
20818  new_path="$path"
20819  if test "x$has_colon" = x; then
20820    # Not in mixed or Windows style, start by that.
20821    new_path=`cmd //c echo $path`
20822  fi
20823
20824
20825  input_path="$new_path"
20826  # Check if we need to convert this using DOS-style short mode. If the path
20827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20828  # take no chances and rewrite it.
20829  # Note: m4 eats our [], so we need to use [ and ] instead.
20830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20831  if test "x$has_forbidden_chars" != x; then
20832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20834  fi
20835
20836
20837  windows_path="$new_path"
20838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20839    unix_path=`$CYGPATH -u "$windows_path"`
20840    new_path="$unix_path"
20841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20843    new_path="$unix_path"
20844  fi
20845
20846  if test "x$path" != "x$new_path"; then
20847    BOOT_JDK="$new_path"
20848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20850  fi
20851
20852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20854
20855    else
20856      # We're on a unix platform. Hooray! :)
20857      path="$BOOT_JDK"
20858      has_space=`$ECHO "$path" | $GREP " "`
20859      if test "x$has_space" != x; then
20860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20863      fi
20864
20865      # Use eval to expand a potential ~
20866      eval path="$path"
20867      if test ! -f "$path" && test ! -d "$path"; then
20868        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20869      fi
20870
20871      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20872    fi
20873  fi
20874
20875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20876$as_echo_n "checking for Boot JDK... " >&6; }
20877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20878$as_echo "$BOOT_JDK" >&6; }
20879            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20880$as_echo_n "checking Boot JDK version... " >&6; }
20881            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20883$as_echo "$BOOT_JDK_VERSION" >&6; }
20884          fi # end check jdk version
20885        fi # end check javac
20886      fi # end check java
20887    fi # end check boot jdk found
20888  fi
20889
20890  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20891    # Having specified an argument which is incorrect will produce an instant failure;
20892    # we should not go on looking
20893    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20894  fi
20895
20896  # Test: Is bootjdk available from builddeps?
20897
20898  if test "x$BOOT_JDK_FOUND" = xno; then
20899    # Now execute the test
20900
20901
20902
20903  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20904    # Source the builddeps file again, to make sure it uses the latest variables!
20905    . $builddepsfile
20906    # Look for a target and build machine specific resource!
20907    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20908    if test "x$resource" = x; then
20909      # Ok, lets instead look for a target specific resource
20910      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20911    fi
20912    if test "x$resource" = x; then
20913      # Ok, lets instead look for a build specific resource
20914      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20915    fi
20916    if test "x$resource" = x; then
20917      # Ok, lets instead look for a generic resource
20918      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20919      resource=${builddep_bootjdk}
20920    fi
20921    if test "x$resource" != x; then
20922      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20923$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20924      # If the resource in the builddeps.conf file is an existing directory,
20925      # for example /java/linux/cups
20926      if test -d ${resource}; then
20927        depdir=${resource}
20928      else
20929
20930  # bootjdk is for example mymodule
20931  # $resource is for example libs/general/libmymod_1_2_3.zip
20932  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20933  # $with_builddeps_dir is for example /localhome/builddeps
20934  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20935  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20936  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20937  filename=`basename $resource`
20938  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20939  filebase=${filename%%.*}
20940  extension=${filename#*.}
20941  installdir=$with_builddeps_dir/$filebase
20942  if test ! -f $installdir/$filename.unpacked; then
20943    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20944$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20945    if test ! -d $installdir; then
20946      mkdir -p $installdir
20947    fi
20948    if test ! -d $installdir; then
20949      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20950    fi
20951    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20952    touch $tmpfile
20953    if test ! -f $tmpfile; then
20954      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20955    fi
20956
20957  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20958  # $tmpfile is the local file name for the downloaded file.
20959  VALID_TOOL=no
20960  if test "x$BDEPS_FTP" = xwget; then
20961    VALID_TOOL=yes
20962    wget -O $tmpfile $with_builddeps_server/$resource
20963  fi
20964  if test "x$BDEPS_FTP" = xlftp; then
20965    VALID_TOOL=yes
20966    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20967  fi
20968  if test "x$BDEPS_FTP" = xftp; then
20969    VALID_TOOL=yes
20970    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20971    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20972    FTPUSERPWD=${FTPSERVER%%@*}
20973    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20974      FTPUSER=${userpwd%%:*}
20975      FTPPWD=${userpwd#*@}
20976      FTPSERVER=${FTPSERVER#*@}
20977    else
20978      FTPUSER=ftp
20979      FTPPWD=ftp
20980    fi
20981    # the "pass" command does not work on some
20982    # ftp clients (read ftp.exe) but if it works,
20983    # passive mode is better!
20984    ( \
20985        echo "user $FTPUSER $FTPPWD"        ; \
20986        echo "pass"                         ; \
20987        echo "bin"                          ; \
20988        echo "get $FTPPATH $tmpfile"              ; \
20989    ) | ftp -in $FTPSERVER
20990  fi
20991  if test "x$VALID_TOOL" != xyes; then
20992    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20993  fi
20994
20995    mv $tmpfile $installdir/$filename
20996    if test ! -s $installdir/$filename; then
20997      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20998    fi
20999    case "$extension" in
21000      zip)  echo "Unzipping $installdir/$filename..."
21001        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
21002        ;;
21003      tar.gz) echo "Untaring $installdir/$filename..."
21004        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21005        ;;
21006      tgz) echo "Untaring $installdir/$filename..."
21007        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21008        ;;
21009      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
21010        ;;
21011    esac
21012  fi
21013  if test -f $installdir/$filename.unpacked; then
21014    depdir=$installdir
21015  fi
21016
21017      fi
21018      # Source the builddeps file again, because in the previous command, the depdir
21019      # was updated to point at the current build dependency install directory.
21020      . $builddepsfile
21021      # Now extract variables from the builddeps.conf files.
21022      theroot=${builddep_bootjdk_ROOT}
21023      thecflags=${builddep_bootjdk_CFLAGS}
21024      thelibs=${builddep_bootjdk_LIBS}
21025      if test "x$depdir" = x; then
21026        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21027      fi
21028      BOOT_JDK=$depdir
21029      if test "x$theroot" != x; then
21030        BOOT_JDK="$theroot"
21031      fi
21032      if test "x$thecflags" != x; then
21033        BOOT_JDK_CFLAGS="$thecflags"
21034      fi
21035      if test "x$thelibs" != x; then
21036        BOOT_JDK_LIBS="$thelibs"
21037      fi
21038      BOOT_JDK_FOUND=maybe
21039      else BOOT_JDK_FOUND=no
21040
21041    fi
21042    else BOOT_JDK_FOUND=no
21043
21044  fi
21045
21046
21047
21048    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21049    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21050      # Do we have a bin/java?
21051      if test ! -x "$BOOT_JDK/bin/java"; then
21052        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21054        BOOT_JDK_FOUND=no
21055      else
21056        # Do we have a bin/javac?
21057        if test ! -x "$BOOT_JDK/bin/javac"; then
21058          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21060          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21061$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21062          BOOT_JDK_FOUND=no
21063        else
21064          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21065          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21066
21067          # Extra M4 quote needed to protect [] in grep expression.
21068          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21069          if test "x$FOUND_CORRECT_VERSION" = x; then
21070            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21072            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21073$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21074            BOOT_JDK_FOUND=no
21075          else
21076            # We're done! :-)
21077            BOOT_JDK_FOUND=yes
21078
21079  # Only process if variable expands to non-empty
21080
21081  if test "x$BOOT_JDK" != x; then
21082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21083
21084  # Input might be given as Windows format, start by converting to
21085  # unix format.
21086  path="$BOOT_JDK"
21087  new_path=`$CYGPATH -u "$path"`
21088
21089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21092  # "foo.exe" is OK but "foo" is an error.
21093  #
21094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21095  # It is also a way to make sure we got the proper file name for the real test later on.
21096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21097  if test "x$test_shortpath" = x; then
21098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21100    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21101  fi
21102
21103  # Call helper function which possibly converts this using DOS-style short mode.
21104  # If so, the updated path is stored in $new_path.
21105
21106  input_path="$new_path"
21107  # Check if we need to convert this using DOS-style short mode. If the path
21108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21109  # take no chances and rewrite it.
21110  # Note: m4 eats our [], so we need to use [ and ] instead.
21111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21112  if test "x$has_forbidden_chars" != x; then
21113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21117      # Going to short mode and back again did indeed matter. Since short mode is
21118      # case insensitive, let's make it lowercase to improve readability.
21119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21120      # Now convert it back to Unix-style (cygpath)
21121      input_path=`$CYGPATH -u "$shortmode_path"`
21122      new_path="$input_path"
21123    fi
21124  fi
21125
21126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21127  if test "x$test_cygdrive_prefix" = x; then
21128    # As a simple fix, exclude /usr/bin since it's not a real path.
21129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21131      # a path prefixed by /cygdrive for fixpath to work.
21132      new_path="$CYGWIN_ROOT_PATH$input_path"
21133    fi
21134  fi
21135
21136
21137  if test "x$path" != "x$new_path"; then
21138    BOOT_JDK="$new_path"
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21141  fi
21142
21143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21144
21145  path="$BOOT_JDK"
21146  has_colon=`$ECHO $path | $GREP ^.:`
21147  new_path="$path"
21148  if test "x$has_colon" = x; then
21149    # Not in mixed or Windows style, start by that.
21150    new_path=`cmd //c echo $path`
21151  fi
21152
21153
21154  input_path="$new_path"
21155  # Check if we need to convert this using DOS-style short mode. If the path
21156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21157  # take no chances and rewrite it.
21158  # Note: m4 eats our [], so we need to use [ and ] instead.
21159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21160  if test "x$has_forbidden_chars" != x; then
21161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21163  fi
21164
21165
21166  windows_path="$new_path"
21167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21168    unix_path=`$CYGPATH -u "$windows_path"`
21169    new_path="$unix_path"
21170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21172    new_path="$unix_path"
21173  fi
21174
21175  if test "x$path" != "x$new_path"; then
21176    BOOT_JDK="$new_path"
21177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21178$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21179  fi
21180
21181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21183
21184    else
21185      # We're on a unix platform. Hooray! :)
21186      path="$BOOT_JDK"
21187      has_space=`$ECHO "$path" | $GREP " "`
21188      if test "x$has_space" != x; then
21189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21192      fi
21193
21194      # Use eval to expand a potential ~
21195      eval path="$path"
21196      if test ! -f "$path" && test ! -d "$path"; then
21197        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21198      fi
21199
21200      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21201    fi
21202  fi
21203
21204            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21205$as_echo_n "checking for Boot JDK... " >&6; }
21206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21207$as_echo "$BOOT_JDK" >&6; }
21208            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21209$as_echo_n "checking Boot JDK version... " >&6; }
21210            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21212$as_echo "$BOOT_JDK_VERSION" >&6; }
21213          fi # end check jdk version
21214        fi # end check javac
21215      fi # end check java
21216    fi # end check boot jdk found
21217  fi
21218
21219
21220  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21221
21222  if test "x$BOOT_JDK_FOUND" = xno; then
21223    # Now execute the test
21224
21225  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21226    # First check at user selected default
21227
21228  if test "x$BOOT_JDK_FOUND" = xno; then
21229    # Now execute the test
21230
21231  if test -x /usr/libexec/java_home; then
21232    BOOT_JDK=`/usr/libexec/java_home `
21233    BOOT_JDK_FOUND=maybe
21234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21235$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21236  fi
21237
21238
21239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21241      # Do we have a bin/java?
21242      if test ! -x "$BOOT_JDK/bin/java"; then
21243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21245        BOOT_JDK_FOUND=no
21246      else
21247        # Do we have a bin/javac?
21248        if test ! -x "$BOOT_JDK/bin/javac"; then
21249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21253          BOOT_JDK_FOUND=no
21254        else
21255          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21256          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21257
21258          # Extra M4 quote needed to protect [] in grep expression.
21259          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21260          if test "x$FOUND_CORRECT_VERSION" = x; then
21261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21263            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21264$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21265            BOOT_JDK_FOUND=no
21266          else
21267            # We're done! :-)
21268            BOOT_JDK_FOUND=yes
21269
21270  # Only process if variable expands to non-empty
21271
21272  if test "x$BOOT_JDK" != x; then
21273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21274
21275  # Input might be given as Windows format, start by converting to
21276  # unix format.
21277  path="$BOOT_JDK"
21278  new_path=`$CYGPATH -u "$path"`
21279
21280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21283  # "foo.exe" is OK but "foo" is an error.
21284  #
21285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21286  # It is also a way to make sure we got the proper file name for the real test later on.
21287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21288  if test "x$test_shortpath" = x; then
21289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21291    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21292  fi
21293
21294  # Call helper function which possibly converts this using DOS-style short mode.
21295  # If so, the updated path is stored in $new_path.
21296
21297  input_path="$new_path"
21298  # Check if we need to convert this using DOS-style short mode. If the path
21299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21300  # take no chances and rewrite it.
21301  # Note: m4 eats our [], so we need to use [ and ] instead.
21302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21303  if test "x$has_forbidden_chars" != x; then
21304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21308      # Going to short mode and back again did indeed matter. Since short mode is
21309      # case insensitive, let's make it lowercase to improve readability.
21310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21311      # Now convert it back to Unix-style (cygpath)
21312      input_path=`$CYGPATH -u "$shortmode_path"`
21313      new_path="$input_path"
21314    fi
21315  fi
21316
21317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21318  if test "x$test_cygdrive_prefix" = x; then
21319    # As a simple fix, exclude /usr/bin since it's not a real path.
21320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21322      # a path prefixed by /cygdrive for fixpath to work.
21323      new_path="$CYGWIN_ROOT_PATH$input_path"
21324    fi
21325  fi
21326
21327
21328  if test "x$path" != "x$new_path"; then
21329    BOOT_JDK="$new_path"
21330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21332  fi
21333
21334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21335
21336  path="$BOOT_JDK"
21337  has_colon=`$ECHO $path | $GREP ^.:`
21338  new_path="$path"
21339  if test "x$has_colon" = x; then
21340    # Not in mixed or Windows style, start by that.
21341    new_path=`cmd //c echo $path`
21342  fi
21343
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354  fi
21355
21356
21357  windows_path="$new_path"
21358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21359    unix_path=`$CYGPATH -u "$windows_path"`
21360    new_path="$unix_path"
21361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21363    new_path="$unix_path"
21364  fi
21365
21366  if test "x$path" != "x$new_path"; then
21367    BOOT_JDK="$new_path"
21368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21370  fi
21371
21372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21374
21375    else
21376      # We're on a unix platform. Hooray! :)
21377      path="$BOOT_JDK"
21378      has_space=`$ECHO "$path" | $GREP " "`
21379      if test "x$has_space" != x; then
21380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21383      fi
21384
21385      # Use eval to expand a potential ~
21386      eval path="$path"
21387      if test ! -f "$path" && test ! -d "$path"; then
21388        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21389      fi
21390
21391      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21392    fi
21393  fi
21394
21395            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21396$as_echo_n "checking for Boot JDK... " >&6; }
21397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21398$as_echo "$BOOT_JDK" >&6; }
21399            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21400$as_echo_n "checking Boot JDK version... " >&6; }
21401            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21403$as_echo "$BOOT_JDK_VERSION" >&6; }
21404          fi # end check jdk version
21405        fi # end check javac
21406      fi # end check java
21407    fi # end check boot jdk found
21408  fi
21409
21410    # If that did not work out (e.g. too old), try explicit versions instead
21411
21412  if test "x$BOOT_JDK_FOUND" = xno; then
21413    # Now execute the test
21414
21415  if test -x /usr/libexec/java_home; then
21416    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21417    BOOT_JDK_FOUND=maybe
21418    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21419$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21420  fi
21421
21422
21423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21425      # Do we have a bin/java?
21426      if test ! -x "$BOOT_JDK/bin/java"; then
21427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21429        BOOT_JDK_FOUND=no
21430      else
21431        # Do we have a bin/javac?
21432        if test ! -x "$BOOT_JDK/bin/javac"; then
21433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21437          BOOT_JDK_FOUND=no
21438        else
21439          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21440          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21441
21442          # Extra M4 quote needed to protect [] in grep expression.
21443          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21444          if test "x$FOUND_CORRECT_VERSION" = x; then
21445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21447            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21448$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21449            BOOT_JDK_FOUND=no
21450          else
21451            # We're done! :-)
21452            BOOT_JDK_FOUND=yes
21453
21454  # Only process if variable expands to non-empty
21455
21456  if test "x$BOOT_JDK" != x; then
21457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21458
21459  # Input might be given as Windows format, start by converting to
21460  # unix format.
21461  path="$BOOT_JDK"
21462  new_path=`$CYGPATH -u "$path"`
21463
21464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21467  # "foo.exe" is OK but "foo" is an error.
21468  #
21469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21470  # It is also a way to make sure we got the proper file name for the real test later on.
21471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21472  if test "x$test_shortpath" = x; then
21473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21476  fi
21477
21478  # Call helper function which possibly converts this using DOS-style short mode.
21479  # If so, the updated path is stored in $new_path.
21480
21481  input_path="$new_path"
21482  # Check if we need to convert this using DOS-style short mode. If the path
21483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21484  # take no chances and rewrite it.
21485  # Note: m4 eats our [], so we need to use [ and ] instead.
21486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21487  if test "x$has_forbidden_chars" != x; then
21488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21492      # Going to short mode and back again did indeed matter. Since short mode is
21493      # case insensitive, let's make it lowercase to improve readability.
21494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21495      # Now convert it back to Unix-style (cygpath)
21496      input_path=`$CYGPATH -u "$shortmode_path"`
21497      new_path="$input_path"
21498    fi
21499  fi
21500
21501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21502  if test "x$test_cygdrive_prefix" = x; then
21503    # As a simple fix, exclude /usr/bin since it's not a real path.
21504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21506      # a path prefixed by /cygdrive for fixpath to work.
21507      new_path="$CYGWIN_ROOT_PATH$input_path"
21508    fi
21509  fi
21510
21511
21512  if test "x$path" != "x$new_path"; then
21513    BOOT_JDK="$new_path"
21514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21516  fi
21517
21518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21519
21520  path="$BOOT_JDK"
21521  has_colon=`$ECHO $path | $GREP ^.:`
21522  new_path="$path"
21523  if test "x$has_colon" = x; then
21524    # Not in mixed or Windows style, start by that.
21525    new_path=`cmd //c echo $path`
21526  fi
21527
21528
21529  input_path="$new_path"
21530  # Check if we need to convert this using DOS-style short mode. If the path
21531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21532  # take no chances and rewrite it.
21533  # Note: m4 eats our [], so we need to use [ and ] instead.
21534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21535  if test "x$has_forbidden_chars" != x; then
21536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21538  fi
21539
21540
21541  windows_path="$new_path"
21542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21543    unix_path=`$CYGPATH -u "$windows_path"`
21544    new_path="$unix_path"
21545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21547    new_path="$unix_path"
21548  fi
21549
21550  if test "x$path" != "x$new_path"; then
21551    BOOT_JDK="$new_path"
21552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21554  fi
21555
21556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21558
21559    else
21560      # We're on a unix platform. Hooray! :)
21561      path="$BOOT_JDK"
21562      has_space=`$ECHO "$path" | $GREP " "`
21563      if test "x$has_space" != x; then
21564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21567      fi
21568
21569      # Use eval to expand a potential ~
21570      eval path="$path"
21571      if test ! -f "$path" && test ! -d "$path"; then
21572        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21573      fi
21574
21575      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21576    fi
21577  fi
21578
21579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21580$as_echo_n "checking for Boot JDK... " >&6; }
21581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21582$as_echo "$BOOT_JDK" >&6; }
21583            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21584$as_echo_n "checking Boot JDK version... " >&6; }
21585            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21587$as_echo "$BOOT_JDK_VERSION" >&6; }
21588          fi # end check jdk version
21589        fi # end check javac
21590      fi # end check java
21591    fi # end check boot jdk found
21592  fi
21593
21594
21595  if test "x$BOOT_JDK_FOUND" = xno; then
21596    # Now execute the test
21597
21598  if test -x /usr/libexec/java_home; then
21599    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21600    BOOT_JDK_FOUND=maybe
21601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21602$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21603  fi
21604
21605
21606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21608      # Do we have a bin/java?
21609      if test ! -x "$BOOT_JDK/bin/java"; then
21610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21612        BOOT_JDK_FOUND=no
21613      else
21614        # Do we have a bin/javac?
21615        if test ! -x "$BOOT_JDK/bin/javac"; then
21616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21620          BOOT_JDK_FOUND=no
21621        else
21622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21624
21625          # Extra M4 quote needed to protect [] in grep expression.
21626          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21627          if test "x$FOUND_CORRECT_VERSION" = x; then
21628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21632            BOOT_JDK_FOUND=no
21633          else
21634            # We're done! :-)
21635            BOOT_JDK_FOUND=yes
21636
21637  # Only process if variable expands to non-empty
21638
21639  if test "x$BOOT_JDK" != x; then
21640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21641
21642  # Input might be given as Windows format, start by converting to
21643  # unix format.
21644  path="$BOOT_JDK"
21645  new_path=`$CYGPATH -u "$path"`
21646
21647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21650  # "foo.exe" is OK but "foo" is an error.
21651  #
21652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21653  # It is also a way to make sure we got the proper file name for the real test later on.
21654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21655  if test "x$test_shortpath" = x; then
21656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21659  fi
21660
21661  # Call helper function which possibly converts this using DOS-style short mode.
21662  # If so, the updated path is stored in $new_path.
21663
21664  input_path="$new_path"
21665  # Check if we need to convert this using DOS-style short mode. If the path
21666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21667  # take no chances and rewrite it.
21668  # Note: m4 eats our [], so we need to use [ and ] instead.
21669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21670  if test "x$has_forbidden_chars" != x; then
21671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21675      # Going to short mode and back again did indeed matter. Since short mode is
21676      # case insensitive, let's make it lowercase to improve readability.
21677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21678      # Now convert it back to Unix-style (cygpath)
21679      input_path=`$CYGPATH -u "$shortmode_path"`
21680      new_path="$input_path"
21681    fi
21682  fi
21683
21684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21685  if test "x$test_cygdrive_prefix" = x; then
21686    # As a simple fix, exclude /usr/bin since it's not a real path.
21687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21689      # a path prefixed by /cygdrive for fixpath to work.
21690      new_path="$CYGWIN_ROOT_PATH$input_path"
21691    fi
21692  fi
21693
21694
21695  if test "x$path" != "x$new_path"; then
21696    BOOT_JDK="$new_path"
21697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21699  fi
21700
21701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21702
21703  path="$BOOT_JDK"
21704  has_colon=`$ECHO $path | $GREP ^.:`
21705  new_path="$path"
21706  if test "x$has_colon" = x; then
21707    # Not in mixed or Windows style, start by that.
21708    new_path=`cmd //c echo $path`
21709  fi
21710
21711
21712  input_path="$new_path"
21713  # Check if we need to convert this using DOS-style short mode. If the path
21714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21715  # take no chances and rewrite it.
21716  # Note: m4 eats our [], so we need to use [ and ] instead.
21717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21718  if test "x$has_forbidden_chars" != x; then
21719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21721  fi
21722
21723
21724  windows_path="$new_path"
21725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21726    unix_path=`$CYGPATH -u "$windows_path"`
21727    new_path="$unix_path"
21728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21730    new_path="$unix_path"
21731  fi
21732
21733  if test "x$path" != "x$new_path"; then
21734    BOOT_JDK="$new_path"
21735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21737  fi
21738
21739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21741
21742    else
21743      # We're on a unix platform. Hooray! :)
21744      path="$BOOT_JDK"
21745      has_space=`$ECHO "$path" | $GREP " "`
21746      if test "x$has_space" != x; then
21747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21750      fi
21751
21752      # Use eval to expand a potential ~
21753      eval path="$path"
21754      if test ! -f "$path" && test ! -d "$path"; then
21755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21756      fi
21757
21758      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21759    fi
21760  fi
21761
21762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21763$as_echo_n "checking for Boot JDK... " >&6; }
21764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21765$as_echo "$BOOT_JDK" >&6; }
21766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21767$as_echo_n "checking Boot JDK version... " >&6; }
21768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21770$as_echo "$BOOT_JDK_VERSION" >&6; }
21771          fi # end check jdk version
21772        fi # end check javac
21773      fi # end check java
21774    fi # end check boot jdk found
21775  fi
21776
21777
21778  if test "x$BOOT_JDK_FOUND" = xno; then
21779    # Now execute the test
21780
21781  if test -x /usr/libexec/java_home; then
21782    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21783    BOOT_JDK_FOUND=maybe
21784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21785$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21786  fi
21787
21788
21789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21791      # Do we have a bin/java?
21792      if test ! -x "$BOOT_JDK/bin/java"; then
21793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21795        BOOT_JDK_FOUND=no
21796      else
21797        # Do we have a bin/javac?
21798        if test ! -x "$BOOT_JDK/bin/javac"; then
21799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21803          BOOT_JDK_FOUND=no
21804        else
21805          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21806          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21807
21808          # Extra M4 quote needed to protect [] in grep expression.
21809          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21810          if test "x$FOUND_CORRECT_VERSION" = x; then
21811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21813            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21814$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21815            BOOT_JDK_FOUND=no
21816          else
21817            # We're done! :-)
21818            BOOT_JDK_FOUND=yes
21819
21820  # Only process if variable expands to non-empty
21821
21822  if test "x$BOOT_JDK" != x; then
21823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21824
21825  # Input might be given as Windows format, start by converting to
21826  # unix format.
21827  path="$BOOT_JDK"
21828  new_path=`$CYGPATH -u "$path"`
21829
21830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21833  # "foo.exe" is OK but "foo" is an error.
21834  #
21835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21836  # It is also a way to make sure we got the proper file name for the real test later on.
21837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21838  if test "x$test_shortpath" = x; then
21839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21842  fi
21843
21844  # Call helper function which possibly converts this using DOS-style short mode.
21845  # If so, the updated path is stored in $new_path.
21846
21847  input_path="$new_path"
21848  # Check if we need to convert this using DOS-style short mode. If the path
21849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21850  # take no chances and rewrite it.
21851  # Note: m4 eats our [], so we need to use [ and ] instead.
21852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21853  if test "x$has_forbidden_chars" != x; then
21854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21858      # Going to short mode and back again did indeed matter. Since short mode is
21859      # case insensitive, let's make it lowercase to improve readability.
21860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21861      # Now convert it back to Unix-style (cygpath)
21862      input_path=`$CYGPATH -u "$shortmode_path"`
21863      new_path="$input_path"
21864    fi
21865  fi
21866
21867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21868  if test "x$test_cygdrive_prefix" = x; then
21869    # As a simple fix, exclude /usr/bin since it's not a real path.
21870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21872      # a path prefixed by /cygdrive for fixpath to work.
21873      new_path="$CYGWIN_ROOT_PATH$input_path"
21874    fi
21875  fi
21876
21877
21878  if test "x$path" != "x$new_path"; then
21879    BOOT_JDK="$new_path"
21880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21882  fi
21883
21884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21885
21886  path="$BOOT_JDK"
21887  has_colon=`$ECHO $path | $GREP ^.:`
21888  new_path="$path"
21889  if test "x$has_colon" = x; then
21890    # Not in mixed or Windows style, start by that.
21891    new_path=`cmd //c echo $path`
21892  fi
21893
21894
21895  input_path="$new_path"
21896  # Check if we need to convert this using DOS-style short mode. If the path
21897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21898  # take no chances and rewrite it.
21899  # Note: m4 eats our [], so we need to use [ and ] instead.
21900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21901  if test "x$has_forbidden_chars" != x; then
21902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21904  fi
21905
21906
21907  windows_path="$new_path"
21908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21909    unix_path=`$CYGPATH -u "$windows_path"`
21910    new_path="$unix_path"
21911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21913    new_path="$unix_path"
21914  fi
21915
21916  if test "x$path" != "x$new_path"; then
21917    BOOT_JDK="$new_path"
21918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21920  fi
21921
21922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21924
21925    else
21926      # We're on a unix platform. Hooray! :)
21927      path="$BOOT_JDK"
21928      has_space=`$ECHO "$path" | $GREP " "`
21929      if test "x$has_space" != x; then
21930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21933      fi
21934
21935      # Use eval to expand a potential ~
21936      eval path="$path"
21937      if test ! -f "$path" && test ! -d "$path"; then
21938        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21939      fi
21940
21941      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21942    fi
21943  fi
21944
21945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21946$as_echo_n "checking for Boot JDK... " >&6; }
21947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21948$as_echo "$BOOT_JDK" >&6; }
21949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21950$as_echo_n "checking Boot JDK version... " >&6; }
21951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21953$as_echo "$BOOT_JDK_VERSION" >&6; }
21954          fi # end check jdk version
21955        fi # end check javac
21956      fi # end check java
21957    fi # end check boot jdk found
21958  fi
21959
21960  fi
21961
21962
21963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21965      # Do we have a bin/java?
21966      if test ! -x "$BOOT_JDK/bin/java"; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21969        BOOT_JDK_FOUND=no
21970      else
21971        # Do we have a bin/javac?
21972        if test ! -x "$BOOT_JDK/bin/javac"; then
21973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21977          BOOT_JDK_FOUND=no
21978        else
21979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21981
21982          # Extra M4 quote needed to protect [] in grep expression.
21983          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21984          if test "x$FOUND_CORRECT_VERSION" = x; then
21985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21989            BOOT_JDK_FOUND=no
21990          else
21991            # We're done! :-)
21992            BOOT_JDK_FOUND=yes
21993
21994  # Only process if variable expands to non-empty
21995
21996  if test "x$BOOT_JDK" != x; then
21997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21998
21999  # Input might be given as Windows format, start by converting to
22000  # unix format.
22001  path="$BOOT_JDK"
22002  new_path=`$CYGPATH -u "$path"`
22003
22004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22007  # "foo.exe" is OK but "foo" is an error.
22008  #
22009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22010  # It is also a way to make sure we got the proper file name for the real test later on.
22011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22012  if test "x$test_shortpath" = x; then
22013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22016  fi
22017
22018  # Call helper function which possibly converts this using DOS-style short mode.
22019  # If so, the updated path is stored in $new_path.
22020
22021  input_path="$new_path"
22022  # Check if we need to convert this using DOS-style short mode. If the path
22023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22024  # take no chances and rewrite it.
22025  # Note: m4 eats our [], so we need to use [ and ] instead.
22026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22027  if test "x$has_forbidden_chars" != x; then
22028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22032      # Going to short mode and back again did indeed matter. Since short mode is
22033      # case insensitive, let's make it lowercase to improve readability.
22034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22035      # Now convert it back to Unix-style (cygpath)
22036      input_path=`$CYGPATH -u "$shortmode_path"`
22037      new_path="$input_path"
22038    fi
22039  fi
22040
22041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22042  if test "x$test_cygdrive_prefix" = x; then
22043    # As a simple fix, exclude /usr/bin since it's not a real path.
22044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22046      # a path prefixed by /cygdrive for fixpath to work.
22047      new_path="$CYGWIN_ROOT_PATH$input_path"
22048    fi
22049  fi
22050
22051
22052  if test "x$path" != "x$new_path"; then
22053    BOOT_JDK="$new_path"
22054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22056  fi
22057
22058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22059
22060  path="$BOOT_JDK"
22061  has_colon=`$ECHO $path | $GREP ^.:`
22062  new_path="$path"
22063  if test "x$has_colon" = x; then
22064    # Not in mixed or Windows style, start by that.
22065    new_path=`cmd //c echo $path`
22066  fi
22067
22068
22069  input_path="$new_path"
22070  # Check if we need to convert this using DOS-style short mode. If the path
22071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22072  # take no chances and rewrite it.
22073  # Note: m4 eats our [], so we need to use [ and ] instead.
22074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22075  if test "x$has_forbidden_chars" != x; then
22076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22078  fi
22079
22080
22081  windows_path="$new_path"
22082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22083    unix_path=`$CYGPATH -u "$windows_path"`
22084    new_path="$unix_path"
22085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22087    new_path="$unix_path"
22088  fi
22089
22090  if test "x$path" != "x$new_path"; then
22091    BOOT_JDK="$new_path"
22092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22094  fi
22095
22096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22098
22099    else
22100      # We're on a unix platform. Hooray! :)
22101      path="$BOOT_JDK"
22102      has_space=`$ECHO "$path" | $GREP " "`
22103      if test "x$has_space" != x; then
22104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22107      fi
22108
22109      # Use eval to expand a potential ~
22110      eval path="$path"
22111      if test ! -f "$path" && test ! -d "$path"; then
22112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22113      fi
22114
22115      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22116    fi
22117  fi
22118
22119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22120$as_echo_n "checking for Boot JDK... " >&6; }
22121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22122$as_echo "$BOOT_JDK" >&6; }
22123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22124$as_echo_n "checking Boot JDK version... " >&6; }
22125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22127$as_echo "$BOOT_JDK_VERSION" >&6; }
22128          fi # end check jdk version
22129        fi # end check javac
22130      fi # end check java
22131    fi # end check boot jdk found
22132  fi
22133
22134
22135  # Test: Is $JAVA_HOME set?
22136
22137  if test "x$BOOT_JDK_FOUND" = xno; then
22138    # Now execute the test
22139
22140  if test "x$JAVA_HOME" != x; then
22141    JAVA_HOME_PROCESSED="$JAVA_HOME"
22142
22143  # Only process if variable expands to non-empty
22144
22145  if test "x$JAVA_HOME_PROCESSED" != x; then
22146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22147
22148  # Input might be given as Windows format, start by converting to
22149  # unix format.
22150  path="$JAVA_HOME_PROCESSED"
22151  new_path=`$CYGPATH -u "$path"`
22152
22153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22156  # "foo.exe" is OK but "foo" is an error.
22157  #
22158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22159  # It is also a way to make sure we got the proper file name for the real test later on.
22160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22161  if test "x$test_shortpath" = x; then
22162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22163$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22164    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22165  fi
22166
22167  # Call helper function which possibly converts this using DOS-style short mode.
22168  # If so, the updated path is stored in $new_path.
22169
22170  input_path="$new_path"
22171  # Check if we need to convert this using DOS-style short mode. If the path
22172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22173  # take no chances and rewrite it.
22174  # Note: m4 eats our [], so we need to use [ and ] instead.
22175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22176  if test "x$has_forbidden_chars" != x; then
22177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22181      # Going to short mode and back again did indeed matter. Since short mode is
22182      # case insensitive, let's make it lowercase to improve readability.
22183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22184      # Now convert it back to Unix-style (cygpath)
22185      input_path=`$CYGPATH -u "$shortmode_path"`
22186      new_path="$input_path"
22187    fi
22188  fi
22189
22190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22191  if test "x$test_cygdrive_prefix" = x; then
22192    # As a simple fix, exclude /usr/bin since it's not a real path.
22193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22195      # a path prefixed by /cygdrive for fixpath to work.
22196      new_path="$CYGWIN_ROOT_PATH$input_path"
22197    fi
22198  fi
22199
22200
22201  if test "x$path" != "x$new_path"; then
22202    JAVA_HOME_PROCESSED="$new_path"
22203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22204$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22205  fi
22206
22207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22208
22209  path="$JAVA_HOME_PROCESSED"
22210  has_colon=`$ECHO $path | $GREP ^.:`
22211  new_path="$path"
22212  if test "x$has_colon" = x; then
22213    # Not in mixed or Windows style, start by that.
22214    new_path=`cmd //c echo $path`
22215  fi
22216
22217
22218  input_path="$new_path"
22219  # Check if we need to convert this using DOS-style short mode. If the path
22220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22221  # take no chances and rewrite it.
22222  # Note: m4 eats our [], so we need to use [ and ] instead.
22223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22224  if test "x$has_forbidden_chars" != x; then
22225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22227  fi
22228
22229
22230  windows_path="$new_path"
22231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22232    unix_path=`$CYGPATH -u "$windows_path"`
22233    new_path="$unix_path"
22234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22236    new_path="$unix_path"
22237  fi
22238
22239  if test "x$path" != "x$new_path"; then
22240    JAVA_HOME_PROCESSED="$new_path"
22241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22242$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22243  fi
22244
22245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22247
22248    else
22249      # We're on a unix platform. Hooray! :)
22250      path="$JAVA_HOME_PROCESSED"
22251      has_space=`$ECHO "$path" | $GREP " "`
22252      if test "x$has_space" != x; then
22253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22254$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22255        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22256      fi
22257
22258      # Use eval to expand a potential ~
22259      eval path="$path"
22260      if test ! -f "$path" && test ! -d "$path"; then
22261        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22262      fi
22263
22264      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22265    fi
22266  fi
22267
22268    if test ! -d "$JAVA_HOME_PROCESSED"; then
22269      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22270$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22271    else
22272      # Aha, the user has set a JAVA_HOME
22273      # let us use that as the Boot JDK.
22274      BOOT_JDK="$JAVA_HOME_PROCESSED"
22275      BOOT_JDK_FOUND=maybe
22276      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22277$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22278    fi
22279  fi
22280
22281
22282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22284      # Do we have a bin/java?
22285      if test ! -x "$BOOT_JDK/bin/java"; then
22286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22288        BOOT_JDK_FOUND=no
22289      else
22290        # Do we have a bin/javac?
22291        if test ! -x "$BOOT_JDK/bin/javac"; then
22292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22296          BOOT_JDK_FOUND=no
22297        else
22298          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22299          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22300
22301          # Extra M4 quote needed to protect [] in grep expression.
22302          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22303          if test "x$FOUND_CORRECT_VERSION" = x; then
22304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22306            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22307$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22308            BOOT_JDK_FOUND=no
22309          else
22310            # We're done! :-)
22311            BOOT_JDK_FOUND=yes
22312
22313  # Only process if variable expands to non-empty
22314
22315  if test "x$BOOT_JDK" != x; then
22316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22317
22318  # Input might be given as Windows format, start by converting to
22319  # unix format.
22320  path="$BOOT_JDK"
22321  new_path=`$CYGPATH -u "$path"`
22322
22323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22326  # "foo.exe" is OK but "foo" is an error.
22327  #
22328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22329  # It is also a way to make sure we got the proper file name for the real test later on.
22330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22331  if test "x$test_shortpath" = x; then
22332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22335  fi
22336
22337  # Call helper function which possibly converts this using DOS-style short mode.
22338  # If so, the updated path is stored in $new_path.
22339
22340  input_path="$new_path"
22341  # Check if we need to convert this using DOS-style short mode. If the path
22342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22343  # take no chances and rewrite it.
22344  # Note: m4 eats our [], so we need to use [ and ] instead.
22345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22346  if test "x$has_forbidden_chars" != x; then
22347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22351      # Going to short mode and back again did indeed matter. Since short mode is
22352      # case insensitive, let's make it lowercase to improve readability.
22353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22354      # Now convert it back to Unix-style (cygpath)
22355      input_path=`$CYGPATH -u "$shortmode_path"`
22356      new_path="$input_path"
22357    fi
22358  fi
22359
22360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22361  if test "x$test_cygdrive_prefix" = x; then
22362    # As a simple fix, exclude /usr/bin since it's not a real path.
22363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22365      # a path prefixed by /cygdrive for fixpath to work.
22366      new_path="$CYGWIN_ROOT_PATH$input_path"
22367    fi
22368  fi
22369
22370
22371  if test "x$path" != "x$new_path"; then
22372    BOOT_JDK="$new_path"
22373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22375  fi
22376
22377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22378
22379  path="$BOOT_JDK"
22380  has_colon=`$ECHO $path | $GREP ^.:`
22381  new_path="$path"
22382  if test "x$has_colon" = x; then
22383    # Not in mixed or Windows style, start by that.
22384    new_path=`cmd //c echo $path`
22385  fi
22386
22387
22388  input_path="$new_path"
22389  # Check if we need to convert this using DOS-style short mode. If the path
22390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22391  # take no chances and rewrite it.
22392  # Note: m4 eats our [], so we need to use [ and ] instead.
22393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22394  if test "x$has_forbidden_chars" != x; then
22395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22397  fi
22398
22399
22400  windows_path="$new_path"
22401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22402    unix_path=`$CYGPATH -u "$windows_path"`
22403    new_path="$unix_path"
22404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22406    new_path="$unix_path"
22407  fi
22408
22409  if test "x$path" != "x$new_path"; then
22410    BOOT_JDK="$new_path"
22411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22413  fi
22414
22415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22417
22418    else
22419      # We're on a unix platform. Hooray! :)
22420      path="$BOOT_JDK"
22421      has_space=`$ECHO "$path" | $GREP " "`
22422      if test "x$has_space" != x; then
22423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22426      fi
22427
22428      # Use eval to expand a potential ~
22429      eval path="$path"
22430      if test ! -f "$path" && test ! -d "$path"; then
22431        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22432      fi
22433
22434      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22435    fi
22436  fi
22437
22438            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22439$as_echo_n "checking for Boot JDK... " >&6; }
22440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22441$as_echo "$BOOT_JDK" >&6; }
22442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22443$as_echo_n "checking Boot JDK version... " >&6; }
22444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22446$as_echo "$BOOT_JDK_VERSION" >&6; }
22447          fi # end check jdk version
22448        fi # end check javac
22449      fi # end check java
22450    fi # end check boot jdk found
22451  fi
22452
22453
22454  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22455
22456  if test "x$BOOT_JDK_FOUND" = xno; then
22457    # Now execute the test
22458
22459  # Extract the first word of "javac", so it can be a program name with args.
22460set dummy javac; ac_word=$2
22461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22462$as_echo_n "checking for $ac_word... " >&6; }
22463if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22464  $as_echo_n "(cached) " >&6
22465else
22466  case $JAVAC_CHECK in
22467  [\\/]* | ?:[\\/]*)
22468  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22469  ;;
22470  *)
22471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22472for as_dir in $PATH
22473do
22474  IFS=$as_save_IFS
22475  test -z "$as_dir" && as_dir=.
22476    for ac_exec_ext in '' $ac_executable_extensions; do
22477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22478    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22480    break 2
22481  fi
22482done
22483  done
22484IFS=$as_save_IFS
22485
22486  ;;
22487esac
22488fi
22489JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22490if test -n "$JAVAC_CHECK"; then
22491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22492$as_echo "$JAVAC_CHECK" >&6; }
22493else
22494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22495$as_echo "no" >&6; }
22496fi
22497
22498
22499  # Extract the first word of "java", so it can be a program name with args.
22500set dummy java; ac_word=$2
22501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22502$as_echo_n "checking for $ac_word... " >&6; }
22503if ${ac_cv_path_JAVA_CHECK+:} false; then :
22504  $as_echo_n "(cached) " >&6
22505else
22506  case $JAVA_CHECK in
22507  [\\/]* | ?:[\\/]*)
22508  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22509  ;;
22510  *)
22511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22512for as_dir in $PATH
22513do
22514  IFS=$as_save_IFS
22515  test -z "$as_dir" && as_dir=.
22516    for ac_exec_ext in '' $ac_executable_extensions; do
22517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22518    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22520    break 2
22521  fi
22522done
22523  done
22524IFS=$as_save_IFS
22525
22526  ;;
22527esac
22528fi
22529JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22530if test -n "$JAVA_CHECK"; then
22531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22532$as_echo "$JAVA_CHECK" >&6; }
22533else
22534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22535$as_echo "no" >&6; }
22536fi
22537
22538
22539  BINARY="$JAVAC_CHECK"
22540  if test "x$JAVAC_CHECK" = x; then
22541    BINARY="$JAVA_CHECK"
22542  fi
22543  if test "x$BINARY" != x; then
22544    # So there is a java(c) binary, it might be part of a JDK.
22545    # Lets find the JDK/JRE directory by following symbolic links.
22546    # Linux/GNU systems often have links from /usr/bin/java to
22547    # /etc/alternatives/java to the real JDK binary.
22548
22549  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22550    # Follow a chain of symbolic links. Use readlink
22551    # where it exists, else fall back to horribly
22552    # complicated shell code.
22553    if test "x$READLINK_TESTED" != yes; then
22554      # On MacOSX there is a readlink tool with a different
22555      # purpose than the GNU readlink tool. Check the found readlink.
22556      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22557      if test "x$ISGNU" = x; then
22558        # A readlink that we do not know how to use.
22559        # Are there other non-GNU readlinks out there?
22560        READLINK_TESTED=yes
22561        READLINK=
22562      fi
22563    fi
22564
22565    if test "x$READLINK" != x; then
22566      BINARY=`$READLINK -f $BINARY`
22567    else
22568      # Save the current directory for restoring afterwards
22569      STARTDIR=$PWD
22570      COUNTER=0
22571      sym_link_dir=`$DIRNAME $BINARY`
22572      sym_link_file=`$BASENAME $BINARY`
22573      cd $sym_link_dir
22574      # Use -P flag to resolve symlinks in directories.
22575      cd `$THEPWDCMD -P`
22576      sym_link_dir=`$THEPWDCMD -P`
22577      # Resolve file symlinks
22578      while test $COUNTER -lt 20; do
22579        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22580        if test "x$ISLINK" == x; then
22581          # This is not a symbolic link! We are done!
22582          break
22583        fi
22584        # Again resolve directory symlinks since the target of the just found
22585        # link could be in a different directory
22586        cd `$DIRNAME $ISLINK`
22587        sym_link_dir=`$THEPWDCMD -P`
22588        sym_link_file=`$BASENAME $ISLINK`
22589        let COUNTER=COUNTER+1
22590      done
22591      cd $STARTDIR
22592      BINARY=$sym_link_dir/$sym_link_file
22593    fi
22594  fi
22595
22596    BOOT_JDK=`dirname "$BINARY"`
22597    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22598    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22599      # Looks like we found ourselves an JDK
22600      BOOT_JDK_FOUND=maybe
22601      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22602$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22603    fi
22604  fi
22605
22606
22607    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22608    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22609      # Do we have a bin/java?
22610      if test ! -x "$BOOT_JDK/bin/java"; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22613        BOOT_JDK_FOUND=no
22614      else
22615        # Do we have a bin/javac?
22616        if test ! -x "$BOOT_JDK/bin/javac"; then
22617          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22619          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22620$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22621          BOOT_JDK_FOUND=no
22622        else
22623          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22624          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22625
22626          # Extra M4 quote needed to protect [] in grep expression.
22627          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22628          if test "x$FOUND_CORRECT_VERSION" = x; then
22629            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22631            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22632$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22633            BOOT_JDK_FOUND=no
22634          else
22635            # We're done! :-)
22636            BOOT_JDK_FOUND=yes
22637
22638  # Only process if variable expands to non-empty
22639
22640  if test "x$BOOT_JDK" != x; then
22641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22642
22643  # Input might be given as Windows format, start by converting to
22644  # unix format.
22645  path="$BOOT_JDK"
22646  new_path=`$CYGPATH -u "$path"`
22647
22648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22651  # "foo.exe" is OK but "foo" is an error.
22652  #
22653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22654  # It is also a way to make sure we got the proper file name for the real test later on.
22655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22656  if test "x$test_shortpath" = x; then
22657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22659    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22660  fi
22661
22662  # Call helper function which possibly converts this using DOS-style short mode.
22663  # If so, the updated path is stored in $new_path.
22664
22665  input_path="$new_path"
22666  # Check if we need to convert this using DOS-style short mode. If the path
22667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22668  # take no chances and rewrite it.
22669  # Note: m4 eats our [], so we need to use [ and ] instead.
22670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22671  if test "x$has_forbidden_chars" != x; then
22672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22676      # Going to short mode and back again did indeed matter. Since short mode is
22677      # case insensitive, let's make it lowercase to improve readability.
22678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22679      # Now convert it back to Unix-style (cygpath)
22680      input_path=`$CYGPATH -u "$shortmode_path"`
22681      new_path="$input_path"
22682    fi
22683  fi
22684
22685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22686  if test "x$test_cygdrive_prefix" = x; then
22687    # As a simple fix, exclude /usr/bin since it's not a real path.
22688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22690      # a path prefixed by /cygdrive for fixpath to work.
22691      new_path="$CYGWIN_ROOT_PATH$input_path"
22692    fi
22693  fi
22694
22695
22696  if test "x$path" != "x$new_path"; then
22697    BOOT_JDK="$new_path"
22698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22700  fi
22701
22702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22703
22704  path="$BOOT_JDK"
22705  has_colon=`$ECHO $path | $GREP ^.:`
22706  new_path="$path"
22707  if test "x$has_colon" = x; then
22708    # Not in mixed or Windows style, start by that.
22709    new_path=`cmd //c echo $path`
22710  fi
22711
22712
22713  input_path="$new_path"
22714  # Check if we need to convert this using DOS-style short mode. If the path
22715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22716  # take no chances and rewrite it.
22717  # Note: m4 eats our [], so we need to use [ and ] instead.
22718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22719  if test "x$has_forbidden_chars" != x; then
22720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22722  fi
22723
22724
22725  windows_path="$new_path"
22726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22727    unix_path=`$CYGPATH -u "$windows_path"`
22728    new_path="$unix_path"
22729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22731    new_path="$unix_path"
22732  fi
22733
22734  if test "x$path" != "x$new_path"; then
22735    BOOT_JDK="$new_path"
22736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22738  fi
22739
22740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22742
22743    else
22744      # We're on a unix platform. Hooray! :)
22745      path="$BOOT_JDK"
22746      has_space=`$ECHO "$path" | $GREP " "`
22747      if test "x$has_space" != x; then
22748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22751      fi
22752
22753      # Use eval to expand a potential ~
22754      eval path="$path"
22755      if test ! -f "$path" && test ! -d "$path"; then
22756        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22757      fi
22758
22759      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22760    fi
22761  fi
22762
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22764$as_echo_n "checking for Boot JDK... " >&6; }
22765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22766$as_echo "$BOOT_JDK" >&6; }
22767            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22768$as_echo_n "checking Boot JDK version... " >&6; }
22769            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22771$as_echo "$BOOT_JDK_VERSION" >&6; }
22772          fi # end check jdk version
22773        fi # end check javac
22774      fi # end check java
22775    fi # end check boot jdk found
22776  fi
22777
22778
22779  # Test: Is there a JDK installed in default, well-known locations?
22780
22781  if test "x$BOOT_JDK_FOUND" = xno; then
22782    # Now execute the test
22783
22784  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22785
22786  if test "x$BOOT_JDK_FOUND" = xno; then
22787    # Now execute the test
22788
22789  if test "x$ProgramW6432" != x; then
22790    VIRTUAL_DIR="$ProgramW6432/Java"
22791
22792  windows_path="$VIRTUAL_DIR"
22793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22794    unix_path=`$CYGPATH -u "$windows_path"`
22795    VIRTUAL_DIR="$unix_path"
22796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22798    VIRTUAL_DIR="$unix_path"
22799  fi
22800
22801
22802  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22803  BOOT_JDK_SUFFIX=""
22804  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22805  if test "x$ALL_JDKS_FOUND" != x; then
22806    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22807
22808  if test "x$BOOT_JDK_FOUND" = xno; then
22809    # Now execute the test
22810
22811        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22812        if test -d "$BOOT_JDK"; then
22813          BOOT_JDK_FOUND=maybe
22814          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22815$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22816        fi
22817
22818
22819    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22820    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22821      # Do we have a bin/java?
22822      if test ! -x "$BOOT_JDK/bin/java"; then
22823        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22825        BOOT_JDK_FOUND=no
22826      else
22827        # Do we have a bin/javac?
22828        if test ! -x "$BOOT_JDK/bin/javac"; then
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22831          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22832$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22833          BOOT_JDK_FOUND=no
22834        else
22835          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22836          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22837
22838          # Extra M4 quote needed to protect [] in grep expression.
22839          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22840          if test "x$FOUND_CORRECT_VERSION" = x; then
22841            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22843            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22844$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22845            BOOT_JDK_FOUND=no
22846          else
22847            # We're done! :-)
22848            BOOT_JDK_FOUND=yes
22849
22850  # Only process if variable expands to non-empty
22851
22852  if test "x$BOOT_JDK" != x; then
22853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22854
22855  # Input might be given as Windows format, start by converting to
22856  # unix format.
22857  path="$BOOT_JDK"
22858  new_path=`$CYGPATH -u "$path"`
22859
22860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22863  # "foo.exe" is OK but "foo" is an error.
22864  #
22865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22866  # It is also a way to make sure we got the proper file name for the real test later on.
22867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22868  if test "x$test_shortpath" = x; then
22869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22871    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22872  fi
22873
22874  # Call helper function which possibly converts this using DOS-style short mode.
22875  # If so, the updated path is stored in $new_path.
22876
22877  input_path="$new_path"
22878  # Check if we need to convert this using DOS-style short mode. If the path
22879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22880  # take no chances and rewrite it.
22881  # Note: m4 eats our [], so we need to use [ and ] instead.
22882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22883  if test "x$has_forbidden_chars" != x; then
22884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22888      # Going to short mode and back again did indeed matter. Since short mode is
22889      # case insensitive, let's make it lowercase to improve readability.
22890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22891      # Now convert it back to Unix-style (cygpath)
22892      input_path=`$CYGPATH -u "$shortmode_path"`
22893      new_path="$input_path"
22894    fi
22895  fi
22896
22897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22898  if test "x$test_cygdrive_prefix" = x; then
22899    # As a simple fix, exclude /usr/bin since it's not a real path.
22900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22902      # a path prefixed by /cygdrive for fixpath to work.
22903      new_path="$CYGWIN_ROOT_PATH$input_path"
22904    fi
22905  fi
22906
22907
22908  if test "x$path" != "x$new_path"; then
22909    BOOT_JDK="$new_path"
22910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22912  fi
22913
22914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22915
22916  path="$BOOT_JDK"
22917  has_colon=`$ECHO $path | $GREP ^.:`
22918  new_path="$path"
22919  if test "x$has_colon" = x; then
22920    # Not in mixed or Windows style, start by that.
22921    new_path=`cmd //c echo $path`
22922  fi
22923
22924
22925  input_path="$new_path"
22926  # Check if we need to convert this using DOS-style short mode. If the path
22927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22928  # take no chances and rewrite it.
22929  # Note: m4 eats our [], so we need to use [ and ] instead.
22930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22931  if test "x$has_forbidden_chars" != x; then
22932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22934  fi
22935
22936
22937  windows_path="$new_path"
22938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22939    unix_path=`$CYGPATH -u "$windows_path"`
22940    new_path="$unix_path"
22941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22943    new_path="$unix_path"
22944  fi
22945
22946  if test "x$path" != "x$new_path"; then
22947    BOOT_JDK="$new_path"
22948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22950  fi
22951
22952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22954
22955    else
22956      # We're on a unix platform. Hooray! :)
22957      path="$BOOT_JDK"
22958      has_space=`$ECHO "$path" | $GREP " "`
22959      if test "x$has_space" != x; then
22960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22963      fi
22964
22965      # Use eval to expand a potential ~
22966      eval path="$path"
22967      if test ! -f "$path" && test ! -d "$path"; then
22968        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22969      fi
22970
22971      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22972    fi
22973  fi
22974
22975            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22976$as_echo_n "checking for Boot JDK... " >&6; }
22977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22978$as_echo "$BOOT_JDK" >&6; }
22979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22980$as_echo_n "checking Boot JDK version... " >&6; }
22981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22983$as_echo "$BOOT_JDK_VERSION" >&6; }
22984          fi # end check jdk version
22985        fi # end check javac
22986      fi # end check java
22987    fi # end check boot jdk found
22988  fi
22989
22990    done
22991  fi
22992
22993  fi
22994
22995
22996    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22997    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22998      # Do we have a bin/java?
22999      if test ! -x "$BOOT_JDK/bin/java"; then
23000        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23002        BOOT_JDK_FOUND=no
23003      else
23004        # Do we have a bin/javac?
23005        if test ! -x "$BOOT_JDK/bin/javac"; then
23006          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23008          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23009$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23010          BOOT_JDK_FOUND=no
23011        else
23012          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23013          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23014
23015          # Extra M4 quote needed to protect [] in grep expression.
23016          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23017          if test "x$FOUND_CORRECT_VERSION" = x; then
23018            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23020            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23021$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23022            BOOT_JDK_FOUND=no
23023          else
23024            # We're done! :-)
23025            BOOT_JDK_FOUND=yes
23026
23027  # Only process if variable expands to non-empty
23028
23029  if test "x$BOOT_JDK" != x; then
23030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23031
23032  # Input might be given as Windows format, start by converting to
23033  # unix format.
23034  path="$BOOT_JDK"
23035  new_path=`$CYGPATH -u "$path"`
23036
23037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23040  # "foo.exe" is OK but "foo" is an error.
23041  #
23042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23043  # It is also a way to make sure we got the proper file name for the real test later on.
23044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23045  if test "x$test_shortpath" = x; then
23046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23049  fi
23050
23051  # Call helper function which possibly converts this using DOS-style short mode.
23052  # If so, the updated path is stored in $new_path.
23053
23054  input_path="$new_path"
23055  # Check if we need to convert this using DOS-style short mode. If the path
23056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23057  # take no chances and rewrite it.
23058  # Note: m4 eats our [], so we need to use [ and ] instead.
23059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23060  if test "x$has_forbidden_chars" != x; then
23061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23065      # Going to short mode and back again did indeed matter. Since short mode is
23066      # case insensitive, let's make it lowercase to improve readability.
23067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23068      # Now convert it back to Unix-style (cygpath)
23069      input_path=`$CYGPATH -u "$shortmode_path"`
23070      new_path="$input_path"
23071    fi
23072  fi
23073
23074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23075  if test "x$test_cygdrive_prefix" = x; then
23076    # As a simple fix, exclude /usr/bin since it's not a real path.
23077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23079      # a path prefixed by /cygdrive for fixpath to work.
23080      new_path="$CYGWIN_ROOT_PATH$input_path"
23081    fi
23082  fi
23083
23084
23085  if test "x$path" != "x$new_path"; then
23086    BOOT_JDK="$new_path"
23087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23089  fi
23090
23091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23092
23093  path="$BOOT_JDK"
23094  has_colon=`$ECHO $path | $GREP ^.:`
23095  new_path="$path"
23096  if test "x$has_colon" = x; then
23097    # Not in mixed or Windows style, start by that.
23098    new_path=`cmd //c echo $path`
23099  fi
23100
23101
23102  input_path="$new_path"
23103  # Check if we need to convert this using DOS-style short mode. If the path
23104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23105  # take no chances and rewrite it.
23106  # Note: m4 eats our [], so we need to use [ and ] instead.
23107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23108  if test "x$has_forbidden_chars" != x; then
23109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23111  fi
23112
23113
23114  windows_path="$new_path"
23115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23116    unix_path=`$CYGPATH -u "$windows_path"`
23117    new_path="$unix_path"
23118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23120    new_path="$unix_path"
23121  fi
23122
23123  if test "x$path" != "x$new_path"; then
23124    BOOT_JDK="$new_path"
23125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23127  fi
23128
23129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23131
23132    else
23133      # We're on a unix platform. Hooray! :)
23134      path="$BOOT_JDK"
23135      has_space=`$ECHO "$path" | $GREP " "`
23136      if test "x$has_space" != x; then
23137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23140      fi
23141
23142      # Use eval to expand a potential ~
23143      eval path="$path"
23144      if test ! -f "$path" && test ! -d "$path"; then
23145        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23146      fi
23147
23148      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23149    fi
23150  fi
23151
23152            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23153$as_echo_n "checking for Boot JDK... " >&6; }
23154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23155$as_echo "$BOOT_JDK" >&6; }
23156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23157$as_echo_n "checking Boot JDK version... " >&6; }
23158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23160$as_echo "$BOOT_JDK_VERSION" >&6; }
23161          fi # end check jdk version
23162        fi # end check javac
23163      fi # end check java
23164    fi # end check boot jdk found
23165  fi
23166
23167
23168  if test "x$BOOT_JDK_FOUND" = xno; then
23169    # Now execute the test
23170
23171  if test "x$PROGRAMW6432" != x; then
23172    VIRTUAL_DIR="$PROGRAMW6432/Java"
23173
23174  windows_path="$VIRTUAL_DIR"
23175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23176    unix_path=`$CYGPATH -u "$windows_path"`
23177    VIRTUAL_DIR="$unix_path"
23178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23180    VIRTUAL_DIR="$unix_path"
23181  fi
23182
23183
23184  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23185  BOOT_JDK_SUFFIX=""
23186  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23187  if test "x$ALL_JDKS_FOUND" != x; then
23188    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23189
23190  if test "x$BOOT_JDK_FOUND" = xno; then
23191    # Now execute the test
23192
23193        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23194        if test -d "$BOOT_JDK"; then
23195          BOOT_JDK_FOUND=maybe
23196          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23197$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23198        fi
23199
23200
23201    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23202    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23203      # Do we have a bin/java?
23204      if test ! -x "$BOOT_JDK/bin/java"; then
23205        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23207        BOOT_JDK_FOUND=no
23208      else
23209        # Do we have a bin/javac?
23210        if test ! -x "$BOOT_JDK/bin/javac"; then
23211          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23213          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23214$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23215          BOOT_JDK_FOUND=no
23216        else
23217          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23218          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23219
23220          # Extra M4 quote needed to protect [] in grep expression.
23221          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23222          if test "x$FOUND_CORRECT_VERSION" = x; then
23223            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23225            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23226$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23227            BOOT_JDK_FOUND=no
23228          else
23229            # We're done! :-)
23230            BOOT_JDK_FOUND=yes
23231
23232  # Only process if variable expands to non-empty
23233
23234  if test "x$BOOT_JDK" != x; then
23235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23236
23237  # Input might be given as Windows format, start by converting to
23238  # unix format.
23239  path="$BOOT_JDK"
23240  new_path=`$CYGPATH -u "$path"`
23241
23242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23245  # "foo.exe" is OK but "foo" is an error.
23246  #
23247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23248  # It is also a way to make sure we got the proper file name for the real test later on.
23249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23250  if test "x$test_shortpath" = x; then
23251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23253    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23254  fi
23255
23256  # Call helper function which possibly converts this using DOS-style short mode.
23257  # If so, the updated path is stored in $new_path.
23258
23259  input_path="$new_path"
23260  # Check if we need to convert this using DOS-style short mode. If the path
23261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23262  # take no chances and rewrite it.
23263  # Note: m4 eats our [], so we need to use [ and ] instead.
23264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23265  if test "x$has_forbidden_chars" != x; then
23266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23270      # Going to short mode and back again did indeed matter. Since short mode is
23271      # case insensitive, let's make it lowercase to improve readability.
23272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23273      # Now convert it back to Unix-style (cygpath)
23274      input_path=`$CYGPATH -u "$shortmode_path"`
23275      new_path="$input_path"
23276    fi
23277  fi
23278
23279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23280  if test "x$test_cygdrive_prefix" = x; then
23281    # As a simple fix, exclude /usr/bin since it's not a real path.
23282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23284      # a path prefixed by /cygdrive for fixpath to work.
23285      new_path="$CYGWIN_ROOT_PATH$input_path"
23286    fi
23287  fi
23288
23289
23290  if test "x$path" != "x$new_path"; then
23291    BOOT_JDK="$new_path"
23292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23294  fi
23295
23296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297
23298  path="$BOOT_JDK"
23299  has_colon=`$ECHO $path | $GREP ^.:`
23300  new_path="$path"
23301  if test "x$has_colon" = x; then
23302    # Not in mixed or Windows style, start by that.
23303    new_path=`cmd //c echo $path`
23304  fi
23305
23306
23307  input_path="$new_path"
23308  # Check if we need to convert this using DOS-style short mode. If the path
23309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23310  # take no chances and rewrite it.
23311  # Note: m4 eats our [], so we need to use [ and ] instead.
23312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23313  if test "x$has_forbidden_chars" != x; then
23314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23316  fi
23317
23318
23319  windows_path="$new_path"
23320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23321    unix_path=`$CYGPATH -u "$windows_path"`
23322    new_path="$unix_path"
23323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23325    new_path="$unix_path"
23326  fi
23327
23328  if test "x$path" != "x$new_path"; then
23329    BOOT_JDK="$new_path"
23330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23332  fi
23333
23334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23336
23337    else
23338      # We're on a unix platform. Hooray! :)
23339      path="$BOOT_JDK"
23340      has_space=`$ECHO "$path" | $GREP " "`
23341      if test "x$has_space" != x; then
23342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23345      fi
23346
23347      # Use eval to expand a potential ~
23348      eval path="$path"
23349      if test ! -f "$path" && test ! -d "$path"; then
23350        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23351      fi
23352
23353      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23354    fi
23355  fi
23356
23357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23358$as_echo_n "checking for Boot JDK... " >&6; }
23359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23360$as_echo "$BOOT_JDK" >&6; }
23361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23362$as_echo_n "checking Boot JDK version... " >&6; }
23363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23365$as_echo "$BOOT_JDK_VERSION" >&6; }
23366          fi # end check jdk version
23367        fi # end check javac
23368      fi # end check java
23369    fi # end check boot jdk found
23370  fi
23371
23372    done
23373  fi
23374
23375  fi
23376
23377
23378    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23379    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23380      # Do we have a bin/java?
23381      if test ! -x "$BOOT_JDK/bin/java"; then
23382        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23384        BOOT_JDK_FOUND=no
23385      else
23386        # Do we have a bin/javac?
23387        if test ! -x "$BOOT_JDK/bin/javac"; then
23388          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23390          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23391$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23392          BOOT_JDK_FOUND=no
23393        else
23394          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23395          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23396
23397          # Extra M4 quote needed to protect [] in grep expression.
23398          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23399          if test "x$FOUND_CORRECT_VERSION" = x; then
23400            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23402            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23403$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23404            BOOT_JDK_FOUND=no
23405          else
23406            # We're done! :-)
23407            BOOT_JDK_FOUND=yes
23408
23409  # Only process if variable expands to non-empty
23410
23411  if test "x$BOOT_JDK" != x; then
23412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23413
23414  # Input might be given as Windows format, start by converting to
23415  # unix format.
23416  path="$BOOT_JDK"
23417  new_path=`$CYGPATH -u "$path"`
23418
23419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23422  # "foo.exe" is OK but "foo" is an error.
23423  #
23424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23425  # It is also a way to make sure we got the proper file name for the real test later on.
23426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23427  if test "x$test_shortpath" = x; then
23428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23430    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23431  fi
23432
23433  # Call helper function which possibly converts this using DOS-style short mode.
23434  # If so, the updated path is stored in $new_path.
23435
23436  input_path="$new_path"
23437  # Check if we need to convert this using DOS-style short mode. If the path
23438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23439  # take no chances and rewrite it.
23440  # Note: m4 eats our [], so we need to use [ and ] instead.
23441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23442  if test "x$has_forbidden_chars" != x; then
23443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23447      # Going to short mode and back again did indeed matter. Since short mode is
23448      # case insensitive, let's make it lowercase to improve readability.
23449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23450      # Now convert it back to Unix-style (cygpath)
23451      input_path=`$CYGPATH -u "$shortmode_path"`
23452      new_path="$input_path"
23453    fi
23454  fi
23455
23456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23457  if test "x$test_cygdrive_prefix" = x; then
23458    # As a simple fix, exclude /usr/bin since it's not a real path.
23459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23461      # a path prefixed by /cygdrive for fixpath to work.
23462      new_path="$CYGWIN_ROOT_PATH$input_path"
23463    fi
23464  fi
23465
23466
23467  if test "x$path" != "x$new_path"; then
23468    BOOT_JDK="$new_path"
23469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23471  fi
23472
23473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23474
23475  path="$BOOT_JDK"
23476  has_colon=`$ECHO $path | $GREP ^.:`
23477  new_path="$path"
23478  if test "x$has_colon" = x; then
23479    # Not in mixed or Windows style, start by that.
23480    new_path=`cmd //c echo $path`
23481  fi
23482
23483
23484  input_path="$new_path"
23485  # Check if we need to convert this using DOS-style short mode. If the path
23486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23487  # take no chances and rewrite it.
23488  # Note: m4 eats our [], so we need to use [ and ] instead.
23489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23490  if test "x$has_forbidden_chars" != x; then
23491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23493  fi
23494
23495
23496  windows_path="$new_path"
23497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23498    unix_path=`$CYGPATH -u "$windows_path"`
23499    new_path="$unix_path"
23500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23502    new_path="$unix_path"
23503  fi
23504
23505  if test "x$path" != "x$new_path"; then
23506    BOOT_JDK="$new_path"
23507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23508$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23509  fi
23510
23511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23513
23514    else
23515      # We're on a unix platform. Hooray! :)
23516      path="$BOOT_JDK"
23517      has_space=`$ECHO "$path" | $GREP " "`
23518      if test "x$has_space" != x; then
23519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23521        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23522      fi
23523
23524      # Use eval to expand a potential ~
23525      eval path="$path"
23526      if test ! -f "$path" && test ! -d "$path"; then
23527        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23528      fi
23529
23530      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23531    fi
23532  fi
23533
23534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23535$as_echo_n "checking for Boot JDK... " >&6; }
23536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23537$as_echo "$BOOT_JDK" >&6; }
23538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23539$as_echo_n "checking Boot JDK version... " >&6; }
23540            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23542$as_echo "$BOOT_JDK_VERSION" >&6; }
23543          fi # end check jdk version
23544        fi # end check javac
23545      fi # end check java
23546    fi # end check boot jdk found
23547  fi
23548
23549
23550  if test "x$BOOT_JDK_FOUND" = xno; then
23551    # Now execute the test
23552
23553  if test "x$PROGRAMFILES" != x; then
23554    VIRTUAL_DIR="$PROGRAMFILES/Java"
23555
23556  windows_path="$VIRTUAL_DIR"
23557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23558    unix_path=`$CYGPATH -u "$windows_path"`
23559    VIRTUAL_DIR="$unix_path"
23560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23562    VIRTUAL_DIR="$unix_path"
23563  fi
23564
23565
23566  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23567  BOOT_JDK_SUFFIX=""
23568  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23569  if test "x$ALL_JDKS_FOUND" != x; then
23570    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23571
23572  if test "x$BOOT_JDK_FOUND" = xno; then
23573    # Now execute the test
23574
23575        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23576        if test -d "$BOOT_JDK"; then
23577          BOOT_JDK_FOUND=maybe
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23579$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23580        fi
23581
23582
23583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23585      # Do we have a bin/java?
23586      if test ! -x "$BOOT_JDK/bin/java"; then
23587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23589        BOOT_JDK_FOUND=no
23590      else
23591        # Do we have a bin/javac?
23592        if test ! -x "$BOOT_JDK/bin/javac"; then
23593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23597          BOOT_JDK_FOUND=no
23598        else
23599          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23600          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23601
23602          # Extra M4 quote needed to protect [] in grep expression.
23603          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23604          if test "x$FOUND_CORRECT_VERSION" = x; then
23605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23607            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23608$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23609            BOOT_JDK_FOUND=no
23610          else
23611            # We're done! :-)
23612            BOOT_JDK_FOUND=yes
23613
23614  # Only process if variable expands to non-empty
23615
23616  if test "x$BOOT_JDK" != x; then
23617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23618
23619  # Input might be given as Windows format, start by converting to
23620  # unix format.
23621  path="$BOOT_JDK"
23622  new_path=`$CYGPATH -u "$path"`
23623
23624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23627  # "foo.exe" is OK but "foo" is an error.
23628  #
23629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23630  # It is also a way to make sure we got the proper file name for the real test later on.
23631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23632  if test "x$test_shortpath" = x; then
23633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23635    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23636  fi
23637
23638  # Call helper function which possibly converts this using DOS-style short mode.
23639  # If so, the updated path is stored in $new_path.
23640
23641  input_path="$new_path"
23642  # Check if we need to convert this using DOS-style short mode. If the path
23643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23644  # take no chances and rewrite it.
23645  # Note: m4 eats our [], so we need to use [ and ] instead.
23646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23647  if test "x$has_forbidden_chars" != x; then
23648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23652      # Going to short mode and back again did indeed matter. Since short mode is
23653      # case insensitive, let's make it lowercase to improve readability.
23654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23655      # Now convert it back to Unix-style (cygpath)
23656      input_path=`$CYGPATH -u "$shortmode_path"`
23657      new_path="$input_path"
23658    fi
23659  fi
23660
23661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23662  if test "x$test_cygdrive_prefix" = x; then
23663    # As a simple fix, exclude /usr/bin since it's not a real path.
23664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23666      # a path prefixed by /cygdrive for fixpath to work.
23667      new_path="$CYGWIN_ROOT_PATH$input_path"
23668    fi
23669  fi
23670
23671
23672  if test "x$path" != "x$new_path"; then
23673    BOOT_JDK="$new_path"
23674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23676  fi
23677
23678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679
23680  path="$BOOT_JDK"
23681  has_colon=`$ECHO $path | $GREP ^.:`
23682  new_path="$path"
23683  if test "x$has_colon" = x; then
23684    # Not in mixed or Windows style, start by that.
23685    new_path=`cmd //c echo $path`
23686  fi
23687
23688
23689  input_path="$new_path"
23690  # Check if we need to convert this using DOS-style short mode. If the path
23691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23692  # take no chances and rewrite it.
23693  # Note: m4 eats our [], so we need to use [ and ] instead.
23694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23695  if test "x$has_forbidden_chars" != x; then
23696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23698  fi
23699
23700
23701  windows_path="$new_path"
23702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23703    unix_path=`$CYGPATH -u "$windows_path"`
23704    new_path="$unix_path"
23705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23707    new_path="$unix_path"
23708  fi
23709
23710  if test "x$path" != "x$new_path"; then
23711    BOOT_JDK="$new_path"
23712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23714  fi
23715
23716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23718
23719    else
23720      # We're on a unix platform. Hooray! :)
23721      path="$BOOT_JDK"
23722      has_space=`$ECHO "$path" | $GREP " "`
23723      if test "x$has_space" != x; then
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23727      fi
23728
23729      # Use eval to expand a potential ~
23730      eval path="$path"
23731      if test ! -f "$path" && test ! -d "$path"; then
23732        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23733      fi
23734
23735      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23736    fi
23737  fi
23738
23739            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23740$as_echo_n "checking for Boot JDK... " >&6; }
23741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23742$as_echo "$BOOT_JDK" >&6; }
23743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23744$as_echo_n "checking Boot JDK version... " >&6; }
23745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23747$as_echo "$BOOT_JDK_VERSION" >&6; }
23748          fi # end check jdk version
23749        fi # end check javac
23750      fi # end check java
23751    fi # end check boot jdk found
23752  fi
23753
23754    done
23755  fi
23756
23757  fi
23758
23759
23760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23762      # Do we have a bin/java?
23763      if test ! -x "$BOOT_JDK/bin/java"; then
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23766        BOOT_JDK_FOUND=no
23767      else
23768        # Do we have a bin/javac?
23769        if test ! -x "$BOOT_JDK/bin/javac"; then
23770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23774          BOOT_JDK_FOUND=no
23775        else
23776          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23777          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23778
23779          # Extra M4 quote needed to protect [] in grep expression.
23780          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23781          if test "x$FOUND_CORRECT_VERSION" = x; then
23782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23784            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23785$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23786            BOOT_JDK_FOUND=no
23787          else
23788            # We're done! :-)
23789            BOOT_JDK_FOUND=yes
23790
23791  # Only process if variable expands to non-empty
23792
23793  if test "x$BOOT_JDK" != x; then
23794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23795
23796  # Input might be given as Windows format, start by converting to
23797  # unix format.
23798  path="$BOOT_JDK"
23799  new_path=`$CYGPATH -u "$path"`
23800
23801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23804  # "foo.exe" is OK but "foo" is an error.
23805  #
23806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23807  # It is also a way to make sure we got the proper file name for the real test later on.
23808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23809  if test "x$test_shortpath" = x; then
23810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23813  fi
23814
23815  # Call helper function which possibly converts this using DOS-style short mode.
23816  # If so, the updated path is stored in $new_path.
23817
23818  input_path="$new_path"
23819  # Check if we need to convert this using DOS-style short mode. If the path
23820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23821  # take no chances and rewrite it.
23822  # Note: m4 eats our [], so we need to use [ and ] instead.
23823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23824  if test "x$has_forbidden_chars" != x; then
23825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23829      # Going to short mode and back again did indeed matter. Since short mode is
23830      # case insensitive, let's make it lowercase to improve readability.
23831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23832      # Now convert it back to Unix-style (cygpath)
23833      input_path=`$CYGPATH -u "$shortmode_path"`
23834      new_path="$input_path"
23835    fi
23836  fi
23837
23838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23839  if test "x$test_cygdrive_prefix" = x; then
23840    # As a simple fix, exclude /usr/bin since it's not a real path.
23841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23843      # a path prefixed by /cygdrive for fixpath to work.
23844      new_path="$CYGWIN_ROOT_PATH$input_path"
23845    fi
23846  fi
23847
23848
23849  if test "x$path" != "x$new_path"; then
23850    BOOT_JDK="$new_path"
23851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23853  fi
23854
23855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23856
23857  path="$BOOT_JDK"
23858  has_colon=`$ECHO $path | $GREP ^.:`
23859  new_path="$path"
23860  if test "x$has_colon" = x; then
23861    # Not in mixed or Windows style, start by that.
23862    new_path=`cmd //c echo $path`
23863  fi
23864
23865
23866  input_path="$new_path"
23867  # Check if we need to convert this using DOS-style short mode. If the path
23868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23869  # take no chances and rewrite it.
23870  # Note: m4 eats our [], so we need to use [ and ] instead.
23871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23872  if test "x$has_forbidden_chars" != x; then
23873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23875  fi
23876
23877
23878  windows_path="$new_path"
23879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23880    unix_path=`$CYGPATH -u "$windows_path"`
23881    new_path="$unix_path"
23882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23884    new_path="$unix_path"
23885  fi
23886
23887  if test "x$path" != "x$new_path"; then
23888    BOOT_JDK="$new_path"
23889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23891  fi
23892
23893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23895
23896    else
23897      # We're on a unix platform. Hooray! :)
23898      path="$BOOT_JDK"
23899      has_space=`$ECHO "$path" | $GREP " "`
23900      if test "x$has_space" != x; then
23901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23904      fi
23905
23906      # Use eval to expand a potential ~
23907      eval path="$path"
23908      if test ! -f "$path" && test ! -d "$path"; then
23909        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23910      fi
23911
23912      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23913    fi
23914  fi
23915
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925          fi # end check jdk version
23926        fi # end check javac
23927      fi # end check java
23928    fi # end check boot jdk found
23929  fi
23930
23931
23932  if test "x$BOOT_JDK_FOUND" = xno; then
23933    # Now execute the test
23934
23935  if test "x$ProgramFiles" != x; then
23936    VIRTUAL_DIR="$ProgramFiles/Java"
23937
23938  windows_path="$VIRTUAL_DIR"
23939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23940    unix_path=`$CYGPATH -u "$windows_path"`
23941    VIRTUAL_DIR="$unix_path"
23942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23944    VIRTUAL_DIR="$unix_path"
23945  fi
23946
23947
23948  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23949  BOOT_JDK_SUFFIX=""
23950  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23951  if test "x$ALL_JDKS_FOUND" != x; then
23952    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23953
23954  if test "x$BOOT_JDK_FOUND" = xno; then
23955    # Now execute the test
23956
23957        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23958        if test -d "$BOOT_JDK"; then
23959          BOOT_JDK_FOUND=maybe
23960          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23961$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23962        fi
23963
23964
23965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23967      # Do we have a bin/java?
23968      if test ! -x "$BOOT_JDK/bin/java"; then
23969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23971        BOOT_JDK_FOUND=no
23972      else
23973        # Do we have a bin/javac?
23974        if test ! -x "$BOOT_JDK/bin/javac"; then
23975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23979          BOOT_JDK_FOUND=no
23980        else
23981          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23982          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23983
23984          # Extra M4 quote needed to protect [] in grep expression.
23985          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23986          if test "x$FOUND_CORRECT_VERSION" = x; then
23987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23989            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23990$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23991            BOOT_JDK_FOUND=no
23992          else
23993            # We're done! :-)
23994            BOOT_JDK_FOUND=yes
23995
23996  # Only process if variable expands to non-empty
23997
23998  if test "x$BOOT_JDK" != x; then
23999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24000
24001  # Input might be given as Windows format, start by converting to
24002  # unix format.
24003  path="$BOOT_JDK"
24004  new_path=`$CYGPATH -u "$path"`
24005
24006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24009  # "foo.exe" is OK but "foo" is an error.
24010  #
24011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24012  # It is also a way to make sure we got the proper file name for the real test later on.
24013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24014  if test "x$test_shortpath" = x; then
24015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24018  fi
24019
24020  # Call helper function which possibly converts this using DOS-style short mode.
24021  # If so, the updated path is stored in $new_path.
24022
24023  input_path="$new_path"
24024  # Check if we need to convert this using DOS-style short mode. If the path
24025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24026  # take no chances and rewrite it.
24027  # Note: m4 eats our [], so we need to use [ and ] instead.
24028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24029  if test "x$has_forbidden_chars" != x; then
24030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24034      # Going to short mode and back again did indeed matter. Since short mode is
24035      # case insensitive, let's make it lowercase to improve readability.
24036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24037      # Now convert it back to Unix-style (cygpath)
24038      input_path=`$CYGPATH -u "$shortmode_path"`
24039      new_path="$input_path"
24040    fi
24041  fi
24042
24043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24044  if test "x$test_cygdrive_prefix" = x; then
24045    # As a simple fix, exclude /usr/bin since it's not a real path.
24046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24048      # a path prefixed by /cygdrive for fixpath to work.
24049      new_path="$CYGWIN_ROOT_PATH$input_path"
24050    fi
24051  fi
24052
24053
24054  if test "x$path" != "x$new_path"; then
24055    BOOT_JDK="$new_path"
24056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24058  fi
24059
24060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24061
24062  path="$BOOT_JDK"
24063  has_colon=`$ECHO $path | $GREP ^.:`
24064  new_path="$path"
24065  if test "x$has_colon" = x; then
24066    # Not in mixed or Windows style, start by that.
24067    new_path=`cmd //c echo $path`
24068  fi
24069
24070
24071  input_path="$new_path"
24072  # Check if we need to convert this using DOS-style short mode. If the path
24073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24074  # take no chances and rewrite it.
24075  # Note: m4 eats our [], so we need to use [ and ] instead.
24076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24077  if test "x$has_forbidden_chars" != x; then
24078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24080  fi
24081
24082
24083  windows_path="$new_path"
24084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24085    unix_path=`$CYGPATH -u "$windows_path"`
24086    new_path="$unix_path"
24087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24089    new_path="$unix_path"
24090  fi
24091
24092  if test "x$path" != "x$new_path"; then
24093    BOOT_JDK="$new_path"
24094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24096  fi
24097
24098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24100
24101    else
24102      # We're on a unix platform. Hooray! :)
24103      path="$BOOT_JDK"
24104      has_space=`$ECHO "$path" | $GREP " "`
24105      if test "x$has_space" != x; then
24106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24109      fi
24110
24111      # Use eval to expand a potential ~
24112      eval path="$path"
24113      if test ! -f "$path" && test ! -d "$path"; then
24114        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24115      fi
24116
24117      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24118    fi
24119  fi
24120
24121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24122$as_echo_n "checking for Boot JDK... " >&6; }
24123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24124$as_echo "$BOOT_JDK" >&6; }
24125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24126$as_echo_n "checking Boot JDK version... " >&6; }
24127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24129$as_echo "$BOOT_JDK_VERSION" >&6; }
24130          fi # end check jdk version
24131        fi # end check javac
24132      fi # end check java
24133    fi # end check boot jdk found
24134  fi
24135
24136    done
24137  fi
24138
24139  fi
24140
24141
24142    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24143    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24144      # Do we have a bin/java?
24145      if test ! -x "$BOOT_JDK/bin/java"; then
24146        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24148        BOOT_JDK_FOUND=no
24149      else
24150        # Do we have a bin/javac?
24151        if test ! -x "$BOOT_JDK/bin/javac"; then
24152          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24154          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24155$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24156          BOOT_JDK_FOUND=no
24157        else
24158          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24159          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24160
24161          # Extra M4 quote needed to protect [] in grep expression.
24162          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24163          if test "x$FOUND_CORRECT_VERSION" = x; then
24164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24166            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24167$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24168            BOOT_JDK_FOUND=no
24169          else
24170            # We're done! :-)
24171            BOOT_JDK_FOUND=yes
24172
24173  # Only process if variable expands to non-empty
24174
24175  if test "x$BOOT_JDK" != x; then
24176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24177
24178  # Input might be given as Windows format, start by converting to
24179  # unix format.
24180  path="$BOOT_JDK"
24181  new_path=`$CYGPATH -u "$path"`
24182
24183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24186  # "foo.exe" is OK but "foo" is an error.
24187  #
24188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24189  # It is also a way to make sure we got the proper file name for the real test later on.
24190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24191  if test "x$test_shortpath" = x; then
24192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24195  fi
24196
24197  # Call helper function which possibly converts this using DOS-style short mode.
24198  # If so, the updated path is stored in $new_path.
24199
24200  input_path="$new_path"
24201  # Check if we need to convert this using DOS-style short mode. If the path
24202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24203  # take no chances and rewrite it.
24204  # Note: m4 eats our [], so we need to use [ and ] instead.
24205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24206  if test "x$has_forbidden_chars" != x; then
24207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24211      # Going to short mode and back again did indeed matter. Since short mode is
24212      # case insensitive, let's make it lowercase to improve readability.
24213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24214      # Now convert it back to Unix-style (cygpath)
24215      input_path=`$CYGPATH -u "$shortmode_path"`
24216      new_path="$input_path"
24217    fi
24218  fi
24219
24220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24221  if test "x$test_cygdrive_prefix" = x; then
24222    # As a simple fix, exclude /usr/bin since it's not a real path.
24223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24225      # a path prefixed by /cygdrive for fixpath to work.
24226      new_path="$CYGWIN_ROOT_PATH$input_path"
24227    fi
24228  fi
24229
24230
24231  if test "x$path" != "x$new_path"; then
24232    BOOT_JDK="$new_path"
24233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24235  fi
24236
24237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24238
24239  path="$BOOT_JDK"
24240  has_colon=`$ECHO $path | $GREP ^.:`
24241  new_path="$path"
24242  if test "x$has_colon" = x; then
24243    # Not in mixed or Windows style, start by that.
24244    new_path=`cmd //c echo $path`
24245  fi
24246
24247
24248  input_path="$new_path"
24249  # Check if we need to convert this using DOS-style short mode. If the path
24250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24251  # take no chances and rewrite it.
24252  # Note: m4 eats our [], so we need to use [ and ] instead.
24253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24254  if test "x$has_forbidden_chars" != x; then
24255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24257  fi
24258
24259
24260  windows_path="$new_path"
24261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24262    unix_path=`$CYGPATH -u "$windows_path"`
24263    new_path="$unix_path"
24264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24266    new_path="$unix_path"
24267  fi
24268
24269  if test "x$path" != "x$new_path"; then
24270    BOOT_JDK="$new_path"
24271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24273  fi
24274
24275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24277
24278    else
24279      # We're on a unix platform. Hooray! :)
24280      path="$BOOT_JDK"
24281      has_space=`$ECHO "$path" | $GREP " "`
24282      if test "x$has_space" != x; then
24283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24286      fi
24287
24288      # Use eval to expand a potential ~
24289      eval path="$path"
24290      if test ! -f "$path" && test ! -d "$path"; then
24291        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24292      fi
24293
24294      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24295    fi
24296  fi
24297
24298            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24299$as_echo_n "checking for Boot JDK... " >&6; }
24300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24301$as_echo "$BOOT_JDK" >&6; }
24302            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24303$as_echo_n "checking Boot JDK version... " >&6; }
24304            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24306$as_echo "$BOOT_JDK_VERSION" >&6; }
24307          fi # end check jdk version
24308        fi # end check javac
24309      fi # end check java
24310    fi # end check boot jdk found
24311  fi
24312
24313
24314  if test "x$BOOT_JDK_FOUND" = xno; then
24315    # Now execute the test
24316
24317  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24318  BOOT_JDK_SUFFIX=""
24319  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24320  if test "x$ALL_JDKS_FOUND" != x; then
24321    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24322
24323  if test "x$BOOT_JDK_FOUND" = xno; then
24324    # Now execute the test
24325
24326        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24327        if test -d "$BOOT_JDK"; then
24328          BOOT_JDK_FOUND=maybe
24329          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24330$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24331        fi
24332
24333
24334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24336      # Do we have a bin/java?
24337      if test ! -x "$BOOT_JDK/bin/java"; then
24338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24340        BOOT_JDK_FOUND=no
24341      else
24342        # Do we have a bin/javac?
24343        if test ! -x "$BOOT_JDK/bin/javac"; then
24344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24348          BOOT_JDK_FOUND=no
24349        else
24350          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24351          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24352
24353          # Extra M4 quote needed to protect [] in grep expression.
24354          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24355          if test "x$FOUND_CORRECT_VERSION" = x; then
24356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24358            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24360            BOOT_JDK_FOUND=no
24361          else
24362            # We're done! :-)
24363            BOOT_JDK_FOUND=yes
24364
24365  # Only process if variable expands to non-empty
24366
24367  if test "x$BOOT_JDK" != x; then
24368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24369
24370  # Input might be given as Windows format, start by converting to
24371  # unix format.
24372  path="$BOOT_JDK"
24373  new_path=`$CYGPATH -u "$path"`
24374
24375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24378  # "foo.exe" is OK but "foo" is an error.
24379  #
24380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24381  # It is also a way to make sure we got the proper file name for the real test later on.
24382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24383  if test "x$test_shortpath" = x; then
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24387  fi
24388
24389  # Call helper function which possibly converts this using DOS-style short mode.
24390  # If so, the updated path is stored in $new_path.
24391
24392  input_path="$new_path"
24393  # Check if we need to convert this using DOS-style short mode. If the path
24394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24395  # take no chances and rewrite it.
24396  # Note: m4 eats our [], so we need to use [ and ] instead.
24397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24398  if test "x$has_forbidden_chars" != x; then
24399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24403      # Going to short mode and back again did indeed matter. Since short mode is
24404      # case insensitive, let's make it lowercase to improve readability.
24405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24406      # Now convert it back to Unix-style (cygpath)
24407      input_path=`$CYGPATH -u "$shortmode_path"`
24408      new_path="$input_path"
24409    fi
24410  fi
24411
24412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24413  if test "x$test_cygdrive_prefix" = x; then
24414    # As a simple fix, exclude /usr/bin since it's not a real path.
24415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24417      # a path prefixed by /cygdrive for fixpath to work.
24418      new_path="$CYGWIN_ROOT_PATH$input_path"
24419    fi
24420  fi
24421
24422
24423  if test "x$path" != "x$new_path"; then
24424    BOOT_JDK="$new_path"
24425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24427  fi
24428
24429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24430
24431  path="$BOOT_JDK"
24432  has_colon=`$ECHO $path | $GREP ^.:`
24433  new_path="$path"
24434  if test "x$has_colon" = x; then
24435    # Not in mixed or Windows style, start by that.
24436    new_path=`cmd //c echo $path`
24437  fi
24438
24439
24440  input_path="$new_path"
24441  # Check if we need to convert this using DOS-style short mode. If the path
24442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24443  # take no chances and rewrite it.
24444  # Note: m4 eats our [], so we need to use [ and ] instead.
24445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24446  if test "x$has_forbidden_chars" != x; then
24447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24449  fi
24450
24451
24452  windows_path="$new_path"
24453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24454    unix_path=`$CYGPATH -u "$windows_path"`
24455    new_path="$unix_path"
24456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24458    new_path="$unix_path"
24459  fi
24460
24461  if test "x$path" != "x$new_path"; then
24462    BOOT_JDK="$new_path"
24463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24465  fi
24466
24467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24469
24470    else
24471      # We're on a unix platform. Hooray! :)
24472      path="$BOOT_JDK"
24473      has_space=`$ECHO "$path" | $GREP " "`
24474      if test "x$has_space" != x; then
24475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24478      fi
24479
24480      # Use eval to expand a potential ~
24481      eval path="$path"
24482      if test ! -f "$path" && test ! -d "$path"; then
24483        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24484      fi
24485
24486      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24487    fi
24488  fi
24489
24490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24491$as_echo_n "checking for Boot JDK... " >&6; }
24492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24493$as_echo "$BOOT_JDK" >&6; }
24494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24495$as_echo_n "checking Boot JDK version... " >&6; }
24496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24498$as_echo "$BOOT_JDK_VERSION" >&6; }
24499          fi # end check jdk version
24500        fi # end check javac
24501      fi # end check java
24502    fi # end check boot jdk found
24503  fi
24504
24505    done
24506  fi
24507
24508
24509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24511      # Do we have a bin/java?
24512      if test ! -x "$BOOT_JDK/bin/java"; then
24513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24515        BOOT_JDK_FOUND=no
24516      else
24517        # Do we have a bin/javac?
24518        if test ! -x "$BOOT_JDK/bin/javac"; then
24519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24523          BOOT_JDK_FOUND=no
24524        else
24525          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24526          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24527
24528          # Extra M4 quote needed to protect [] in grep expression.
24529          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24530          if test "x$FOUND_CORRECT_VERSION" = x; then
24531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24533            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24534$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24535            BOOT_JDK_FOUND=no
24536          else
24537            # We're done! :-)
24538            BOOT_JDK_FOUND=yes
24539
24540  # Only process if variable expands to non-empty
24541
24542  if test "x$BOOT_JDK" != x; then
24543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24544
24545  # Input might be given as Windows format, start by converting to
24546  # unix format.
24547  path="$BOOT_JDK"
24548  new_path=`$CYGPATH -u "$path"`
24549
24550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24553  # "foo.exe" is OK but "foo" is an error.
24554  #
24555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24556  # It is also a way to make sure we got the proper file name for the real test later on.
24557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24558  if test "x$test_shortpath" = x; then
24559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24562  fi
24563
24564  # Call helper function which possibly converts this using DOS-style short mode.
24565  # If so, the updated path is stored in $new_path.
24566
24567  input_path="$new_path"
24568  # Check if we need to convert this using DOS-style short mode. If the path
24569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24570  # take no chances and rewrite it.
24571  # Note: m4 eats our [], so we need to use [ and ] instead.
24572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24573  if test "x$has_forbidden_chars" != x; then
24574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24578      # Going to short mode and back again did indeed matter. Since short mode is
24579      # case insensitive, let's make it lowercase to improve readability.
24580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24581      # Now convert it back to Unix-style (cygpath)
24582      input_path=`$CYGPATH -u "$shortmode_path"`
24583      new_path="$input_path"
24584    fi
24585  fi
24586
24587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24588  if test "x$test_cygdrive_prefix" = x; then
24589    # As a simple fix, exclude /usr/bin since it's not a real path.
24590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24592      # a path prefixed by /cygdrive for fixpath to work.
24593      new_path="$CYGWIN_ROOT_PATH$input_path"
24594    fi
24595  fi
24596
24597
24598  if test "x$path" != "x$new_path"; then
24599    BOOT_JDK="$new_path"
24600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24602  fi
24603
24604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24605
24606  path="$BOOT_JDK"
24607  has_colon=`$ECHO $path | $GREP ^.:`
24608  new_path="$path"
24609  if test "x$has_colon" = x; then
24610    # Not in mixed or Windows style, start by that.
24611    new_path=`cmd //c echo $path`
24612  fi
24613
24614
24615  input_path="$new_path"
24616  # Check if we need to convert this using DOS-style short mode. If the path
24617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24618  # take no chances and rewrite it.
24619  # Note: m4 eats our [], so we need to use [ and ] instead.
24620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24621  if test "x$has_forbidden_chars" != x; then
24622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24624  fi
24625
24626
24627  windows_path="$new_path"
24628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24629    unix_path=`$CYGPATH -u "$windows_path"`
24630    new_path="$unix_path"
24631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24633    new_path="$unix_path"
24634  fi
24635
24636  if test "x$path" != "x$new_path"; then
24637    BOOT_JDK="$new_path"
24638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24640  fi
24641
24642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24644
24645    else
24646      # We're on a unix platform. Hooray! :)
24647      path="$BOOT_JDK"
24648      has_space=`$ECHO "$path" | $GREP " "`
24649      if test "x$has_space" != x; then
24650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24653      fi
24654
24655      # Use eval to expand a potential ~
24656      eval path="$path"
24657      if test ! -f "$path" && test ! -d "$path"; then
24658        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24659      fi
24660
24661      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24662    fi
24663  fi
24664
24665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24666$as_echo_n "checking for Boot JDK... " >&6; }
24667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24668$as_echo "$BOOT_JDK" >&6; }
24669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24670$as_echo_n "checking Boot JDK version... " >&6; }
24671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24673$as_echo "$BOOT_JDK_VERSION" >&6; }
24674          fi # end check jdk version
24675        fi # end check javac
24676      fi # end check java
24677    fi # end check boot jdk found
24678  fi
24679
24680  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24681
24682  if test "x$BOOT_JDK_FOUND" = xno; then
24683    # Now execute the test
24684
24685  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24686  BOOT_JDK_SUFFIX="/Contents/Home"
24687  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24688  if test "x$ALL_JDKS_FOUND" != x; then
24689    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24690
24691  if test "x$BOOT_JDK_FOUND" = xno; then
24692    # Now execute the test
24693
24694        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24695        if test -d "$BOOT_JDK"; then
24696          BOOT_JDK_FOUND=maybe
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24698$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24699        fi
24700
24701
24702    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24703    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24704      # Do we have a bin/java?
24705      if test ! -x "$BOOT_JDK/bin/java"; then
24706        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24708        BOOT_JDK_FOUND=no
24709      else
24710        # Do we have a bin/javac?
24711        if test ! -x "$BOOT_JDK/bin/javac"; then
24712          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24714          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24715$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24716          BOOT_JDK_FOUND=no
24717        else
24718          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24719          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24720
24721          # Extra M4 quote needed to protect [] in grep expression.
24722          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24723          if test "x$FOUND_CORRECT_VERSION" = x; then
24724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24726            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24727$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24728            BOOT_JDK_FOUND=no
24729          else
24730            # We're done! :-)
24731            BOOT_JDK_FOUND=yes
24732
24733  # Only process if variable expands to non-empty
24734
24735  if test "x$BOOT_JDK" != x; then
24736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24737
24738  # Input might be given as Windows format, start by converting to
24739  # unix format.
24740  path="$BOOT_JDK"
24741  new_path=`$CYGPATH -u "$path"`
24742
24743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24746  # "foo.exe" is OK but "foo" is an error.
24747  #
24748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24749  # It is also a way to make sure we got the proper file name for the real test later on.
24750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24751  if test "x$test_shortpath" = x; then
24752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24755  fi
24756
24757  # Call helper function which possibly converts this using DOS-style short mode.
24758  # If so, the updated path is stored in $new_path.
24759
24760  input_path="$new_path"
24761  # Check if we need to convert this using DOS-style short mode. If the path
24762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24763  # take no chances and rewrite it.
24764  # Note: m4 eats our [], so we need to use [ and ] instead.
24765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24766  if test "x$has_forbidden_chars" != x; then
24767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24771      # Going to short mode and back again did indeed matter. Since short mode is
24772      # case insensitive, let's make it lowercase to improve readability.
24773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24774      # Now convert it back to Unix-style (cygpath)
24775      input_path=`$CYGPATH -u "$shortmode_path"`
24776      new_path="$input_path"
24777    fi
24778  fi
24779
24780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24781  if test "x$test_cygdrive_prefix" = x; then
24782    # As a simple fix, exclude /usr/bin since it's not a real path.
24783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24785      # a path prefixed by /cygdrive for fixpath to work.
24786      new_path="$CYGWIN_ROOT_PATH$input_path"
24787    fi
24788  fi
24789
24790
24791  if test "x$path" != "x$new_path"; then
24792    BOOT_JDK="$new_path"
24793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24795  fi
24796
24797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24798
24799  path="$BOOT_JDK"
24800  has_colon=`$ECHO $path | $GREP ^.:`
24801  new_path="$path"
24802  if test "x$has_colon" = x; then
24803    # Not in mixed or Windows style, start by that.
24804    new_path=`cmd //c echo $path`
24805  fi
24806
24807
24808  input_path="$new_path"
24809  # Check if we need to convert this using DOS-style short mode. If the path
24810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24811  # take no chances and rewrite it.
24812  # Note: m4 eats our [], so we need to use [ and ] instead.
24813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24814  if test "x$has_forbidden_chars" != x; then
24815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24817  fi
24818
24819
24820  windows_path="$new_path"
24821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822    unix_path=`$CYGPATH -u "$windows_path"`
24823    new_path="$unix_path"
24824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24826    new_path="$unix_path"
24827  fi
24828
24829  if test "x$path" != "x$new_path"; then
24830    BOOT_JDK="$new_path"
24831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24833  fi
24834
24835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24837
24838    else
24839      # We're on a unix platform. Hooray! :)
24840      path="$BOOT_JDK"
24841      has_space=`$ECHO "$path" | $GREP " "`
24842      if test "x$has_space" != x; then
24843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24846      fi
24847
24848      # Use eval to expand a potential ~
24849      eval path="$path"
24850      if test ! -f "$path" && test ! -d "$path"; then
24851        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24852      fi
24853
24854      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24855    fi
24856  fi
24857
24858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24859$as_echo_n "checking for Boot JDK... " >&6; }
24860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24861$as_echo "$BOOT_JDK" >&6; }
24862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24863$as_echo_n "checking Boot JDK version... " >&6; }
24864            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24866$as_echo "$BOOT_JDK_VERSION" >&6; }
24867          fi # end check jdk version
24868        fi # end check javac
24869      fi # end check java
24870    fi # end check boot jdk found
24871  fi
24872
24873    done
24874  fi
24875
24876
24877    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24878    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24879      # Do we have a bin/java?
24880      if test ! -x "$BOOT_JDK/bin/java"; then
24881        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24883        BOOT_JDK_FOUND=no
24884      else
24885        # Do we have a bin/javac?
24886        if test ! -x "$BOOT_JDK/bin/javac"; then
24887          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24889          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24890$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24891          BOOT_JDK_FOUND=no
24892        else
24893          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24894          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24895
24896          # Extra M4 quote needed to protect [] in grep expression.
24897          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24898          if test "x$FOUND_CORRECT_VERSION" = x; then
24899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24901            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24902$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24903            BOOT_JDK_FOUND=no
24904          else
24905            # We're done! :-)
24906            BOOT_JDK_FOUND=yes
24907
24908  # Only process if variable expands to non-empty
24909
24910  if test "x$BOOT_JDK" != x; then
24911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912
24913  # Input might be given as Windows format, start by converting to
24914  # unix format.
24915  path="$BOOT_JDK"
24916  new_path=`$CYGPATH -u "$path"`
24917
24918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24921  # "foo.exe" is OK but "foo" is an error.
24922  #
24923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24924  # It is also a way to make sure we got the proper file name for the real test later on.
24925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24926  if test "x$test_shortpath" = x; then
24927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24930  fi
24931
24932  # Call helper function which possibly converts this using DOS-style short mode.
24933  # If so, the updated path is stored in $new_path.
24934
24935  input_path="$new_path"
24936  # Check if we need to convert this using DOS-style short mode. If the path
24937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24938  # take no chances and rewrite it.
24939  # Note: m4 eats our [], so we need to use [ and ] instead.
24940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24941  if test "x$has_forbidden_chars" != x; then
24942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24946      # Going to short mode and back again did indeed matter. Since short mode is
24947      # case insensitive, let's make it lowercase to improve readability.
24948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24949      # Now convert it back to Unix-style (cygpath)
24950      input_path=`$CYGPATH -u "$shortmode_path"`
24951      new_path="$input_path"
24952    fi
24953  fi
24954
24955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24956  if test "x$test_cygdrive_prefix" = x; then
24957    # As a simple fix, exclude /usr/bin since it's not a real path.
24958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24960      # a path prefixed by /cygdrive for fixpath to work.
24961      new_path="$CYGWIN_ROOT_PATH$input_path"
24962    fi
24963  fi
24964
24965
24966  if test "x$path" != "x$new_path"; then
24967    BOOT_JDK="$new_path"
24968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24970  fi
24971
24972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24973
24974  path="$BOOT_JDK"
24975  has_colon=`$ECHO $path | $GREP ^.:`
24976  new_path="$path"
24977  if test "x$has_colon" = x; then
24978    # Not in mixed or Windows style, start by that.
24979    new_path=`cmd //c echo $path`
24980  fi
24981
24982
24983  input_path="$new_path"
24984  # Check if we need to convert this using DOS-style short mode. If the path
24985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24986  # take no chances and rewrite it.
24987  # Note: m4 eats our [], so we need to use [ and ] instead.
24988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24989  if test "x$has_forbidden_chars" != x; then
24990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24992  fi
24993
24994
24995  windows_path="$new_path"
24996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24997    unix_path=`$CYGPATH -u "$windows_path"`
24998    new_path="$unix_path"
24999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25001    new_path="$unix_path"
25002  fi
25003
25004  if test "x$path" != "x$new_path"; then
25005    BOOT_JDK="$new_path"
25006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25008  fi
25009
25010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25012
25013    else
25014      # We're on a unix platform. Hooray! :)
25015      path="$BOOT_JDK"
25016      has_space=`$ECHO "$path" | $GREP " "`
25017      if test "x$has_space" != x; then
25018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25021      fi
25022
25023      # Use eval to expand a potential ~
25024      eval path="$path"
25025      if test ! -f "$path" && test ! -d "$path"; then
25026        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25027      fi
25028
25029      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25030    fi
25031  fi
25032
25033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25034$as_echo_n "checking for Boot JDK... " >&6; }
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25036$as_echo "$BOOT_JDK" >&6; }
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25038$as_echo_n "checking Boot JDK version... " >&6; }
25039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25041$as_echo "$BOOT_JDK_VERSION" >&6; }
25042          fi # end check jdk version
25043        fi # end check javac
25044      fi # end check java
25045    fi # end check boot jdk found
25046  fi
25047
25048
25049  if test "x$BOOT_JDK_FOUND" = xno; then
25050    # Now execute the test
25051
25052  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25053  BOOT_JDK_SUFFIX="/Contents/Home"
25054  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25055  if test "x$ALL_JDKS_FOUND" != x; then
25056    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25057
25058  if test "x$BOOT_JDK_FOUND" = xno; then
25059    # Now execute the test
25060
25061        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25062        if test -d "$BOOT_JDK"; then
25063          BOOT_JDK_FOUND=maybe
25064          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25065$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25066        fi
25067
25068
25069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25071      # Do we have a bin/java?
25072      if test ! -x "$BOOT_JDK/bin/java"; then
25073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25075        BOOT_JDK_FOUND=no
25076      else
25077        # Do we have a bin/javac?
25078        if test ! -x "$BOOT_JDK/bin/javac"; then
25079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25083          BOOT_JDK_FOUND=no
25084        else
25085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25087
25088          # Extra M4 quote needed to protect [] in grep expression.
25089          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25090          if test "x$FOUND_CORRECT_VERSION" = x; then
25091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25095            BOOT_JDK_FOUND=no
25096          else
25097            # We're done! :-)
25098            BOOT_JDK_FOUND=yes
25099
25100  # Only process if variable expands to non-empty
25101
25102  if test "x$BOOT_JDK" != x; then
25103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104
25105  # Input might be given as Windows format, start by converting to
25106  # unix format.
25107  path="$BOOT_JDK"
25108  new_path=`$CYGPATH -u "$path"`
25109
25110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25113  # "foo.exe" is OK but "foo" is an error.
25114  #
25115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25116  # It is also a way to make sure we got the proper file name for the real test later on.
25117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25118  if test "x$test_shortpath" = x; then
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25122  fi
25123
25124  # Call helper function which possibly converts this using DOS-style short mode.
25125  # If so, the updated path is stored in $new_path.
25126
25127  input_path="$new_path"
25128  # Check if we need to convert this using DOS-style short mode. If the path
25129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25130  # take no chances and rewrite it.
25131  # Note: m4 eats our [], so we need to use [ and ] instead.
25132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25133  if test "x$has_forbidden_chars" != x; then
25134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25138      # Going to short mode and back again did indeed matter. Since short mode is
25139      # case insensitive, let's make it lowercase to improve readability.
25140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25141      # Now convert it back to Unix-style (cygpath)
25142      input_path=`$CYGPATH -u "$shortmode_path"`
25143      new_path="$input_path"
25144    fi
25145  fi
25146
25147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25148  if test "x$test_cygdrive_prefix" = x; then
25149    # As a simple fix, exclude /usr/bin since it's not a real path.
25150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25152      # a path prefixed by /cygdrive for fixpath to work.
25153      new_path="$CYGWIN_ROOT_PATH$input_path"
25154    fi
25155  fi
25156
25157
25158  if test "x$path" != "x$new_path"; then
25159    BOOT_JDK="$new_path"
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25162  fi
25163
25164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25165
25166  path="$BOOT_JDK"
25167  has_colon=`$ECHO $path | $GREP ^.:`
25168  new_path="$path"
25169  if test "x$has_colon" = x; then
25170    # Not in mixed or Windows style, start by that.
25171    new_path=`cmd //c echo $path`
25172  fi
25173
25174
25175  input_path="$new_path"
25176  # Check if we need to convert this using DOS-style short mode. If the path
25177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25178  # take no chances and rewrite it.
25179  # Note: m4 eats our [], so we need to use [ and ] instead.
25180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25181  if test "x$has_forbidden_chars" != x; then
25182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25184  fi
25185
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196  if test "x$path" != "x$new_path"; then
25197    BOOT_JDK="$new_path"
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25200  fi
25201
25202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25204
25205    else
25206      # We're on a unix platform. Hooray! :)
25207      path="$BOOT_JDK"
25208      has_space=`$ECHO "$path" | $GREP " "`
25209      if test "x$has_space" != x; then
25210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25213      fi
25214
25215      # Use eval to expand a potential ~
25216      eval path="$path"
25217      if test ! -f "$path" && test ! -d "$path"; then
25218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25219      fi
25220
25221      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25222    fi
25223  fi
25224
25225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25226$as_echo_n "checking for Boot JDK... " >&6; }
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25228$as_echo "$BOOT_JDK" >&6; }
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25230$as_echo_n "checking Boot JDK version... " >&6; }
25231            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25233$as_echo "$BOOT_JDK_VERSION" >&6; }
25234          fi # end check jdk version
25235        fi # end check javac
25236      fi # end check java
25237    fi # end check boot jdk found
25238  fi
25239
25240    done
25241  fi
25242
25243
25244    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25245    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25246      # Do we have a bin/java?
25247      if test ! -x "$BOOT_JDK/bin/java"; then
25248        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25250        BOOT_JDK_FOUND=no
25251      else
25252        # Do we have a bin/javac?
25253        if test ! -x "$BOOT_JDK/bin/javac"; then
25254          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25256          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25257$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25258          BOOT_JDK_FOUND=no
25259        else
25260          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25261          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25262
25263          # Extra M4 quote needed to protect [] in grep expression.
25264          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25265          if test "x$FOUND_CORRECT_VERSION" = x; then
25266            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25268            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25269$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25270            BOOT_JDK_FOUND=no
25271          else
25272            # We're done! :-)
25273            BOOT_JDK_FOUND=yes
25274
25275  # Only process if variable expands to non-empty
25276
25277  if test "x$BOOT_JDK" != x; then
25278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25279
25280  # Input might be given as Windows format, start by converting to
25281  # unix format.
25282  path="$BOOT_JDK"
25283  new_path=`$CYGPATH -u "$path"`
25284
25285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25288  # "foo.exe" is OK but "foo" is an error.
25289  #
25290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25291  # It is also a way to make sure we got the proper file name for the real test later on.
25292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25293  if test "x$test_shortpath" = x; then
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25296    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25297  fi
25298
25299  # Call helper function which possibly converts this using DOS-style short mode.
25300  # If so, the updated path is stored in $new_path.
25301
25302  input_path="$new_path"
25303  # Check if we need to convert this using DOS-style short mode. If the path
25304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25305  # take no chances and rewrite it.
25306  # Note: m4 eats our [], so we need to use [ and ] instead.
25307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25308  if test "x$has_forbidden_chars" != x; then
25309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25313      # Going to short mode and back again did indeed matter. Since short mode is
25314      # case insensitive, let's make it lowercase to improve readability.
25315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25316      # Now convert it back to Unix-style (cygpath)
25317      input_path=`$CYGPATH -u "$shortmode_path"`
25318      new_path="$input_path"
25319    fi
25320  fi
25321
25322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25323  if test "x$test_cygdrive_prefix" = x; then
25324    # As a simple fix, exclude /usr/bin since it's not a real path.
25325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25327      # a path prefixed by /cygdrive for fixpath to work.
25328      new_path="$CYGWIN_ROOT_PATH$input_path"
25329    fi
25330  fi
25331
25332
25333  if test "x$path" != "x$new_path"; then
25334    BOOT_JDK="$new_path"
25335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25336$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25337  fi
25338
25339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25340
25341  path="$BOOT_JDK"
25342  has_colon=`$ECHO $path | $GREP ^.:`
25343  new_path="$path"
25344  if test "x$has_colon" = x; then
25345    # Not in mixed or Windows style, start by that.
25346    new_path=`cmd //c echo $path`
25347  fi
25348
25349
25350  input_path="$new_path"
25351  # Check if we need to convert this using DOS-style short mode. If the path
25352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25353  # take no chances and rewrite it.
25354  # Note: m4 eats our [], so we need to use [ and ] instead.
25355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25356  if test "x$has_forbidden_chars" != x; then
25357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25359  fi
25360
25361
25362  windows_path="$new_path"
25363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25364    unix_path=`$CYGPATH -u "$windows_path"`
25365    new_path="$unix_path"
25366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25368    new_path="$unix_path"
25369  fi
25370
25371  if test "x$path" != "x$new_path"; then
25372    BOOT_JDK="$new_path"
25373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25375  fi
25376
25377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25379
25380    else
25381      # We're on a unix platform. Hooray! :)
25382      path="$BOOT_JDK"
25383      has_space=`$ECHO "$path" | $GREP " "`
25384      if test "x$has_space" != x; then
25385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25387        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25388      fi
25389
25390      # Use eval to expand a potential ~
25391      eval path="$path"
25392      if test ! -f "$path" && test ! -d "$path"; then
25393        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25394      fi
25395
25396      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25397    fi
25398  fi
25399
25400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25401$as_echo_n "checking for Boot JDK... " >&6; }
25402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25403$as_echo "$BOOT_JDK" >&6; }
25404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25405$as_echo_n "checking Boot JDK version... " >&6; }
25406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25408$as_echo "$BOOT_JDK_VERSION" >&6; }
25409          fi # end check jdk version
25410        fi # end check javac
25411      fi # end check java
25412    fi # end check boot jdk found
25413  fi
25414
25415  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25416
25417  if test "x$BOOT_JDK_FOUND" = xno; then
25418    # Now execute the test
25419
25420  BOOT_JDK_PREFIX="/usr/lib/jvm"
25421  BOOT_JDK_SUFFIX=""
25422  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25423  if test "x$ALL_JDKS_FOUND" != x; then
25424    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25425
25426  if test "x$BOOT_JDK_FOUND" = xno; then
25427    # Now execute the test
25428
25429        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25430        if test -d "$BOOT_JDK"; then
25431          BOOT_JDK_FOUND=maybe
25432          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25433$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25434        fi
25435
25436
25437    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25438    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25439      # Do we have a bin/java?
25440      if test ! -x "$BOOT_JDK/bin/java"; then
25441        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25443        BOOT_JDK_FOUND=no
25444      else
25445        # Do we have a bin/javac?
25446        if test ! -x "$BOOT_JDK/bin/javac"; then
25447          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25449          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25450$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25451          BOOT_JDK_FOUND=no
25452        else
25453          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25454          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25455
25456          # Extra M4 quote needed to protect [] in grep expression.
25457          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25458          if test "x$FOUND_CORRECT_VERSION" = x; then
25459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25461            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25462$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25463            BOOT_JDK_FOUND=no
25464          else
25465            # We're done! :-)
25466            BOOT_JDK_FOUND=yes
25467
25468  # Only process if variable expands to non-empty
25469
25470  if test "x$BOOT_JDK" != x; then
25471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25472
25473  # Input might be given as Windows format, start by converting to
25474  # unix format.
25475  path="$BOOT_JDK"
25476  new_path=`$CYGPATH -u "$path"`
25477
25478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25481  # "foo.exe" is OK but "foo" is an error.
25482  #
25483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25484  # It is also a way to make sure we got the proper file name for the real test later on.
25485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25486  if test "x$test_shortpath" = x; then
25487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25489    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25490  fi
25491
25492  # Call helper function which possibly converts this using DOS-style short mode.
25493  # If so, the updated path is stored in $new_path.
25494
25495  input_path="$new_path"
25496  # Check if we need to convert this using DOS-style short mode. If the path
25497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25498  # take no chances and rewrite it.
25499  # Note: m4 eats our [], so we need to use [ and ] instead.
25500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25501  if test "x$has_forbidden_chars" != x; then
25502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25506      # Going to short mode and back again did indeed matter. Since short mode is
25507      # case insensitive, let's make it lowercase to improve readability.
25508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25509      # Now convert it back to Unix-style (cygpath)
25510      input_path=`$CYGPATH -u "$shortmode_path"`
25511      new_path="$input_path"
25512    fi
25513  fi
25514
25515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25516  if test "x$test_cygdrive_prefix" = x; then
25517    # As a simple fix, exclude /usr/bin since it's not a real path.
25518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25520      # a path prefixed by /cygdrive for fixpath to work.
25521      new_path="$CYGWIN_ROOT_PATH$input_path"
25522    fi
25523  fi
25524
25525
25526  if test "x$path" != "x$new_path"; then
25527    BOOT_JDK="$new_path"
25528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25530  fi
25531
25532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25533
25534  path="$BOOT_JDK"
25535  has_colon=`$ECHO $path | $GREP ^.:`
25536  new_path="$path"
25537  if test "x$has_colon" = x; then
25538    # Not in mixed or Windows style, start by that.
25539    new_path=`cmd //c echo $path`
25540  fi
25541
25542
25543  input_path="$new_path"
25544  # Check if we need to convert this using DOS-style short mode. If the path
25545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25546  # take no chances and rewrite it.
25547  # Note: m4 eats our [], so we need to use [ and ] instead.
25548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25549  if test "x$has_forbidden_chars" != x; then
25550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25552  fi
25553
25554
25555  windows_path="$new_path"
25556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25557    unix_path=`$CYGPATH -u "$windows_path"`
25558    new_path="$unix_path"
25559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25561    new_path="$unix_path"
25562  fi
25563
25564  if test "x$path" != "x$new_path"; then
25565    BOOT_JDK="$new_path"
25566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25568  fi
25569
25570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25572
25573    else
25574      # We're on a unix platform. Hooray! :)
25575      path="$BOOT_JDK"
25576      has_space=`$ECHO "$path" | $GREP " "`
25577      if test "x$has_space" != x; then
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25581      fi
25582
25583      # Use eval to expand a potential ~
25584      eval path="$path"
25585      if test ! -f "$path" && test ! -d "$path"; then
25586        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25587      fi
25588
25589      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25590    fi
25591  fi
25592
25593            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25594$as_echo_n "checking for Boot JDK... " >&6; }
25595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25596$as_echo "$BOOT_JDK" >&6; }
25597            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25598$as_echo_n "checking Boot JDK version... " >&6; }
25599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25601$as_echo "$BOOT_JDK_VERSION" >&6; }
25602          fi # end check jdk version
25603        fi # end check javac
25604      fi # end check java
25605    fi # end check boot jdk found
25606  fi
25607
25608    done
25609  fi
25610
25611
25612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25614      # Do we have a bin/java?
25615      if test ! -x "$BOOT_JDK/bin/java"; then
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25618        BOOT_JDK_FOUND=no
25619      else
25620        # Do we have a bin/javac?
25621        if test ! -x "$BOOT_JDK/bin/javac"; then
25622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25626          BOOT_JDK_FOUND=no
25627        else
25628          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25629          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25630
25631          # Extra M4 quote needed to protect [] in grep expression.
25632          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25633          if test "x$FOUND_CORRECT_VERSION" = x; then
25634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25636            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25637$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25638            BOOT_JDK_FOUND=no
25639          else
25640            # We're done! :-)
25641            BOOT_JDK_FOUND=yes
25642
25643  # Only process if variable expands to non-empty
25644
25645  if test "x$BOOT_JDK" != x; then
25646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25647
25648  # Input might be given as Windows format, start by converting to
25649  # unix format.
25650  path="$BOOT_JDK"
25651  new_path=`$CYGPATH -u "$path"`
25652
25653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25656  # "foo.exe" is OK but "foo" is an error.
25657  #
25658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25659  # It is also a way to make sure we got the proper file name for the real test later on.
25660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25661  if test "x$test_shortpath" = x; then
25662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25664    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25665  fi
25666
25667  # Call helper function which possibly converts this using DOS-style short mode.
25668  # If so, the updated path is stored in $new_path.
25669
25670  input_path="$new_path"
25671  # Check if we need to convert this using DOS-style short mode. If the path
25672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25673  # take no chances and rewrite it.
25674  # Note: m4 eats our [], so we need to use [ and ] instead.
25675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25676  if test "x$has_forbidden_chars" != x; then
25677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25681      # Going to short mode and back again did indeed matter. Since short mode is
25682      # case insensitive, let's make it lowercase to improve readability.
25683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25684      # Now convert it back to Unix-style (cygpath)
25685      input_path=`$CYGPATH -u "$shortmode_path"`
25686      new_path="$input_path"
25687    fi
25688  fi
25689
25690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25691  if test "x$test_cygdrive_prefix" = x; then
25692    # As a simple fix, exclude /usr/bin since it's not a real path.
25693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25695      # a path prefixed by /cygdrive for fixpath to work.
25696      new_path="$CYGWIN_ROOT_PATH$input_path"
25697    fi
25698  fi
25699
25700
25701  if test "x$path" != "x$new_path"; then
25702    BOOT_JDK="$new_path"
25703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25705  fi
25706
25707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25708
25709  path="$BOOT_JDK"
25710  has_colon=`$ECHO $path | $GREP ^.:`
25711  new_path="$path"
25712  if test "x$has_colon" = x; then
25713    # Not in mixed or Windows style, start by that.
25714    new_path=`cmd //c echo $path`
25715  fi
25716
25717
25718  input_path="$new_path"
25719  # Check if we need to convert this using DOS-style short mode. If the path
25720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25721  # take no chances and rewrite it.
25722  # Note: m4 eats our [], so we need to use [ and ] instead.
25723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25724  if test "x$has_forbidden_chars" != x; then
25725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25727  fi
25728
25729
25730  windows_path="$new_path"
25731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25732    unix_path=`$CYGPATH -u "$windows_path"`
25733    new_path="$unix_path"
25734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25736    new_path="$unix_path"
25737  fi
25738
25739  if test "x$path" != "x$new_path"; then
25740    BOOT_JDK="$new_path"
25741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25743  fi
25744
25745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25747
25748    else
25749      # We're on a unix platform. Hooray! :)
25750      path="$BOOT_JDK"
25751      has_space=`$ECHO "$path" | $GREP " "`
25752      if test "x$has_space" != x; then
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25756      fi
25757
25758      # Use eval to expand a potential ~
25759      eval path="$path"
25760      if test ! -f "$path" && test ! -d "$path"; then
25761        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25762      fi
25763
25764      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25765    fi
25766  fi
25767
25768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25769$as_echo_n "checking for Boot JDK... " >&6; }
25770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25771$as_echo "$BOOT_JDK" >&6; }
25772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25773$as_echo_n "checking Boot JDK version... " >&6; }
25774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25776$as_echo "$BOOT_JDK_VERSION" >&6; }
25777          fi # end check jdk version
25778        fi # end check javac
25779      fi # end check java
25780    fi # end check boot jdk found
25781  fi
25782
25783  fi
25784
25785
25786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25788      # Do we have a bin/java?
25789      if test ! -x "$BOOT_JDK/bin/java"; then
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25792        BOOT_JDK_FOUND=no
25793      else
25794        # Do we have a bin/javac?
25795        if test ! -x "$BOOT_JDK/bin/javac"; then
25796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25800          BOOT_JDK_FOUND=no
25801        else
25802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25804
25805          # Extra M4 quote needed to protect [] in grep expression.
25806          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25807          if test "x$FOUND_CORRECT_VERSION" = x; then
25808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25812            BOOT_JDK_FOUND=no
25813          else
25814            # We're done! :-)
25815            BOOT_JDK_FOUND=yes
25816
25817  # Only process if variable expands to non-empty
25818
25819  if test "x$BOOT_JDK" != x; then
25820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821
25822  # Input might be given as Windows format, start by converting to
25823  # unix format.
25824  path="$BOOT_JDK"
25825  new_path=`$CYGPATH -u "$path"`
25826
25827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25830  # "foo.exe" is OK but "foo" is an error.
25831  #
25832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25833  # It is also a way to make sure we got the proper file name for the real test later on.
25834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25835  if test "x$test_shortpath" = x; then
25836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25839  fi
25840
25841  # Call helper function which possibly converts this using DOS-style short mode.
25842  # If so, the updated path is stored in $new_path.
25843
25844  input_path="$new_path"
25845  # Check if we need to convert this using DOS-style short mode. If the path
25846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25847  # take no chances and rewrite it.
25848  # Note: m4 eats our [], so we need to use [ and ] instead.
25849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25850  if test "x$has_forbidden_chars" != x; then
25851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25855      # Going to short mode and back again did indeed matter. Since short mode is
25856      # case insensitive, let's make it lowercase to improve readability.
25857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25858      # Now convert it back to Unix-style (cygpath)
25859      input_path=`$CYGPATH -u "$shortmode_path"`
25860      new_path="$input_path"
25861    fi
25862  fi
25863
25864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25865  if test "x$test_cygdrive_prefix" = x; then
25866    # As a simple fix, exclude /usr/bin since it's not a real path.
25867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25869      # a path prefixed by /cygdrive for fixpath to work.
25870      new_path="$CYGWIN_ROOT_PATH$input_path"
25871    fi
25872  fi
25873
25874
25875  if test "x$path" != "x$new_path"; then
25876    BOOT_JDK="$new_path"
25877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25879  fi
25880
25881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882
25883  path="$BOOT_JDK"
25884  has_colon=`$ECHO $path | $GREP ^.:`
25885  new_path="$path"
25886  if test "x$has_colon" = x; then
25887    # Not in mixed or Windows style, start by that.
25888    new_path=`cmd //c echo $path`
25889  fi
25890
25891
25892  input_path="$new_path"
25893  # Check if we need to convert this using DOS-style short mode. If the path
25894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25895  # take no chances and rewrite it.
25896  # Note: m4 eats our [], so we need to use [ and ] instead.
25897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25898  if test "x$has_forbidden_chars" != x; then
25899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25901  fi
25902
25903
25904  windows_path="$new_path"
25905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25906    unix_path=`$CYGPATH -u "$windows_path"`
25907    new_path="$unix_path"
25908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25910    new_path="$unix_path"
25911  fi
25912
25913  if test "x$path" != "x$new_path"; then
25914    BOOT_JDK="$new_path"
25915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25917  fi
25918
25919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25921
25922    else
25923      # We're on a unix platform. Hooray! :)
25924      path="$BOOT_JDK"
25925      has_space=`$ECHO "$path" | $GREP " "`
25926      if test "x$has_space" != x; then
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25930      fi
25931
25932      # Use eval to expand a potential ~
25933      eval path="$path"
25934      if test ! -f "$path" && test ! -d "$path"; then
25935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25936      fi
25937
25938      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25939    fi
25940  fi
25941
25942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25943$as_echo_n "checking for Boot JDK... " >&6; }
25944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25945$as_echo "$BOOT_JDK" >&6; }
25946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25947$as_echo_n "checking Boot JDK version... " >&6; }
25948            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25950$as_echo "$BOOT_JDK_VERSION" >&6; }
25951          fi # end check jdk version
25952        fi # end check javac
25953      fi # end check java
25954    fi # end check boot jdk found
25955  fi
25956
25957
25958  # If we haven't found anything yet, we've truly lost. Give up.
25959  if test "x$BOOT_JDK_FOUND" = xno; then
25960
25961  # Print a helpful message on how to acquire the necessary build dependency.
25962  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25963  MISSING_DEPENDENCY=openjdk
25964
25965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25966    cygwin_help $MISSING_DEPENDENCY
25967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25968    msys_help $MISSING_DEPENDENCY
25969  else
25970    PKGHANDLER_COMMAND=
25971
25972    case $PKGHANDLER in
25973      apt-get)
25974        apt_help     $MISSING_DEPENDENCY ;;
25975      yum)
25976        yum_help     $MISSING_DEPENDENCY ;;
25977      port)
25978        port_help    $MISSING_DEPENDENCY ;;
25979      pkgutil)
25980        pkgutil_help $MISSING_DEPENDENCY ;;
25981      pkgadd)
25982        pkgadd_help  $MISSING_DEPENDENCY ;;
25983    esac
25984
25985    if test "x$PKGHANDLER_COMMAND" != x; then
25986      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25987    fi
25988  fi
25989
25990    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25991$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25992    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25993$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25994    as_fn_error $? "Cannot continue" "$LINENO" 5
25995  fi
25996
25997
25998
25999  # Setup tools from the Boot JDK.
26000
26001  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26002
26003  # Publish this variable in the help.
26004
26005
26006  if test "x$JAVA" = x; then
26007    # The variable is not set by user, try to locate tool using the code snippet
26008
26009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26010$as_echo_n "checking for java in Boot JDK... " >&6; }
26011      JAVA=$BOOT_JDK/bin/java
26012      if test ! -x $JAVA; then
26013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26014$as_echo "not found" >&6; }
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26016$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26017        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26018      fi
26019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26020$as_echo "ok" >&6; }
26021
26022
26023  else
26024    # The variable is set, but is it from the command line or the environment?
26025
26026    # Try to remove the string !JAVA! from our list.
26027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26029      # If it failed, the variable was not from the command line. Ignore it,
26030      # but warn the user (except for BASH, which is always set by the calling BASH).
26031      if test "xJAVA" != xBASH; then
26032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26033$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26034      fi
26035      # Try to locate tool using the code snippet
26036
26037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26038$as_echo_n "checking for java in Boot JDK... " >&6; }
26039      JAVA=$BOOT_JDK/bin/java
26040      if test ! -x $JAVA; then
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26042$as_echo "not found" >&6; }
26043        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26044$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26045        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26046      fi
26047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26048$as_echo "ok" >&6; }
26049
26050
26051    else
26052      # If it succeeded, then it was overridden by the user. We will use it
26053      # for the tool.
26054
26055      # First remove it from the list of overridden variables, so we can test
26056      # for unknown variables in the end.
26057      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26058
26059      # Check if the provided tool contains a complete path.
26060      tool_specified="$JAVA"
26061      tool_basename="${tool_specified##*/}"
26062      if test "x$tool_basename" = "x$tool_specified"; then
26063        # A command without a complete path is provided, search $PATH.
26064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26065$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26066        # Extract the first word of "$tool_basename", so it can be a program name with args.
26067set dummy $tool_basename; ac_word=$2
26068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26069$as_echo_n "checking for $ac_word... " >&6; }
26070if ${ac_cv_path_JAVA+:} false; then :
26071  $as_echo_n "(cached) " >&6
26072else
26073  case $JAVA in
26074  [\\/]* | ?:[\\/]*)
26075  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26076  ;;
26077  *)
26078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26079for as_dir in $PATH
26080do
26081  IFS=$as_save_IFS
26082  test -z "$as_dir" && as_dir=.
26083    for ac_exec_ext in '' $ac_executable_extensions; do
26084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26085    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26087    break 2
26088  fi
26089done
26090  done
26091IFS=$as_save_IFS
26092
26093  ;;
26094esac
26095fi
26096JAVA=$ac_cv_path_JAVA
26097if test -n "$JAVA"; then
26098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26099$as_echo "$JAVA" >&6; }
26100else
26101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26102$as_echo "no" >&6; }
26103fi
26104
26105
26106        if test "x$JAVA" = x; then
26107          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26108        fi
26109      else
26110        # Otherwise we believe it is a complete path. Use it as it is.
26111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26112$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26114$as_echo_n "checking for JAVA... " >&6; }
26115        if test ! -x "$tool_specified"; then
26116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26117$as_echo "not found" >&6; }
26118          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26119        fi
26120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26121$as_echo "$tool_specified" >&6; }
26122      fi
26123    fi
26124  fi
26125
26126
26127
26128  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26129
26130  # Publish this variable in the help.
26131
26132
26133  if test "x$JAVAC" = x; then
26134    # The variable is not set by user, try to locate tool using the code snippet
26135
26136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26137$as_echo_n "checking for javac in Boot JDK... " >&6; }
26138      JAVAC=$BOOT_JDK/bin/javac
26139      if test ! -x $JAVAC; then
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26141$as_echo "not found" >&6; }
26142        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26143$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26144        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26145      fi
26146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26147$as_echo "ok" >&6; }
26148
26149
26150  else
26151    # The variable is set, but is it from the command line or the environment?
26152
26153    # Try to remove the string !JAVAC! from our list.
26154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26156      # If it failed, the variable was not from the command line. Ignore it,
26157      # but warn the user (except for BASH, which is always set by the calling BASH).
26158      if test "xJAVAC" != xBASH; then
26159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26160$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26161      fi
26162      # Try to locate tool using the code snippet
26163
26164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26165$as_echo_n "checking for javac in Boot JDK... " >&6; }
26166      JAVAC=$BOOT_JDK/bin/javac
26167      if test ! -x $JAVAC; then
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26169$as_echo "not found" >&6; }
26170        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26171$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26172        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26173      fi
26174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26175$as_echo "ok" >&6; }
26176
26177
26178    else
26179      # If it succeeded, then it was overridden by the user. We will use it
26180      # for the tool.
26181
26182      # First remove it from the list of overridden variables, so we can test
26183      # for unknown variables in the end.
26184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26185
26186      # Check if the provided tool contains a complete path.
26187      tool_specified="$JAVAC"
26188      tool_basename="${tool_specified##*/}"
26189      if test "x$tool_basename" = "x$tool_specified"; then
26190        # A command without a complete path is provided, search $PATH.
26191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26192$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26193        # Extract the first word of "$tool_basename", so it can be a program name with args.
26194set dummy $tool_basename; ac_word=$2
26195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26196$as_echo_n "checking for $ac_word... " >&6; }
26197if ${ac_cv_path_JAVAC+:} false; then :
26198  $as_echo_n "(cached) " >&6
26199else
26200  case $JAVAC in
26201  [\\/]* | ?:[\\/]*)
26202  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26203  ;;
26204  *)
26205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26206for as_dir in $PATH
26207do
26208  IFS=$as_save_IFS
26209  test -z "$as_dir" && as_dir=.
26210    for ac_exec_ext in '' $ac_executable_extensions; do
26211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26212    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26214    break 2
26215  fi
26216done
26217  done
26218IFS=$as_save_IFS
26219
26220  ;;
26221esac
26222fi
26223JAVAC=$ac_cv_path_JAVAC
26224if test -n "$JAVAC"; then
26225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26226$as_echo "$JAVAC" >&6; }
26227else
26228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26229$as_echo "no" >&6; }
26230fi
26231
26232
26233        if test "x$JAVAC" = x; then
26234          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26235        fi
26236      else
26237        # Otherwise we believe it is a complete path. Use it as it is.
26238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26239$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26241$as_echo_n "checking for JAVAC... " >&6; }
26242        if test ! -x "$tool_specified"; then
26243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26244$as_echo "not found" >&6; }
26245          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26246        fi
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26248$as_echo "$tool_specified" >&6; }
26249      fi
26250    fi
26251  fi
26252
26253
26254
26255  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26256
26257  # Publish this variable in the help.
26258
26259
26260  if test "x$JAVAH" = x; then
26261    # The variable is not set by user, try to locate tool using the code snippet
26262
26263      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26264$as_echo_n "checking for javah in Boot JDK... " >&6; }
26265      JAVAH=$BOOT_JDK/bin/javah
26266      if test ! -x $JAVAH; then
26267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26268$as_echo "not found" >&6; }
26269        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26270$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26271        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26272      fi
26273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26274$as_echo "ok" >&6; }
26275
26276
26277  else
26278    # The variable is set, but is it from the command line or the environment?
26279
26280    # Try to remove the string !JAVAH! from our list.
26281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26283      # If it failed, the variable was not from the command line. Ignore it,
26284      # but warn the user (except for BASH, which is always set by the calling BASH).
26285      if test "xJAVAH" != xBASH; then
26286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26287$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26288      fi
26289      # Try to locate tool using the code snippet
26290
26291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26292$as_echo_n "checking for javah in Boot JDK... " >&6; }
26293      JAVAH=$BOOT_JDK/bin/javah
26294      if test ! -x $JAVAH; then
26295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26296$as_echo "not found" >&6; }
26297        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26298$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26299        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26300      fi
26301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26302$as_echo "ok" >&6; }
26303
26304
26305    else
26306      # If it succeeded, then it was overridden by the user. We will use it
26307      # for the tool.
26308
26309      # First remove it from the list of overridden variables, so we can test
26310      # for unknown variables in the end.
26311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26312
26313      # Check if the provided tool contains a complete path.
26314      tool_specified="$JAVAH"
26315      tool_basename="${tool_specified##*/}"
26316      if test "x$tool_basename" = "x$tool_specified"; then
26317        # A command without a complete path is provided, search $PATH.
26318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26319$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26320        # Extract the first word of "$tool_basename", so it can be a program name with args.
26321set dummy $tool_basename; ac_word=$2
26322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26323$as_echo_n "checking for $ac_word... " >&6; }
26324if ${ac_cv_path_JAVAH+:} false; then :
26325  $as_echo_n "(cached) " >&6
26326else
26327  case $JAVAH in
26328  [\\/]* | ?:[\\/]*)
26329  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26330  ;;
26331  *)
26332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26333for as_dir in $PATH
26334do
26335  IFS=$as_save_IFS
26336  test -z "$as_dir" && as_dir=.
26337    for ac_exec_ext in '' $ac_executable_extensions; do
26338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26339    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26341    break 2
26342  fi
26343done
26344  done
26345IFS=$as_save_IFS
26346
26347  ;;
26348esac
26349fi
26350JAVAH=$ac_cv_path_JAVAH
26351if test -n "$JAVAH"; then
26352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26353$as_echo "$JAVAH" >&6; }
26354else
26355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26356$as_echo "no" >&6; }
26357fi
26358
26359
26360        if test "x$JAVAH" = x; then
26361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26362        fi
26363      else
26364        # Otherwise we believe it is a complete path. Use it as it is.
26365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26366$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26368$as_echo_n "checking for JAVAH... " >&6; }
26369        if test ! -x "$tool_specified"; then
26370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26371$as_echo "not found" >&6; }
26372          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26373        fi
26374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26375$as_echo "$tool_specified" >&6; }
26376      fi
26377    fi
26378  fi
26379
26380
26381
26382  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26383
26384  # Publish this variable in the help.
26385
26386
26387  if test "x$JAR" = x; then
26388    # The variable is not set by user, try to locate tool using the code snippet
26389
26390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26391$as_echo_n "checking for jar in Boot JDK... " >&6; }
26392      JAR=$BOOT_JDK/bin/jar
26393      if test ! -x $JAR; then
26394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26395$as_echo "not found" >&6; }
26396        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26397$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26398        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26399      fi
26400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26401$as_echo "ok" >&6; }
26402
26403
26404  else
26405    # The variable is set, but is it from the command line or the environment?
26406
26407    # Try to remove the string !JAR! from our list.
26408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26410      # If it failed, the variable was not from the command line. Ignore it,
26411      # but warn the user (except for BASH, which is always set by the calling BASH).
26412      if test "xJAR" != xBASH; then
26413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26414$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26415      fi
26416      # Try to locate tool using the code snippet
26417
26418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26419$as_echo_n "checking for jar in Boot JDK... " >&6; }
26420      JAR=$BOOT_JDK/bin/jar
26421      if test ! -x $JAR; then
26422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26423$as_echo "not found" >&6; }
26424        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26425$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26426        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26427      fi
26428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26429$as_echo "ok" >&6; }
26430
26431
26432    else
26433      # If it succeeded, then it was overridden by the user. We will use it
26434      # for the tool.
26435
26436      # First remove it from the list of overridden variables, so we can test
26437      # for unknown variables in the end.
26438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26439
26440      # Check if the provided tool contains a complete path.
26441      tool_specified="$JAR"
26442      tool_basename="${tool_specified##*/}"
26443      if test "x$tool_basename" = "x$tool_specified"; then
26444        # A command without a complete path is provided, search $PATH.
26445        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26446$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26447        # Extract the first word of "$tool_basename", so it can be a program name with args.
26448set dummy $tool_basename; ac_word=$2
26449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26450$as_echo_n "checking for $ac_word... " >&6; }
26451if ${ac_cv_path_JAR+:} false; then :
26452  $as_echo_n "(cached) " >&6
26453else
26454  case $JAR in
26455  [\\/]* | ?:[\\/]*)
26456  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26457  ;;
26458  *)
26459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26460for as_dir in $PATH
26461do
26462  IFS=$as_save_IFS
26463  test -z "$as_dir" && as_dir=.
26464    for ac_exec_ext in '' $ac_executable_extensions; do
26465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26466    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26468    break 2
26469  fi
26470done
26471  done
26472IFS=$as_save_IFS
26473
26474  ;;
26475esac
26476fi
26477JAR=$ac_cv_path_JAR
26478if test -n "$JAR"; then
26479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26480$as_echo "$JAR" >&6; }
26481else
26482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26483$as_echo "no" >&6; }
26484fi
26485
26486
26487        if test "x$JAR" = x; then
26488          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26489        fi
26490      else
26491        # Otherwise we believe it is a complete path. Use it as it is.
26492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26493$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26495$as_echo_n "checking for JAR... " >&6; }
26496        if test ! -x "$tool_specified"; then
26497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26498$as_echo "not found" >&6; }
26499          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26500        fi
26501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26502$as_echo "$tool_specified" >&6; }
26503      fi
26504    fi
26505  fi
26506
26507
26508
26509  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26510
26511  # Publish this variable in the help.
26512
26513
26514  if test "x$JARSIGNER" = x; then
26515    # The variable is not set by user, try to locate tool using the code snippet
26516
26517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26518$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26519      JARSIGNER=$BOOT_JDK/bin/jarsigner
26520      if test ! -x $JARSIGNER; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26522$as_echo "not found" >&6; }
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26524$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26525        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26526      fi
26527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26528$as_echo "ok" >&6; }
26529
26530
26531  else
26532    # The variable is set, but is it from the command line or the environment?
26533
26534    # Try to remove the string !JARSIGNER! from our list.
26535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26537      # If it failed, the variable was not from the command line. Ignore it,
26538      # but warn the user (except for BASH, which is always set by the calling BASH).
26539      if test "xJARSIGNER" != xBASH; then
26540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26541$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26542      fi
26543      # Try to locate tool using the code snippet
26544
26545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26546$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26547      JARSIGNER=$BOOT_JDK/bin/jarsigner
26548      if test ! -x $JARSIGNER; then
26549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26550$as_echo "not found" >&6; }
26551        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26552$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26553        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26554      fi
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26556$as_echo "ok" >&6; }
26557
26558
26559    else
26560      # If it succeeded, then it was overridden by the user. We will use it
26561      # for the tool.
26562
26563      # First remove it from the list of overridden variables, so we can test
26564      # for unknown variables in the end.
26565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26566
26567      # Check if the provided tool contains a complete path.
26568      tool_specified="$JARSIGNER"
26569      tool_basename="${tool_specified##*/}"
26570      if test "x$tool_basename" = "x$tool_specified"; then
26571        # A command without a complete path is provided, search $PATH.
26572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26573$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26574        # Extract the first word of "$tool_basename", so it can be a program name with args.
26575set dummy $tool_basename; ac_word=$2
26576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26577$as_echo_n "checking for $ac_word... " >&6; }
26578if ${ac_cv_path_JARSIGNER+:} false; then :
26579  $as_echo_n "(cached) " >&6
26580else
26581  case $JARSIGNER in
26582  [\\/]* | ?:[\\/]*)
26583  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26584  ;;
26585  *)
26586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26587for as_dir in $PATH
26588do
26589  IFS=$as_save_IFS
26590  test -z "$as_dir" && as_dir=.
26591    for ac_exec_ext in '' $ac_executable_extensions; do
26592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26593    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26595    break 2
26596  fi
26597done
26598  done
26599IFS=$as_save_IFS
26600
26601  ;;
26602esac
26603fi
26604JARSIGNER=$ac_cv_path_JARSIGNER
26605if test -n "$JARSIGNER"; then
26606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26607$as_echo "$JARSIGNER" >&6; }
26608else
26609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26610$as_echo "no" >&6; }
26611fi
26612
26613
26614        if test "x$JARSIGNER" = x; then
26615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26616        fi
26617      else
26618        # Otherwise we believe it is a complete path. Use it as it is.
26619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26620$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26622$as_echo_n "checking for JARSIGNER... " >&6; }
26623        if test ! -x "$tool_specified"; then
26624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26625$as_echo "not found" >&6; }
26626          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26627        fi
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26629$as_echo "$tool_specified" >&6; }
26630      fi
26631    fi
26632  fi
26633
26634
26635
26636  # Finally, set some other options...
26637
26638  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26639  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26640
26641
26642
26643
26644###############################################################################
26645#
26646# Configure the sources to use. We can add or override individual directories.
26647#
26648###############################################################################
26649
26650
26651  # Where are the sources. Any of these can be overridden
26652  # using --with-override-corba and the likes.
26653  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26654  CORBA_TOPDIR="$SRC_ROOT/corba"
26655  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26656  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26657  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26658  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26659  JDK_TOPDIR="$SRC_ROOT/jdk"
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670  ###############################################################################
26671  #
26672  # Pickup additional source for a component from outside of the source root
26673  # or override source for a component.
26674  #
26675
26676# Check whether --with-add-source-root was given.
26677if test "${with_add_source_root+set}" = set; then :
26678  withval=$with_add_source_root;
26679fi
26680
26681
26682
26683# Check whether --with-override-source-root was given.
26684if test "${with_override_source_root+set}" = set; then :
26685  withval=$with_override_source_root;
26686fi
26687
26688
26689
26690# Check whether --with-adds-and-overrides was given.
26691if test "${with_adds_and_overrides+set}" = set; then :
26692  withval=$with_adds_and_overrides;
26693fi
26694
26695
26696  if test "x$with_adds_and_overrides" != x; then
26697    with_add_source_root="$with_adds_and_overrides/adds"
26698    with_override_source_root="$with_adds_and_overrides/overrides"
26699  fi
26700
26701  if test "x$with_add_source_root" != x; then
26702    if ! test -d $with_add_source_root; then
26703      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26704    fi
26705    CURDIR="$PWD"
26706    cd "$with_add_source_root"
26707    ADD_SRC_ROOT="`pwd`"
26708    cd "$CURDIR"
26709    # Verify that the addon source root does not have any root makefiles.
26710    # If it does, then it is usually an error, prevent this.
26711    if test -f $with_add_source_root/langtools/make/Makefile; then
26712      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
26713    fi
26714    if test -f $with_add_source_root/corba/make/Makefile; then
26715      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
26716    fi
26717    if test -f $with_add_source_root/jaxp/make/Makefile; then
26718      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
26719    fi
26720    if test -f $with_add_source_root/jaxws/make/Makefile; then
26721      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
26722    fi
26723    if test -f $with_add_source_root/hotspot/make/Makefile; then
26724      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
26725    fi
26726    if test -f $with_add_source_root/nashorn/make/Makefile; then
26727      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
26728    fi
26729    if test -f $with_add_source_root/jdk/make/Makefile; then
26730      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
26731    fi
26732  fi
26733
26734
26735  if test "x$with_override_source_root" != x; then
26736    if ! test -d $with_override_source_root; then
26737      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26738    fi
26739    CURDIR="$PWD"
26740    cd "$with_override_source_root"
26741    OVERRIDE_SRC_ROOT="`pwd`"
26742    cd "$CURDIR"
26743    if test -f $with_override_source_root/langtools/make/Makefile; then
26744      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
26745    fi
26746    if test -f $with_override_source_root/corba/make/Makefile; then
26747      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
26748    fi
26749    if test -f $with_override_source_root/jaxp/make/Makefile; then
26750      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
26751    fi
26752    if test -f $with_override_source_root/jaxws/make/Makefile; then
26753      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
26754    fi
26755    if test -f $with_override_source_root/hotspot/make/Makefile; then
26756      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
26757    fi
26758    if test -f $with_override_source_root/nashorn/make/Makefile; then
26759      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
26760    fi
26761    if test -f $with_override_source_root/jdk/make/Makefile; then
26762      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
26763    fi
26764  fi
26765
26766
26767  ###############################################################################
26768  #
26769  # Override a repo completely, this is used for example when you have 3 small
26770  # development sandboxes of the langtools sources and want to avoid having 3 full
26771  # OpenJDK sources checked out on disk.
26772  #
26773  # Assuming that the 3 langtools sandboxes are located here:
26774  # /home/fredrik/sandbox1/langtools
26775  # /home/fredrik/sandbox2/langtools
26776  # /home/fredrik/sandbox3/langtools
26777  #
26778  # From the source root you create build subdirs manually:
26779  #     mkdir -p build1 build2 build3
26780  # in each build directory run:
26781  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26782  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26783  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26784  #
26785
26786
26787# Check whether --with-override-langtools was given.
26788if test "${with_override_langtools+set}" = set; then :
26789  withval=$with_override_langtools;
26790fi
26791
26792
26793
26794# Check whether --with-override-corba was given.
26795if test "${with_override_corba+set}" = set; then :
26796  withval=$with_override_corba;
26797fi
26798
26799
26800
26801# Check whether --with-override-jaxp was given.
26802if test "${with_override_jaxp+set}" = set; then :
26803  withval=$with_override_jaxp;
26804fi
26805
26806
26807
26808# Check whether --with-override-jaxws was given.
26809if test "${with_override_jaxws+set}" = set; then :
26810  withval=$with_override_jaxws;
26811fi
26812
26813
26814
26815# Check whether --with-override-hotspot was given.
26816if test "${with_override_hotspot+set}" = set; then :
26817  withval=$with_override_hotspot;
26818fi
26819
26820
26821
26822# Check whether --with-override-nashorn was given.
26823if test "${with_override_nashorn+set}" = set; then :
26824  withval=$with_override_nashorn;
26825fi
26826
26827
26828
26829# Check whether --with-override-jdk was given.
26830if test "${with_override_jdk+set}" = set; then :
26831  withval=$with_override_jdk;
26832fi
26833
26834
26835  if test "x$with_override_langtools" != x; then
26836    CURDIR="$PWD"
26837    cd "$with_override_langtools"
26838    LANGTOOLS_TOPDIR="`pwd`"
26839    cd "$CURDIR"
26840    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26841      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26842    fi
26843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26844$as_echo_n "checking if langtools should be overridden... " >&6; }
26845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26846$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26847  fi
26848  if test "x$with_override_corba" != x; then
26849    CURDIR="$PWD"
26850    cd "$with_override_corba"
26851    CORBA_TOPDIR="`pwd`"
26852    cd "$CURDIR"
26853    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26854      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26855    fi
26856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26857$as_echo_n "checking if corba should be overridden... " >&6; }
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26859$as_echo "yes with $CORBA_TOPDIR" >&6; }
26860  fi
26861  if test "x$with_override_jaxp" != x; then
26862    CURDIR="$PWD"
26863    cd "$with_override_jaxp"
26864    JAXP_TOPDIR="`pwd`"
26865    cd "$CURDIR"
26866    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26867      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26868    fi
26869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26870$as_echo_n "checking if jaxp should be overridden... " >&6; }
26871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26872$as_echo "yes with $JAXP_TOPDIR" >&6; }
26873  fi
26874  if test "x$with_override_jaxws" != x; then
26875    CURDIR="$PWD"
26876    cd "$with_override_jaxws"
26877    JAXWS_TOPDIR="`pwd`"
26878    cd "$CURDIR"
26879    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26880      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26881    fi
26882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26883$as_echo_n "checking if jaxws should be overridden... " >&6; }
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26885$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26886  fi
26887  if test "x$with_override_hotspot" != x; then
26888    CURDIR="$PWD"
26889    cd "$with_override_hotspot"
26890    HOTSPOT_TOPDIR="`pwd`"
26891    cd "$CURDIR"
26892    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26893      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26894    fi
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26896$as_echo_n "checking if hotspot should be overridden... " >&6; }
26897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26898$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26899  fi
26900  if test "x$with_override_nashorn" != x; then
26901    CURDIR="$PWD"
26902    cd "$with_override_nashorn"
26903    NASHORN_TOPDIR="`pwd`"
26904    cd "$CURDIR"
26905    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26906      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26907    fi
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26909$as_echo_n "checking if nashorn should be overridden... " >&6; }
26910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26911$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26912  fi
26913  if test "x$with_override_jdk" != x; then
26914    CURDIR="$PWD"
26915    cd "$with_override_jdk"
26916    JDK_TOPDIR="`pwd`"
26917    cd "$CURDIR"
26918    if ! test -f $JDK_TOPDIR/make/Makefile; then
26919      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26920    fi
26921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26922$as_echo_n "checking if JDK should be overridden... " >&6; }
26923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26924$as_echo "yes with $JDK_TOPDIR" >&6; }
26925  fi
26926
26927
26928  BUILD_OUTPUT="$OUTPUT_ROOT"
26929
26930
26931  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26932  BUILD_HOTSPOT=true
26933
26934
26935
26936# Check whether --with-import-hotspot was given.
26937if test "${with_import_hotspot+set}" = set; then :
26938  withval=$with_import_hotspot;
26939fi
26940
26941  if test "x$with_import_hotspot" != x; then
26942    CURDIR="$PWD"
26943    cd "$with_import_hotspot"
26944    HOTSPOT_DIST="`pwd`"
26945    cd "$CURDIR"
26946    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26947      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26948    fi
26949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26950$as_echo_n "checking if hotspot should be imported... " >&6; }
26951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26952$as_echo "yes from $HOTSPOT_DIST" >&6; }
26953    BUILD_HOTSPOT=false
26954  fi
26955
26956  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26957
26958
26959###############################################################################
26960#
26961# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26962# native code.
26963#
26964###############################################################################
26965
26966# First determine the toolchain type (compiler family)
26967
26968
26969# Check whether --with-toolchain-type was given.
26970if test "${with_toolchain_type+set}" = set; then :
26971  withval=$with_toolchain_type;
26972fi
26973
26974
26975  # Use indirect variable referencing
26976  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26977  VALID_TOOLCHAINS=${!toolchain_var_name}
26978
26979  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26980    if test -n "$XCODEBUILD"; then
26981      # On Mac OS X, default toolchain to clang after Xcode 5
26982      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26983      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26984      if test $? -ne 0; then
26985        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26986      fi
26987      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26988          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26989          $CUT -f 1 -d .`
26990      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26991$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26992      if test $XCODE_MAJOR_VERSION -ge 5; then
26993          DEFAULT_TOOLCHAIN="clang"
26994      else
26995          DEFAULT_TOOLCHAIN="gcc"
26996      fi
26997    else
26998      # If Xcode is not installed, but the command line tools are
26999      # then we can't run xcodebuild. On these systems we should
27000      # default to clang
27001      DEFAULT_TOOLCHAIN="clang"
27002    fi
27003  else
27004    # First toolchain type in the list is the default
27005    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27006  fi
27007
27008  if test "x$with_toolchain_type" = xlist; then
27009    # List all toolchains
27010    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27011$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27012    for toolchain in $VALID_TOOLCHAINS; do
27013      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27014      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27015      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27016    done
27017
27018    exit 0
27019  elif test "x$with_toolchain_type" != x; then
27020    # User override; check that it is valid
27021    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27022      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27023$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27024      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27025$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27026      as_fn_error $? "Cannot continue." "$LINENO" 5
27027    fi
27028    TOOLCHAIN_TYPE=$with_toolchain_type
27029  else
27030    # No flag given, use default
27031    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27032  fi
27033
27034
27035  TOOLCHAIN_CC_BINARY_clang="clang"
27036  TOOLCHAIN_CC_BINARY_gcc="gcc"
27037  TOOLCHAIN_CC_BINARY_microsoft="cl"
27038  TOOLCHAIN_CC_BINARY_solstudio="cc"
27039  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27040
27041  TOOLCHAIN_CXX_BINARY_clang="clang++"
27042  TOOLCHAIN_CXX_BINARY_gcc="g++"
27043  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27044  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27045  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27046
27047  # Use indirect variable referencing
27048  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27049  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27050  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27051  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27052  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27053  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27054
27055
27056  # Define filename patterns
27057  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27058    LIBRARY_PREFIX=
27059    SHARED_LIBRARY_SUFFIX='.dll'
27060    STATIC_LIBRARY_SUFFIX='.lib'
27061    SHARED_LIBRARY='$1.dll'
27062    STATIC_LIBRARY='$1.lib'
27063    OBJ_SUFFIX='.obj'
27064    EXE_SUFFIX='.exe'
27065  else
27066    LIBRARY_PREFIX=lib
27067    SHARED_LIBRARY_SUFFIX='.so'
27068    STATIC_LIBRARY_SUFFIX='.a'
27069    SHARED_LIBRARY='lib$1.so'
27070    STATIC_LIBRARY='lib$1.a'
27071    OBJ_SUFFIX='.o'
27072    EXE_SUFFIX=''
27073    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27074      SHARED_LIBRARY='lib$1.dylib'
27075      SHARED_LIBRARY_SUFFIX='.dylib'
27076    fi
27077  fi
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27089    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27090$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27091  else
27092    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27093$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27094  fi
27095
27096
27097# Then detect the actual binaries needed
27098
27099  # FIXME: Is this needed?
27100  ac_ext=cpp
27101ac_cpp='$CXXCPP $CPPFLAGS'
27102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27105
27106
27107  # Store the CFLAGS etc passed to the configure script.
27108  ORG_CFLAGS="$CFLAGS"
27109  ORG_CXXFLAGS="$CXXFLAGS"
27110
27111  # autoconf magic only relies on PATH, so update it if tools dir is specified
27112  OLD_PATH="$PATH"
27113
27114  # On Windows, we need to detect the visual studio installation first.
27115  # This will change the PATH, but we need to keep that new PATH even
27116  # after toolchain detection is done, since the compiler (on x86) uses
27117  # it for DLL resolution in runtime.
27118  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27119      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27120
27121  # Store path to cygwin link.exe to help excluding it when searching for
27122  # VS linker. This must be done before changing the PATH when looking for VS.
27123  # Extract the first word of "link", so it can be a program name with args.
27124set dummy link; ac_word=$2
27125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27126$as_echo_n "checking for $ac_word... " >&6; }
27127if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27128  $as_echo_n "(cached) " >&6
27129else
27130  case $CYGWIN_LINK in
27131  [\\/]* | ?:[\\/]*)
27132  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27133  ;;
27134  *)
27135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27136for as_dir in $PATH
27137do
27138  IFS=$as_save_IFS
27139  test -z "$as_dir" && as_dir=.
27140    for ac_exec_ext in '' $ac_executable_extensions; do
27141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27142    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27144    break 2
27145  fi
27146done
27147  done
27148IFS=$as_save_IFS
27149
27150  ;;
27151esac
27152fi
27153CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27154if test -n "$CYGWIN_LINK"; then
27155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27156$as_echo "$CYGWIN_LINK" >&6; }
27157else
27158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27159$as_echo "no" >&6; }
27160fi
27161
27162
27163  if test "x$CYGWIN_LINK" != x; then
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27165$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27166    "$CYGWIN_LINK" --version > /dev/null
27167    if test $? -eq 0 ; then
27168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27169$as_echo "yes" >&6; }
27170    else
27171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27172$as_echo "no" >&6; }
27173      # This might be the VS linker. Don't exclude it later on.
27174      CYGWIN_LINK=""
27175    fi
27176  fi
27177
27178  # First-hand choice is to locate and run the vsvars bat file.
27179
27180
27181# Check whether --with-toolchain-version was given.
27182if test "${with_toolchain_version+set}" = set; then :
27183  withval=$with_toolchain_version;
27184fi
27185
27186
27187  if test "x$with_toolchain_version" = xlist; then
27188    # List all toolchains
27189    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27190$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27191    for version in $VALID_VS_VERSIONS; do
27192      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27193      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27194    done
27195
27196    exit 0
27197  elif test "x$DEVKIT_VS_VERSION" != x; then
27198    VS_VERSION=$DEVKIT_VS_VERSION
27199    TOOLCHAIN_VERSION=$VS_VERSION
27200    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27201    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27202    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27203    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27204    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27205    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27206
27207    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27208    # can still be exported as INCLUDE for compiler invocations without
27209    # SYSROOT_CFLAGS
27210    OLDIFS="$IFS"
27211    IFS=";"
27212    for i in $DEVKIT_VS_INCLUDE; do
27213      ipath=$i
27214
27215  unix_path="$ipath"
27216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217    windows_path=`$CYGPATH -m "$unix_path"`
27218    ipath="$windows_path"
27219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220    windows_path=`cmd //c echo $unix_path`
27221    ipath="$windows_path"
27222  fi
27223
27224      VS_INCLUDE="$VS_INCLUDE;$ipath"
27225    done
27226    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27227    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27228    for i in $DEVKIT_VS_LIB; do
27229      libpath=$i
27230
27231  unix_path="$libpath"
27232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27233    windows_path=`$CYGPATH -m "$unix_path"`
27234    libpath="$windows_path"
27235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27236    windows_path=`cmd //c echo $unix_path`
27237    libpath="$windows_path"
27238  fi
27239
27240      VS_LIB="$VS_LIB;$libpath"
27241    done
27242    IFS="$OLDIFS"
27243
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27245$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27246
27247  elif test "x$with_toolchain_version" != x; then
27248    # User override; check that it is valid
27249    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27250      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27251$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27252      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27253$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27254      as_fn_error $? "Cannot continue." "$LINENO" 5
27255    fi
27256    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27257  else
27258    # No flag given, use default
27259    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27260  fi
27261
27262  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27263
27264  VS_VERSION="$VS_VERSION"
27265  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27266  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27267  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27268  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27269
27270  # When using --with-tools-dir, assume it points to the correct and default
27271  # version of Visual Studio or that --with-toolchain-version was also set.
27272  if test "x$with_tools_dir" != x; then
27273
27274  if test "x$VS_ENV_CMD" = x; then
27275    VS_VERSION="${VS_VERSION}"
27276    VS_BASE="$with_tools_dir/../.."
27277    METHOD="--with-tools-dir"
27278
27279    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27280      VCVARSFILE="vc/bin/vcvars32.bat"
27281    else
27282      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27283    fi
27284
27285
27286  windows_path="$VS_BASE"
27287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27288    unix_path=`$CYGPATH -u "$windows_path"`
27289    VS_BASE="$unix_path"
27290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27292    VS_BASE="$unix_path"
27293  fi
27294
27295    if test -d "$VS_BASE"; then
27296      if test -f "$VS_BASE/$VCVARSFILE"; then
27297        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27298$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27299        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27300        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27301        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27302        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27303      else
27304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27305$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27306        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27307$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27308      fi
27309    fi
27310  fi
27311
27312
27313  if test "x$VS_ENV_CMD" = x; then
27314    VS_VERSION="${VS_VERSION}"
27315    VS_BASE="$with_tools_dir/../../.."
27316    METHOD="--with-tools-dir"
27317
27318    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27319      VCVARSFILE="vc/bin/vcvars32.bat"
27320    else
27321      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27322    fi
27323
27324
27325  windows_path="$VS_BASE"
27326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27327    unix_path=`$CYGPATH -u "$windows_path"`
27328    VS_BASE="$unix_path"
27329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27331    VS_BASE="$unix_path"
27332  fi
27333
27334    if test -d "$VS_BASE"; then
27335      if test -f "$VS_BASE/$VCVARSFILE"; then
27336        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27337$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27338        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27339        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27340        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27341        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27342      else
27343        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27344$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27345        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27346$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27347      fi
27348    fi
27349  fi
27350
27351    if test "x$VS_ENV_CMD" = x; then
27352      # Having specified an argument which is incorrect will produce an instant failure;
27353      # we should not go on looking
27354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27355$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27356      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27357$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27358      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27359$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27360      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27361    fi
27362  fi
27363
27364  VS_ENV_CMD=""
27365  VS_ENV_ARGS=""
27366
27367  if test "x$VS_COMNTOOLS" != x; then
27368
27369  if test "x$VS_ENV_CMD" = x; then
27370    VS_VERSION="${VS_VERSION}"
27371    VS_BASE="$VS_COMNTOOLS/../.."
27372    METHOD="$VS_COMNTOOLS_VAR variable"
27373
27374    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27375      VCVARSFILE="vc/bin/vcvars32.bat"
27376    else
27377      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27378    fi
27379
27380
27381  windows_path="$VS_BASE"
27382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27383    unix_path=`$CYGPATH -u "$windows_path"`
27384    VS_BASE="$unix_path"
27385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27387    VS_BASE="$unix_path"
27388  fi
27389
27390    if test -d "$VS_BASE"; then
27391      if test -f "$VS_BASE/$VCVARSFILE"; then
27392        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27393$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27394        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27395        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27396        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27397        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27398      else
27399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27400$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27401        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27402$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27403      fi
27404    fi
27405  fi
27406
27407  fi
27408  if test "x$PROGRAMFILES" != x; then
27409
27410  if test "x$VS_ENV_CMD" = x; then
27411    VS_VERSION="${VS_VERSION}"
27412    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27413    METHOD="well-known name"
27414
27415    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27416      VCVARSFILE="vc/bin/vcvars32.bat"
27417    else
27418      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27419    fi
27420
27421
27422  windows_path="$VS_BASE"
27423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27424    unix_path=`$CYGPATH -u "$windows_path"`
27425    VS_BASE="$unix_path"
27426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27428    VS_BASE="$unix_path"
27429  fi
27430
27431    if test -d "$VS_BASE"; then
27432      if test -f "$VS_BASE/$VCVARSFILE"; then
27433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27434$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27435        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27436        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27437        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27438        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27439      else
27440        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27441$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27442        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27443$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27444      fi
27445    fi
27446  fi
27447
27448  fi
27449  # Work around the insanely named ProgramFiles(x86) env variable
27450  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27451  if test "x$PROGRAMFILES_X86" != x; then
27452
27453  if test "x$VS_ENV_CMD" = x; then
27454    VS_VERSION="${VS_VERSION}"
27455    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27456    METHOD="well-known name"
27457
27458    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27459      VCVARSFILE="vc/bin/vcvars32.bat"
27460    else
27461      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27462    fi
27463
27464
27465  windows_path="$VS_BASE"
27466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27467    unix_path=`$CYGPATH -u "$windows_path"`
27468    VS_BASE="$unix_path"
27469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27471    VS_BASE="$unix_path"
27472  fi
27473
27474    if test -d "$VS_BASE"; then
27475      if test -f "$VS_BASE/$VCVARSFILE"; then
27476        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27477$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27478        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27479        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27480        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27481        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27482      else
27483        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27484$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27485        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27486$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27487      fi
27488    fi
27489  fi
27490
27491  fi
27492
27493  if test "x$VS_ENV_CMD" = x; then
27494    VS_VERSION="${VS_VERSION}"
27495    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27496    METHOD="well-known name"
27497
27498    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27499      VCVARSFILE="vc/bin/vcvars32.bat"
27500    else
27501      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27502    fi
27503
27504
27505  windows_path="$VS_BASE"
27506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27507    unix_path=`$CYGPATH -u "$windows_path"`
27508    VS_BASE="$unix_path"
27509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27511    VS_BASE="$unix_path"
27512  fi
27513
27514    if test -d "$VS_BASE"; then
27515      if test -f "$VS_BASE/$VCVARSFILE"; then
27516        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27517$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27518        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27519        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27520        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27521        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27522      else
27523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27524$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27525        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27526$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27527      fi
27528    fi
27529  fi
27530
27531
27532  if test "x$VS_ENV_CMD" = x; then
27533    VS_VERSION="${VS_VERSION}"
27534    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27535    METHOD="well-known name"
27536
27537    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27538      VCVARSFILE="vc/bin/vcvars32.bat"
27539    else
27540      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27541    fi
27542
27543
27544  windows_path="$VS_BASE"
27545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546    unix_path=`$CYGPATH -u "$windows_path"`
27547    VS_BASE="$unix_path"
27548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27550    VS_BASE="$unix_path"
27551  fi
27552
27553    if test -d "$VS_BASE"; then
27554      if test -f "$VS_BASE/$VCVARSFILE"; then
27555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27556$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27557        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27558        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27559        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27560        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27561      else
27562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27563$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27564        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27565$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27566      fi
27567    fi
27568  fi
27569
27570
27571  if test "x$SDK_INSTALL_DIR" != x; then
27572    if test "x$ProgramW6432" != x; then
27573
27574  if test "x$VS_ENV_CMD" = x; then
27575    VS_VERSION="${VS_VERSION}"
27576    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27577    METHOD="well-known name"
27578
27579  windows_path="$WIN_SDK_BASE"
27580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27581    unix_path=`$CYGPATH -u "$windows_path"`
27582    WIN_SDK_BASE="$unix_path"
27583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27585    WIN_SDK_BASE="$unix_path"
27586  fi
27587
27588    if test -d "$WIN_SDK_BASE"; then
27589      # There have been cases of partial or broken SDK installations. A missing
27590      # lib dir is not going to work.
27591      if test ! -d "$WIN_SDK_BASE/lib"; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27593$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27594        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27595$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27596      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27598$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27599        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27600        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27601          VS_ENV_ARGS="/x86"
27602        else
27603          VS_ENV_ARGS="/x64"
27604        fi
27605        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27606        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27607        # TODO: improve detection for other versions of SDK
27608        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27609      else
27610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27611$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27613$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27614      fi
27615    fi
27616  fi
27617
27618    fi
27619    if test "x$PROGRAMW6432" != x; then
27620
27621  if test "x$VS_ENV_CMD" = x; then
27622    VS_VERSION="${VS_VERSION}"
27623    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27624    METHOD="well-known name"
27625
27626  windows_path="$WIN_SDK_BASE"
27627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628    unix_path=`$CYGPATH -u "$windows_path"`
27629    WIN_SDK_BASE="$unix_path"
27630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27632    WIN_SDK_BASE="$unix_path"
27633  fi
27634
27635    if test -d "$WIN_SDK_BASE"; then
27636      # There have been cases of partial or broken SDK installations. A missing
27637      # lib dir is not going to work.
27638      if test ! -d "$WIN_SDK_BASE/lib"; then
27639        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27640$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27641        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27642$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27643      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27646        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27647        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27648          VS_ENV_ARGS="/x86"
27649        else
27650          VS_ENV_ARGS="/x64"
27651        fi
27652        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27653        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27654        # TODO: improve detection for other versions of SDK
27655        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27656      else
27657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27658$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27660$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27661      fi
27662    fi
27663  fi
27664
27665    fi
27666    if test "x$PROGRAMFILES" != x; then
27667
27668  if test "x$VS_ENV_CMD" = x; then
27669    VS_VERSION="${VS_VERSION}"
27670    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27671    METHOD="well-known name"
27672
27673  windows_path="$WIN_SDK_BASE"
27674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675    unix_path=`$CYGPATH -u "$windows_path"`
27676    WIN_SDK_BASE="$unix_path"
27677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27679    WIN_SDK_BASE="$unix_path"
27680  fi
27681
27682    if test -d "$WIN_SDK_BASE"; then
27683      # There have been cases of partial or broken SDK installations. A missing
27684      # lib dir is not going to work.
27685      if test ! -d "$WIN_SDK_BASE/lib"; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27687$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27688        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27689$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27690      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27692$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27693        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27694        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27695          VS_ENV_ARGS="/x86"
27696        else
27697          VS_ENV_ARGS="/x64"
27698        fi
27699        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27700        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27701        # TODO: improve detection for other versions of SDK
27702        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27703      else
27704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27705$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27706        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27707$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27708      fi
27709    fi
27710  fi
27711
27712    fi
27713
27714  if test "x$VS_ENV_CMD" = x; then
27715    VS_VERSION="${VS_VERSION}"
27716    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27717    METHOD="well-known name"
27718
27719  windows_path="$WIN_SDK_BASE"
27720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27721    unix_path=`$CYGPATH -u "$windows_path"`
27722    WIN_SDK_BASE="$unix_path"
27723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27725    WIN_SDK_BASE="$unix_path"
27726  fi
27727
27728    if test -d "$WIN_SDK_BASE"; then
27729      # There have been cases of partial or broken SDK installations. A missing
27730      # lib dir is not going to work.
27731      if test ! -d "$WIN_SDK_BASE/lib"; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27733$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27734        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27735$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27736      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27738$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27739        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27740        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27741          VS_ENV_ARGS="/x86"
27742        else
27743          VS_ENV_ARGS="/x64"
27744        fi
27745        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27746        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27747        # TODO: improve detection for other versions of SDK
27748        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27749      else
27750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27751$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27752        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27753$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27754      fi
27755    fi
27756  fi
27757
27758
27759  if test "x$VS_ENV_CMD" = x; then
27760    VS_VERSION="${VS_VERSION}"
27761    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27762    METHOD="well-known name"
27763
27764  windows_path="$WIN_SDK_BASE"
27765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27766    unix_path=`$CYGPATH -u "$windows_path"`
27767    WIN_SDK_BASE="$unix_path"
27768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27770    WIN_SDK_BASE="$unix_path"
27771  fi
27772
27773    if test -d "$WIN_SDK_BASE"; then
27774      # There have been cases of partial or broken SDK installations. A missing
27775      # lib dir is not going to work.
27776      if test ! -d "$WIN_SDK_BASE/lib"; then
27777        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27778$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27779        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27780$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27781      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27783$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27784        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27785        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27786          VS_ENV_ARGS="/x86"
27787        else
27788          VS_ENV_ARGS="/x64"
27789        fi
27790        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27791        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27792        # TODO: improve detection for other versions of SDK
27793        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27794      else
27795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27796$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27797        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27798$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27799      fi
27800    fi
27801  fi
27802
27803  fi
27804
27805    if test "x$VS_ENV_CMD" != x; then
27806      TOOLCHAIN_VERSION=$VS_VERSION
27807      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27808      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27809      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27810      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27811      # The rest of the variables are already evaled while probing
27812      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27813$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27814      break
27815    fi
27816  done
27817
27818
27819  # If we have a devkit, skip all of the below.
27820  if test "x$DEVKIT_VS_VERSION" = x; then
27821    if test "x$VS_ENV_CMD" != x; then
27822      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27823
27824  # Only process if variable expands to non-empty
27825
27826  if test "x$VS_ENV_CMD" != x; then
27827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828
27829  # First separate the path from the arguments. This will split at the first
27830  # space.
27831  complete="$VS_ENV_CMD"
27832  path="${complete%% *}"
27833  tmp="$complete EOL"
27834  arguments="${tmp#* }"
27835
27836  # Input might be given as Windows format, start by converting to
27837  # unix format.
27838  new_path=`$CYGPATH -u "$path"`
27839
27840  # Now try to locate executable using which
27841  new_path=`$WHICH "$new_path" 2> /dev/null`
27842  # bat and cmd files are not always considered executable in cygwin causing which
27843  # to not find them
27844  if test "x$new_path" = x \
27845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27847    new_path=`$CYGPATH -u "$path"`
27848  fi
27849  if test "x$new_path" = x; then
27850    # Oops. Which didn't find the executable.
27851    # The splitting of arguments from the executable at a space might have been incorrect,
27852    # since paths with space are more likely in Windows. Give it another try with the whole
27853    # argument.
27854    path="$complete"
27855    arguments="EOL"
27856    new_path=`$CYGPATH -u "$path"`
27857    new_path=`$WHICH "$new_path" 2> /dev/null`
27858    # bat and cmd files are not always considered executable in cygwin causing which
27859    # to not find them
27860    if test "x$new_path" = x \
27861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27863      new_path=`$CYGPATH -u "$path"`
27864    fi
27865    if test "x$new_path" = x; then
27866      # It's still not found. Now this is an unrecoverable error.
27867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27868$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27869      has_space=`$ECHO "$complete" | $GREP " "`
27870      if test "x$has_space" != x; then
27871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27873      fi
27874      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27875    fi
27876  fi
27877
27878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27881  # "foo.exe" is OK but "foo" is an error.
27882  #
27883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27884  # It is also a way to make sure we got the proper file name for the real test later on.
27885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27886  if test "x$test_shortpath" = x; then
27887    # Short path failed, file does not exist as specified.
27888    # Try adding .exe or .cmd
27889    if test -f "${new_path}.exe"; then
27890      input_to_shortpath="${new_path}.exe"
27891    elif test -f "${new_path}.cmd"; then
27892      input_to_shortpath="${new_path}.cmd"
27893    else
27894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27895$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27898      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27899    fi
27900  else
27901    input_to_shortpath="$new_path"
27902  fi
27903
27904  # Call helper function which possibly converts this using DOS-style short mode.
27905  # If so, the updated path is stored in $new_path.
27906  new_path="$input_to_shortpath"
27907
27908  input_path="$input_to_shortpath"
27909  # Check if we need to convert this using DOS-style short mode. If the path
27910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27911  # take no chances and rewrite it.
27912  # Note: m4 eats our [], so we need to use [ and ] instead.
27913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27914  if test "x$has_forbidden_chars" != x; then
27915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27919      # Going to short mode and back again did indeed matter. Since short mode is
27920      # case insensitive, let's make it lowercase to improve readability.
27921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27922      # Now convert it back to Unix-style (cygpath)
27923      input_path=`$CYGPATH -u "$shortmode_path"`
27924      new_path="$input_path"
27925    fi
27926  fi
27927
27928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27929  if test "x$test_cygdrive_prefix" = x; then
27930    # As a simple fix, exclude /usr/bin since it's not a real path.
27931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27933      # a path prefixed by /cygdrive for fixpath to work.
27934      new_path="$CYGWIN_ROOT_PATH$input_path"
27935    fi
27936  fi
27937
27938  # remove trailing .exe if any
27939  new_path="${new_path/%.exe/}"
27940
27941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27942
27943  # First separate the path from the arguments. This will split at the first
27944  # space.
27945  complete="$VS_ENV_CMD"
27946  path="${complete%% *}"
27947  tmp="$complete EOL"
27948  arguments="${tmp#* }"
27949
27950  # Input might be given as Windows format, start by converting to
27951  # unix format.
27952  new_path="$path"
27953
27954  windows_path="$new_path"
27955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27956    unix_path=`$CYGPATH -u "$windows_path"`
27957    new_path="$unix_path"
27958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27960    new_path="$unix_path"
27961  fi
27962
27963
27964  # Now try to locate executable using which
27965  new_path=`$WHICH "$new_path" 2> /dev/null`
27966
27967  if test "x$new_path" = x; then
27968    # Oops. Which didn't find the executable.
27969    # The splitting of arguments from the executable at a space might have been incorrect,
27970    # since paths with space are more likely in Windows. Give it another try with the whole
27971    # argument.
27972    path="$complete"
27973    arguments="EOL"
27974    new_path="$path"
27975
27976  windows_path="$new_path"
27977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27978    unix_path=`$CYGPATH -u "$windows_path"`
27979    new_path="$unix_path"
27980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27982    new_path="$unix_path"
27983  fi
27984
27985
27986    new_path=`$WHICH "$new_path" 2> /dev/null`
27987    # bat and cmd files are not always considered executable in MSYS causing which
27988    # to not find them
27989    if test "x$new_path" = x \
27990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27992      new_path="$path"
27993
27994  windows_path="$new_path"
27995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27996    unix_path=`$CYGPATH -u "$windows_path"`
27997    new_path="$unix_path"
27998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28000    new_path="$unix_path"
28001  fi
28002
28003    fi
28004
28005    if test "x$new_path" = x; then
28006      # It's still not found. Now this is an unrecoverable error.
28007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28008$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28009      has_space=`$ECHO "$complete" | $GREP " "`
28010      if test "x$has_space" != x; then
28011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28013      fi
28014      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28015    fi
28016  fi
28017
28018  # Now new_path has a complete unix path to the binary
28019  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28020    # Keep paths in /bin as-is, but remove trailing .exe if any
28021    new_path="${new_path/%.exe/}"
28022    # Do not save /bin paths to all_fixpath_prefixes!
28023  else
28024    # Not in mixed or Windows style, start by that.
28025    new_path=`cmd //c echo $new_path`
28026
28027  input_path="$new_path"
28028  # Check if we need to convert this using DOS-style short mode. If the path
28029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28030  # take no chances and rewrite it.
28031  # Note: m4 eats our [], so we need to use [ and ] instead.
28032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28033  if test "x$has_forbidden_chars" != x; then
28034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28036  fi
28037
28038    # Output is in $new_path
28039
28040  windows_path="$new_path"
28041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28042    unix_path=`$CYGPATH -u "$windows_path"`
28043    new_path="$unix_path"
28044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28046    new_path="$unix_path"
28047  fi
28048
28049    # remove trailing .exe if any
28050    new_path="${new_path/%.exe/}"
28051
28052    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28053    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28054  fi
28055
28056    else
28057      # We're on a unix platform. Hooray! :)
28058      # First separate the path from the arguments. This will split at the first
28059      # space.
28060      complete="$VS_ENV_CMD"
28061      path="${complete%% *}"
28062      tmp="$complete EOL"
28063      arguments="${tmp#* }"
28064
28065      # Cannot rely on the command "which" here since it doesn't always work.
28066      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28067      if test -z "$is_absolute_path"; then
28068        # Path to executable is not absolute. Find it.
28069        IFS_save="$IFS"
28070        IFS=:
28071        for p in $PATH; do
28072          if test -f "$p/$path" && test -x "$p/$path"; then
28073            new_path="$p/$path"
28074            break
28075          fi
28076        done
28077        IFS="$IFS_save"
28078      else
28079        # This is an absolute path, we can use it without further modifications.
28080        new_path="$path"
28081      fi
28082
28083      if test "x$new_path" = x; then
28084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28085$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28086        has_space=`$ECHO "$complete" | $GREP " "`
28087        if test "x$has_space" != x; then
28088          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28089$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28090        fi
28091        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28092      fi
28093    fi
28094
28095    # Now join together the path and the arguments once again
28096    if test "x$arguments" != xEOL; then
28097      new_complete="$new_path ${arguments% *}"
28098    else
28099      new_complete="$new_path"
28100    fi
28101
28102    if test "x$complete" != "x$new_complete"; then
28103      VS_ENV_CMD="$new_complete"
28104      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28105$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28106    fi
28107  fi
28108
28109
28110      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28111      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28112$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28113
28114      # We need to create a couple of temporary files.
28115      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28116      $MKDIR -p $VS_ENV_TMP_DIR
28117
28118      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28119      # Instead create a shell script which will set the relevant variables when run.
28120      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28121
28122  unix_path="$WINPATH_VS_ENV_CMD"
28123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28124    windows_path=`$CYGPATH -m "$unix_path"`
28125    WINPATH_VS_ENV_CMD="$windows_path"
28126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28127    windows_path=`cmd //c echo $unix_path`
28128    WINPATH_VS_ENV_CMD="$windows_path"
28129  fi
28130
28131      WINPATH_BASH="$BASH"
28132
28133  unix_path="$WINPATH_BASH"
28134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28135    windows_path=`$CYGPATH -m "$unix_path"`
28136    WINPATH_BASH="$windows_path"
28137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28138    windows_path=`cmd //c echo $unix_path`
28139    WINPATH_BASH="$windows_path"
28140  fi
28141
28142
28143      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28144      # script (executable by bash) that will setup the important variables.
28145      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28146      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28147      # This will end up something like:
28148      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28149      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28150      # These will end up something like:
28151      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28152      # The trailing space for everyone except PATH is no typo, but is needed due
28153      # to trailing \ in the Windows paths. These will be stripped later.
28154      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28155          >> $EXTRACT_VC_ENV_BAT_FILE
28156      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28157          >> $EXTRACT_VC_ENV_BAT_FILE
28158      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28159          >> $EXTRACT_VC_ENV_BAT_FILE
28160      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28161          >> $EXTRACT_VC_ENV_BAT_FILE
28162      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28163          >> $EXTRACT_VC_ENV_BAT_FILE
28164      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28165          >> $EXTRACT_VC_ENV_BAT_FILE
28166
28167      # Now execute the newly created bat file.
28168      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28169      # Change directory so we don't need to mess with Windows paths in redirects.
28170      cd $VS_ENV_TMP_DIR
28171      cmd /c extract-vs-env.bat | $CAT
28172      cd $CURDIR
28173
28174      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28176$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28177        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28178$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28179        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28180$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28181        as_fn_error $? "Cannot continue" "$LINENO" 5
28182      fi
28183
28184      # Now set all paths and other env variables. This will allow the rest of
28185      # the configure script to find and run the compiler in the proper way.
28186      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28187$as_echo "$as_me: Setting extracted environment variables" >&6;}
28188      . $VS_ENV_TMP_DIR/set-vs-env.sh
28189      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28190      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28191    else
28192      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28193      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28194$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28195    fi
28196  fi
28197
28198  # At this point, we should have correct variables in the environment, or we can't continue.
28199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28200$as_echo_n "checking for Visual Studio variables... " >&6; }
28201
28202  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28203      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28204    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28206$as_echo "present but broken" >&6; }
28207      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28208    else
28209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28210$as_echo "ok" >&6; }
28211      # Remove any trailing "\" ";" and " " from the variables.
28212      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28213      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28214      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28215      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28216      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28217      # Remove any paths containing # (typically F#) as that messes up make. This
28218      # is needed if visual studio was installed with F# support.
28219      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28220
28221
28222
28223
28224
28225      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28226      OLDIFS="$IFS"
28227      IFS=";"
28228      for i in $VS_INCLUDE; do
28229        ipath=$i
28230        # Only process non-empty elements
28231        if test "x$ipath" != x; then
28232          IFS="$OLDIFS"
28233          # Check that directory exists before calling fixup_path
28234          testpath=$ipath
28235
28236  windows_path="$testpath"
28237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28238    unix_path=`$CYGPATH -u "$windows_path"`
28239    testpath="$unix_path"
28240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28242    testpath="$unix_path"
28243  fi
28244
28245          if test -d "$testpath"; then
28246
28247  # Only process if variable expands to non-empty
28248
28249  if test "x$ipath" != x; then
28250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28251
28252  # Input might be given as Windows format, start by converting to
28253  # unix format.
28254  path="$ipath"
28255  new_path=`$CYGPATH -u "$path"`
28256
28257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28260  # "foo.exe" is OK but "foo" is an error.
28261  #
28262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28263  # It is also a way to make sure we got the proper file name for the real test later on.
28264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28265  if test "x$test_shortpath" = x; then
28266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28267$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28268    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28269  fi
28270
28271  # Call helper function which possibly converts this using DOS-style short mode.
28272  # If so, the updated path is stored in $new_path.
28273
28274  input_path="$new_path"
28275  # Check if we need to convert this using DOS-style short mode. If the path
28276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28277  # take no chances and rewrite it.
28278  # Note: m4 eats our [], so we need to use [ and ] instead.
28279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28280  if test "x$has_forbidden_chars" != x; then
28281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28285      # Going to short mode and back again did indeed matter. Since short mode is
28286      # case insensitive, let's make it lowercase to improve readability.
28287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28288      # Now convert it back to Unix-style (cygpath)
28289      input_path=`$CYGPATH -u "$shortmode_path"`
28290      new_path="$input_path"
28291    fi
28292  fi
28293
28294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28295  if test "x$test_cygdrive_prefix" = x; then
28296    # As a simple fix, exclude /usr/bin since it's not a real path.
28297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28299      # a path prefixed by /cygdrive for fixpath to work.
28300      new_path="$CYGWIN_ROOT_PATH$input_path"
28301    fi
28302  fi
28303
28304
28305  if test "x$path" != "x$new_path"; then
28306    ipath="$new_path"
28307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28308$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28309  fi
28310
28311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28312
28313  path="$ipath"
28314  has_colon=`$ECHO $path | $GREP ^.:`
28315  new_path="$path"
28316  if test "x$has_colon" = x; then
28317    # Not in mixed or Windows style, start by that.
28318    new_path=`cmd //c echo $path`
28319  fi
28320
28321
28322  input_path="$new_path"
28323  # Check if we need to convert this using DOS-style short mode. If the path
28324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28325  # take no chances and rewrite it.
28326  # Note: m4 eats our [], so we need to use [ and ] instead.
28327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28328  if test "x$has_forbidden_chars" != x; then
28329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28331  fi
28332
28333
28334  windows_path="$new_path"
28335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28336    unix_path=`$CYGPATH -u "$windows_path"`
28337    new_path="$unix_path"
28338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28340    new_path="$unix_path"
28341  fi
28342
28343  if test "x$path" != "x$new_path"; then
28344    ipath="$new_path"
28345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28346$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28347  fi
28348
28349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28351
28352    else
28353      # We're on a unix platform. Hooray! :)
28354      path="$ipath"
28355      has_space=`$ECHO "$path" | $GREP " "`
28356      if test "x$has_space" != x; then
28357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28358$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28360      fi
28361
28362      # Use eval to expand a potential ~
28363      eval path="$path"
28364      if test ! -f "$path" && test ! -d "$path"; then
28365        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28366      fi
28367
28368      ipath="`cd "$path"; $THEPWDCMD -L`"
28369    fi
28370  fi
28371
28372            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28373          fi
28374          IFS=";"
28375        fi
28376      done
28377      # Convert VS_LIB into SYSROOT_LDFLAGS
28378      for i in $VS_LIB; do
28379        libpath=$i
28380        # Only process non-empty elements
28381        if test "x$libpath" != x; then
28382          IFS="$OLDIFS"
28383          # Check that directory exists before calling fixup_path
28384          testpath=$libpath
28385
28386  windows_path="$testpath"
28387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388    unix_path=`$CYGPATH -u "$windows_path"`
28389    testpath="$unix_path"
28390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28392    testpath="$unix_path"
28393  fi
28394
28395          if test -d "$testpath"; then
28396
28397  # Only process if variable expands to non-empty
28398
28399  if test "x$libpath" != x; then
28400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28401
28402  # Input might be given as Windows format, start by converting to
28403  # unix format.
28404  path="$libpath"
28405  new_path=`$CYGPATH -u "$path"`
28406
28407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28410  # "foo.exe" is OK but "foo" is an error.
28411  #
28412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28413  # It is also a way to make sure we got the proper file name for the real test later on.
28414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28415  if test "x$test_shortpath" = x; then
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28417$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28418    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423
28424  input_path="$new_path"
28425  # Check if we need to convert this using DOS-style short mode. If the path
28426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28427  # take no chances and rewrite it.
28428  # Note: m4 eats our [], so we need to use [ and ] instead.
28429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28430  if test "x$has_forbidden_chars" != x; then
28431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28435      # Going to short mode and back again did indeed matter. Since short mode is
28436      # case insensitive, let's make it lowercase to improve readability.
28437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28438      # Now convert it back to Unix-style (cygpath)
28439      input_path=`$CYGPATH -u "$shortmode_path"`
28440      new_path="$input_path"
28441    fi
28442  fi
28443
28444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28445  if test "x$test_cygdrive_prefix" = x; then
28446    # As a simple fix, exclude /usr/bin since it's not a real path.
28447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28449      # a path prefixed by /cygdrive for fixpath to work.
28450      new_path="$CYGWIN_ROOT_PATH$input_path"
28451    fi
28452  fi
28453
28454
28455  if test "x$path" != "x$new_path"; then
28456    libpath="$new_path"
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28458$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28459  fi
28460
28461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28462
28463  path="$libpath"
28464  has_colon=`$ECHO $path | $GREP ^.:`
28465  new_path="$path"
28466  if test "x$has_colon" = x; then
28467    # Not in mixed or Windows style, start by that.
28468    new_path=`cmd //c echo $path`
28469  fi
28470
28471
28472  input_path="$new_path"
28473  # Check if we need to convert this using DOS-style short mode. If the path
28474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28475  # take no chances and rewrite it.
28476  # Note: m4 eats our [], so we need to use [ and ] instead.
28477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28478  if test "x$has_forbidden_chars" != x; then
28479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28481  fi
28482
28483
28484  windows_path="$new_path"
28485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486    unix_path=`$CYGPATH -u "$windows_path"`
28487    new_path="$unix_path"
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28490    new_path="$unix_path"
28491  fi
28492
28493  if test "x$path" != "x$new_path"; then
28494    libpath="$new_path"
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28496$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28497  fi
28498
28499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28501
28502    else
28503      # We're on a unix platform. Hooray! :)
28504      path="$libpath"
28505      has_space=`$ECHO "$path" | $GREP " "`
28506      if test "x$has_space" != x; then
28507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28508$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28510      fi
28511
28512      # Use eval to expand a potential ~
28513      eval path="$path"
28514      if test ! -f "$path" && test ! -d "$path"; then
28515        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28516      fi
28517
28518      libpath="`cd "$path"; $THEPWDCMD -L`"
28519    fi
28520  fi
28521
28522            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28523          fi
28524          IFS=";"
28525        fi
28526      done
28527      IFS="$OLDIFS"
28528    fi
28529  else
28530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28531$as_echo "not found" >&6; }
28532
28533    if test "x$VS_ENV_CMD" = x; then
28534      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28535$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28536      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28537$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28538    else
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28540$as_echo "$as_me: Running the extraction script failed." >&6;}
28541    fi
28542    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28543$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28544    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28545$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28546    as_fn_error $? "Cannot continue" "$LINENO" 5
28547  fi
28548
28549    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28550    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28551    PATH="$VS_PATH"
28552    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28553    export INCLUDE="$VS_INCLUDE"
28554    export LIB="$VS_LIB"
28555  fi
28556
28557  # For solaris we really need solaris tools, and not the GNU equivalent.
28558  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28559  # so add that to path before starting to probe.
28560  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28561  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28562    PATH="/usr/ccs/bin:$PATH"
28563  fi
28564
28565  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28566  # override all other locations.
28567  if test "x$TOOLCHAIN_PATH" != x; then
28568    PATH=$TOOLCHAIN_PATH:$PATH
28569  fi
28570
28571
28572  #
28573  # Setup the compilers (CC and CXX)
28574  #
28575
28576  COMPILER_NAME=C
28577  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28578
28579  if test "x$CC" != x; then
28580    # User has supplied compiler name already, always let that override.
28581    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28582$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28583    if test "x`basename $CC`" = "x$CC"; then
28584      # A command without a complete path is provided, search $PATH.
28585
28586      for ac_prog in $CC
28587do
28588  # Extract the first word of "$ac_prog", so it can be a program name with args.
28589set dummy $ac_prog; ac_word=$2
28590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28591$as_echo_n "checking for $ac_word... " >&6; }
28592if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28593  $as_echo_n "(cached) " >&6
28594else
28595  case $POTENTIAL_CC in
28596  [\\/]* | ?:[\\/]*)
28597  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28598  ;;
28599  *)
28600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28601for as_dir in $PATH
28602do
28603  IFS=$as_save_IFS
28604  test -z "$as_dir" && as_dir=.
28605    for ac_exec_ext in '' $ac_executable_extensions; do
28606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28607    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28609    break 2
28610  fi
28611done
28612  done
28613IFS=$as_save_IFS
28614
28615  ;;
28616esac
28617fi
28618POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28619if test -n "$POTENTIAL_CC"; then
28620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28621$as_echo "$POTENTIAL_CC" >&6; }
28622else
28623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28624$as_echo "no" >&6; }
28625fi
28626
28627
28628  test -n "$POTENTIAL_CC" && break
28629done
28630
28631      if test "x$POTENTIAL_CC" != x; then
28632        CC=$POTENTIAL_CC
28633      else
28634        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28635      fi
28636    else
28637      # Otherwise it might already be a complete path
28638      if test ! -x "$CC"; then
28639        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28640      fi
28641    fi
28642  else
28643    # No user supplied value. Locate compiler ourselves.
28644
28645    # If we are cross compiling, assume cross compilation tools follows the
28646    # cross compilation standard where they are prefixed with the autoconf
28647    # standard name for the target. For example the binary
28648    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28649    # If we are not cross compiling, then the default compiler name will be
28650    # used.
28651
28652    CC=
28653    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28654    # before checking the rest of the PATH.
28655    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28656    # step, this should not be necessary.
28657    if test -n "$TOOLCHAIN_PATH"; then
28658      PATH_save="$PATH"
28659      PATH="$TOOLCHAIN_PATH"
28660      for ac_prog in $SEARCH_LIST
28661do
28662  # Extract the first word of "$ac_prog", so it can be a program name with args.
28663set dummy $ac_prog; ac_word=$2
28664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28665$as_echo_n "checking for $ac_word... " >&6; }
28666if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28667  $as_echo_n "(cached) " >&6
28668else
28669  case $TOOLCHAIN_PATH_CC in
28670  [\\/]* | ?:[\\/]*)
28671  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28672  ;;
28673  *)
28674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28675for as_dir in $PATH
28676do
28677  IFS=$as_save_IFS
28678  test -z "$as_dir" && as_dir=.
28679    for ac_exec_ext in '' $ac_executable_extensions; do
28680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28681    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28683    break 2
28684  fi
28685done
28686  done
28687IFS=$as_save_IFS
28688
28689  ;;
28690esac
28691fi
28692TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28693if test -n "$TOOLCHAIN_PATH_CC"; then
28694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28695$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28696else
28697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28698$as_echo "no" >&6; }
28699fi
28700
28701
28702  test -n "$TOOLCHAIN_PATH_CC" && break
28703done
28704
28705      CC=$TOOLCHAIN_PATH_CC
28706      PATH="$PATH_save"
28707    fi
28708
28709    # AC_PATH_PROGS can't be run multiple times with the same variable,
28710    # so create a new name for this run.
28711    if test "x$CC" = x; then
28712      for ac_prog in $SEARCH_LIST
28713do
28714  # Extract the first word of "$ac_prog", so it can be a program name with args.
28715set dummy $ac_prog; ac_word=$2
28716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28717$as_echo_n "checking for $ac_word... " >&6; }
28718if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28719  $as_echo_n "(cached) " >&6
28720else
28721  case $POTENTIAL_CC in
28722  [\\/]* | ?:[\\/]*)
28723  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28724  ;;
28725  *)
28726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28727for as_dir in $PATH
28728do
28729  IFS=$as_save_IFS
28730  test -z "$as_dir" && as_dir=.
28731    for ac_exec_ext in '' $ac_executable_extensions; do
28732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28733    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28735    break 2
28736  fi
28737done
28738  done
28739IFS=$as_save_IFS
28740
28741  ;;
28742esac
28743fi
28744POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28745if test -n "$POTENTIAL_CC"; then
28746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28747$as_echo "$POTENTIAL_CC" >&6; }
28748else
28749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28750$as_echo "no" >&6; }
28751fi
28752
28753
28754  test -n "$POTENTIAL_CC" && break
28755done
28756
28757      CC=$POTENTIAL_CC
28758    fi
28759
28760    if test "x$CC" = x; then
28761
28762  # Print a helpful message on how to acquire the necessary build dependency.
28763  # devkit is the help tag: freetype, cups, pulse, alsa etc
28764  MISSING_DEPENDENCY=devkit
28765
28766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767    cygwin_help $MISSING_DEPENDENCY
28768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28769    msys_help $MISSING_DEPENDENCY
28770  else
28771    PKGHANDLER_COMMAND=
28772
28773    case $PKGHANDLER in
28774      apt-get)
28775        apt_help     $MISSING_DEPENDENCY ;;
28776      yum)
28777        yum_help     $MISSING_DEPENDENCY ;;
28778      port)
28779        port_help    $MISSING_DEPENDENCY ;;
28780      pkgutil)
28781        pkgutil_help $MISSING_DEPENDENCY ;;
28782      pkgadd)
28783        pkgadd_help  $MISSING_DEPENDENCY ;;
28784    esac
28785
28786    if test "x$PKGHANDLER_COMMAND" != x; then
28787      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28788    fi
28789  fi
28790
28791      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28792    fi
28793  fi
28794
28795  # Now we have a compiler binary in CC. Make sure it's okay.
28796
28797  # Only process if variable expands to non-empty
28798
28799  if test "x$CC" != x; then
28800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28801
28802  # First separate the path from the arguments. This will split at the first
28803  # space.
28804  complete="$CC"
28805  path="${complete%% *}"
28806  tmp="$complete EOL"
28807  arguments="${tmp#* }"
28808
28809  # Input might be given as Windows format, start by converting to
28810  # unix format.
28811  new_path=`$CYGPATH -u "$path"`
28812
28813  # Now try to locate executable using which
28814  new_path=`$WHICH "$new_path" 2> /dev/null`
28815  # bat and cmd files are not always considered executable in cygwin causing which
28816  # to not find them
28817  if test "x$new_path" = x \
28818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28820    new_path=`$CYGPATH -u "$path"`
28821  fi
28822  if test "x$new_path" = x; then
28823    # Oops. Which didn't find the executable.
28824    # The splitting of arguments from the executable at a space might have been incorrect,
28825    # since paths with space are more likely in Windows. Give it another try with the whole
28826    # argument.
28827    path="$complete"
28828    arguments="EOL"
28829    new_path=`$CYGPATH -u "$path"`
28830    new_path=`$WHICH "$new_path" 2> /dev/null`
28831    # bat and cmd files are not always considered executable in cygwin causing which
28832    # to not find them
28833    if test "x$new_path" = x \
28834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28836      new_path=`$CYGPATH -u "$path"`
28837    fi
28838    if test "x$new_path" = x; then
28839      # It's still not found. Now this is an unrecoverable error.
28840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28841$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28842      has_space=`$ECHO "$complete" | $GREP " "`
28843      if test "x$has_space" != x; then
28844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28846      fi
28847      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28848    fi
28849  fi
28850
28851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28854  # "foo.exe" is OK but "foo" is an error.
28855  #
28856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28857  # It is also a way to make sure we got the proper file name for the real test later on.
28858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28859  if test "x$test_shortpath" = x; then
28860    # Short path failed, file does not exist as specified.
28861    # Try adding .exe or .cmd
28862    if test -f "${new_path}.exe"; then
28863      input_to_shortpath="${new_path}.exe"
28864    elif test -f "${new_path}.cmd"; then
28865      input_to_shortpath="${new_path}.cmd"
28866    else
28867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28868$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28871      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28872    fi
28873  else
28874    input_to_shortpath="$new_path"
28875  fi
28876
28877  # Call helper function which possibly converts this using DOS-style short mode.
28878  # If so, the updated path is stored in $new_path.
28879  new_path="$input_to_shortpath"
28880
28881  input_path="$input_to_shortpath"
28882  # Check if we need to convert this using DOS-style short mode. If the path
28883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28884  # take no chances and rewrite it.
28885  # Note: m4 eats our [], so we need to use [ and ] instead.
28886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28887  if test "x$has_forbidden_chars" != x; then
28888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28892      # Going to short mode and back again did indeed matter. Since short mode is
28893      # case insensitive, let's make it lowercase to improve readability.
28894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28895      # Now convert it back to Unix-style (cygpath)
28896      input_path=`$CYGPATH -u "$shortmode_path"`
28897      new_path="$input_path"
28898    fi
28899  fi
28900
28901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28902  if test "x$test_cygdrive_prefix" = x; then
28903    # As a simple fix, exclude /usr/bin since it's not a real path.
28904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28906      # a path prefixed by /cygdrive for fixpath to work.
28907      new_path="$CYGWIN_ROOT_PATH$input_path"
28908    fi
28909  fi
28910
28911  # remove trailing .exe if any
28912  new_path="${new_path/%.exe/}"
28913
28914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28915
28916  # First separate the path from the arguments. This will split at the first
28917  # space.
28918  complete="$CC"
28919  path="${complete%% *}"
28920  tmp="$complete EOL"
28921  arguments="${tmp#* }"
28922
28923  # Input might be given as Windows format, start by converting to
28924  # unix format.
28925  new_path="$path"
28926
28927  windows_path="$new_path"
28928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28929    unix_path=`$CYGPATH -u "$windows_path"`
28930    new_path="$unix_path"
28931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28933    new_path="$unix_path"
28934  fi
28935
28936
28937  # Now try to locate executable using which
28938  new_path=`$WHICH "$new_path" 2> /dev/null`
28939
28940  if test "x$new_path" = x; then
28941    # Oops. Which didn't find the executable.
28942    # The splitting of arguments from the executable at a space might have been incorrect,
28943    # since paths with space are more likely in Windows. Give it another try with the whole
28944    # argument.
28945    path="$complete"
28946    arguments="EOL"
28947    new_path="$path"
28948
28949  windows_path="$new_path"
28950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28951    unix_path=`$CYGPATH -u "$windows_path"`
28952    new_path="$unix_path"
28953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28955    new_path="$unix_path"
28956  fi
28957
28958
28959    new_path=`$WHICH "$new_path" 2> /dev/null`
28960    # bat and cmd files are not always considered executable in MSYS causing which
28961    # to not find them
28962    if test "x$new_path" = x \
28963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28965      new_path="$path"
28966
28967  windows_path="$new_path"
28968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28969    unix_path=`$CYGPATH -u "$windows_path"`
28970    new_path="$unix_path"
28971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28973    new_path="$unix_path"
28974  fi
28975
28976    fi
28977
28978    if test "x$new_path" = x; then
28979      # It's still not found. Now this is an unrecoverable error.
28980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28981$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28982      has_space=`$ECHO "$complete" | $GREP " "`
28983      if test "x$has_space" != x; then
28984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28986      fi
28987      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28988    fi
28989  fi
28990
28991  # Now new_path has a complete unix path to the binary
28992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28993    # Keep paths in /bin as-is, but remove trailing .exe if any
28994    new_path="${new_path/%.exe/}"
28995    # Do not save /bin paths to all_fixpath_prefixes!
28996  else
28997    # Not in mixed or Windows style, start by that.
28998    new_path=`cmd //c echo $new_path`
28999
29000  input_path="$new_path"
29001  # Check if we need to convert this using DOS-style short mode. If the path
29002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29003  # take no chances and rewrite it.
29004  # Note: m4 eats our [], so we need to use [ and ] instead.
29005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29006  if test "x$has_forbidden_chars" != x; then
29007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29009  fi
29010
29011    # Output is in $new_path
29012
29013  windows_path="$new_path"
29014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29015    unix_path=`$CYGPATH -u "$windows_path"`
29016    new_path="$unix_path"
29017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29019    new_path="$unix_path"
29020  fi
29021
29022    # remove trailing .exe if any
29023    new_path="${new_path/%.exe/}"
29024
29025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29027  fi
29028
29029    else
29030      # We're on a unix platform. Hooray! :)
29031      # First separate the path from the arguments. This will split at the first
29032      # space.
29033      complete="$CC"
29034      path="${complete%% *}"
29035      tmp="$complete EOL"
29036      arguments="${tmp#* }"
29037
29038      # Cannot rely on the command "which" here since it doesn't always work.
29039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29040      if test -z "$is_absolute_path"; then
29041        # Path to executable is not absolute. Find it.
29042        IFS_save="$IFS"
29043        IFS=:
29044        for p in $PATH; do
29045          if test -f "$p/$path" && test -x "$p/$path"; then
29046            new_path="$p/$path"
29047            break
29048          fi
29049        done
29050        IFS="$IFS_save"
29051      else
29052        # This is an absolute path, we can use it without further modifications.
29053        new_path="$path"
29054      fi
29055
29056      if test "x$new_path" = x; then
29057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29058$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29059        has_space=`$ECHO "$complete" | $GREP " "`
29060        if test "x$has_space" != x; then
29061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29063        fi
29064        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29065      fi
29066    fi
29067
29068    # Now join together the path and the arguments once again
29069    if test "x$arguments" != xEOL; then
29070      new_complete="$new_path ${arguments% *}"
29071    else
29072      new_complete="$new_path"
29073    fi
29074
29075    if test "x$complete" != "x$new_complete"; then
29076      CC="$new_complete"
29077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29078$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29079    fi
29080  fi
29081
29082  TEST_COMPILER="$CC"
29083  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29084  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29085  if test "x$OPENJDK_BUILD_OS" != xaix; then
29086    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29088$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29089
29090  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29091    # Follow a chain of symbolic links. Use readlink
29092    # where it exists, else fall back to horribly
29093    # complicated shell code.
29094    if test "x$READLINK_TESTED" != yes; then
29095      # On MacOSX there is a readlink tool with a different
29096      # purpose than the GNU readlink tool. Check the found readlink.
29097      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29098      if test "x$ISGNU" = x; then
29099        # A readlink that we do not know how to use.
29100        # Are there other non-GNU readlinks out there?
29101        READLINK_TESTED=yes
29102        READLINK=
29103      fi
29104    fi
29105
29106    if test "x$READLINK" != x; then
29107      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29108    else
29109      # Save the current directory for restoring afterwards
29110      STARTDIR=$PWD
29111      COUNTER=0
29112      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29113      sym_link_file=`$BASENAME $TEST_COMPILER`
29114      cd $sym_link_dir
29115      # Use -P flag to resolve symlinks in directories.
29116      cd `$THEPWDCMD -P`
29117      sym_link_dir=`$THEPWDCMD -P`
29118      # Resolve file symlinks
29119      while test $COUNTER -lt 20; do
29120        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29121        if test "x$ISLINK" == x; then
29122          # This is not a symbolic link! We are done!
29123          break
29124        fi
29125        # Again resolve directory symlinks since the target of the just found
29126        # link could be in a different directory
29127        cd `$DIRNAME $ISLINK`
29128        sym_link_dir=`$THEPWDCMD -P`
29129        sym_link_file=`$BASENAME $ISLINK`
29130        let COUNTER=COUNTER+1
29131      done
29132      cd $STARTDIR
29133      TEST_COMPILER=$sym_link_dir/$sym_link_file
29134    fi
29135  fi
29136
29137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29138$as_echo "$TEST_COMPILER" >&6; }
29139  fi
29140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29141$as_echo_n "checking if CC is disguised ccache... " >&6; }
29142
29143  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29144  if test "x$COMPILER_BASENAME" = "xccache"; then
29145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29146$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29147    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29148    # We want to control ccache invocation ourselves, so ignore this cc and try
29149    # searching again.
29150
29151    # Remove the path to the fake ccache cc from the PATH
29152    RETRY_COMPILER_SAVED_PATH="$PATH"
29153    COMPILER_DIRNAME=`$DIRNAME $CC`
29154    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29155
29156    # Try again looking for our compiler
29157    if test -n "$ac_tool_prefix"; then
29158  for ac_prog in $TOOLCHAIN_CC_BINARY
29159  do
29160    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29161set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29163$as_echo_n "checking for $ac_word... " >&6; }
29164if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29165  $as_echo_n "(cached) " >&6
29166else
29167  if test -n "$PROPER_COMPILER_CC"; then
29168  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29169else
29170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29171for as_dir in $PATH
29172do
29173  IFS=$as_save_IFS
29174  test -z "$as_dir" && as_dir=.
29175    for ac_exec_ext in '' $ac_executable_extensions; do
29176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29177    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29179    break 2
29180  fi
29181done
29182  done
29183IFS=$as_save_IFS
29184
29185fi
29186fi
29187PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29188if test -n "$PROPER_COMPILER_CC"; then
29189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29190$as_echo "$PROPER_COMPILER_CC" >&6; }
29191else
29192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29193$as_echo "no" >&6; }
29194fi
29195
29196
29197    test -n "$PROPER_COMPILER_CC" && break
29198  done
29199fi
29200if test -z "$PROPER_COMPILER_CC"; then
29201  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29202  for ac_prog in $TOOLCHAIN_CC_BINARY
29203do
29204  # Extract the first word of "$ac_prog", so it can be a program name with args.
29205set dummy $ac_prog; ac_word=$2
29206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29207$as_echo_n "checking for $ac_word... " >&6; }
29208if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29209  $as_echo_n "(cached) " >&6
29210else
29211  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29212  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29213else
29214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29215for as_dir in $PATH
29216do
29217  IFS=$as_save_IFS
29218  test -z "$as_dir" && as_dir=.
29219    for ac_exec_ext in '' $ac_executable_extensions; do
29220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29221    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29223    break 2
29224  fi
29225done
29226  done
29227IFS=$as_save_IFS
29228
29229fi
29230fi
29231ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29232if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29234$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29235else
29236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29237$as_echo "no" >&6; }
29238fi
29239
29240
29241  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29242done
29243
29244  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29245    PROPER_COMPILER_CC=""
29246  else
29247    case $cross_compiling:$ac_tool_warned in
29248yes:)
29249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29251ac_tool_warned=yes ;;
29252esac
29253    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29254  fi
29255fi
29256
29257
29258  # Only process if variable expands to non-empty
29259
29260  if test "x$PROPER_COMPILER_CC" != x; then
29261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29262
29263  # First separate the path from the arguments. This will split at the first
29264  # space.
29265  complete="$PROPER_COMPILER_CC"
29266  path="${complete%% *}"
29267  tmp="$complete EOL"
29268  arguments="${tmp#* }"
29269
29270  # Input might be given as Windows format, start by converting to
29271  # unix format.
29272  new_path=`$CYGPATH -u "$path"`
29273
29274  # Now try to locate executable using which
29275  new_path=`$WHICH "$new_path" 2> /dev/null`
29276  # bat and cmd files are not always considered executable in cygwin causing which
29277  # to not find them
29278  if test "x$new_path" = x \
29279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29281    new_path=`$CYGPATH -u "$path"`
29282  fi
29283  if test "x$new_path" = x; then
29284    # Oops. Which didn't find the executable.
29285    # The splitting of arguments from the executable at a space might have been incorrect,
29286    # since paths with space are more likely in Windows. Give it another try with the whole
29287    # argument.
29288    path="$complete"
29289    arguments="EOL"
29290    new_path=`$CYGPATH -u "$path"`
29291    new_path=`$WHICH "$new_path" 2> /dev/null`
29292    # bat and cmd files are not always considered executable in cygwin causing which
29293    # to not find them
29294    if test "x$new_path" = x \
29295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29297      new_path=`$CYGPATH -u "$path"`
29298    fi
29299    if test "x$new_path" = x; then
29300      # It's still not found. Now this is an unrecoverable error.
29301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29302$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29303      has_space=`$ECHO "$complete" | $GREP " "`
29304      if test "x$has_space" != x; then
29305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29307      fi
29308      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29309    fi
29310  fi
29311
29312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29315  # "foo.exe" is OK but "foo" is an error.
29316  #
29317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29318  # It is also a way to make sure we got the proper file name for the real test later on.
29319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29320  if test "x$test_shortpath" = x; then
29321    # Short path failed, file does not exist as specified.
29322    # Try adding .exe or .cmd
29323    if test -f "${new_path}.exe"; then
29324      input_to_shortpath="${new_path}.exe"
29325    elif test -f "${new_path}.cmd"; then
29326      input_to_shortpath="${new_path}.cmd"
29327    else
29328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29329$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29332      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29333    fi
29334  else
29335    input_to_shortpath="$new_path"
29336  fi
29337
29338  # Call helper function which possibly converts this using DOS-style short mode.
29339  # If so, the updated path is stored in $new_path.
29340  new_path="$input_to_shortpath"
29341
29342  input_path="$input_to_shortpath"
29343  # Check if we need to convert this using DOS-style short mode. If the path
29344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29345  # take no chances and rewrite it.
29346  # Note: m4 eats our [], so we need to use [ and ] instead.
29347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29348  if test "x$has_forbidden_chars" != x; then
29349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29353      # Going to short mode and back again did indeed matter. Since short mode is
29354      # case insensitive, let's make it lowercase to improve readability.
29355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29356      # Now convert it back to Unix-style (cygpath)
29357      input_path=`$CYGPATH -u "$shortmode_path"`
29358      new_path="$input_path"
29359    fi
29360  fi
29361
29362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29363  if test "x$test_cygdrive_prefix" = x; then
29364    # As a simple fix, exclude /usr/bin since it's not a real path.
29365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29367      # a path prefixed by /cygdrive for fixpath to work.
29368      new_path="$CYGWIN_ROOT_PATH$input_path"
29369    fi
29370  fi
29371
29372  # remove trailing .exe if any
29373  new_path="${new_path/%.exe/}"
29374
29375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29376
29377  # First separate the path from the arguments. This will split at the first
29378  # space.
29379  complete="$PROPER_COMPILER_CC"
29380  path="${complete%% *}"
29381  tmp="$complete EOL"
29382  arguments="${tmp#* }"
29383
29384  # Input might be given as Windows format, start by converting to
29385  # unix format.
29386  new_path="$path"
29387
29388  windows_path="$new_path"
29389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29390    unix_path=`$CYGPATH -u "$windows_path"`
29391    new_path="$unix_path"
29392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29394    new_path="$unix_path"
29395  fi
29396
29397
29398  # Now try to locate executable using which
29399  new_path=`$WHICH "$new_path" 2> /dev/null`
29400
29401  if test "x$new_path" = x; then
29402    # Oops. Which didn't find the executable.
29403    # The splitting of arguments from the executable at a space might have been incorrect,
29404    # since paths with space are more likely in Windows. Give it another try with the whole
29405    # argument.
29406    path="$complete"
29407    arguments="EOL"
29408    new_path="$path"
29409
29410  windows_path="$new_path"
29411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29412    unix_path=`$CYGPATH -u "$windows_path"`
29413    new_path="$unix_path"
29414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29416    new_path="$unix_path"
29417  fi
29418
29419
29420    new_path=`$WHICH "$new_path" 2> /dev/null`
29421    # bat and cmd files are not always considered executable in MSYS causing which
29422    # to not find them
29423    if test "x$new_path" = x \
29424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29426      new_path="$path"
29427
29428  windows_path="$new_path"
29429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29430    unix_path=`$CYGPATH -u "$windows_path"`
29431    new_path="$unix_path"
29432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29434    new_path="$unix_path"
29435  fi
29436
29437    fi
29438
29439    if test "x$new_path" = x; then
29440      # It's still not found. Now this is an unrecoverable error.
29441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29442$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29443      has_space=`$ECHO "$complete" | $GREP " "`
29444      if test "x$has_space" != x; then
29445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29447      fi
29448      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29449    fi
29450  fi
29451
29452  # Now new_path has a complete unix path to the binary
29453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29454    # Keep paths in /bin as-is, but remove trailing .exe if any
29455    new_path="${new_path/%.exe/}"
29456    # Do not save /bin paths to all_fixpath_prefixes!
29457  else
29458    # Not in mixed or Windows style, start by that.
29459    new_path=`cmd //c echo $new_path`
29460
29461  input_path="$new_path"
29462  # Check if we need to convert this using DOS-style short mode. If the path
29463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29464  # take no chances and rewrite it.
29465  # Note: m4 eats our [], so we need to use [ and ] instead.
29466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29467  if test "x$has_forbidden_chars" != x; then
29468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29470  fi
29471
29472    # Output is in $new_path
29473
29474  windows_path="$new_path"
29475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29476    unix_path=`$CYGPATH -u "$windows_path"`
29477    new_path="$unix_path"
29478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29480    new_path="$unix_path"
29481  fi
29482
29483    # remove trailing .exe if any
29484    new_path="${new_path/%.exe/}"
29485
29486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29488  fi
29489
29490    else
29491      # We're on a unix platform. Hooray! :)
29492      # First separate the path from the arguments. This will split at the first
29493      # space.
29494      complete="$PROPER_COMPILER_CC"
29495      path="${complete%% *}"
29496      tmp="$complete EOL"
29497      arguments="${tmp#* }"
29498
29499      # Cannot rely on the command "which" here since it doesn't always work.
29500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29501      if test -z "$is_absolute_path"; then
29502        # Path to executable is not absolute. Find it.
29503        IFS_save="$IFS"
29504        IFS=:
29505        for p in $PATH; do
29506          if test -f "$p/$path" && test -x "$p/$path"; then
29507            new_path="$p/$path"
29508            break
29509          fi
29510        done
29511        IFS="$IFS_save"
29512      else
29513        # This is an absolute path, we can use it without further modifications.
29514        new_path="$path"
29515      fi
29516
29517      if test "x$new_path" = x; then
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29519$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29520        has_space=`$ECHO "$complete" | $GREP " "`
29521        if test "x$has_space" != x; then
29522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29524        fi
29525        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29526      fi
29527    fi
29528
29529    # Now join together the path and the arguments once again
29530    if test "x$arguments" != xEOL; then
29531      new_complete="$new_path ${arguments% *}"
29532    else
29533      new_complete="$new_path"
29534    fi
29535
29536    if test "x$complete" != "x$new_complete"; then
29537      PROPER_COMPILER_CC="$new_complete"
29538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29539$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29540    fi
29541  fi
29542
29543    PATH="$RETRY_COMPILER_SAVED_PATH"
29544
29545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29546$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29547
29548  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29549    # Follow a chain of symbolic links. Use readlink
29550    # where it exists, else fall back to horribly
29551    # complicated shell code.
29552    if test "x$READLINK_TESTED" != yes; then
29553      # On MacOSX there is a readlink tool with a different
29554      # purpose than the GNU readlink tool. Check the found readlink.
29555      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29556      if test "x$ISGNU" = x; then
29557        # A readlink that we do not know how to use.
29558        # Are there other non-GNU readlinks out there?
29559        READLINK_TESTED=yes
29560        READLINK=
29561      fi
29562    fi
29563
29564    if test "x$READLINK" != x; then
29565      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29566    else
29567      # Save the current directory for restoring afterwards
29568      STARTDIR=$PWD
29569      COUNTER=0
29570      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29571      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29572      cd $sym_link_dir
29573      # Use -P flag to resolve symlinks in directories.
29574      cd `$THEPWDCMD -P`
29575      sym_link_dir=`$THEPWDCMD -P`
29576      # Resolve file symlinks
29577      while test $COUNTER -lt 20; do
29578        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29579        if test "x$ISLINK" == x; then
29580          # This is not a symbolic link! We are done!
29581          break
29582        fi
29583        # Again resolve directory symlinks since the target of the just found
29584        # link could be in a different directory
29585        cd `$DIRNAME $ISLINK`
29586        sym_link_dir=`$THEPWDCMD -P`
29587        sym_link_file=`$BASENAME $ISLINK`
29588        let COUNTER=COUNTER+1
29589      done
29590      cd $STARTDIR
29591      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29592    fi
29593  fi
29594
29595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29596$as_echo "$PROPER_COMPILER_CC" >&6; }
29597    CC="$PROPER_COMPILER_CC"
29598  else
29599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29600$as_echo "no, keeping CC" >&6; }
29601  fi
29602
29603
29604  COMPILER=$CC
29605  COMPILER_NAME=$COMPILER_NAME
29606
29607  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29608    # cc -V output typically looks like
29609    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29610    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29611    # Check that this is likely to be the Solaris Studio cc.
29612    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29613    if test $? -ne 0; then
29614      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29615      { $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
29616$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29617      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29618$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29620$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29621      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29622    fi
29623    # Remove usage instructions (if present), and
29624    # collapse compiler output into a single line
29625    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29626        $SED -e 's/ *[Uu]sage:.*//'`
29627    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29628        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29629  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29630    # xlc -qversion output typically looks like
29631    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29632    #     Version: 11.01.0000.0015
29633    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29634    # Check that this is likely to be the IBM XL C compiler.
29635    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29636    if test $? -ne 0; then
29637      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29638      { $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
29639$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29640      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29641$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29642      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29643$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29644      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29645    fi
29646    # Collapse compiler output into a single line
29647    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29648    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29649        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29650  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29651    # There is no specific version flag, but all output starts with a version string.
29652    # First line typically looks something like:
29653    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29654    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29655    # Check that this is likely to be Microsoft CL.EXE.
29656    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29657    if test $? -ne 0; then
29658      { $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
29659$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29660      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29661$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29662      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29663    fi
29664    # Collapse compiler output into a single line
29665    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29666    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29667        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29668  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29669    # gcc --version output typically looks like
29670    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29671    #     Copyright (C) 2013 Free Software Foundation, Inc.
29672    #     This is free software; see the source for copying conditions.  There is NO
29673    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29674    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29675    # Check that this is likely to be GCC.
29676    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29677    if test $? -ne 0; then
29678      { $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
29679$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29680      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29681$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29682      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29683    fi
29684    # Remove Copyright and legalese from version string, and
29685    # collapse into a single line
29686    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29687        $SED -e 's/ *Copyright .*//'`
29688    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29689        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29690  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29691    # clang --version output typically looks like
29692    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29693    #    clang version 3.3 (tags/RELEASE_33/final)
29694    # or
29695    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29696    #    Target: x86_64-pc-linux-gnu
29697    #    Thread model: posix
29698    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29699    # Check that this is likely to be clang
29700    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29701    if test $? -ne 0; then
29702      { $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
29703$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29704      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29705$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29706      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29707    fi
29708    # Collapse compiler output into a single line
29709    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29710    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29711        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29712  else
29713      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29714  fi
29715  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29716  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29717  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29718  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29719
29720  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29721$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29722
29723
29724  # Now that we have resolved CC ourself, let autoconf have its go at it
29725  ac_ext=c
29726ac_cpp='$CPP $CPPFLAGS'
29727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29729ac_compiler_gnu=$ac_cv_c_compiler_gnu
29730if test -n "$ac_tool_prefix"; then
29731  for ac_prog in $CC
29732  do
29733    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29736$as_echo_n "checking for $ac_word... " >&6; }
29737if ${ac_cv_prog_CC+:} false; then :
29738  $as_echo_n "(cached) " >&6
29739else
29740  if test -n "$CC"; then
29741  ac_cv_prog_CC="$CC" # Let the user override the test.
29742else
29743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29744for as_dir in $PATH
29745do
29746  IFS=$as_save_IFS
29747  test -z "$as_dir" && as_dir=.
29748    for ac_exec_ext in '' $ac_executable_extensions; do
29749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29750    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29752    break 2
29753  fi
29754done
29755  done
29756IFS=$as_save_IFS
29757
29758fi
29759fi
29760CC=$ac_cv_prog_CC
29761if test -n "$CC"; then
29762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29763$as_echo "$CC" >&6; }
29764else
29765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29766$as_echo "no" >&6; }
29767fi
29768
29769
29770    test -n "$CC" && break
29771  done
29772fi
29773if test -z "$CC"; then
29774  ac_ct_CC=$CC
29775  for ac_prog in $CC
29776do
29777  # Extract the first word of "$ac_prog", so it can be a program name with args.
29778set dummy $ac_prog; ac_word=$2
29779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29780$as_echo_n "checking for $ac_word... " >&6; }
29781if ${ac_cv_prog_ac_ct_CC+:} false; then :
29782  $as_echo_n "(cached) " >&6
29783else
29784  if test -n "$ac_ct_CC"; then
29785  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29786else
29787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29788for as_dir in $PATH
29789do
29790  IFS=$as_save_IFS
29791  test -z "$as_dir" && as_dir=.
29792    for ac_exec_ext in '' $ac_executable_extensions; do
29793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29794    ac_cv_prog_ac_ct_CC="$ac_prog"
29795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29796    break 2
29797  fi
29798done
29799  done
29800IFS=$as_save_IFS
29801
29802fi
29803fi
29804ac_ct_CC=$ac_cv_prog_ac_ct_CC
29805if test -n "$ac_ct_CC"; then
29806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29807$as_echo "$ac_ct_CC" >&6; }
29808else
29809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29810$as_echo "no" >&6; }
29811fi
29812
29813
29814  test -n "$ac_ct_CC" && break
29815done
29816
29817  if test "x$ac_ct_CC" = x; then
29818    CC=""
29819  else
29820    case $cross_compiling:$ac_tool_warned in
29821yes:)
29822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29824ac_tool_warned=yes ;;
29825esac
29826    CC=$ac_ct_CC
29827  fi
29828fi
29829
29830
29831test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29833as_fn_error $? "no acceptable C compiler found in \$PATH
29834See \`config.log' for more details" "$LINENO" 5; }
29835
29836# Provide some information about the compiler.
29837$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29838set X $ac_compile
29839ac_compiler=$2
29840for ac_option in --version -v -V -qversion; do
29841  { { ac_try="$ac_compiler $ac_option >&5"
29842case "(($ac_try" in
29843  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29844  *) ac_try_echo=$ac_try;;
29845esac
29846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29847$as_echo "$ac_try_echo"; } >&5
29848  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29849  ac_status=$?
29850  if test -s conftest.err; then
29851    sed '10a\
29852... rest of stderr output deleted ...
29853         10q' conftest.err >conftest.er1
29854    cat conftest.er1 >&5
29855  fi
29856  rm -f conftest.er1 conftest.err
29857  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29858  test $ac_status = 0; }
29859done
29860
29861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29862/* end confdefs.h.  */
29863
29864int
29865main ()
29866{
29867
29868  ;
29869  return 0;
29870}
29871_ACEOF
29872ac_clean_files_save=$ac_clean_files
29873ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29874# Try to create an executable without -o first, disregard a.out.
29875# It will help us diagnose broken compilers, and finding out an intuition
29876# of exeext.
29877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29878$as_echo_n "checking whether the C compiler works... " >&6; }
29879ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29880
29881# The possible output files:
29882ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29883
29884ac_rmfiles=
29885for ac_file in $ac_files
29886do
29887  case $ac_file in
29888    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29889    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29890  esac
29891done
29892rm -f $ac_rmfiles
29893
29894if { { ac_try="$ac_link_default"
29895case "(($ac_try" in
29896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29897  *) ac_try_echo=$ac_try;;
29898esac
29899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29900$as_echo "$ac_try_echo"; } >&5
29901  (eval "$ac_link_default") 2>&5
29902  ac_status=$?
29903  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29904  test $ac_status = 0; }; then :
29905  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29906# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29907# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29908# so that the user can short-circuit this test for compilers unknown to
29909# Autoconf.
29910for ac_file in $ac_files ''
29911do
29912  test -f "$ac_file" || continue
29913  case $ac_file in
29914    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29915	;;
29916    [ab].out )
29917	# We found the default executable, but exeext='' is most
29918	# certainly right.
29919	break;;
29920    *.* )
29921	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29922	then :; else
29923	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29924	fi
29925	# We set ac_cv_exeext here because the later test for it is not
29926	# safe: cross compilers may not add the suffix if given an `-o'
29927	# argument, so we may need to know it at that point already.
29928	# Even if this section looks crufty: it has the advantage of
29929	# actually working.
29930	break;;
29931    * )
29932	break;;
29933  esac
29934done
29935test "$ac_cv_exeext" = no && ac_cv_exeext=
29936
29937else
29938  ac_file=''
29939fi
29940if test -z "$ac_file"; then :
29941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29942$as_echo "no" >&6; }
29943$as_echo "$as_me: failed program was:" >&5
29944sed 's/^/| /' conftest.$ac_ext >&5
29945
29946{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29948as_fn_error 77 "C compiler cannot create executables
29949See \`config.log' for more details" "$LINENO" 5; }
29950else
29951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29952$as_echo "yes" >&6; }
29953fi
29954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29955$as_echo_n "checking for C compiler default output file name... " >&6; }
29956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29957$as_echo "$ac_file" >&6; }
29958ac_exeext=$ac_cv_exeext
29959
29960rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29961ac_clean_files=$ac_clean_files_save
29962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29963$as_echo_n "checking for suffix of executables... " >&6; }
29964if { { ac_try="$ac_link"
29965case "(($ac_try" in
29966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29967  *) ac_try_echo=$ac_try;;
29968esac
29969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29970$as_echo "$ac_try_echo"; } >&5
29971  (eval "$ac_link") 2>&5
29972  ac_status=$?
29973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29974  test $ac_status = 0; }; then :
29975  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29976# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29977# work properly (i.e., refer to `conftest.exe'), while it won't with
29978# `rm'.
29979for ac_file in conftest.exe conftest conftest.*; do
29980  test -f "$ac_file" || continue
29981  case $ac_file in
29982    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29983    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29984	  break;;
29985    * ) break;;
29986  esac
29987done
29988else
29989  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29991as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29992See \`config.log' for more details" "$LINENO" 5; }
29993fi
29994rm -f conftest conftest$ac_cv_exeext
29995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29996$as_echo "$ac_cv_exeext" >&6; }
29997
29998rm -f conftest.$ac_ext
29999EXEEXT=$ac_cv_exeext
30000ac_exeext=$EXEEXT
30001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30002/* end confdefs.h.  */
30003#include <stdio.h>
30004int
30005main ()
30006{
30007FILE *f = fopen ("conftest.out", "w");
30008 return ferror (f) || fclose (f) != 0;
30009
30010  ;
30011  return 0;
30012}
30013_ACEOF
30014ac_clean_files="$ac_clean_files conftest.out"
30015# Check that the compiler produces executables we can run.  If not, either
30016# the compiler is broken, or we cross compile.
30017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30018$as_echo_n "checking whether we are cross compiling... " >&6; }
30019if test "$cross_compiling" != yes; then
30020  { { ac_try="$ac_link"
30021case "(($ac_try" in
30022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30023  *) ac_try_echo=$ac_try;;
30024esac
30025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30026$as_echo "$ac_try_echo"; } >&5
30027  (eval "$ac_link") 2>&5
30028  ac_status=$?
30029  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30030  test $ac_status = 0; }
30031  if { ac_try='./conftest$ac_cv_exeext'
30032  { { case "(($ac_try" in
30033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30034  *) ac_try_echo=$ac_try;;
30035esac
30036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30037$as_echo "$ac_try_echo"; } >&5
30038  (eval "$ac_try") 2>&5
30039  ac_status=$?
30040  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30041  test $ac_status = 0; }; }; then
30042    cross_compiling=no
30043  else
30044    if test "$cross_compiling" = maybe; then
30045	cross_compiling=yes
30046    else
30047	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30049as_fn_error $? "cannot run C compiled programs.
30050If you meant to cross compile, use \`--host'.
30051See \`config.log' for more details" "$LINENO" 5; }
30052    fi
30053  fi
30054fi
30055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30056$as_echo "$cross_compiling" >&6; }
30057
30058rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30059ac_clean_files=$ac_clean_files_save
30060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30061$as_echo_n "checking for suffix of object files... " >&6; }
30062if ${ac_cv_objext+:} false; then :
30063  $as_echo_n "(cached) " >&6
30064else
30065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30066/* end confdefs.h.  */
30067
30068int
30069main ()
30070{
30071
30072  ;
30073  return 0;
30074}
30075_ACEOF
30076rm -f conftest.o conftest.obj
30077if { { ac_try="$ac_compile"
30078case "(($ac_try" in
30079  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30080  *) ac_try_echo=$ac_try;;
30081esac
30082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30083$as_echo "$ac_try_echo"; } >&5
30084  (eval "$ac_compile") 2>&5
30085  ac_status=$?
30086  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30087  test $ac_status = 0; }; then :
30088  for ac_file in conftest.o conftest.obj conftest.*; do
30089  test -f "$ac_file" || continue;
30090  case $ac_file in
30091    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30092    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30093       break;;
30094  esac
30095done
30096else
30097  $as_echo "$as_me: failed program was:" >&5
30098sed 's/^/| /' conftest.$ac_ext >&5
30099
30100{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30102as_fn_error $? "cannot compute suffix of object files: cannot compile
30103See \`config.log' for more details" "$LINENO" 5; }
30104fi
30105rm -f conftest.$ac_cv_objext conftest.$ac_ext
30106fi
30107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30108$as_echo "$ac_cv_objext" >&6; }
30109OBJEXT=$ac_cv_objext
30110ac_objext=$OBJEXT
30111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30112$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30113if ${ac_cv_c_compiler_gnu+:} false; then :
30114  $as_echo_n "(cached) " >&6
30115else
30116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30117/* end confdefs.h.  */
30118
30119int
30120main ()
30121{
30122#ifndef __GNUC__
30123       choke me
30124#endif
30125
30126  ;
30127  return 0;
30128}
30129_ACEOF
30130if ac_fn_c_try_compile "$LINENO"; then :
30131  ac_compiler_gnu=yes
30132else
30133  ac_compiler_gnu=no
30134fi
30135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30136ac_cv_c_compiler_gnu=$ac_compiler_gnu
30137
30138fi
30139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30140$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30141if test $ac_compiler_gnu = yes; then
30142  GCC=yes
30143else
30144  GCC=
30145fi
30146ac_test_CFLAGS=${CFLAGS+set}
30147ac_save_CFLAGS=$CFLAGS
30148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30149$as_echo_n "checking whether $CC accepts -g... " >&6; }
30150if ${ac_cv_prog_cc_g+:} false; then :
30151  $as_echo_n "(cached) " >&6
30152else
30153  ac_save_c_werror_flag=$ac_c_werror_flag
30154   ac_c_werror_flag=yes
30155   ac_cv_prog_cc_g=no
30156   CFLAGS="-g"
30157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30158/* end confdefs.h.  */
30159
30160int
30161main ()
30162{
30163
30164  ;
30165  return 0;
30166}
30167_ACEOF
30168if ac_fn_c_try_compile "$LINENO"; then :
30169  ac_cv_prog_cc_g=yes
30170else
30171  CFLAGS=""
30172      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30173/* end confdefs.h.  */
30174
30175int
30176main ()
30177{
30178
30179  ;
30180  return 0;
30181}
30182_ACEOF
30183if ac_fn_c_try_compile "$LINENO"; then :
30184
30185else
30186  ac_c_werror_flag=$ac_save_c_werror_flag
30187	 CFLAGS="-g"
30188	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30189/* end confdefs.h.  */
30190
30191int
30192main ()
30193{
30194
30195  ;
30196  return 0;
30197}
30198_ACEOF
30199if ac_fn_c_try_compile "$LINENO"; then :
30200  ac_cv_prog_cc_g=yes
30201fi
30202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30203fi
30204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30205fi
30206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30207   ac_c_werror_flag=$ac_save_c_werror_flag
30208fi
30209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30210$as_echo "$ac_cv_prog_cc_g" >&6; }
30211if test "$ac_test_CFLAGS" = set; then
30212  CFLAGS=$ac_save_CFLAGS
30213elif test $ac_cv_prog_cc_g = yes; then
30214  if test "$GCC" = yes; then
30215    CFLAGS="-g -O2"
30216  else
30217    CFLAGS="-g"
30218  fi
30219else
30220  if test "$GCC" = yes; then
30221    CFLAGS="-O2"
30222  else
30223    CFLAGS=
30224  fi
30225fi
30226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30227$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30228if ${ac_cv_prog_cc_c89+:} false; then :
30229  $as_echo_n "(cached) " >&6
30230else
30231  ac_cv_prog_cc_c89=no
30232ac_save_CC=$CC
30233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30234/* end confdefs.h.  */
30235#include <stdarg.h>
30236#include <stdio.h>
30237struct stat;
30238/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30239struct buf { int x; };
30240FILE * (*rcsopen) (struct buf *, struct stat *, int);
30241static char *e (p, i)
30242     char **p;
30243     int i;
30244{
30245  return p[i];
30246}
30247static char *f (char * (*g) (char **, int), char **p, ...)
30248{
30249  char *s;
30250  va_list v;
30251  va_start (v,p);
30252  s = g (p, va_arg (v,int));
30253  va_end (v);
30254  return s;
30255}
30256
30257/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30258   function prototypes and stuff, but not '\xHH' hex character constants.
30259   These don't provoke an error unfortunately, instead are silently treated
30260   as 'x'.  The following induces an error, until -std is added to get
30261   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30262   array size at least.  It's necessary to write '\x00'==0 to get something
30263   that's true only with -std.  */
30264int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30265
30266/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30267   inside strings and character constants.  */
30268#define FOO(x) 'x'
30269int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30270
30271int test (int i, double x);
30272struct s1 {int (*f) (int a);};
30273struct s2 {int (*f) (double a);};
30274int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30275int argc;
30276char **argv;
30277int
30278main ()
30279{
30280return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30281  ;
30282  return 0;
30283}
30284_ACEOF
30285for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30286	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30287do
30288  CC="$ac_save_CC $ac_arg"
30289  if ac_fn_c_try_compile "$LINENO"; then :
30290  ac_cv_prog_cc_c89=$ac_arg
30291fi
30292rm -f core conftest.err conftest.$ac_objext
30293  test "x$ac_cv_prog_cc_c89" != "xno" && break
30294done
30295rm -f conftest.$ac_ext
30296CC=$ac_save_CC
30297
30298fi
30299# AC_CACHE_VAL
30300case "x$ac_cv_prog_cc_c89" in
30301  x)
30302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30303$as_echo "none needed" >&6; } ;;
30304  xno)
30305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30306$as_echo "unsupported" >&6; } ;;
30307  *)
30308    CC="$CC $ac_cv_prog_cc_c89"
30309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30310$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30311esac
30312if test "x$ac_cv_prog_cc_c89" != xno; then :
30313
30314fi
30315
30316ac_ext=cpp
30317ac_cpp='$CXXCPP $CPPFLAGS'
30318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30321
30322
30323
30324  COMPILER_NAME=C++
30325  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30326
30327  if test "x$CXX" != x; then
30328    # User has supplied compiler name already, always let that override.
30329    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30330$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30331    if test "x`basename $CXX`" = "x$CXX"; then
30332      # A command without a complete path is provided, search $PATH.
30333
30334      for ac_prog in $CXX
30335do
30336  # Extract the first word of "$ac_prog", so it can be a program name with args.
30337set dummy $ac_prog; ac_word=$2
30338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30339$as_echo_n "checking for $ac_word... " >&6; }
30340if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30341  $as_echo_n "(cached) " >&6
30342else
30343  case $POTENTIAL_CXX in
30344  [\\/]* | ?:[\\/]*)
30345  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30346  ;;
30347  *)
30348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30349for as_dir in $PATH
30350do
30351  IFS=$as_save_IFS
30352  test -z "$as_dir" && as_dir=.
30353    for ac_exec_ext in '' $ac_executable_extensions; do
30354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30355    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30357    break 2
30358  fi
30359done
30360  done
30361IFS=$as_save_IFS
30362
30363  ;;
30364esac
30365fi
30366POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30367if test -n "$POTENTIAL_CXX"; then
30368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30369$as_echo "$POTENTIAL_CXX" >&6; }
30370else
30371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30372$as_echo "no" >&6; }
30373fi
30374
30375
30376  test -n "$POTENTIAL_CXX" && break
30377done
30378
30379      if test "x$POTENTIAL_CXX" != x; then
30380        CXX=$POTENTIAL_CXX
30381      else
30382        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30383      fi
30384    else
30385      # Otherwise it might already be a complete path
30386      if test ! -x "$CXX"; then
30387        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30388      fi
30389    fi
30390  else
30391    # No user supplied value. Locate compiler ourselves.
30392
30393    # If we are cross compiling, assume cross compilation tools follows the
30394    # cross compilation standard where they are prefixed with the autoconf
30395    # standard name for the target. For example the binary
30396    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30397    # If we are not cross compiling, then the default compiler name will be
30398    # used.
30399
30400    CXX=
30401    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30402    # before checking the rest of the PATH.
30403    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30404    # step, this should not be necessary.
30405    if test -n "$TOOLCHAIN_PATH"; then
30406      PATH_save="$PATH"
30407      PATH="$TOOLCHAIN_PATH"
30408      for ac_prog in $SEARCH_LIST
30409do
30410  # Extract the first word of "$ac_prog", so it can be a program name with args.
30411set dummy $ac_prog; ac_word=$2
30412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30413$as_echo_n "checking for $ac_word... " >&6; }
30414if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30415  $as_echo_n "(cached) " >&6
30416else
30417  case $TOOLCHAIN_PATH_CXX in
30418  [\\/]* | ?:[\\/]*)
30419  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30420  ;;
30421  *)
30422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30423for as_dir in $PATH
30424do
30425  IFS=$as_save_IFS
30426  test -z "$as_dir" && as_dir=.
30427    for ac_exec_ext in '' $ac_executable_extensions; do
30428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30429    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30431    break 2
30432  fi
30433done
30434  done
30435IFS=$as_save_IFS
30436
30437  ;;
30438esac
30439fi
30440TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30441if test -n "$TOOLCHAIN_PATH_CXX"; then
30442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30443$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30444else
30445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30446$as_echo "no" >&6; }
30447fi
30448
30449
30450  test -n "$TOOLCHAIN_PATH_CXX" && break
30451done
30452
30453      CXX=$TOOLCHAIN_PATH_CXX
30454      PATH="$PATH_save"
30455    fi
30456
30457    # AC_PATH_PROGS can't be run multiple times with the same variable,
30458    # so create a new name for this run.
30459    if test "x$CXX" = x; then
30460      for ac_prog in $SEARCH_LIST
30461do
30462  # Extract the first word of "$ac_prog", so it can be a program name with args.
30463set dummy $ac_prog; ac_word=$2
30464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30465$as_echo_n "checking for $ac_word... " >&6; }
30466if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30467  $as_echo_n "(cached) " >&6
30468else
30469  case $POTENTIAL_CXX in
30470  [\\/]* | ?:[\\/]*)
30471  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30472  ;;
30473  *)
30474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30475for as_dir in $PATH
30476do
30477  IFS=$as_save_IFS
30478  test -z "$as_dir" && as_dir=.
30479    for ac_exec_ext in '' $ac_executable_extensions; do
30480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30481    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30483    break 2
30484  fi
30485done
30486  done
30487IFS=$as_save_IFS
30488
30489  ;;
30490esac
30491fi
30492POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30493if test -n "$POTENTIAL_CXX"; then
30494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30495$as_echo "$POTENTIAL_CXX" >&6; }
30496else
30497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30498$as_echo "no" >&6; }
30499fi
30500
30501
30502  test -n "$POTENTIAL_CXX" && break
30503done
30504
30505      CXX=$POTENTIAL_CXX
30506    fi
30507
30508    if test "x$CXX" = x; then
30509
30510  # Print a helpful message on how to acquire the necessary build dependency.
30511  # devkit is the help tag: freetype, cups, pulse, alsa etc
30512  MISSING_DEPENDENCY=devkit
30513
30514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30515    cygwin_help $MISSING_DEPENDENCY
30516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30517    msys_help $MISSING_DEPENDENCY
30518  else
30519    PKGHANDLER_COMMAND=
30520
30521    case $PKGHANDLER in
30522      apt-get)
30523        apt_help     $MISSING_DEPENDENCY ;;
30524      yum)
30525        yum_help     $MISSING_DEPENDENCY ;;
30526      port)
30527        port_help    $MISSING_DEPENDENCY ;;
30528      pkgutil)
30529        pkgutil_help $MISSING_DEPENDENCY ;;
30530      pkgadd)
30531        pkgadd_help  $MISSING_DEPENDENCY ;;
30532    esac
30533
30534    if test "x$PKGHANDLER_COMMAND" != x; then
30535      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30536    fi
30537  fi
30538
30539      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30540    fi
30541  fi
30542
30543  # Now we have a compiler binary in CXX. Make sure it's okay.
30544
30545  # Only process if variable expands to non-empty
30546
30547  if test "x$CXX" != x; then
30548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30549
30550  # First separate the path from the arguments. This will split at the first
30551  # space.
30552  complete="$CXX"
30553  path="${complete%% *}"
30554  tmp="$complete EOL"
30555  arguments="${tmp#* }"
30556
30557  # Input might be given as Windows format, start by converting to
30558  # unix format.
30559  new_path=`$CYGPATH -u "$path"`
30560
30561  # Now try to locate executable using which
30562  new_path=`$WHICH "$new_path" 2> /dev/null`
30563  # bat and cmd files are not always considered executable in cygwin causing which
30564  # to not find them
30565  if test "x$new_path" = x \
30566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30568    new_path=`$CYGPATH -u "$path"`
30569  fi
30570  if test "x$new_path" = x; then
30571    # Oops. Which didn't find the executable.
30572    # The splitting of arguments from the executable at a space might have been incorrect,
30573    # since paths with space are more likely in Windows. Give it another try with the whole
30574    # argument.
30575    path="$complete"
30576    arguments="EOL"
30577    new_path=`$CYGPATH -u "$path"`
30578    new_path=`$WHICH "$new_path" 2> /dev/null`
30579    # bat and cmd files are not always considered executable in cygwin causing which
30580    # to not find them
30581    if test "x$new_path" = x \
30582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30584      new_path=`$CYGPATH -u "$path"`
30585    fi
30586    if test "x$new_path" = x; then
30587      # It's still not found. Now this is an unrecoverable error.
30588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30589$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30590      has_space=`$ECHO "$complete" | $GREP " "`
30591      if test "x$has_space" != x; then
30592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30594      fi
30595      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30596    fi
30597  fi
30598
30599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30602  # "foo.exe" is OK but "foo" is an error.
30603  #
30604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30605  # It is also a way to make sure we got the proper file name for the real test later on.
30606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30607  if test "x$test_shortpath" = x; then
30608    # Short path failed, file does not exist as specified.
30609    # Try adding .exe or .cmd
30610    if test -f "${new_path}.exe"; then
30611      input_to_shortpath="${new_path}.exe"
30612    elif test -f "${new_path}.cmd"; then
30613      input_to_shortpath="${new_path}.cmd"
30614    else
30615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30616$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30619      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30620    fi
30621  else
30622    input_to_shortpath="$new_path"
30623  fi
30624
30625  # Call helper function which possibly converts this using DOS-style short mode.
30626  # If so, the updated path is stored in $new_path.
30627  new_path="$input_to_shortpath"
30628
30629  input_path="$input_to_shortpath"
30630  # Check if we need to convert this using DOS-style short mode. If the path
30631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30632  # take no chances and rewrite it.
30633  # Note: m4 eats our [], so we need to use [ and ] instead.
30634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30635  if test "x$has_forbidden_chars" != x; then
30636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30640      # Going to short mode and back again did indeed matter. Since short mode is
30641      # case insensitive, let's make it lowercase to improve readability.
30642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30643      # Now convert it back to Unix-style (cygpath)
30644      input_path=`$CYGPATH -u "$shortmode_path"`
30645      new_path="$input_path"
30646    fi
30647  fi
30648
30649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30650  if test "x$test_cygdrive_prefix" = x; then
30651    # As a simple fix, exclude /usr/bin since it's not a real path.
30652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30654      # a path prefixed by /cygdrive for fixpath to work.
30655      new_path="$CYGWIN_ROOT_PATH$input_path"
30656    fi
30657  fi
30658
30659  # remove trailing .exe if any
30660  new_path="${new_path/%.exe/}"
30661
30662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30663
30664  # First separate the path from the arguments. This will split at the first
30665  # space.
30666  complete="$CXX"
30667  path="${complete%% *}"
30668  tmp="$complete EOL"
30669  arguments="${tmp#* }"
30670
30671  # Input might be given as Windows format, start by converting to
30672  # unix format.
30673  new_path="$path"
30674
30675  windows_path="$new_path"
30676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30677    unix_path=`$CYGPATH -u "$windows_path"`
30678    new_path="$unix_path"
30679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30681    new_path="$unix_path"
30682  fi
30683
30684
30685  # Now try to locate executable using which
30686  new_path=`$WHICH "$new_path" 2> /dev/null`
30687
30688  if test "x$new_path" = x; then
30689    # Oops. Which didn't find the executable.
30690    # The splitting of arguments from the executable at a space might have been incorrect,
30691    # since paths with space are more likely in Windows. Give it another try with the whole
30692    # argument.
30693    path="$complete"
30694    arguments="EOL"
30695    new_path="$path"
30696
30697  windows_path="$new_path"
30698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30699    unix_path=`$CYGPATH -u "$windows_path"`
30700    new_path="$unix_path"
30701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30703    new_path="$unix_path"
30704  fi
30705
30706
30707    new_path=`$WHICH "$new_path" 2> /dev/null`
30708    # bat and cmd files are not always considered executable in MSYS causing which
30709    # to not find them
30710    if test "x$new_path" = x \
30711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30713      new_path="$path"
30714
30715  windows_path="$new_path"
30716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30717    unix_path=`$CYGPATH -u "$windows_path"`
30718    new_path="$unix_path"
30719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30721    new_path="$unix_path"
30722  fi
30723
30724    fi
30725
30726    if test "x$new_path" = x; then
30727      # It's still not found. Now this is an unrecoverable error.
30728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30729$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30730      has_space=`$ECHO "$complete" | $GREP " "`
30731      if test "x$has_space" != x; then
30732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30734      fi
30735      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30736    fi
30737  fi
30738
30739  # Now new_path has a complete unix path to the binary
30740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30741    # Keep paths in /bin as-is, but remove trailing .exe if any
30742    new_path="${new_path/%.exe/}"
30743    # Do not save /bin paths to all_fixpath_prefixes!
30744  else
30745    # Not in mixed or Windows style, start by that.
30746    new_path=`cmd //c echo $new_path`
30747
30748  input_path="$new_path"
30749  # Check if we need to convert this using DOS-style short mode. If the path
30750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30751  # take no chances and rewrite it.
30752  # Note: m4 eats our [], so we need to use [ and ] instead.
30753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30754  if test "x$has_forbidden_chars" != x; then
30755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30757  fi
30758
30759    # Output is in $new_path
30760
30761  windows_path="$new_path"
30762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30763    unix_path=`$CYGPATH -u "$windows_path"`
30764    new_path="$unix_path"
30765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30767    new_path="$unix_path"
30768  fi
30769
30770    # remove trailing .exe if any
30771    new_path="${new_path/%.exe/}"
30772
30773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30775  fi
30776
30777    else
30778      # We're on a unix platform. Hooray! :)
30779      # First separate the path from the arguments. This will split at the first
30780      # space.
30781      complete="$CXX"
30782      path="${complete%% *}"
30783      tmp="$complete EOL"
30784      arguments="${tmp#* }"
30785
30786      # Cannot rely on the command "which" here since it doesn't always work.
30787      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30788      if test -z "$is_absolute_path"; then
30789        # Path to executable is not absolute. Find it.
30790        IFS_save="$IFS"
30791        IFS=:
30792        for p in $PATH; do
30793          if test -f "$p/$path" && test -x "$p/$path"; then
30794            new_path="$p/$path"
30795            break
30796          fi
30797        done
30798        IFS="$IFS_save"
30799      else
30800        # This is an absolute path, we can use it without further modifications.
30801        new_path="$path"
30802      fi
30803
30804      if test "x$new_path" = x; then
30805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30806$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30807        has_space=`$ECHO "$complete" | $GREP " "`
30808        if test "x$has_space" != x; then
30809          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30810$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30811        fi
30812        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30813      fi
30814    fi
30815
30816    # Now join together the path and the arguments once again
30817    if test "x$arguments" != xEOL; then
30818      new_complete="$new_path ${arguments% *}"
30819    else
30820      new_complete="$new_path"
30821    fi
30822
30823    if test "x$complete" != "x$new_complete"; then
30824      CXX="$new_complete"
30825      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30826$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30827    fi
30828  fi
30829
30830  TEST_COMPILER="$CXX"
30831  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30832  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30833  if test "x$OPENJDK_BUILD_OS" != xaix; then
30834    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30836$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30837
30838  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30839    # Follow a chain of symbolic links. Use readlink
30840    # where it exists, else fall back to horribly
30841    # complicated shell code.
30842    if test "x$READLINK_TESTED" != yes; then
30843      # On MacOSX there is a readlink tool with a different
30844      # purpose than the GNU readlink tool. Check the found readlink.
30845      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30846      if test "x$ISGNU" = x; then
30847        # A readlink that we do not know how to use.
30848        # Are there other non-GNU readlinks out there?
30849        READLINK_TESTED=yes
30850        READLINK=
30851      fi
30852    fi
30853
30854    if test "x$READLINK" != x; then
30855      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30856    else
30857      # Save the current directory for restoring afterwards
30858      STARTDIR=$PWD
30859      COUNTER=0
30860      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30861      sym_link_file=`$BASENAME $TEST_COMPILER`
30862      cd $sym_link_dir
30863      # Use -P flag to resolve symlinks in directories.
30864      cd `$THEPWDCMD -P`
30865      sym_link_dir=`$THEPWDCMD -P`
30866      # Resolve file symlinks
30867      while test $COUNTER -lt 20; do
30868        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30869        if test "x$ISLINK" == x; then
30870          # This is not a symbolic link! We are done!
30871          break
30872        fi
30873        # Again resolve directory symlinks since the target of the just found
30874        # link could be in a different directory
30875        cd `$DIRNAME $ISLINK`
30876        sym_link_dir=`$THEPWDCMD -P`
30877        sym_link_file=`$BASENAME $ISLINK`
30878        let COUNTER=COUNTER+1
30879      done
30880      cd $STARTDIR
30881      TEST_COMPILER=$sym_link_dir/$sym_link_file
30882    fi
30883  fi
30884
30885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30886$as_echo "$TEST_COMPILER" >&6; }
30887  fi
30888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30889$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30890
30891  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30892  if test "x$COMPILER_BASENAME" = "xccache"; then
30893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30894$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30895    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30896    # We want to control ccache invocation ourselves, so ignore this cc and try
30897    # searching again.
30898
30899    # Remove the path to the fake ccache cc from the PATH
30900    RETRY_COMPILER_SAVED_PATH="$PATH"
30901    COMPILER_DIRNAME=`$DIRNAME $CXX`
30902    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30903
30904    # Try again looking for our compiler
30905    if test -n "$ac_tool_prefix"; then
30906  for ac_prog in $TOOLCHAIN_CXX_BINARY
30907  do
30908    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30911$as_echo_n "checking for $ac_word... " >&6; }
30912if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30913  $as_echo_n "(cached) " >&6
30914else
30915  if test -n "$PROPER_COMPILER_CXX"; then
30916  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30917else
30918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30919for as_dir in $PATH
30920do
30921  IFS=$as_save_IFS
30922  test -z "$as_dir" && as_dir=.
30923    for ac_exec_ext in '' $ac_executable_extensions; do
30924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30925    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30927    break 2
30928  fi
30929done
30930  done
30931IFS=$as_save_IFS
30932
30933fi
30934fi
30935PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30936if test -n "$PROPER_COMPILER_CXX"; then
30937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30938$as_echo "$PROPER_COMPILER_CXX" >&6; }
30939else
30940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30941$as_echo "no" >&6; }
30942fi
30943
30944
30945    test -n "$PROPER_COMPILER_CXX" && break
30946  done
30947fi
30948if test -z "$PROPER_COMPILER_CXX"; then
30949  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30950  for ac_prog in $TOOLCHAIN_CXX_BINARY
30951do
30952  # Extract the first word of "$ac_prog", so it can be a program name with args.
30953set dummy $ac_prog; ac_word=$2
30954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30955$as_echo_n "checking for $ac_word... " >&6; }
30956if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30957  $as_echo_n "(cached) " >&6
30958else
30959  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30960  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30961else
30962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30963for as_dir in $PATH
30964do
30965  IFS=$as_save_IFS
30966  test -z "$as_dir" && as_dir=.
30967    for ac_exec_ext in '' $ac_executable_extensions; do
30968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30969    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30971    break 2
30972  fi
30973done
30974  done
30975IFS=$as_save_IFS
30976
30977fi
30978fi
30979ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30980if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30982$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30983else
30984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30985$as_echo "no" >&6; }
30986fi
30987
30988
30989  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30990done
30991
30992  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30993    PROPER_COMPILER_CXX=""
30994  else
30995    case $cross_compiling:$ac_tool_warned in
30996yes:)
30997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30999ac_tool_warned=yes ;;
31000esac
31001    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31002  fi
31003fi
31004
31005
31006  # Only process if variable expands to non-empty
31007
31008  if test "x$PROPER_COMPILER_CXX" != x; then
31009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31010
31011  # First separate the path from the arguments. This will split at the first
31012  # space.
31013  complete="$PROPER_COMPILER_CXX"
31014  path="${complete%% *}"
31015  tmp="$complete EOL"
31016  arguments="${tmp#* }"
31017
31018  # Input might be given as Windows format, start by converting to
31019  # unix format.
31020  new_path=`$CYGPATH -u "$path"`
31021
31022  # Now try to locate executable using which
31023  new_path=`$WHICH "$new_path" 2> /dev/null`
31024  # bat and cmd files are not always considered executable in cygwin causing which
31025  # to not find them
31026  if test "x$new_path" = x \
31027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31029    new_path=`$CYGPATH -u "$path"`
31030  fi
31031  if test "x$new_path" = x; then
31032    # Oops. Which didn't find the executable.
31033    # The splitting of arguments from the executable at a space might have been incorrect,
31034    # since paths with space are more likely in Windows. Give it another try with the whole
31035    # argument.
31036    path="$complete"
31037    arguments="EOL"
31038    new_path=`$CYGPATH -u "$path"`
31039    new_path=`$WHICH "$new_path" 2> /dev/null`
31040    # bat and cmd files are not always considered executable in cygwin causing which
31041    # to not find them
31042    if test "x$new_path" = x \
31043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31045      new_path=`$CYGPATH -u "$path"`
31046    fi
31047    if test "x$new_path" = x; then
31048      # It's still not found. Now this is an unrecoverable error.
31049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31050$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31051      has_space=`$ECHO "$complete" | $GREP " "`
31052      if test "x$has_space" != x; then
31053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31055      fi
31056      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31057    fi
31058  fi
31059
31060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31063  # "foo.exe" is OK but "foo" is an error.
31064  #
31065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31066  # It is also a way to make sure we got the proper file name for the real test later on.
31067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31068  if test "x$test_shortpath" = x; then
31069    # Short path failed, file does not exist as specified.
31070    # Try adding .exe or .cmd
31071    if test -f "${new_path}.exe"; then
31072      input_to_shortpath="${new_path}.exe"
31073    elif test -f "${new_path}.cmd"; then
31074      input_to_shortpath="${new_path}.cmd"
31075    else
31076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31077$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31080      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31081    fi
31082  else
31083    input_to_shortpath="$new_path"
31084  fi
31085
31086  # Call helper function which possibly converts this using DOS-style short mode.
31087  # If so, the updated path is stored in $new_path.
31088  new_path="$input_to_shortpath"
31089
31090  input_path="$input_to_shortpath"
31091  # Check if we need to convert this using DOS-style short mode. If the path
31092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31093  # take no chances and rewrite it.
31094  # Note: m4 eats our [], so we need to use [ and ] instead.
31095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31096  if test "x$has_forbidden_chars" != x; then
31097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31101      # Going to short mode and back again did indeed matter. Since short mode is
31102      # case insensitive, let's make it lowercase to improve readability.
31103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31104      # Now convert it back to Unix-style (cygpath)
31105      input_path=`$CYGPATH -u "$shortmode_path"`
31106      new_path="$input_path"
31107    fi
31108  fi
31109
31110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31111  if test "x$test_cygdrive_prefix" = x; then
31112    # As a simple fix, exclude /usr/bin since it's not a real path.
31113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31115      # a path prefixed by /cygdrive for fixpath to work.
31116      new_path="$CYGWIN_ROOT_PATH$input_path"
31117    fi
31118  fi
31119
31120  # remove trailing .exe if any
31121  new_path="${new_path/%.exe/}"
31122
31123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124
31125  # First separate the path from the arguments. This will split at the first
31126  # space.
31127  complete="$PROPER_COMPILER_CXX"
31128  path="${complete%% *}"
31129  tmp="$complete EOL"
31130  arguments="${tmp#* }"
31131
31132  # Input might be given as Windows format, start by converting to
31133  # unix format.
31134  new_path="$path"
31135
31136  windows_path="$new_path"
31137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31138    unix_path=`$CYGPATH -u "$windows_path"`
31139    new_path="$unix_path"
31140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31142    new_path="$unix_path"
31143  fi
31144
31145
31146  # Now try to locate executable using which
31147  new_path=`$WHICH "$new_path" 2> /dev/null`
31148
31149  if test "x$new_path" = x; then
31150    # Oops. Which didn't find the executable.
31151    # The splitting of arguments from the executable at a space might have been incorrect,
31152    # since paths with space are more likely in Windows. Give it another try with the whole
31153    # argument.
31154    path="$complete"
31155    arguments="EOL"
31156    new_path="$path"
31157
31158  windows_path="$new_path"
31159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31160    unix_path=`$CYGPATH -u "$windows_path"`
31161    new_path="$unix_path"
31162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31164    new_path="$unix_path"
31165  fi
31166
31167
31168    new_path=`$WHICH "$new_path" 2> /dev/null`
31169    # bat and cmd files are not always considered executable in MSYS causing which
31170    # to not find them
31171    if test "x$new_path" = x \
31172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31174      new_path="$path"
31175
31176  windows_path="$new_path"
31177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31178    unix_path=`$CYGPATH -u "$windows_path"`
31179    new_path="$unix_path"
31180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31182    new_path="$unix_path"
31183  fi
31184
31185    fi
31186
31187    if test "x$new_path" = x; then
31188      # It's still not found. Now this is an unrecoverable error.
31189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31190$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31191      has_space=`$ECHO "$complete" | $GREP " "`
31192      if test "x$has_space" != x; then
31193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31195      fi
31196      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31197    fi
31198  fi
31199
31200  # Now new_path has a complete unix path to the binary
31201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31202    # Keep paths in /bin as-is, but remove trailing .exe if any
31203    new_path="${new_path/%.exe/}"
31204    # Do not save /bin paths to all_fixpath_prefixes!
31205  else
31206    # Not in mixed or Windows style, start by that.
31207    new_path=`cmd //c echo $new_path`
31208
31209  input_path="$new_path"
31210  # Check if we need to convert this using DOS-style short mode. If the path
31211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31212  # take no chances and rewrite it.
31213  # Note: m4 eats our [], so we need to use [ and ] instead.
31214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31215  if test "x$has_forbidden_chars" != x; then
31216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31218  fi
31219
31220    # Output is in $new_path
31221
31222  windows_path="$new_path"
31223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31224    unix_path=`$CYGPATH -u "$windows_path"`
31225    new_path="$unix_path"
31226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31228    new_path="$unix_path"
31229  fi
31230
31231    # remove trailing .exe if any
31232    new_path="${new_path/%.exe/}"
31233
31234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31236  fi
31237
31238    else
31239      # We're on a unix platform. Hooray! :)
31240      # First separate the path from the arguments. This will split at the first
31241      # space.
31242      complete="$PROPER_COMPILER_CXX"
31243      path="${complete%% *}"
31244      tmp="$complete EOL"
31245      arguments="${tmp#* }"
31246
31247      # Cannot rely on the command "which" here since it doesn't always work.
31248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31249      if test -z "$is_absolute_path"; then
31250        # Path to executable is not absolute. Find it.
31251        IFS_save="$IFS"
31252        IFS=:
31253        for p in $PATH; do
31254          if test -f "$p/$path" && test -x "$p/$path"; then
31255            new_path="$p/$path"
31256            break
31257          fi
31258        done
31259        IFS="$IFS_save"
31260      else
31261        # This is an absolute path, we can use it without further modifications.
31262        new_path="$path"
31263      fi
31264
31265      if test "x$new_path" = x; then
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31267$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31268        has_space=`$ECHO "$complete" | $GREP " "`
31269        if test "x$has_space" != x; then
31270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31272        fi
31273        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31274      fi
31275    fi
31276
31277    # Now join together the path and the arguments once again
31278    if test "x$arguments" != xEOL; then
31279      new_complete="$new_path ${arguments% *}"
31280    else
31281      new_complete="$new_path"
31282    fi
31283
31284    if test "x$complete" != "x$new_complete"; then
31285      PROPER_COMPILER_CXX="$new_complete"
31286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31287$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31288    fi
31289  fi
31290
31291    PATH="$RETRY_COMPILER_SAVED_PATH"
31292
31293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31294$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31295
31296  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31297    # Follow a chain of symbolic links. Use readlink
31298    # where it exists, else fall back to horribly
31299    # complicated shell code.
31300    if test "x$READLINK_TESTED" != yes; then
31301      # On MacOSX there is a readlink tool with a different
31302      # purpose than the GNU readlink tool. Check the found readlink.
31303      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31304      if test "x$ISGNU" = x; then
31305        # A readlink that we do not know how to use.
31306        # Are there other non-GNU readlinks out there?
31307        READLINK_TESTED=yes
31308        READLINK=
31309      fi
31310    fi
31311
31312    if test "x$READLINK" != x; then
31313      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31314    else
31315      # Save the current directory for restoring afterwards
31316      STARTDIR=$PWD
31317      COUNTER=0
31318      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31319      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31320      cd $sym_link_dir
31321      # Use -P flag to resolve symlinks in directories.
31322      cd `$THEPWDCMD -P`
31323      sym_link_dir=`$THEPWDCMD -P`
31324      # Resolve file symlinks
31325      while test $COUNTER -lt 20; do
31326        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31327        if test "x$ISLINK" == x; then
31328          # This is not a symbolic link! We are done!
31329          break
31330        fi
31331        # Again resolve directory symlinks since the target of the just found
31332        # link could be in a different directory
31333        cd `$DIRNAME $ISLINK`
31334        sym_link_dir=`$THEPWDCMD -P`
31335        sym_link_file=`$BASENAME $ISLINK`
31336        let COUNTER=COUNTER+1
31337      done
31338      cd $STARTDIR
31339      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31340    fi
31341  fi
31342
31343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31344$as_echo "$PROPER_COMPILER_CXX" >&6; }
31345    CXX="$PROPER_COMPILER_CXX"
31346  else
31347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31348$as_echo "no, keeping CXX" >&6; }
31349  fi
31350
31351
31352  COMPILER=$CXX
31353  COMPILER_NAME=$COMPILER_NAME
31354
31355  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31356    # cc -V output typically looks like
31357    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31358    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31359    # Check that this is likely to be the Solaris Studio cc.
31360    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31361    if test $? -ne 0; then
31362      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31363      { $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
31364$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31365      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31366$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31367      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31368$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31369      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31370    fi
31371    # Remove usage instructions (if present), and
31372    # collapse compiler output into a single line
31373    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31374        $SED -e 's/ *[Uu]sage:.*//'`
31375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31376        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31377  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31378    # xlc -qversion output typically looks like
31379    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31380    #     Version: 11.01.0000.0015
31381    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31382    # Check that this is likely to be the IBM XL C compiler.
31383    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31384    if test $? -ne 0; then
31385      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31386      { $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
31387$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31388      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31389$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31390      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31391$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31392      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31393    fi
31394    # Collapse compiler output into a single line
31395    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31396    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31397        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31398  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31399    # There is no specific version flag, but all output starts with a version string.
31400    # First line typically looks something like:
31401    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31402    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31403    # Check that this is likely to be Microsoft CL.EXE.
31404    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31405    if test $? -ne 0; then
31406      { $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
31407$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31408      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31409$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31410      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31411    fi
31412    # Collapse compiler output into a single line
31413    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31414    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31415        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31416  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31417    # gcc --version output typically looks like
31418    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31419    #     Copyright (C) 2013 Free Software Foundation, Inc.
31420    #     This is free software; see the source for copying conditions.  There is NO
31421    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31422    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31423    # Check that this is likely to be GCC.
31424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31425    if test $? -ne 0; then
31426      { $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
31427$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31428      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31429$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31430      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31431    fi
31432    # Remove Copyright and legalese from version string, and
31433    # collapse into a single line
31434    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31435        $SED -e 's/ *Copyright .*//'`
31436    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31437        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31438  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31439    # clang --version output typically looks like
31440    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31441    #    clang version 3.3 (tags/RELEASE_33/final)
31442    # or
31443    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31444    #    Target: x86_64-pc-linux-gnu
31445    #    Thread model: posix
31446    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31447    # Check that this is likely to be clang
31448    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31449    if test $? -ne 0; then
31450      { $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
31451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31453$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31454      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31455    fi
31456    # Collapse compiler output into a single line
31457    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31458    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31459        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31460  else
31461      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31462  fi
31463  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31464  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31465  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31466  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31467
31468  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31469$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31470
31471
31472  # Now that we have resolved CXX ourself, let autoconf have its go at it
31473  ac_ext=cpp
31474ac_cpp='$CXXCPP $CPPFLAGS'
31475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31478if test -z "$CXX"; then
31479  if test -n "$CCC"; then
31480    CXX=$CCC
31481  else
31482    if test -n "$ac_tool_prefix"; then
31483  for ac_prog in $CXX
31484  do
31485    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31486set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31488$as_echo_n "checking for $ac_word... " >&6; }
31489if ${ac_cv_prog_CXX+:} false; then :
31490  $as_echo_n "(cached) " >&6
31491else
31492  if test -n "$CXX"; then
31493  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31494else
31495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31496for as_dir in $PATH
31497do
31498  IFS=$as_save_IFS
31499  test -z "$as_dir" && as_dir=.
31500    for ac_exec_ext in '' $ac_executable_extensions; do
31501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31502    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31504    break 2
31505  fi
31506done
31507  done
31508IFS=$as_save_IFS
31509
31510fi
31511fi
31512CXX=$ac_cv_prog_CXX
31513if test -n "$CXX"; then
31514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31515$as_echo "$CXX" >&6; }
31516else
31517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31518$as_echo "no" >&6; }
31519fi
31520
31521
31522    test -n "$CXX" && break
31523  done
31524fi
31525if test -z "$CXX"; then
31526  ac_ct_CXX=$CXX
31527  for ac_prog in $CXX
31528do
31529  # Extract the first word of "$ac_prog", so it can be a program name with args.
31530set dummy $ac_prog; ac_word=$2
31531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31532$as_echo_n "checking for $ac_word... " >&6; }
31533if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31534  $as_echo_n "(cached) " >&6
31535else
31536  if test -n "$ac_ct_CXX"; then
31537  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31538else
31539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31540for as_dir in $PATH
31541do
31542  IFS=$as_save_IFS
31543  test -z "$as_dir" && as_dir=.
31544    for ac_exec_ext in '' $ac_executable_extensions; do
31545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31546    ac_cv_prog_ac_ct_CXX="$ac_prog"
31547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31548    break 2
31549  fi
31550done
31551  done
31552IFS=$as_save_IFS
31553
31554fi
31555fi
31556ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31557if test -n "$ac_ct_CXX"; then
31558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31559$as_echo "$ac_ct_CXX" >&6; }
31560else
31561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31562$as_echo "no" >&6; }
31563fi
31564
31565
31566  test -n "$ac_ct_CXX" && break
31567done
31568
31569  if test "x$ac_ct_CXX" = x; then
31570    CXX="g++"
31571  else
31572    case $cross_compiling:$ac_tool_warned in
31573yes:)
31574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31576ac_tool_warned=yes ;;
31577esac
31578    CXX=$ac_ct_CXX
31579  fi
31580fi
31581
31582  fi
31583fi
31584# Provide some information about the compiler.
31585$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31586set X $ac_compile
31587ac_compiler=$2
31588for ac_option in --version -v -V -qversion; do
31589  { { ac_try="$ac_compiler $ac_option >&5"
31590case "(($ac_try" in
31591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31592  *) ac_try_echo=$ac_try;;
31593esac
31594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31595$as_echo "$ac_try_echo"; } >&5
31596  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31597  ac_status=$?
31598  if test -s conftest.err; then
31599    sed '10a\
31600... rest of stderr output deleted ...
31601         10q' conftest.err >conftest.er1
31602    cat conftest.er1 >&5
31603  fi
31604  rm -f conftest.er1 conftest.err
31605  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31606  test $ac_status = 0; }
31607done
31608
31609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31610$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31611if ${ac_cv_cxx_compiler_gnu+:} false; then :
31612  $as_echo_n "(cached) " >&6
31613else
31614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31615/* end confdefs.h.  */
31616
31617int
31618main ()
31619{
31620#ifndef __GNUC__
31621       choke me
31622#endif
31623
31624  ;
31625  return 0;
31626}
31627_ACEOF
31628if ac_fn_cxx_try_compile "$LINENO"; then :
31629  ac_compiler_gnu=yes
31630else
31631  ac_compiler_gnu=no
31632fi
31633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31634ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31635
31636fi
31637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31638$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31639if test $ac_compiler_gnu = yes; then
31640  GXX=yes
31641else
31642  GXX=
31643fi
31644ac_test_CXXFLAGS=${CXXFLAGS+set}
31645ac_save_CXXFLAGS=$CXXFLAGS
31646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31647$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31648if ${ac_cv_prog_cxx_g+:} false; then :
31649  $as_echo_n "(cached) " >&6
31650else
31651  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31652   ac_cxx_werror_flag=yes
31653   ac_cv_prog_cxx_g=no
31654   CXXFLAGS="-g"
31655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31656/* end confdefs.h.  */
31657
31658int
31659main ()
31660{
31661
31662  ;
31663  return 0;
31664}
31665_ACEOF
31666if ac_fn_cxx_try_compile "$LINENO"; then :
31667  ac_cv_prog_cxx_g=yes
31668else
31669  CXXFLAGS=""
31670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31671/* end confdefs.h.  */
31672
31673int
31674main ()
31675{
31676
31677  ;
31678  return 0;
31679}
31680_ACEOF
31681if ac_fn_cxx_try_compile "$LINENO"; then :
31682
31683else
31684  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31685	 CXXFLAGS="-g"
31686	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31687/* end confdefs.h.  */
31688
31689int
31690main ()
31691{
31692
31693  ;
31694  return 0;
31695}
31696_ACEOF
31697if ac_fn_cxx_try_compile "$LINENO"; then :
31698  ac_cv_prog_cxx_g=yes
31699fi
31700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31701fi
31702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31703fi
31704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31705   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31706fi
31707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31708$as_echo "$ac_cv_prog_cxx_g" >&6; }
31709if test "$ac_test_CXXFLAGS" = set; then
31710  CXXFLAGS=$ac_save_CXXFLAGS
31711elif test $ac_cv_prog_cxx_g = yes; then
31712  if test "$GXX" = yes; then
31713    CXXFLAGS="-g -O2"
31714  else
31715    CXXFLAGS="-g"
31716  fi
31717else
31718  if test "$GXX" = yes; then
31719    CXXFLAGS="-O2"
31720  else
31721    CXXFLAGS=
31722  fi
31723fi
31724ac_ext=cpp
31725ac_cpp='$CXXCPP $CPPFLAGS'
31726ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31727ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31728ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31729
31730
31731  #
31732  # Setup the preprocessor (CPP and CXXCPP)
31733  #
31734  ac_ext=c
31735ac_cpp='$CPP $CPPFLAGS'
31736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31738ac_compiler_gnu=$ac_cv_c_compiler_gnu
31739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31740$as_echo_n "checking how to run the C preprocessor... " >&6; }
31741# On Suns, sometimes $CPP names a directory.
31742if test -n "$CPP" && test -d "$CPP"; then
31743  CPP=
31744fi
31745if test -z "$CPP"; then
31746  if ${ac_cv_prog_CPP+:} false; then :
31747  $as_echo_n "(cached) " >&6
31748else
31749      # Double quotes because CPP needs to be expanded
31750    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31751    do
31752      ac_preproc_ok=false
31753for ac_c_preproc_warn_flag in '' yes
31754do
31755  # Use a header file that comes with gcc, so configuring glibc
31756  # with a fresh cross-compiler works.
31757  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31758  # <limits.h> exists even on freestanding compilers.
31759  # On the NeXT, cc -E runs the code through the compiler's parser,
31760  # not just through cpp. "Syntax error" is here to catch this case.
31761  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31762/* end confdefs.h.  */
31763#ifdef __STDC__
31764# include <limits.h>
31765#else
31766# include <assert.h>
31767#endif
31768		     Syntax error
31769_ACEOF
31770if ac_fn_c_try_cpp "$LINENO"; then :
31771
31772else
31773  # Broken: fails on valid input.
31774continue
31775fi
31776rm -f conftest.err conftest.i conftest.$ac_ext
31777
31778  # OK, works on sane cases.  Now check whether nonexistent headers
31779  # can be detected and how.
31780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31781/* end confdefs.h.  */
31782#include <ac_nonexistent.h>
31783_ACEOF
31784if ac_fn_c_try_cpp "$LINENO"; then :
31785  # Broken: success on invalid input.
31786continue
31787else
31788  # Passes both tests.
31789ac_preproc_ok=:
31790break
31791fi
31792rm -f conftest.err conftest.i conftest.$ac_ext
31793
31794done
31795# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31796rm -f conftest.i conftest.err conftest.$ac_ext
31797if $ac_preproc_ok; then :
31798  break
31799fi
31800
31801    done
31802    ac_cv_prog_CPP=$CPP
31803
31804fi
31805  CPP=$ac_cv_prog_CPP
31806else
31807  ac_cv_prog_CPP=$CPP
31808fi
31809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31810$as_echo "$CPP" >&6; }
31811ac_preproc_ok=false
31812for ac_c_preproc_warn_flag in '' yes
31813do
31814  # Use a header file that comes with gcc, so configuring glibc
31815  # with a fresh cross-compiler works.
31816  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31817  # <limits.h> exists even on freestanding compilers.
31818  # On the NeXT, cc -E runs the code through the compiler's parser,
31819  # not just through cpp. "Syntax error" is here to catch this case.
31820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31821/* end confdefs.h.  */
31822#ifdef __STDC__
31823# include <limits.h>
31824#else
31825# include <assert.h>
31826#endif
31827		     Syntax error
31828_ACEOF
31829if ac_fn_c_try_cpp "$LINENO"; then :
31830
31831else
31832  # Broken: fails on valid input.
31833continue
31834fi
31835rm -f conftest.err conftest.i conftest.$ac_ext
31836
31837  # OK, works on sane cases.  Now check whether nonexistent headers
31838  # can be detected and how.
31839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31840/* end confdefs.h.  */
31841#include <ac_nonexistent.h>
31842_ACEOF
31843if ac_fn_c_try_cpp "$LINENO"; then :
31844  # Broken: success on invalid input.
31845continue
31846else
31847  # Passes both tests.
31848ac_preproc_ok=:
31849break
31850fi
31851rm -f conftest.err conftest.i conftest.$ac_ext
31852
31853done
31854# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31855rm -f conftest.i conftest.err conftest.$ac_ext
31856if $ac_preproc_ok; then :
31857
31858else
31859  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31861as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31862See \`config.log' for more details" "$LINENO" 5; }
31863fi
31864
31865ac_ext=cpp
31866ac_cpp='$CXXCPP $CPPFLAGS'
31867ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31868ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31869ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31870
31871
31872  # Only process if variable expands to non-empty
31873
31874  if test "x$CPP" != x; then
31875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31876
31877  # First separate the path from the arguments. This will split at the first
31878  # space.
31879  complete="$CPP"
31880  path="${complete%% *}"
31881  tmp="$complete EOL"
31882  arguments="${tmp#* }"
31883
31884  # Input might be given as Windows format, start by converting to
31885  # unix format.
31886  new_path=`$CYGPATH -u "$path"`
31887
31888  # Now try to locate executable using which
31889  new_path=`$WHICH "$new_path" 2> /dev/null`
31890  # bat and cmd files are not always considered executable in cygwin causing which
31891  # to not find them
31892  if test "x$new_path" = x \
31893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31895    new_path=`$CYGPATH -u "$path"`
31896  fi
31897  if test "x$new_path" = x; then
31898    # Oops. Which didn't find the executable.
31899    # The splitting of arguments from the executable at a space might have been incorrect,
31900    # since paths with space are more likely in Windows. Give it another try with the whole
31901    # argument.
31902    path="$complete"
31903    arguments="EOL"
31904    new_path=`$CYGPATH -u "$path"`
31905    new_path=`$WHICH "$new_path" 2> /dev/null`
31906    # bat and cmd files are not always considered executable in cygwin causing which
31907    # to not find them
31908    if test "x$new_path" = x \
31909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31911      new_path=`$CYGPATH -u "$path"`
31912    fi
31913    if test "x$new_path" = x; then
31914      # It's still not found. Now this is an unrecoverable error.
31915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31916$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31917      has_space=`$ECHO "$complete" | $GREP " "`
31918      if test "x$has_space" != x; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31921      fi
31922      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31923    fi
31924  fi
31925
31926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31929  # "foo.exe" is OK but "foo" is an error.
31930  #
31931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31932  # It is also a way to make sure we got the proper file name for the real test later on.
31933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31934  if test "x$test_shortpath" = x; then
31935    # Short path failed, file does not exist as specified.
31936    # Try adding .exe or .cmd
31937    if test -f "${new_path}.exe"; then
31938      input_to_shortpath="${new_path}.exe"
31939    elif test -f "${new_path}.cmd"; then
31940      input_to_shortpath="${new_path}.cmd"
31941    else
31942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31943$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31946      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31947    fi
31948  else
31949    input_to_shortpath="$new_path"
31950  fi
31951
31952  # Call helper function which possibly converts this using DOS-style short mode.
31953  # If so, the updated path is stored in $new_path.
31954  new_path="$input_to_shortpath"
31955
31956  input_path="$input_to_shortpath"
31957  # Check if we need to convert this using DOS-style short mode. If the path
31958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31959  # take no chances and rewrite it.
31960  # Note: m4 eats our [], so we need to use [ and ] instead.
31961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31962  if test "x$has_forbidden_chars" != x; then
31963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31967      # Going to short mode and back again did indeed matter. Since short mode is
31968      # case insensitive, let's make it lowercase to improve readability.
31969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31970      # Now convert it back to Unix-style (cygpath)
31971      input_path=`$CYGPATH -u "$shortmode_path"`
31972      new_path="$input_path"
31973    fi
31974  fi
31975
31976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31977  if test "x$test_cygdrive_prefix" = x; then
31978    # As a simple fix, exclude /usr/bin since it's not a real path.
31979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31981      # a path prefixed by /cygdrive for fixpath to work.
31982      new_path="$CYGWIN_ROOT_PATH$input_path"
31983    fi
31984  fi
31985
31986  # remove trailing .exe if any
31987  new_path="${new_path/%.exe/}"
31988
31989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990
31991  # First separate the path from the arguments. This will split at the first
31992  # space.
31993  complete="$CPP"
31994  path="${complete%% *}"
31995  tmp="$complete EOL"
31996  arguments="${tmp#* }"
31997
31998  # Input might be given as Windows format, start by converting to
31999  # unix format.
32000  new_path="$path"
32001
32002  windows_path="$new_path"
32003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32004    unix_path=`$CYGPATH -u "$windows_path"`
32005    new_path="$unix_path"
32006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32008    new_path="$unix_path"
32009  fi
32010
32011
32012  # Now try to locate executable using which
32013  new_path=`$WHICH "$new_path" 2> /dev/null`
32014
32015  if test "x$new_path" = x; then
32016    # Oops. Which didn't find the executable.
32017    # The splitting of arguments from the executable at a space might have been incorrect,
32018    # since paths with space are more likely in Windows. Give it another try with the whole
32019    # argument.
32020    path="$complete"
32021    arguments="EOL"
32022    new_path="$path"
32023
32024  windows_path="$new_path"
32025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32026    unix_path=`$CYGPATH -u "$windows_path"`
32027    new_path="$unix_path"
32028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32030    new_path="$unix_path"
32031  fi
32032
32033
32034    new_path=`$WHICH "$new_path" 2> /dev/null`
32035    # bat and cmd files are not always considered executable in MSYS causing which
32036    # to not find them
32037    if test "x$new_path" = x \
32038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32040      new_path="$path"
32041
32042  windows_path="$new_path"
32043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32044    unix_path=`$CYGPATH -u "$windows_path"`
32045    new_path="$unix_path"
32046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32048    new_path="$unix_path"
32049  fi
32050
32051    fi
32052
32053    if test "x$new_path" = x; then
32054      # It's still not found. Now this is an unrecoverable error.
32055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32056$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32057      has_space=`$ECHO "$complete" | $GREP " "`
32058      if test "x$has_space" != x; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32061      fi
32062      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32063    fi
32064  fi
32065
32066  # Now new_path has a complete unix path to the binary
32067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32068    # Keep paths in /bin as-is, but remove trailing .exe if any
32069    new_path="${new_path/%.exe/}"
32070    # Do not save /bin paths to all_fixpath_prefixes!
32071  else
32072    # Not in mixed or Windows style, start by that.
32073    new_path=`cmd //c echo $new_path`
32074
32075  input_path="$new_path"
32076  # Check if we need to convert this using DOS-style short mode. If the path
32077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32078  # take no chances and rewrite it.
32079  # Note: m4 eats our [], so we need to use [ and ] instead.
32080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32081  if test "x$has_forbidden_chars" != x; then
32082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32084  fi
32085
32086    # Output is in $new_path
32087
32088  windows_path="$new_path"
32089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32090    unix_path=`$CYGPATH -u "$windows_path"`
32091    new_path="$unix_path"
32092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32094    new_path="$unix_path"
32095  fi
32096
32097    # remove trailing .exe if any
32098    new_path="${new_path/%.exe/}"
32099
32100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32102  fi
32103
32104    else
32105      # We're on a unix platform. Hooray! :)
32106      # First separate the path from the arguments. This will split at the first
32107      # space.
32108      complete="$CPP"
32109      path="${complete%% *}"
32110      tmp="$complete EOL"
32111      arguments="${tmp#* }"
32112
32113      # Cannot rely on the command "which" here since it doesn't always work.
32114      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32115      if test -z "$is_absolute_path"; then
32116        # Path to executable is not absolute. Find it.
32117        IFS_save="$IFS"
32118        IFS=:
32119        for p in $PATH; do
32120          if test -f "$p/$path" && test -x "$p/$path"; then
32121            new_path="$p/$path"
32122            break
32123          fi
32124        done
32125        IFS="$IFS_save"
32126      else
32127        # This is an absolute path, we can use it without further modifications.
32128        new_path="$path"
32129      fi
32130
32131      if test "x$new_path" = x; then
32132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32133$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32134        has_space=`$ECHO "$complete" | $GREP " "`
32135        if test "x$has_space" != x; then
32136          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32137$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32138        fi
32139        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32140      fi
32141    fi
32142
32143    # Now join together the path and the arguments once again
32144    if test "x$arguments" != xEOL; then
32145      new_complete="$new_path ${arguments% *}"
32146    else
32147      new_complete="$new_path"
32148    fi
32149
32150    if test "x$complete" != "x$new_complete"; then
32151      CPP="$new_complete"
32152      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32153$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32154    fi
32155  fi
32156
32157  ac_ext=cpp
32158ac_cpp='$CXXCPP $CPPFLAGS'
32159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32163$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32164if test -z "$CXXCPP"; then
32165  if ${ac_cv_prog_CXXCPP+:} false; then :
32166  $as_echo_n "(cached) " >&6
32167else
32168      # Double quotes because CXXCPP needs to be expanded
32169    for CXXCPP in "$CXX -E" "/lib/cpp"
32170    do
32171      ac_preproc_ok=false
32172for ac_cxx_preproc_warn_flag in '' yes
32173do
32174  # Use a header file that comes with gcc, so configuring glibc
32175  # with a fresh cross-compiler works.
32176  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32177  # <limits.h> exists even on freestanding compilers.
32178  # On the NeXT, cc -E runs the code through the compiler's parser,
32179  # not just through cpp. "Syntax error" is here to catch this case.
32180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32181/* end confdefs.h.  */
32182#ifdef __STDC__
32183# include <limits.h>
32184#else
32185# include <assert.h>
32186#endif
32187		     Syntax error
32188_ACEOF
32189if ac_fn_cxx_try_cpp "$LINENO"; then :
32190
32191else
32192  # Broken: fails on valid input.
32193continue
32194fi
32195rm -f conftest.err conftest.i conftest.$ac_ext
32196
32197  # OK, works on sane cases.  Now check whether nonexistent headers
32198  # can be detected and how.
32199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32200/* end confdefs.h.  */
32201#include <ac_nonexistent.h>
32202_ACEOF
32203if ac_fn_cxx_try_cpp "$LINENO"; then :
32204  # Broken: success on invalid input.
32205continue
32206else
32207  # Passes both tests.
32208ac_preproc_ok=:
32209break
32210fi
32211rm -f conftest.err conftest.i conftest.$ac_ext
32212
32213done
32214# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32215rm -f conftest.i conftest.err conftest.$ac_ext
32216if $ac_preproc_ok; then :
32217  break
32218fi
32219
32220    done
32221    ac_cv_prog_CXXCPP=$CXXCPP
32222
32223fi
32224  CXXCPP=$ac_cv_prog_CXXCPP
32225else
32226  ac_cv_prog_CXXCPP=$CXXCPP
32227fi
32228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32229$as_echo "$CXXCPP" >&6; }
32230ac_preproc_ok=false
32231for ac_cxx_preproc_warn_flag in '' yes
32232do
32233  # Use a header file that comes with gcc, so configuring glibc
32234  # with a fresh cross-compiler works.
32235  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32236  # <limits.h> exists even on freestanding compilers.
32237  # On the NeXT, cc -E runs the code through the compiler's parser,
32238  # not just through cpp. "Syntax error" is here to catch this case.
32239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32240/* end confdefs.h.  */
32241#ifdef __STDC__
32242# include <limits.h>
32243#else
32244# include <assert.h>
32245#endif
32246		     Syntax error
32247_ACEOF
32248if ac_fn_cxx_try_cpp "$LINENO"; then :
32249
32250else
32251  # Broken: fails on valid input.
32252continue
32253fi
32254rm -f conftest.err conftest.i conftest.$ac_ext
32255
32256  # OK, works on sane cases.  Now check whether nonexistent headers
32257  # can be detected and how.
32258  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32259/* end confdefs.h.  */
32260#include <ac_nonexistent.h>
32261_ACEOF
32262if ac_fn_cxx_try_cpp "$LINENO"; then :
32263  # Broken: success on invalid input.
32264continue
32265else
32266  # Passes both tests.
32267ac_preproc_ok=:
32268break
32269fi
32270rm -f conftest.err conftest.i conftest.$ac_ext
32271
32272done
32273# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32274rm -f conftest.i conftest.err conftest.$ac_ext
32275if $ac_preproc_ok; then :
32276
32277else
32278  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32280as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32281See \`config.log' for more details" "$LINENO" 5; }
32282fi
32283
32284ac_ext=cpp
32285ac_cpp='$CXXCPP $CPPFLAGS'
32286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32289
32290
32291  # Only process if variable expands to non-empty
32292
32293  if test "x$CXXCPP" != x; then
32294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32295
32296  # First separate the path from the arguments. This will split at the first
32297  # space.
32298  complete="$CXXCPP"
32299  path="${complete%% *}"
32300  tmp="$complete EOL"
32301  arguments="${tmp#* }"
32302
32303  # Input might be given as Windows format, start by converting to
32304  # unix format.
32305  new_path=`$CYGPATH -u "$path"`
32306
32307  # Now try to locate executable using which
32308  new_path=`$WHICH "$new_path" 2> /dev/null`
32309  # bat and cmd files are not always considered executable in cygwin causing which
32310  # to not find them
32311  if test "x$new_path" = x \
32312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32314    new_path=`$CYGPATH -u "$path"`
32315  fi
32316  if test "x$new_path" = x; then
32317    # Oops. Which didn't find the executable.
32318    # The splitting of arguments from the executable at a space might have been incorrect,
32319    # since paths with space are more likely in Windows. Give it another try with the whole
32320    # argument.
32321    path="$complete"
32322    arguments="EOL"
32323    new_path=`$CYGPATH -u "$path"`
32324    new_path=`$WHICH "$new_path" 2> /dev/null`
32325    # bat and cmd files are not always considered executable in cygwin causing which
32326    # to not find them
32327    if test "x$new_path" = x \
32328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32330      new_path=`$CYGPATH -u "$path"`
32331    fi
32332    if test "x$new_path" = x; then
32333      # It's still not found. Now this is an unrecoverable error.
32334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32335$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32336      has_space=`$ECHO "$complete" | $GREP " "`
32337      if test "x$has_space" != x; then
32338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32340      fi
32341      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32342    fi
32343  fi
32344
32345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32348  # "foo.exe" is OK but "foo" is an error.
32349  #
32350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32351  # It is also a way to make sure we got the proper file name for the real test later on.
32352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32353  if test "x$test_shortpath" = x; then
32354    # Short path failed, file does not exist as specified.
32355    # Try adding .exe or .cmd
32356    if test -f "${new_path}.exe"; then
32357      input_to_shortpath="${new_path}.exe"
32358    elif test -f "${new_path}.cmd"; then
32359      input_to_shortpath="${new_path}.cmd"
32360    else
32361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32362$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32365      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32366    fi
32367  else
32368    input_to_shortpath="$new_path"
32369  fi
32370
32371  # Call helper function which possibly converts this using DOS-style short mode.
32372  # If so, the updated path is stored in $new_path.
32373  new_path="$input_to_shortpath"
32374
32375  input_path="$input_to_shortpath"
32376  # Check if we need to convert this using DOS-style short mode. If the path
32377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32378  # take no chances and rewrite it.
32379  # Note: m4 eats our [], so we need to use [ and ] instead.
32380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32381  if test "x$has_forbidden_chars" != x; then
32382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32386      # Going to short mode and back again did indeed matter. Since short mode is
32387      # case insensitive, let's make it lowercase to improve readability.
32388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32389      # Now convert it back to Unix-style (cygpath)
32390      input_path=`$CYGPATH -u "$shortmode_path"`
32391      new_path="$input_path"
32392    fi
32393  fi
32394
32395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32396  if test "x$test_cygdrive_prefix" = x; then
32397    # As a simple fix, exclude /usr/bin since it's not a real path.
32398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32400      # a path prefixed by /cygdrive for fixpath to work.
32401      new_path="$CYGWIN_ROOT_PATH$input_path"
32402    fi
32403  fi
32404
32405  # remove trailing .exe if any
32406  new_path="${new_path/%.exe/}"
32407
32408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409
32410  # First separate the path from the arguments. This will split at the first
32411  # space.
32412  complete="$CXXCPP"
32413  path="${complete%% *}"
32414  tmp="$complete EOL"
32415  arguments="${tmp#* }"
32416
32417  # Input might be given as Windows format, start by converting to
32418  # unix format.
32419  new_path="$path"
32420
32421  windows_path="$new_path"
32422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32423    unix_path=`$CYGPATH -u "$windows_path"`
32424    new_path="$unix_path"
32425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32427    new_path="$unix_path"
32428  fi
32429
32430
32431  # Now try to locate executable using which
32432  new_path=`$WHICH "$new_path" 2> /dev/null`
32433
32434  if test "x$new_path" = x; then
32435    # Oops. Which didn't find the executable.
32436    # The splitting of arguments from the executable at a space might have been incorrect,
32437    # since paths with space are more likely in Windows. Give it another try with the whole
32438    # argument.
32439    path="$complete"
32440    arguments="EOL"
32441    new_path="$path"
32442
32443  windows_path="$new_path"
32444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445    unix_path=`$CYGPATH -u "$windows_path"`
32446    new_path="$unix_path"
32447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449    new_path="$unix_path"
32450  fi
32451
32452
32453    new_path=`$WHICH "$new_path" 2> /dev/null`
32454    # bat and cmd files are not always considered executable in MSYS causing which
32455    # to not find them
32456    if test "x$new_path" = x \
32457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32459      new_path="$path"
32460
32461  windows_path="$new_path"
32462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32463    unix_path=`$CYGPATH -u "$windows_path"`
32464    new_path="$unix_path"
32465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32467    new_path="$unix_path"
32468  fi
32469
32470    fi
32471
32472    if test "x$new_path" = x; then
32473      # It's still not found. Now this is an unrecoverable error.
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32475$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32476      has_space=`$ECHO "$complete" | $GREP " "`
32477      if test "x$has_space" != x; then
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32480      fi
32481      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32482    fi
32483  fi
32484
32485  # Now new_path has a complete unix path to the binary
32486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32487    # Keep paths in /bin as-is, but remove trailing .exe if any
32488    new_path="${new_path/%.exe/}"
32489    # Do not save /bin paths to all_fixpath_prefixes!
32490  else
32491    # Not in mixed or Windows style, start by that.
32492    new_path=`cmd //c echo $new_path`
32493
32494  input_path="$new_path"
32495  # Check if we need to convert this using DOS-style short mode. If the path
32496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32497  # take no chances and rewrite it.
32498  # Note: m4 eats our [], so we need to use [ and ] instead.
32499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32500  if test "x$has_forbidden_chars" != x; then
32501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32503  fi
32504
32505    # Output is in $new_path
32506
32507  windows_path="$new_path"
32508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32509    unix_path=`$CYGPATH -u "$windows_path"`
32510    new_path="$unix_path"
32511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32513    new_path="$unix_path"
32514  fi
32515
32516    # remove trailing .exe if any
32517    new_path="${new_path/%.exe/}"
32518
32519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32521  fi
32522
32523    else
32524      # We're on a unix platform. Hooray! :)
32525      # First separate the path from the arguments. This will split at the first
32526      # space.
32527      complete="$CXXCPP"
32528      path="${complete%% *}"
32529      tmp="$complete EOL"
32530      arguments="${tmp#* }"
32531
32532      # Cannot rely on the command "which" here since it doesn't always work.
32533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32534      if test -z "$is_absolute_path"; then
32535        # Path to executable is not absolute. Find it.
32536        IFS_save="$IFS"
32537        IFS=:
32538        for p in $PATH; do
32539          if test -f "$p/$path" && test -x "$p/$path"; then
32540            new_path="$p/$path"
32541            break
32542          fi
32543        done
32544        IFS="$IFS_save"
32545      else
32546        # This is an absolute path, we can use it without further modifications.
32547        new_path="$path"
32548      fi
32549
32550      if test "x$new_path" = x; then
32551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32552$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32553        has_space=`$ECHO "$complete" | $GREP " "`
32554        if test "x$has_space" != x; then
32555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32557        fi
32558        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32559      fi
32560    fi
32561
32562    # Now join together the path and the arguments once again
32563    if test "x$arguments" != xEOL; then
32564      new_complete="$new_path ${arguments% *}"
32565    else
32566      new_complete="$new_path"
32567    fi
32568
32569    if test "x$complete" != "x$new_complete"; then
32570      CXXCPP="$new_complete"
32571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32572$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32573    fi
32574  fi
32575
32576
32577  #
32578  # Setup the linker (LD)
32579  #
32580  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32581    # In the Microsoft toolchain we have a separate LD command "link".
32582    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32583    # a cygwin program for something completely different.
32584    # Extract the first word of "link", so it can be a program name with args.
32585set dummy link; ac_word=$2
32586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32587$as_echo_n "checking for $ac_word... " >&6; }
32588if ${ac_cv_prog_LD+:} false; then :
32589  $as_echo_n "(cached) " >&6
32590else
32591  if test -n "$LD"; then
32592  ac_cv_prog_LD="$LD" # Let the user override the test.
32593else
32594  ac_prog_rejected=no
32595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32596for as_dir in $PATH
32597do
32598  IFS=$as_save_IFS
32599  test -z "$as_dir" && as_dir=.
32600    for ac_exec_ext in '' $ac_executable_extensions; do
32601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32602    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32603       ac_prog_rejected=yes
32604       continue
32605     fi
32606    ac_cv_prog_LD="link"
32607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32608    break 2
32609  fi
32610done
32611  done
32612IFS=$as_save_IFS
32613
32614if test $ac_prog_rejected = yes; then
32615  # We found a bogon in the path, so make sure we never use it.
32616  set dummy $ac_cv_prog_LD
32617  shift
32618  if test $# != 0; then
32619    # We chose a different compiler from the bogus one.
32620    # However, it has the same basename, so the bogon will be chosen
32621    # first if we set LD to just the basename; use the full file name.
32622    shift
32623    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32624  fi
32625fi
32626fi
32627fi
32628LD=$ac_cv_prog_LD
32629if test -n "$LD"; then
32630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32631$as_echo "$LD" >&6; }
32632else
32633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32634$as_echo "no" >&6; }
32635fi
32636
32637
32638
32639  # Only process if variable expands to non-empty
32640
32641  if test "x$LD" != x; then
32642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643
32644  # First separate the path from the arguments. This will split at the first
32645  # space.
32646  complete="$LD"
32647  path="${complete%% *}"
32648  tmp="$complete EOL"
32649  arguments="${tmp#* }"
32650
32651  # Input might be given as Windows format, start by converting to
32652  # unix format.
32653  new_path=`$CYGPATH -u "$path"`
32654
32655  # Now try to locate executable using which
32656  new_path=`$WHICH "$new_path" 2> /dev/null`
32657  # bat and cmd files are not always considered executable in cygwin causing which
32658  # to not find them
32659  if test "x$new_path" = x \
32660      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32661      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32662    new_path=`$CYGPATH -u "$path"`
32663  fi
32664  if test "x$new_path" = x; then
32665    # Oops. Which didn't find the executable.
32666    # The splitting of arguments from the executable at a space might have been incorrect,
32667    # since paths with space are more likely in Windows. Give it another try with the whole
32668    # argument.
32669    path="$complete"
32670    arguments="EOL"
32671    new_path=`$CYGPATH -u "$path"`
32672    new_path=`$WHICH "$new_path" 2> /dev/null`
32673    # bat and cmd files are not always considered executable in cygwin causing which
32674    # to not find them
32675    if test "x$new_path" = x \
32676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32678      new_path=`$CYGPATH -u "$path"`
32679    fi
32680    if test "x$new_path" = x; then
32681      # It's still not found. Now this is an unrecoverable error.
32682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32683$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32684      has_space=`$ECHO "$complete" | $GREP " "`
32685      if test "x$has_space" != x; then
32686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32688      fi
32689      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32690    fi
32691  fi
32692
32693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32696  # "foo.exe" is OK but "foo" is an error.
32697  #
32698  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32699  # It is also a way to make sure we got the proper file name for the real test later on.
32700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32701  if test "x$test_shortpath" = x; then
32702    # Short path failed, file does not exist as specified.
32703    # Try adding .exe or .cmd
32704    if test -f "${new_path}.exe"; then
32705      input_to_shortpath="${new_path}.exe"
32706    elif test -f "${new_path}.cmd"; then
32707      input_to_shortpath="${new_path}.cmd"
32708    else
32709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32710$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32713      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32714    fi
32715  else
32716    input_to_shortpath="$new_path"
32717  fi
32718
32719  # Call helper function which possibly converts this using DOS-style short mode.
32720  # If so, the updated path is stored in $new_path.
32721  new_path="$input_to_shortpath"
32722
32723  input_path="$input_to_shortpath"
32724  # Check if we need to convert this using DOS-style short mode. If the path
32725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32726  # take no chances and rewrite it.
32727  # Note: m4 eats our [], so we need to use [ and ] instead.
32728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32729  if test "x$has_forbidden_chars" != x; then
32730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32734      # Going to short mode and back again did indeed matter. Since short mode is
32735      # case insensitive, let's make it lowercase to improve readability.
32736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32737      # Now convert it back to Unix-style (cygpath)
32738      input_path=`$CYGPATH -u "$shortmode_path"`
32739      new_path="$input_path"
32740    fi
32741  fi
32742
32743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32744  if test "x$test_cygdrive_prefix" = x; then
32745    # As a simple fix, exclude /usr/bin since it's not a real path.
32746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32748      # a path prefixed by /cygdrive for fixpath to work.
32749      new_path="$CYGWIN_ROOT_PATH$input_path"
32750    fi
32751  fi
32752
32753  # remove trailing .exe if any
32754  new_path="${new_path/%.exe/}"
32755
32756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32757
32758  # First separate the path from the arguments. This will split at the first
32759  # space.
32760  complete="$LD"
32761  path="${complete%% *}"
32762  tmp="$complete EOL"
32763  arguments="${tmp#* }"
32764
32765  # Input might be given as Windows format, start by converting to
32766  # unix format.
32767  new_path="$path"
32768
32769  windows_path="$new_path"
32770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32771    unix_path=`$CYGPATH -u "$windows_path"`
32772    new_path="$unix_path"
32773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32775    new_path="$unix_path"
32776  fi
32777
32778
32779  # Now try to locate executable using which
32780  new_path=`$WHICH "$new_path" 2> /dev/null`
32781
32782  if test "x$new_path" = x; then
32783    # Oops. Which didn't find the executable.
32784    # The splitting of arguments from the executable at a space might have been incorrect,
32785    # since paths with space are more likely in Windows. Give it another try with the whole
32786    # argument.
32787    path="$complete"
32788    arguments="EOL"
32789    new_path="$path"
32790
32791  windows_path="$new_path"
32792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32793    unix_path=`$CYGPATH -u "$windows_path"`
32794    new_path="$unix_path"
32795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32797    new_path="$unix_path"
32798  fi
32799
32800
32801    new_path=`$WHICH "$new_path" 2> /dev/null`
32802    # bat and cmd files are not always considered executable in MSYS causing which
32803    # to not find them
32804    if test "x$new_path" = x \
32805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32807      new_path="$path"
32808
32809  windows_path="$new_path"
32810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32811    unix_path=`$CYGPATH -u "$windows_path"`
32812    new_path="$unix_path"
32813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32815    new_path="$unix_path"
32816  fi
32817
32818    fi
32819
32820    if test "x$new_path" = x; then
32821      # It's still not found. Now this is an unrecoverable error.
32822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32823$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32824      has_space=`$ECHO "$complete" | $GREP " "`
32825      if test "x$has_space" != x; then
32826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32828      fi
32829      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32830    fi
32831  fi
32832
32833  # Now new_path has a complete unix path to the binary
32834  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32835    # Keep paths in /bin as-is, but remove trailing .exe if any
32836    new_path="${new_path/%.exe/}"
32837    # Do not save /bin paths to all_fixpath_prefixes!
32838  else
32839    # Not in mixed or Windows style, start by that.
32840    new_path=`cmd //c echo $new_path`
32841
32842  input_path="$new_path"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32851  fi
32852
32853    # Output is in $new_path
32854
32855  windows_path="$new_path"
32856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32857    unix_path=`$CYGPATH -u "$windows_path"`
32858    new_path="$unix_path"
32859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32861    new_path="$unix_path"
32862  fi
32863
32864    # remove trailing .exe if any
32865    new_path="${new_path/%.exe/}"
32866
32867    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32868    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32869  fi
32870
32871    else
32872      # We're on a unix platform. Hooray! :)
32873      # First separate the path from the arguments. This will split at the first
32874      # space.
32875      complete="$LD"
32876      path="${complete%% *}"
32877      tmp="$complete EOL"
32878      arguments="${tmp#* }"
32879
32880      # Cannot rely on the command "which" here since it doesn't always work.
32881      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32882      if test -z "$is_absolute_path"; then
32883        # Path to executable is not absolute. Find it.
32884        IFS_save="$IFS"
32885        IFS=:
32886        for p in $PATH; do
32887          if test -f "$p/$path" && test -x "$p/$path"; then
32888            new_path="$p/$path"
32889            break
32890          fi
32891        done
32892        IFS="$IFS_save"
32893      else
32894        # This is an absolute path, we can use it without further modifications.
32895        new_path="$path"
32896      fi
32897
32898      if test "x$new_path" = x; then
32899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32900$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32901        has_space=`$ECHO "$complete" | $GREP " "`
32902        if test "x$has_space" != x; then
32903          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32905        fi
32906        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32907      fi
32908    fi
32909
32910    # Now join together the path and the arguments once again
32911    if test "x$arguments" != xEOL; then
32912      new_complete="$new_path ${arguments% *}"
32913    else
32914      new_complete="$new_path"
32915    fi
32916
32917    if test "x$complete" != "x$new_complete"; then
32918      LD="$new_complete"
32919      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32920$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32921    fi
32922  fi
32923
32924    # Verify that we indeed succeeded with this trick.
32925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32926$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32927    "$LD" --version > /dev/null
32928    if test $? -eq 0 ; then
32929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32930$as_echo "no" >&6; }
32931      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32932    else
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32934$as_echo "yes" >&6; }
32935    fi
32936    LDCXX="$LD"
32937  else
32938    # All other toolchains use the compiler to link.
32939    LD="$CC"
32940    LDCXX="$CXX"
32941  fi
32942
32943  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32944
32945
32946  #
32947  # Setup the assembler (AS)
32948  #
32949  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32950    # FIXME: should this really be solaris, or solstudio?
32951
32952
32953  # Publish this variable in the help.
32954
32955
32956  if test "x$AS" = x; then
32957    # The variable is not set by user, try to locate tool using the code snippet
32958    for ac_prog in as
32959do
32960  # Extract the first word of "$ac_prog", so it can be a program name with args.
32961set dummy $ac_prog; ac_word=$2
32962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32963$as_echo_n "checking for $ac_word... " >&6; }
32964if ${ac_cv_path_AS+:} false; then :
32965  $as_echo_n "(cached) " >&6
32966else
32967  case $AS in
32968  [\\/]* | ?:[\\/]*)
32969  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32970  ;;
32971  *)
32972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32973for as_dir in $PATH
32974do
32975  IFS=$as_save_IFS
32976  test -z "$as_dir" && as_dir=.
32977    for ac_exec_ext in '' $ac_executable_extensions; do
32978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32979    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32981    break 2
32982  fi
32983done
32984  done
32985IFS=$as_save_IFS
32986
32987  ;;
32988esac
32989fi
32990AS=$ac_cv_path_AS
32991if test -n "$AS"; then
32992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32993$as_echo "$AS" >&6; }
32994else
32995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32996$as_echo "no" >&6; }
32997fi
32998
32999
33000  test -n "$AS" && break
33001done
33002
33003  else
33004    # The variable is set, but is it from the command line or the environment?
33005
33006    # Try to remove the string !AS! from our list.
33007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33009      # If it failed, the variable was not from the command line. Ignore it,
33010      # but warn the user (except for BASH, which is always set by the calling BASH).
33011      if test "xAS" != xBASH; then
33012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33013$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33014      fi
33015      # Try to locate tool using the code snippet
33016      for ac_prog in as
33017do
33018  # Extract the first word of "$ac_prog", so it can be a program name with args.
33019set dummy $ac_prog; ac_word=$2
33020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33021$as_echo_n "checking for $ac_word... " >&6; }
33022if ${ac_cv_path_AS+:} false; then :
33023  $as_echo_n "(cached) " >&6
33024else
33025  case $AS in
33026  [\\/]* | ?:[\\/]*)
33027  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33028  ;;
33029  *)
33030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33031for as_dir in $PATH
33032do
33033  IFS=$as_save_IFS
33034  test -z "$as_dir" && as_dir=.
33035    for ac_exec_ext in '' $ac_executable_extensions; do
33036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33037    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33039    break 2
33040  fi
33041done
33042  done
33043IFS=$as_save_IFS
33044
33045  ;;
33046esac
33047fi
33048AS=$ac_cv_path_AS
33049if test -n "$AS"; then
33050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33051$as_echo "$AS" >&6; }
33052else
33053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33054$as_echo "no" >&6; }
33055fi
33056
33057
33058  test -n "$AS" && break
33059done
33060
33061    else
33062      # If it succeeded, then it was overridden by the user. We will use it
33063      # for the tool.
33064
33065      # First remove it from the list of overridden variables, so we can test
33066      # for unknown variables in the end.
33067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33068
33069      # Check if the provided tool contains a complete path.
33070      tool_specified="$AS"
33071      tool_basename="${tool_specified##*/}"
33072      if test "x$tool_basename" = "x$tool_specified"; then
33073        # A command without a complete path is provided, search $PATH.
33074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33075$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33076        # Extract the first word of "$tool_basename", so it can be a program name with args.
33077set dummy $tool_basename; ac_word=$2
33078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33079$as_echo_n "checking for $ac_word... " >&6; }
33080if ${ac_cv_path_AS+:} false; then :
33081  $as_echo_n "(cached) " >&6
33082else
33083  case $AS in
33084  [\\/]* | ?:[\\/]*)
33085  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33086  ;;
33087  *)
33088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33089for as_dir in $PATH
33090do
33091  IFS=$as_save_IFS
33092  test -z "$as_dir" && as_dir=.
33093    for ac_exec_ext in '' $ac_executable_extensions; do
33094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33095    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33097    break 2
33098  fi
33099done
33100  done
33101IFS=$as_save_IFS
33102
33103  ;;
33104esac
33105fi
33106AS=$ac_cv_path_AS
33107if test -n "$AS"; then
33108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33109$as_echo "$AS" >&6; }
33110else
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33112$as_echo "no" >&6; }
33113fi
33114
33115
33116        if test "x$AS" = x; then
33117          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33118        fi
33119      else
33120        # Otherwise we believe it is a complete path. Use it as it is.
33121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33122$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33123        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33124$as_echo_n "checking for AS... " >&6; }
33125        if test ! -x "$tool_specified"; then
33126          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33127$as_echo "not found" >&6; }
33128          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33129        fi
33130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33131$as_echo "$tool_specified" >&6; }
33132      fi
33133    fi
33134  fi
33135
33136
33137
33138  # Only process if variable expands to non-empty
33139
33140  if test "x$AS" != x; then
33141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33142
33143  # First separate the path from the arguments. This will split at the first
33144  # space.
33145  complete="$AS"
33146  path="${complete%% *}"
33147  tmp="$complete EOL"
33148  arguments="${tmp#* }"
33149
33150  # Input might be given as Windows format, start by converting to
33151  # unix format.
33152  new_path=`$CYGPATH -u "$path"`
33153
33154  # Now try to locate executable using which
33155  new_path=`$WHICH "$new_path" 2> /dev/null`
33156  # bat and cmd files are not always considered executable in cygwin causing which
33157  # to not find them
33158  if test "x$new_path" = x \
33159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33161    new_path=`$CYGPATH -u "$path"`
33162  fi
33163  if test "x$new_path" = x; then
33164    # Oops. Which didn't find the executable.
33165    # The splitting of arguments from the executable at a space might have been incorrect,
33166    # since paths with space are more likely in Windows. Give it another try with the whole
33167    # argument.
33168    path="$complete"
33169    arguments="EOL"
33170    new_path=`$CYGPATH -u "$path"`
33171    new_path=`$WHICH "$new_path" 2> /dev/null`
33172    # bat and cmd files are not always considered executable in cygwin causing which
33173    # to not find them
33174    if test "x$new_path" = x \
33175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33177      new_path=`$CYGPATH -u "$path"`
33178    fi
33179    if test "x$new_path" = x; then
33180      # It's still not found. Now this is an unrecoverable error.
33181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33182$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33183      has_space=`$ECHO "$complete" | $GREP " "`
33184      if test "x$has_space" != x; then
33185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33187      fi
33188      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33189    fi
33190  fi
33191
33192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33195  # "foo.exe" is OK but "foo" is an error.
33196  #
33197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33198  # It is also a way to make sure we got the proper file name for the real test later on.
33199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33200  if test "x$test_shortpath" = x; then
33201    # Short path failed, file does not exist as specified.
33202    # Try adding .exe or .cmd
33203    if test -f "${new_path}.exe"; then
33204      input_to_shortpath="${new_path}.exe"
33205    elif test -f "${new_path}.cmd"; then
33206      input_to_shortpath="${new_path}.cmd"
33207    else
33208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33209$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33212      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33213    fi
33214  else
33215    input_to_shortpath="$new_path"
33216  fi
33217
33218  # Call helper function which possibly converts this using DOS-style short mode.
33219  # If so, the updated path is stored in $new_path.
33220  new_path="$input_to_shortpath"
33221
33222  input_path="$input_to_shortpath"
33223  # Check if we need to convert this using DOS-style short mode. If the path
33224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33225  # take no chances and rewrite it.
33226  # Note: m4 eats our [], so we need to use [ and ] instead.
33227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33228  if test "x$has_forbidden_chars" != x; then
33229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33233      # Going to short mode and back again did indeed matter. Since short mode is
33234      # case insensitive, let's make it lowercase to improve readability.
33235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33236      # Now convert it back to Unix-style (cygpath)
33237      input_path=`$CYGPATH -u "$shortmode_path"`
33238      new_path="$input_path"
33239    fi
33240  fi
33241
33242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33243  if test "x$test_cygdrive_prefix" = x; then
33244    # As a simple fix, exclude /usr/bin since it's not a real path.
33245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33247      # a path prefixed by /cygdrive for fixpath to work.
33248      new_path="$CYGWIN_ROOT_PATH$input_path"
33249    fi
33250  fi
33251
33252  # remove trailing .exe if any
33253  new_path="${new_path/%.exe/}"
33254
33255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33256
33257  # First separate the path from the arguments. This will split at the first
33258  # space.
33259  complete="$AS"
33260  path="${complete%% *}"
33261  tmp="$complete EOL"
33262  arguments="${tmp#* }"
33263
33264  # Input might be given as Windows format, start by converting to
33265  # unix format.
33266  new_path="$path"
33267
33268  windows_path="$new_path"
33269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33270    unix_path=`$CYGPATH -u "$windows_path"`
33271    new_path="$unix_path"
33272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33274    new_path="$unix_path"
33275  fi
33276
33277
33278  # Now try to locate executable using which
33279  new_path=`$WHICH "$new_path" 2> /dev/null`
33280
33281  if test "x$new_path" = x; then
33282    # Oops. Which didn't find the executable.
33283    # The splitting of arguments from the executable at a space might have been incorrect,
33284    # since paths with space are more likely in Windows. Give it another try with the whole
33285    # argument.
33286    path="$complete"
33287    arguments="EOL"
33288    new_path="$path"
33289
33290  windows_path="$new_path"
33291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33292    unix_path=`$CYGPATH -u "$windows_path"`
33293    new_path="$unix_path"
33294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33296    new_path="$unix_path"
33297  fi
33298
33299
33300    new_path=`$WHICH "$new_path" 2> /dev/null`
33301    # bat and cmd files are not always considered executable in MSYS causing which
33302    # to not find them
33303    if test "x$new_path" = x \
33304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33306      new_path="$path"
33307
33308  windows_path="$new_path"
33309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33310    unix_path=`$CYGPATH -u "$windows_path"`
33311    new_path="$unix_path"
33312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33314    new_path="$unix_path"
33315  fi
33316
33317    fi
33318
33319    if test "x$new_path" = x; then
33320      # It's still not found. Now this is an unrecoverable error.
33321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33322$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33323      has_space=`$ECHO "$complete" | $GREP " "`
33324      if test "x$has_space" != x; then
33325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33327      fi
33328      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33329    fi
33330  fi
33331
33332  # Now new_path has a complete unix path to the binary
33333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33334    # Keep paths in /bin as-is, but remove trailing .exe if any
33335    new_path="${new_path/%.exe/}"
33336    # Do not save /bin paths to all_fixpath_prefixes!
33337  else
33338    # Not in mixed or Windows style, start by that.
33339    new_path=`cmd //c echo $new_path`
33340
33341  input_path="$new_path"
33342  # Check if we need to convert this using DOS-style short mode. If the path
33343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33344  # take no chances and rewrite it.
33345  # Note: m4 eats our [], so we need to use [ and ] instead.
33346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33347  if test "x$has_forbidden_chars" != x; then
33348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33350  fi
33351
33352    # Output is in $new_path
33353
33354  windows_path="$new_path"
33355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33356    unix_path=`$CYGPATH -u "$windows_path"`
33357    new_path="$unix_path"
33358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33360    new_path="$unix_path"
33361  fi
33362
33363    # remove trailing .exe if any
33364    new_path="${new_path/%.exe/}"
33365
33366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33368  fi
33369
33370    else
33371      # We're on a unix platform. Hooray! :)
33372      # First separate the path from the arguments. This will split at the first
33373      # space.
33374      complete="$AS"
33375      path="${complete%% *}"
33376      tmp="$complete EOL"
33377      arguments="${tmp#* }"
33378
33379      # Cannot rely on the command "which" here since it doesn't always work.
33380      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33381      if test -z "$is_absolute_path"; then
33382        # Path to executable is not absolute. Find it.
33383        IFS_save="$IFS"
33384        IFS=:
33385        for p in $PATH; do
33386          if test -f "$p/$path" && test -x "$p/$path"; then
33387            new_path="$p/$path"
33388            break
33389          fi
33390        done
33391        IFS="$IFS_save"
33392      else
33393        # This is an absolute path, we can use it without further modifications.
33394        new_path="$path"
33395      fi
33396
33397      if test "x$new_path" = x; then
33398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33399$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33400        has_space=`$ECHO "$complete" | $GREP " "`
33401        if test "x$has_space" != x; then
33402          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33404        fi
33405        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33406      fi
33407    fi
33408
33409    # Now join together the path and the arguments once again
33410    if test "x$arguments" != xEOL; then
33411      new_complete="$new_path ${arguments% *}"
33412    else
33413      new_complete="$new_path"
33414    fi
33415
33416    if test "x$complete" != "x$new_complete"; then
33417      AS="$new_complete"
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33419$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33420    fi
33421  fi
33422
33423  else
33424    # FIXME: is this correct for microsoft?
33425    AS="$CC -c"
33426  fi
33427
33428
33429  #
33430  # Setup the archiver (AR)
33431  #
33432  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33433    # The corresponding ar tool is lib.exe (used to create static libraries)
33434    # Extract the first word of "lib", so it can be a program name with args.
33435set dummy lib; ac_word=$2
33436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33437$as_echo_n "checking for $ac_word... " >&6; }
33438if ${ac_cv_prog_AR+:} false; then :
33439  $as_echo_n "(cached) " >&6
33440else
33441  if test -n "$AR"; then
33442  ac_cv_prog_AR="$AR" # Let the user override the test.
33443else
33444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33445for as_dir in $PATH
33446do
33447  IFS=$as_save_IFS
33448  test -z "$as_dir" && as_dir=.
33449    for ac_exec_ext in '' $ac_executable_extensions; do
33450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33451    ac_cv_prog_AR="lib"
33452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33453    break 2
33454  fi
33455done
33456  done
33457IFS=$as_save_IFS
33458
33459fi
33460fi
33461AR=$ac_cv_prog_AR
33462if test -n "$AR"; then
33463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33464$as_echo "$AR" >&6; }
33465else
33466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33467$as_echo "no" >&6; }
33468fi
33469
33470
33471  else
33472
33473
33474  # Publish this variable in the help.
33475
33476
33477  if test "x$AR" = x; then
33478    # The variable is not set by user, try to locate tool using the code snippet
33479    if test -n "$ac_tool_prefix"; then
33480  for ac_prog in ar
33481  do
33482    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33483set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33485$as_echo_n "checking for $ac_word... " >&6; }
33486if ${ac_cv_prog_AR+:} false; then :
33487  $as_echo_n "(cached) " >&6
33488else
33489  if test -n "$AR"; then
33490  ac_cv_prog_AR="$AR" # Let the user override the test.
33491else
33492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33493for as_dir in $PATH
33494do
33495  IFS=$as_save_IFS
33496  test -z "$as_dir" && as_dir=.
33497    for ac_exec_ext in '' $ac_executable_extensions; do
33498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33499    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33501    break 2
33502  fi
33503done
33504  done
33505IFS=$as_save_IFS
33506
33507fi
33508fi
33509AR=$ac_cv_prog_AR
33510if test -n "$AR"; then
33511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33512$as_echo "$AR" >&6; }
33513else
33514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33515$as_echo "no" >&6; }
33516fi
33517
33518
33519    test -n "$AR" && break
33520  done
33521fi
33522if test -z "$AR"; then
33523  ac_ct_AR=$AR
33524  for ac_prog in ar
33525do
33526  # Extract the first word of "$ac_prog", so it can be a program name with args.
33527set dummy $ac_prog; ac_word=$2
33528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33529$as_echo_n "checking for $ac_word... " >&6; }
33530if ${ac_cv_prog_ac_ct_AR+:} false; then :
33531  $as_echo_n "(cached) " >&6
33532else
33533  if test -n "$ac_ct_AR"; then
33534  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33535else
33536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33537for as_dir in $PATH
33538do
33539  IFS=$as_save_IFS
33540  test -z "$as_dir" && as_dir=.
33541    for ac_exec_ext in '' $ac_executable_extensions; do
33542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33543    ac_cv_prog_ac_ct_AR="$ac_prog"
33544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33545    break 2
33546  fi
33547done
33548  done
33549IFS=$as_save_IFS
33550
33551fi
33552fi
33553ac_ct_AR=$ac_cv_prog_ac_ct_AR
33554if test -n "$ac_ct_AR"; then
33555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33556$as_echo "$ac_ct_AR" >&6; }
33557else
33558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33559$as_echo "no" >&6; }
33560fi
33561
33562
33563  test -n "$ac_ct_AR" && break
33564done
33565
33566  if test "x$ac_ct_AR" = x; then
33567    AR=""
33568  else
33569    case $cross_compiling:$ac_tool_warned in
33570yes:)
33571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33573ac_tool_warned=yes ;;
33574esac
33575    AR=$ac_ct_AR
33576  fi
33577fi
33578
33579  else
33580    # The variable is set, but is it from the command line or the environment?
33581
33582    # Try to remove the string !AR! from our list.
33583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33585      # If it failed, the variable was not from the command line. Ignore it,
33586      # but warn the user (except for BASH, which is always set by the calling BASH).
33587      if test "xAR" != xBASH; then
33588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33589$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33590      fi
33591      # Try to locate tool using the code snippet
33592      if test -n "$ac_tool_prefix"; then
33593  for ac_prog in ar
33594  do
33595    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33596set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33598$as_echo_n "checking for $ac_word... " >&6; }
33599if ${ac_cv_prog_AR+:} false; then :
33600  $as_echo_n "(cached) " >&6
33601else
33602  if test -n "$AR"; then
33603  ac_cv_prog_AR="$AR" # Let the user override the test.
33604else
33605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33606for as_dir in $PATH
33607do
33608  IFS=$as_save_IFS
33609  test -z "$as_dir" && as_dir=.
33610    for ac_exec_ext in '' $ac_executable_extensions; do
33611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33612    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33614    break 2
33615  fi
33616done
33617  done
33618IFS=$as_save_IFS
33619
33620fi
33621fi
33622AR=$ac_cv_prog_AR
33623if test -n "$AR"; then
33624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33625$as_echo "$AR" >&6; }
33626else
33627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33628$as_echo "no" >&6; }
33629fi
33630
33631
33632    test -n "$AR" && break
33633  done
33634fi
33635if test -z "$AR"; then
33636  ac_ct_AR=$AR
33637  for ac_prog in ar
33638do
33639  # Extract the first word of "$ac_prog", so it can be a program name with args.
33640set dummy $ac_prog; ac_word=$2
33641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33642$as_echo_n "checking for $ac_word... " >&6; }
33643if ${ac_cv_prog_ac_ct_AR+:} false; then :
33644  $as_echo_n "(cached) " >&6
33645else
33646  if test -n "$ac_ct_AR"; then
33647  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33648else
33649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33650for as_dir in $PATH
33651do
33652  IFS=$as_save_IFS
33653  test -z "$as_dir" && as_dir=.
33654    for ac_exec_ext in '' $ac_executable_extensions; do
33655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33656    ac_cv_prog_ac_ct_AR="$ac_prog"
33657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33658    break 2
33659  fi
33660done
33661  done
33662IFS=$as_save_IFS
33663
33664fi
33665fi
33666ac_ct_AR=$ac_cv_prog_ac_ct_AR
33667if test -n "$ac_ct_AR"; then
33668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33669$as_echo "$ac_ct_AR" >&6; }
33670else
33671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33672$as_echo "no" >&6; }
33673fi
33674
33675
33676  test -n "$ac_ct_AR" && break
33677done
33678
33679  if test "x$ac_ct_AR" = x; then
33680    AR=""
33681  else
33682    case $cross_compiling:$ac_tool_warned in
33683yes:)
33684{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33685$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33686ac_tool_warned=yes ;;
33687esac
33688    AR=$ac_ct_AR
33689  fi
33690fi
33691
33692    else
33693      # If it succeeded, then it was overridden by the user. We will use it
33694      # for the tool.
33695
33696      # First remove it from the list of overridden variables, so we can test
33697      # for unknown variables in the end.
33698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33699
33700      # Check if the provided tool contains a complete path.
33701      tool_specified="$AR"
33702      tool_basename="${tool_specified##*/}"
33703      if test "x$tool_basename" = "x$tool_specified"; then
33704        # A command without a complete path is provided, search $PATH.
33705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33706$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33707        # Extract the first word of "$tool_basename", so it can be a program name with args.
33708set dummy $tool_basename; ac_word=$2
33709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33710$as_echo_n "checking for $ac_word... " >&6; }
33711if ${ac_cv_path_AR+:} false; then :
33712  $as_echo_n "(cached) " >&6
33713else
33714  case $AR in
33715  [\\/]* | ?:[\\/]*)
33716  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33717  ;;
33718  *)
33719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33720for as_dir in $PATH
33721do
33722  IFS=$as_save_IFS
33723  test -z "$as_dir" && as_dir=.
33724    for ac_exec_ext in '' $ac_executable_extensions; do
33725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33726    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33728    break 2
33729  fi
33730done
33731  done
33732IFS=$as_save_IFS
33733
33734  ;;
33735esac
33736fi
33737AR=$ac_cv_path_AR
33738if test -n "$AR"; then
33739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33740$as_echo "$AR" >&6; }
33741else
33742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33743$as_echo "no" >&6; }
33744fi
33745
33746
33747        if test "x$AR" = x; then
33748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33749        fi
33750      else
33751        # Otherwise we believe it is a complete path. Use it as it is.
33752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33753$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33755$as_echo_n "checking for AR... " >&6; }
33756        if test ! -x "$tool_specified"; then
33757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33758$as_echo "not found" >&6; }
33759          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33760        fi
33761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33762$as_echo "$tool_specified" >&6; }
33763      fi
33764    fi
33765  fi
33766
33767
33768  fi
33769
33770  # Only process if variable expands to non-empty
33771
33772  if test "x$AR" != x; then
33773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33774
33775  # First separate the path from the arguments. This will split at the first
33776  # space.
33777  complete="$AR"
33778  path="${complete%% *}"
33779  tmp="$complete EOL"
33780  arguments="${tmp#* }"
33781
33782  # Input might be given as Windows format, start by converting to
33783  # unix format.
33784  new_path=`$CYGPATH -u "$path"`
33785
33786  # Now try to locate executable using which
33787  new_path=`$WHICH "$new_path" 2> /dev/null`
33788  # bat and cmd files are not always considered executable in cygwin causing which
33789  # to not find them
33790  if test "x$new_path" = x \
33791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33793    new_path=`$CYGPATH -u "$path"`
33794  fi
33795  if test "x$new_path" = x; then
33796    # Oops. Which didn't find the executable.
33797    # The splitting of arguments from the executable at a space might have been incorrect,
33798    # since paths with space are more likely in Windows. Give it another try with the whole
33799    # argument.
33800    path="$complete"
33801    arguments="EOL"
33802    new_path=`$CYGPATH -u "$path"`
33803    new_path=`$WHICH "$new_path" 2> /dev/null`
33804    # bat and cmd files are not always considered executable in cygwin causing which
33805    # to not find them
33806    if test "x$new_path" = x \
33807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33809      new_path=`$CYGPATH -u "$path"`
33810    fi
33811    if test "x$new_path" = x; then
33812      # It's still not found. Now this is an unrecoverable error.
33813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33814$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33815      has_space=`$ECHO "$complete" | $GREP " "`
33816      if test "x$has_space" != x; then
33817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33819      fi
33820      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33821    fi
33822  fi
33823
33824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33827  # "foo.exe" is OK but "foo" is an error.
33828  #
33829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33830  # It is also a way to make sure we got the proper file name for the real test later on.
33831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33832  if test "x$test_shortpath" = x; then
33833    # Short path failed, file does not exist as specified.
33834    # Try adding .exe or .cmd
33835    if test -f "${new_path}.exe"; then
33836      input_to_shortpath="${new_path}.exe"
33837    elif test -f "${new_path}.cmd"; then
33838      input_to_shortpath="${new_path}.cmd"
33839    else
33840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33841$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33844      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33845    fi
33846  else
33847    input_to_shortpath="$new_path"
33848  fi
33849
33850  # Call helper function which possibly converts this using DOS-style short mode.
33851  # If so, the updated path is stored in $new_path.
33852  new_path="$input_to_shortpath"
33853
33854  input_path="$input_to_shortpath"
33855  # Check if we need to convert this using DOS-style short mode. If the path
33856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33857  # take no chances and rewrite it.
33858  # Note: m4 eats our [], so we need to use [ and ] instead.
33859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33860  if test "x$has_forbidden_chars" != x; then
33861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33865      # Going to short mode and back again did indeed matter. Since short mode is
33866      # case insensitive, let's make it lowercase to improve readability.
33867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33868      # Now convert it back to Unix-style (cygpath)
33869      input_path=`$CYGPATH -u "$shortmode_path"`
33870      new_path="$input_path"
33871    fi
33872  fi
33873
33874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33875  if test "x$test_cygdrive_prefix" = x; then
33876    # As a simple fix, exclude /usr/bin since it's not a real path.
33877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33879      # a path prefixed by /cygdrive for fixpath to work.
33880      new_path="$CYGWIN_ROOT_PATH$input_path"
33881    fi
33882  fi
33883
33884  # remove trailing .exe if any
33885  new_path="${new_path/%.exe/}"
33886
33887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33888
33889  # First separate the path from the arguments. This will split at the first
33890  # space.
33891  complete="$AR"
33892  path="${complete%% *}"
33893  tmp="$complete EOL"
33894  arguments="${tmp#* }"
33895
33896  # Input might be given as Windows format, start by converting to
33897  # unix format.
33898  new_path="$path"
33899
33900  windows_path="$new_path"
33901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33902    unix_path=`$CYGPATH -u "$windows_path"`
33903    new_path="$unix_path"
33904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33906    new_path="$unix_path"
33907  fi
33908
33909
33910  # Now try to locate executable using which
33911  new_path=`$WHICH "$new_path" 2> /dev/null`
33912
33913  if test "x$new_path" = x; then
33914    # Oops. Which didn't find the executable.
33915    # The splitting of arguments from the executable at a space might have been incorrect,
33916    # since paths with space are more likely in Windows. Give it another try with the whole
33917    # argument.
33918    path="$complete"
33919    arguments="EOL"
33920    new_path="$path"
33921
33922  windows_path="$new_path"
33923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924    unix_path=`$CYGPATH -u "$windows_path"`
33925    new_path="$unix_path"
33926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33928    new_path="$unix_path"
33929  fi
33930
33931
33932    new_path=`$WHICH "$new_path" 2> /dev/null`
33933    # bat and cmd files are not always considered executable in MSYS causing which
33934    # to not find them
33935    if test "x$new_path" = x \
33936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33938      new_path="$path"
33939
33940  windows_path="$new_path"
33941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33942    unix_path=`$CYGPATH -u "$windows_path"`
33943    new_path="$unix_path"
33944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33946    new_path="$unix_path"
33947  fi
33948
33949    fi
33950
33951    if test "x$new_path" = x; then
33952      # It's still not found. Now this is an unrecoverable error.
33953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33954$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33955      has_space=`$ECHO "$complete" | $GREP " "`
33956      if test "x$has_space" != x; then
33957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33959      fi
33960      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33961    fi
33962  fi
33963
33964  # Now new_path has a complete unix path to the binary
33965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33966    # Keep paths in /bin as-is, but remove trailing .exe if any
33967    new_path="${new_path/%.exe/}"
33968    # Do not save /bin paths to all_fixpath_prefixes!
33969  else
33970    # Not in mixed or Windows style, start by that.
33971    new_path=`cmd //c echo $new_path`
33972
33973  input_path="$new_path"
33974  # Check if we need to convert this using DOS-style short mode. If the path
33975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33976  # take no chances and rewrite it.
33977  # Note: m4 eats our [], so we need to use [ and ] instead.
33978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33979  if test "x$has_forbidden_chars" != x; then
33980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33982  fi
33983
33984    # Output is in $new_path
33985
33986  windows_path="$new_path"
33987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33988    unix_path=`$CYGPATH -u "$windows_path"`
33989    new_path="$unix_path"
33990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33992    new_path="$unix_path"
33993  fi
33994
33995    # remove trailing .exe if any
33996    new_path="${new_path/%.exe/}"
33997
33998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34000  fi
34001
34002    else
34003      # We're on a unix platform. Hooray! :)
34004      # First separate the path from the arguments. This will split at the first
34005      # space.
34006      complete="$AR"
34007      path="${complete%% *}"
34008      tmp="$complete EOL"
34009      arguments="${tmp#* }"
34010
34011      # Cannot rely on the command "which" here since it doesn't always work.
34012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34013      if test -z "$is_absolute_path"; then
34014        # Path to executable is not absolute. Find it.
34015        IFS_save="$IFS"
34016        IFS=:
34017        for p in $PATH; do
34018          if test -f "$p/$path" && test -x "$p/$path"; then
34019            new_path="$p/$path"
34020            break
34021          fi
34022        done
34023        IFS="$IFS_save"
34024      else
34025        # This is an absolute path, we can use it without further modifications.
34026        new_path="$path"
34027      fi
34028
34029      if test "x$new_path" = x; then
34030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34031$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34032        has_space=`$ECHO "$complete" | $GREP " "`
34033        if test "x$has_space" != x; then
34034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34036        fi
34037        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34038      fi
34039    fi
34040
34041    # Now join together the path and the arguments once again
34042    if test "x$arguments" != xEOL; then
34043      new_complete="$new_path ${arguments% *}"
34044    else
34045      new_complete="$new_path"
34046    fi
34047
34048    if test "x$complete" != "x$new_complete"; then
34049      AR="$new_complete"
34050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34051$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34052    fi
34053  fi
34054
34055
34056
34057  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34058
34059
34060  # Publish this variable in the help.
34061
34062
34063  if test "x$LIPO" = x; then
34064    # The variable is not set by user, try to locate tool using the code snippet
34065    for ac_prog in lipo
34066do
34067  # Extract the first word of "$ac_prog", so it can be a program name with args.
34068set dummy $ac_prog; ac_word=$2
34069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34070$as_echo_n "checking for $ac_word... " >&6; }
34071if ${ac_cv_path_LIPO+:} false; then :
34072  $as_echo_n "(cached) " >&6
34073else
34074  case $LIPO in
34075  [\\/]* | ?:[\\/]*)
34076  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34077  ;;
34078  *)
34079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34080for as_dir in $PATH
34081do
34082  IFS=$as_save_IFS
34083  test -z "$as_dir" && as_dir=.
34084    for ac_exec_ext in '' $ac_executable_extensions; do
34085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34086    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34088    break 2
34089  fi
34090done
34091  done
34092IFS=$as_save_IFS
34093
34094  ;;
34095esac
34096fi
34097LIPO=$ac_cv_path_LIPO
34098if test -n "$LIPO"; then
34099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34100$as_echo "$LIPO" >&6; }
34101else
34102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34103$as_echo "no" >&6; }
34104fi
34105
34106
34107  test -n "$LIPO" && break
34108done
34109
34110  else
34111    # The variable is set, but is it from the command line or the environment?
34112
34113    # Try to remove the string !LIPO! from our list.
34114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34116      # If it failed, the variable was not from the command line. Ignore it,
34117      # but warn the user (except for BASH, which is always set by the calling BASH).
34118      if test "xLIPO" != xBASH; then
34119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34120$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34121      fi
34122      # Try to locate tool using the code snippet
34123      for ac_prog in lipo
34124do
34125  # Extract the first word of "$ac_prog", so it can be a program name with args.
34126set dummy $ac_prog; ac_word=$2
34127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34128$as_echo_n "checking for $ac_word... " >&6; }
34129if ${ac_cv_path_LIPO+:} false; then :
34130  $as_echo_n "(cached) " >&6
34131else
34132  case $LIPO in
34133  [\\/]* | ?:[\\/]*)
34134  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34135  ;;
34136  *)
34137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34138for as_dir in $PATH
34139do
34140  IFS=$as_save_IFS
34141  test -z "$as_dir" && as_dir=.
34142    for ac_exec_ext in '' $ac_executable_extensions; do
34143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34144    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34146    break 2
34147  fi
34148done
34149  done
34150IFS=$as_save_IFS
34151
34152  ;;
34153esac
34154fi
34155LIPO=$ac_cv_path_LIPO
34156if test -n "$LIPO"; then
34157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34158$as_echo "$LIPO" >&6; }
34159else
34160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34161$as_echo "no" >&6; }
34162fi
34163
34164
34165  test -n "$LIPO" && break
34166done
34167
34168    else
34169      # If it succeeded, then it was overridden by the user. We will use it
34170      # for the tool.
34171
34172      # First remove it from the list of overridden variables, so we can test
34173      # for unknown variables in the end.
34174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34175
34176      # Check if the provided tool contains a complete path.
34177      tool_specified="$LIPO"
34178      tool_basename="${tool_specified##*/}"
34179      if test "x$tool_basename" = "x$tool_specified"; then
34180        # A command without a complete path is provided, search $PATH.
34181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34182$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34183        # Extract the first word of "$tool_basename", so it can be a program name with args.
34184set dummy $tool_basename; ac_word=$2
34185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34186$as_echo_n "checking for $ac_word... " >&6; }
34187if ${ac_cv_path_LIPO+:} false; then :
34188  $as_echo_n "(cached) " >&6
34189else
34190  case $LIPO in
34191  [\\/]* | ?:[\\/]*)
34192  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34193  ;;
34194  *)
34195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34196for as_dir in $PATH
34197do
34198  IFS=$as_save_IFS
34199  test -z "$as_dir" && as_dir=.
34200    for ac_exec_ext in '' $ac_executable_extensions; do
34201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34202    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34204    break 2
34205  fi
34206done
34207  done
34208IFS=$as_save_IFS
34209
34210  ;;
34211esac
34212fi
34213LIPO=$ac_cv_path_LIPO
34214if test -n "$LIPO"; then
34215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34216$as_echo "$LIPO" >&6; }
34217else
34218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34219$as_echo "no" >&6; }
34220fi
34221
34222
34223        if test "x$LIPO" = x; then
34224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34225        fi
34226      else
34227        # Otherwise we believe it is a complete path. Use it as it is.
34228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34229$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34231$as_echo_n "checking for LIPO... " >&6; }
34232        if test ! -x "$tool_specified"; then
34233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34234$as_echo "not found" >&6; }
34235          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34236        fi
34237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34238$as_echo "$tool_specified" >&6; }
34239      fi
34240    fi
34241  fi
34242
34243
34244
34245  # Only process if variable expands to non-empty
34246
34247  if test "x$LIPO" != x; then
34248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34249
34250  # First separate the path from the arguments. This will split at the first
34251  # space.
34252  complete="$LIPO"
34253  path="${complete%% *}"
34254  tmp="$complete EOL"
34255  arguments="${tmp#* }"
34256
34257  # Input might be given as Windows format, start by converting to
34258  # unix format.
34259  new_path=`$CYGPATH -u "$path"`
34260
34261  # Now try to locate executable using which
34262  new_path=`$WHICH "$new_path" 2> /dev/null`
34263  # bat and cmd files are not always considered executable in cygwin causing which
34264  # to not find them
34265  if test "x$new_path" = x \
34266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34268    new_path=`$CYGPATH -u "$path"`
34269  fi
34270  if test "x$new_path" = x; then
34271    # Oops. Which didn't find the executable.
34272    # The splitting of arguments from the executable at a space might have been incorrect,
34273    # since paths with space are more likely in Windows. Give it another try with the whole
34274    # argument.
34275    path="$complete"
34276    arguments="EOL"
34277    new_path=`$CYGPATH -u "$path"`
34278    new_path=`$WHICH "$new_path" 2> /dev/null`
34279    # bat and cmd files are not always considered executable in cygwin causing which
34280    # to not find them
34281    if test "x$new_path" = x \
34282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34284      new_path=`$CYGPATH -u "$path"`
34285    fi
34286    if test "x$new_path" = x; then
34287      # It's still not found. Now this is an unrecoverable error.
34288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34289$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34290      has_space=`$ECHO "$complete" | $GREP " "`
34291      if test "x$has_space" != x; then
34292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34294      fi
34295      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34296    fi
34297  fi
34298
34299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34302  # "foo.exe" is OK but "foo" is an error.
34303  #
34304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34305  # It is also a way to make sure we got the proper file name for the real test later on.
34306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34307  if test "x$test_shortpath" = x; then
34308    # Short path failed, file does not exist as specified.
34309    # Try adding .exe or .cmd
34310    if test -f "${new_path}.exe"; then
34311      input_to_shortpath="${new_path}.exe"
34312    elif test -f "${new_path}.cmd"; then
34313      input_to_shortpath="${new_path}.cmd"
34314    else
34315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34316$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34319      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34320    fi
34321  else
34322    input_to_shortpath="$new_path"
34323  fi
34324
34325  # Call helper function which possibly converts this using DOS-style short mode.
34326  # If so, the updated path is stored in $new_path.
34327  new_path="$input_to_shortpath"
34328
34329  input_path="$input_to_shortpath"
34330  # Check if we need to convert this using DOS-style short mode. If the path
34331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34332  # take no chances and rewrite it.
34333  # Note: m4 eats our [], so we need to use [ and ] instead.
34334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34335  if test "x$has_forbidden_chars" != x; then
34336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34340      # Going to short mode and back again did indeed matter. Since short mode is
34341      # case insensitive, let's make it lowercase to improve readability.
34342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34343      # Now convert it back to Unix-style (cygpath)
34344      input_path=`$CYGPATH -u "$shortmode_path"`
34345      new_path="$input_path"
34346    fi
34347  fi
34348
34349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34350  if test "x$test_cygdrive_prefix" = x; then
34351    # As a simple fix, exclude /usr/bin since it's not a real path.
34352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34354      # a path prefixed by /cygdrive for fixpath to work.
34355      new_path="$CYGWIN_ROOT_PATH$input_path"
34356    fi
34357  fi
34358
34359  # remove trailing .exe if any
34360  new_path="${new_path/%.exe/}"
34361
34362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34363
34364  # First separate the path from the arguments. This will split at the first
34365  # space.
34366  complete="$LIPO"
34367  path="${complete%% *}"
34368  tmp="$complete EOL"
34369  arguments="${tmp#* }"
34370
34371  # Input might be given as Windows format, start by converting to
34372  # unix format.
34373  new_path="$path"
34374
34375  windows_path="$new_path"
34376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34377    unix_path=`$CYGPATH -u "$windows_path"`
34378    new_path="$unix_path"
34379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34381    new_path="$unix_path"
34382  fi
34383
34384
34385  # Now try to locate executable using which
34386  new_path=`$WHICH "$new_path" 2> /dev/null`
34387
34388  if test "x$new_path" = x; then
34389    # Oops. Which didn't find the executable.
34390    # The splitting of arguments from the executable at a space might have been incorrect,
34391    # since paths with space are more likely in Windows. Give it another try with the whole
34392    # argument.
34393    path="$complete"
34394    arguments="EOL"
34395    new_path="$path"
34396
34397  windows_path="$new_path"
34398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34399    unix_path=`$CYGPATH -u "$windows_path"`
34400    new_path="$unix_path"
34401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34403    new_path="$unix_path"
34404  fi
34405
34406
34407    new_path=`$WHICH "$new_path" 2> /dev/null`
34408    # bat and cmd files are not always considered executable in MSYS causing which
34409    # to not find them
34410    if test "x$new_path" = x \
34411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34413      new_path="$path"
34414
34415  windows_path="$new_path"
34416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34417    unix_path=`$CYGPATH -u "$windows_path"`
34418    new_path="$unix_path"
34419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34421    new_path="$unix_path"
34422  fi
34423
34424    fi
34425
34426    if test "x$new_path" = x; then
34427      # It's still not found. Now this is an unrecoverable error.
34428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34429$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34430      has_space=`$ECHO "$complete" | $GREP " "`
34431      if test "x$has_space" != x; then
34432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34434      fi
34435      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34436    fi
34437  fi
34438
34439  # Now new_path has a complete unix path to the binary
34440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34441    # Keep paths in /bin as-is, but remove trailing .exe if any
34442    new_path="${new_path/%.exe/}"
34443    # Do not save /bin paths to all_fixpath_prefixes!
34444  else
34445    # Not in mixed or Windows style, start by that.
34446    new_path=`cmd //c echo $new_path`
34447
34448  input_path="$new_path"
34449  # Check if we need to convert this using DOS-style short mode. If the path
34450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34451  # take no chances and rewrite it.
34452  # Note: m4 eats our [], so we need to use [ and ] instead.
34453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34454  if test "x$has_forbidden_chars" != x; then
34455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34457  fi
34458
34459    # Output is in $new_path
34460
34461  windows_path="$new_path"
34462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34463    unix_path=`$CYGPATH -u "$windows_path"`
34464    new_path="$unix_path"
34465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34467    new_path="$unix_path"
34468  fi
34469
34470    # remove trailing .exe if any
34471    new_path="${new_path/%.exe/}"
34472
34473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34475  fi
34476
34477    else
34478      # We're on a unix platform. Hooray! :)
34479      # First separate the path from the arguments. This will split at the first
34480      # space.
34481      complete="$LIPO"
34482      path="${complete%% *}"
34483      tmp="$complete EOL"
34484      arguments="${tmp#* }"
34485
34486      # Cannot rely on the command "which" here since it doesn't always work.
34487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34488      if test -z "$is_absolute_path"; then
34489        # Path to executable is not absolute. Find it.
34490        IFS_save="$IFS"
34491        IFS=:
34492        for p in $PATH; do
34493          if test -f "$p/$path" && test -x "$p/$path"; then
34494            new_path="$p/$path"
34495            break
34496          fi
34497        done
34498        IFS="$IFS_save"
34499      else
34500        # This is an absolute path, we can use it without further modifications.
34501        new_path="$path"
34502      fi
34503
34504      if test "x$new_path" = x; then
34505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34506$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34507        has_space=`$ECHO "$complete" | $GREP " "`
34508        if test "x$has_space" != x; then
34509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34511        fi
34512        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34513      fi
34514    fi
34515
34516    # Now join together the path and the arguments once again
34517    if test "x$arguments" != xEOL; then
34518      new_complete="$new_path ${arguments% *}"
34519    else
34520      new_complete="$new_path"
34521    fi
34522
34523    if test "x$complete" != "x$new_complete"; then
34524      LIPO="$new_complete"
34525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34526$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34527    fi
34528  fi
34529
34530  fi
34531
34532  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34533    # Extract the first word of "mt", so it can be a program name with args.
34534set dummy mt; ac_word=$2
34535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34536$as_echo_n "checking for $ac_word... " >&6; }
34537if ${ac_cv_prog_MT+:} false; then :
34538  $as_echo_n "(cached) " >&6
34539else
34540  if test -n "$MT"; then
34541  ac_cv_prog_MT="$MT" # Let the user override the test.
34542else
34543  ac_prog_rejected=no
34544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34545for as_dir in $PATH
34546do
34547  IFS=$as_save_IFS
34548  test -z "$as_dir" && as_dir=.
34549    for ac_exec_ext in '' $ac_executable_extensions; do
34550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34551    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34552       ac_prog_rejected=yes
34553       continue
34554     fi
34555    ac_cv_prog_MT="mt"
34556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34557    break 2
34558  fi
34559done
34560  done
34561IFS=$as_save_IFS
34562
34563if test $ac_prog_rejected = yes; then
34564  # We found a bogon in the path, so make sure we never use it.
34565  set dummy $ac_cv_prog_MT
34566  shift
34567  if test $# != 0; then
34568    # We chose a different compiler from the bogus one.
34569    # However, it has the same basename, so the bogon will be chosen
34570    # first if we set MT to just the basename; use the full file name.
34571    shift
34572    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34573  fi
34574fi
34575fi
34576fi
34577MT=$ac_cv_prog_MT
34578if test -n "$MT"; then
34579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34580$as_echo "$MT" >&6; }
34581else
34582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34583$as_echo "no" >&6; }
34584fi
34585
34586
34587
34588  # Only process if variable expands to non-empty
34589
34590  if test "x$MT" != x; then
34591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34592
34593  # First separate the path from the arguments. This will split at the first
34594  # space.
34595  complete="$MT"
34596  path="${complete%% *}"
34597  tmp="$complete EOL"
34598  arguments="${tmp#* }"
34599
34600  # Input might be given as Windows format, start by converting to
34601  # unix format.
34602  new_path=`$CYGPATH -u "$path"`
34603
34604  # Now try to locate executable using which
34605  new_path=`$WHICH "$new_path" 2> /dev/null`
34606  # bat and cmd files are not always considered executable in cygwin causing which
34607  # to not find them
34608  if test "x$new_path" = x \
34609      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34610      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34611    new_path=`$CYGPATH -u "$path"`
34612  fi
34613  if test "x$new_path" = x; then
34614    # Oops. Which didn't find the executable.
34615    # The splitting of arguments from the executable at a space might have been incorrect,
34616    # since paths with space are more likely in Windows. Give it another try with the whole
34617    # argument.
34618    path="$complete"
34619    arguments="EOL"
34620    new_path=`$CYGPATH -u "$path"`
34621    new_path=`$WHICH "$new_path" 2> /dev/null`
34622    # bat and cmd files are not always considered executable in cygwin causing which
34623    # to not find them
34624    if test "x$new_path" = x \
34625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34627      new_path=`$CYGPATH -u "$path"`
34628    fi
34629    if test "x$new_path" = x; then
34630      # It's still not found. Now this is an unrecoverable error.
34631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34632$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34633      has_space=`$ECHO "$complete" | $GREP " "`
34634      if test "x$has_space" != x; then
34635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34637      fi
34638      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34639    fi
34640  fi
34641
34642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34645  # "foo.exe" is OK but "foo" is an error.
34646  #
34647  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34648  # It is also a way to make sure we got the proper file name for the real test later on.
34649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34650  if test "x$test_shortpath" = x; then
34651    # Short path failed, file does not exist as specified.
34652    # Try adding .exe or .cmd
34653    if test -f "${new_path}.exe"; then
34654      input_to_shortpath="${new_path}.exe"
34655    elif test -f "${new_path}.cmd"; then
34656      input_to_shortpath="${new_path}.cmd"
34657    else
34658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34659$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34662      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34663    fi
34664  else
34665    input_to_shortpath="$new_path"
34666  fi
34667
34668  # Call helper function which possibly converts this using DOS-style short mode.
34669  # If so, the updated path is stored in $new_path.
34670  new_path="$input_to_shortpath"
34671
34672  input_path="$input_to_shortpath"
34673  # Check if we need to convert this using DOS-style short mode. If the path
34674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34675  # take no chances and rewrite it.
34676  # Note: m4 eats our [], so we need to use [ and ] instead.
34677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34678  if test "x$has_forbidden_chars" != x; then
34679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34683      # Going to short mode and back again did indeed matter. Since short mode is
34684      # case insensitive, let's make it lowercase to improve readability.
34685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34686      # Now convert it back to Unix-style (cygpath)
34687      input_path=`$CYGPATH -u "$shortmode_path"`
34688      new_path="$input_path"
34689    fi
34690  fi
34691
34692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34693  if test "x$test_cygdrive_prefix" = x; then
34694    # As a simple fix, exclude /usr/bin since it's not a real path.
34695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34697      # a path prefixed by /cygdrive for fixpath to work.
34698      new_path="$CYGWIN_ROOT_PATH$input_path"
34699    fi
34700  fi
34701
34702  # remove trailing .exe if any
34703  new_path="${new_path/%.exe/}"
34704
34705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34706
34707  # First separate the path from the arguments. This will split at the first
34708  # space.
34709  complete="$MT"
34710  path="${complete%% *}"
34711  tmp="$complete EOL"
34712  arguments="${tmp#* }"
34713
34714  # Input might be given as Windows format, start by converting to
34715  # unix format.
34716  new_path="$path"
34717
34718  windows_path="$new_path"
34719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34720    unix_path=`$CYGPATH -u "$windows_path"`
34721    new_path="$unix_path"
34722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34724    new_path="$unix_path"
34725  fi
34726
34727
34728  # Now try to locate executable using which
34729  new_path=`$WHICH "$new_path" 2> /dev/null`
34730
34731  if test "x$new_path" = x; then
34732    # Oops. Which didn't find the executable.
34733    # The splitting of arguments from the executable at a space might have been incorrect,
34734    # since paths with space are more likely in Windows. Give it another try with the whole
34735    # argument.
34736    path="$complete"
34737    arguments="EOL"
34738    new_path="$path"
34739
34740  windows_path="$new_path"
34741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34742    unix_path=`$CYGPATH -u "$windows_path"`
34743    new_path="$unix_path"
34744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34746    new_path="$unix_path"
34747  fi
34748
34749
34750    new_path=`$WHICH "$new_path" 2> /dev/null`
34751    # bat and cmd files are not always considered executable in MSYS causing which
34752    # to not find them
34753    if test "x$new_path" = x \
34754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34756      new_path="$path"
34757
34758  windows_path="$new_path"
34759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34760    unix_path=`$CYGPATH -u "$windows_path"`
34761    new_path="$unix_path"
34762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34764    new_path="$unix_path"
34765  fi
34766
34767    fi
34768
34769    if test "x$new_path" = x; then
34770      # It's still not found. Now this is an unrecoverable error.
34771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34772$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34773      has_space=`$ECHO "$complete" | $GREP " "`
34774      if test "x$has_space" != x; then
34775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34777      fi
34778      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34779    fi
34780  fi
34781
34782  # Now new_path has a complete unix path to the binary
34783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34784    # Keep paths in /bin as-is, but remove trailing .exe if any
34785    new_path="${new_path/%.exe/}"
34786    # Do not save /bin paths to all_fixpath_prefixes!
34787  else
34788    # Not in mixed or Windows style, start by that.
34789    new_path=`cmd //c echo $new_path`
34790
34791  input_path="$new_path"
34792  # Check if we need to convert this using DOS-style short mode. If the path
34793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34794  # take no chances and rewrite it.
34795  # Note: m4 eats our [], so we need to use [ and ] instead.
34796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34797  if test "x$has_forbidden_chars" != x; then
34798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34800  fi
34801
34802    # Output is in $new_path
34803
34804  windows_path="$new_path"
34805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34806    unix_path=`$CYGPATH -u "$windows_path"`
34807    new_path="$unix_path"
34808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34810    new_path="$unix_path"
34811  fi
34812
34813    # remove trailing .exe if any
34814    new_path="${new_path/%.exe/}"
34815
34816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34818  fi
34819
34820    else
34821      # We're on a unix platform. Hooray! :)
34822      # First separate the path from the arguments. This will split at the first
34823      # space.
34824      complete="$MT"
34825      path="${complete%% *}"
34826      tmp="$complete EOL"
34827      arguments="${tmp#* }"
34828
34829      # Cannot rely on the command "which" here since it doesn't always work.
34830      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34831      if test -z "$is_absolute_path"; then
34832        # Path to executable is not absolute. Find it.
34833        IFS_save="$IFS"
34834        IFS=:
34835        for p in $PATH; do
34836          if test -f "$p/$path" && test -x "$p/$path"; then
34837            new_path="$p/$path"
34838            break
34839          fi
34840        done
34841        IFS="$IFS_save"
34842      else
34843        # This is an absolute path, we can use it without further modifications.
34844        new_path="$path"
34845      fi
34846
34847      if test "x$new_path" = x; then
34848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34849$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34850        has_space=`$ECHO "$complete" | $GREP " "`
34851        if test "x$has_space" != x; then
34852          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34853$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34854        fi
34855        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34856      fi
34857    fi
34858
34859    # Now join together the path and the arguments once again
34860    if test "x$arguments" != xEOL; then
34861      new_complete="$new_path ${arguments% *}"
34862    else
34863      new_complete="$new_path"
34864    fi
34865
34866    if test "x$complete" != "x$new_complete"; then
34867      MT="$new_complete"
34868      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34869$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34870    fi
34871  fi
34872
34873    # Setup the resource compiler (RC)
34874    # Extract the first word of "rc", so it can be a program name with args.
34875set dummy rc; ac_word=$2
34876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34877$as_echo_n "checking for $ac_word... " >&6; }
34878if ${ac_cv_prog_RC+:} false; then :
34879  $as_echo_n "(cached) " >&6
34880else
34881  if test -n "$RC"; then
34882  ac_cv_prog_RC="$RC" # Let the user override the test.
34883else
34884  ac_prog_rejected=no
34885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34886for as_dir in $PATH
34887do
34888  IFS=$as_save_IFS
34889  test -z "$as_dir" && as_dir=.
34890    for ac_exec_ext in '' $ac_executable_extensions; do
34891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34892    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34893       ac_prog_rejected=yes
34894       continue
34895     fi
34896    ac_cv_prog_RC="rc"
34897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34898    break 2
34899  fi
34900done
34901  done
34902IFS=$as_save_IFS
34903
34904if test $ac_prog_rejected = yes; then
34905  # We found a bogon in the path, so make sure we never use it.
34906  set dummy $ac_cv_prog_RC
34907  shift
34908  if test $# != 0; then
34909    # We chose a different compiler from the bogus one.
34910    # However, it has the same basename, so the bogon will be chosen
34911    # first if we set RC to just the basename; use the full file name.
34912    shift
34913    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34914  fi
34915fi
34916fi
34917fi
34918RC=$ac_cv_prog_RC
34919if test -n "$RC"; then
34920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34921$as_echo "$RC" >&6; }
34922else
34923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34924$as_echo "no" >&6; }
34925fi
34926
34927
34928
34929  # Only process if variable expands to non-empty
34930
34931  if test "x$RC" != x; then
34932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34933
34934  # First separate the path from the arguments. This will split at the first
34935  # space.
34936  complete="$RC"
34937  path="${complete%% *}"
34938  tmp="$complete EOL"
34939  arguments="${tmp#* }"
34940
34941  # Input might be given as Windows format, start by converting to
34942  # unix format.
34943  new_path=`$CYGPATH -u "$path"`
34944
34945  # Now try to locate executable using which
34946  new_path=`$WHICH "$new_path" 2> /dev/null`
34947  # bat and cmd files are not always considered executable in cygwin causing which
34948  # to not find them
34949  if test "x$new_path" = x \
34950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34952    new_path=`$CYGPATH -u "$path"`
34953  fi
34954  if test "x$new_path" = x; then
34955    # Oops. Which didn't find the executable.
34956    # The splitting of arguments from the executable at a space might have been incorrect,
34957    # since paths with space are more likely in Windows. Give it another try with the whole
34958    # argument.
34959    path="$complete"
34960    arguments="EOL"
34961    new_path=`$CYGPATH -u "$path"`
34962    new_path=`$WHICH "$new_path" 2> /dev/null`
34963    # bat and cmd files are not always considered executable in cygwin causing which
34964    # to not find them
34965    if test "x$new_path" = x \
34966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34968      new_path=`$CYGPATH -u "$path"`
34969    fi
34970    if test "x$new_path" = x; then
34971      # It's still not found. Now this is an unrecoverable error.
34972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34973$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34974      has_space=`$ECHO "$complete" | $GREP " "`
34975      if test "x$has_space" != x; then
34976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34978      fi
34979      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34980    fi
34981  fi
34982
34983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34986  # "foo.exe" is OK but "foo" is an error.
34987  #
34988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34989  # It is also a way to make sure we got the proper file name for the real test later on.
34990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34991  if test "x$test_shortpath" = x; then
34992    # Short path failed, file does not exist as specified.
34993    # Try adding .exe or .cmd
34994    if test -f "${new_path}.exe"; then
34995      input_to_shortpath="${new_path}.exe"
34996    elif test -f "${new_path}.cmd"; then
34997      input_to_shortpath="${new_path}.cmd"
34998    else
34999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35000$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35003      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35004    fi
35005  else
35006    input_to_shortpath="$new_path"
35007  fi
35008
35009  # Call helper function which possibly converts this using DOS-style short mode.
35010  # If so, the updated path is stored in $new_path.
35011  new_path="$input_to_shortpath"
35012
35013  input_path="$input_to_shortpath"
35014  # Check if we need to convert this using DOS-style short mode. If the path
35015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35016  # take no chances and rewrite it.
35017  # Note: m4 eats our [], so we need to use [ and ] instead.
35018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35019  if test "x$has_forbidden_chars" != x; then
35020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35024      # Going to short mode and back again did indeed matter. Since short mode is
35025      # case insensitive, let's make it lowercase to improve readability.
35026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35027      # Now convert it back to Unix-style (cygpath)
35028      input_path=`$CYGPATH -u "$shortmode_path"`
35029      new_path="$input_path"
35030    fi
35031  fi
35032
35033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35034  if test "x$test_cygdrive_prefix" = x; then
35035    # As a simple fix, exclude /usr/bin since it's not a real path.
35036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35038      # a path prefixed by /cygdrive for fixpath to work.
35039      new_path="$CYGWIN_ROOT_PATH$input_path"
35040    fi
35041  fi
35042
35043  # remove trailing .exe if any
35044  new_path="${new_path/%.exe/}"
35045
35046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35047
35048  # First separate the path from the arguments. This will split at the first
35049  # space.
35050  complete="$RC"
35051  path="${complete%% *}"
35052  tmp="$complete EOL"
35053  arguments="${tmp#* }"
35054
35055  # Input might be given as Windows format, start by converting to
35056  # unix format.
35057  new_path="$path"
35058
35059  windows_path="$new_path"
35060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35061    unix_path=`$CYGPATH -u "$windows_path"`
35062    new_path="$unix_path"
35063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35065    new_path="$unix_path"
35066  fi
35067
35068
35069  # Now try to locate executable using which
35070  new_path=`$WHICH "$new_path" 2> /dev/null`
35071
35072  if test "x$new_path" = x; then
35073    # Oops. Which didn't find the executable.
35074    # The splitting of arguments from the executable at a space might have been incorrect,
35075    # since paths with space are more likely in Windows. Give it another try with the whole
35076    # argument.
35077    path="$complete"
35078    arguments="EOL"
35079    new_path="$path"
35080
35081  windows_path="$new_path"
35082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35083    unix_path=`$CYGPATH -u "$windows_path"`
35084    new_path="$unix_path"
35085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35087    new_path="$unix_path"
35088  fi
35089
35090
35091    new_path=`$WHICH "$new_path" 2> /dev/null`
35092    # bat and cmd files are not always considered executable in MSYS causing which
35093    # to not find them
35094    if test "x$new_path" = x \
35095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35097      new_path="$path"
35098
35099  windows_path="$new_path"
35100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35101    unix_path=`$CYGPATH -u "$windows_path"`
35102    new_path="$unix_path"
35103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35105    new_path="$unix_path"
35106  fi
35107
35108    fi
35109
35110    if test "x$new_path" = x; then
35111      # It's still not found. Now this is an unrecoverable error.
35112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35113$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35114      has_space=`$ECHO "$complete" | $GREP " "`
35115      if test "x$has_space" != x; then
35116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35118      fi
35119      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35120    fi
35121  fi
35122
35123  # Now new_path has a complete unix path to the binary
35124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35125    # Keep paths in /bin as-is, but remove trailing .exe if any
35126    new_path="${new_path/%.exe/}"
35127    # Do not save /bin paths to all_fixpath_prefixes!
35128  else
35129    # Not in mixed or Windows style, start by that.
35130    new_path=`cmd //c echo $new_path`
35131
35132  input_path="$new_path"
35133  # Check if we need to convert this using DOS-style short mode. If the path
35134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35135  # take no chances and rewrite it.
35136  # Note: m4 eats our [], so we need to use [ and ] instead.
35137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35138  if test "x$has_forbidden_chars" != x; then
35139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35141  fi
35142
35143    # Output is in $new_path
35144
35145  windows_path="$new_path"
35146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35147    unix_path=`$CYGPATH -u "$windows_path"`
35148    new_path="$unix_path"
35149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35151    new_path="$unix_path"
35152  fi
35153
35154    # remove trailing .exe if any
35155    new_path="${new_path/%.exe/}"
35156
35157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35159  fi
35160
35161    else
35162      # We're on a unix platform. Hooray! :)
35163      # First separate the path from the arguments. This will split at the first
35164      # space.
35165      complete="$RC"
35166      path="${complete%% *}"
35167      tmp="$complete EOL"
35168      arguments="${tmp#* }"
35169
35170      # Cannot rely on the command "which" here since it doesn't always work.
35171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35172      if test -z "$is_absolute_path"; then
35173        # Path to executable is not absolute. Find it.
35174        IFS_save="$IFS"
35175        IFS=:
35176        for p in $PATH; do
35177          if test -f "$p/$path" && test -x "$p/$path"; then
35178            new_path="$p/$path"
35179            break
35180          fi
35181        done
35182        IFS="$IFS_save"
35183      else
35184        # This is an absolute path, we can use it without further modifications.
35185        new_path="$path"
35186      fi
35187
35188      if test "x$new_path" = x; then
35189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35190$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35191        has_space=`$ECHO "$complete" | $GREP " "`
35192        if test "x$has_space" != x; then
35193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35195        fi
35196        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35197      fi
35198    fi
35199
35200    # Now join together the path and the arguments once again
35201    if test "x$arguments" != xEOL; then
35202      new_complete="$new_path ${arguments% *}"
35203    else
35204      new_complete="$new_path"
35205    fi
35206
35207    if test "x$complete" != "x$new_complete"; then
35208      RC="$new_complete"
35209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35210$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35211    fi
35212  fi
35213
35214    # Extract the first word of "dumpbin", so it can be a program name with args.
35215set dummy dumpbin; ac_word=$2
35216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35217$as_echo_n "checking for $ac_word... " >&6; }
35218if ${ac_cv_prog_DUMPBIN+:} false; then :
35219  $as_echo_n "(cached) " >&6
35220else
35221  if test -n "$DUMPBIN"; then
35222  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35223else
35224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35225for as_dir in $PATH
35226do
35227  IFS=$as_save_IFS
35228  test -z "$as_dir" && as_dir=.
35229    for ac_exec_ext in '' $ac_executable_extensions; do
35230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35231    ac_cv_prog_DUMPBIN="dumpbin"
35232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35233    break 2
35234  fi
35235done
35236  done
35237IFS=$as_save_IFS
35238
35239fi
35240fi
35241DUMPBIN=$ac_cv_prog_DUMPBIN
35242if test -n "$DUMPBIN"; then
35243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35244$as_echo "$DUMPBIN" >&6; }
35245else
35246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35247$as_echo "no" >&6; }
35248fi
35249
35250
35251
35252  # Only process if variable expands to non-empty
35253
35254  if test "x$DUMPBIN" != x; then
35255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35256
35257  # First separate the path from the arguments. This will split at the first
35258  # space.
35259  complete="$DUMPBIN"
35260  path="${complete%% *}"
35261  tmp="$complete EOL"
35262  arguments="${tmp#* }"
35263
35264  # Input might be given as Windows format, start by converting to
35265  # unix format.
35266  new_path=`$CYGPATH -u "$path"`
35267
35268  # Now try to locate executable using which
35269  new_path=`$WHICH "$new_path" 2> /dev/null`
35270  # bat and cmd files are not always considered executable in cygwin causing which
35271  # to not find them
35272  if test "x$new_path" = x \
35273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35275    new_path=`$CYGPATH -u "$path"`
35276  fi
35277  if test "x$new_path" = x; then
35278    # Oops. Which didn't find the executable.
35279    # The splitting of arguments from the executable at a space might have been incorrect,
35280    # since paths with space are more likely in Windows. Give it another try with the whole
35281    # argument.
35282    path="$complete"
35283    arguments="EOL"
35284    new_path=`$CYGPATH -u "$path"`
35285    new_path=`$WHICH "$new_path" 2> /dev/null`
35286    # bat and cmd files are not always considered executable in cygwin causing which
35287    # to not find them
35288    if test "x$new_path" = x \
35289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35291      new_path=`$CYGPATH -u "$path"`
35292    fi
35293    if test "x$new_path" = x; then
35294      # It's still not found. Now this is an unrecoverable error.
35295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35296$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35297      has_space=`$ECHO "$complete" | $GREP " "`
35298      if test "x$has_space" != x; then
35299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35301      fi
35302      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35303    fi
35304  fi
35305
35306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35309  # "foo.exe" is OK but "foo" is an error.
35310  #
35311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35312  # It is also a way to make sure we got the proper file name for the real test later on.
35313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35314  if test "x$test_shortpath" = x; then
35315    # Short path failed, file does not exist as specified.
35316    # Try adding .exe or .cmd
35317    if test -f "${new_path}.exe"; then
35318      input_to_shortpath="${new_path}.exe"
35319    elif test -f "${new_path}.cmd"; then
35320      input_to_shortpath="${new_path}.cmd"
35321    else
35322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35323$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35326      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35327    fi
35328  else
35329    input_to_shortpath="$new_path"
35330  fi
35331
35332  # Call helper function which possibly converts this using DOS-style short mode.
35333  # If so, the updated path is stored in $new_path.
35334  new_path="$input_to_shortpath"
35335
35336  input_path="$input_to_shortpath"
35337  # Check if we need to convert this using DOS-style short mode. If the path
35338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35339  # take no chances and rewrite it.
35340  # Note: m4 eats our [], so we need to use [ and ] instead.
35341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35342  if test "x$has_forbidden_chars" != x; then
35343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35347      # Going to short mode and back again did indeed matter. Since short mode is
35348      # case insensitive, let's make it lowercase to improve readability.
35349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35350      # Now convert it back to Unix-style (cygpath)
35351      input_path=`$CYGPATH -u "$shortmode_path"`
35352      new_path="$input_path"
35353    fi
35354  fi
35355
35356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35357  if test "x$test_cygdrive_prefix" = x; then
35358    # As a simple fix, exclude /usr/bin since it's not a real path.
35359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35361      # a path prefixed by /cygdrive for fixpath to work.
35362      new_path="$CYGWIN_ROOT_PATH$input_path"
35363    fi
35364  fi
35365
35366  # remove trailing .exe if any
35367  new_path="${new_path/%.exe/}"
35368
35369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35370
35371  # First separate the path from the arguments. This will split at the first
35372  # space.
35373  complete="$DUMPBIN"
35374  path="${complete%% *}"
35375  tmp="$complete EOL"
35376  arguments="${tmp#* }"
35377
35378  # Input might be given as Windows format, start by converting to
35379  # unix format.
35380  new_path="$path"
35381
35382  windows_path="$new_path"
35383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35384    unix_path=`$CYGPATH -u "$windows_path"`
35385    new_path="$unix_path"
35386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35388    new_path="$unix_path"
35389  fi
35390
35391
35392  # Now try to locate executable using which
35393  new_path=`$WHICH "$new_path" 2> /dev/null`
35394
35395  if test "x$new_path" = x; then
35396    # Oops. Which didn't find the executable.
35397    # The splitting of arguments from the executable at a space might have been incorrect,
35398    # since paths with space are more likely in Windows. Give it another try with the whole
35399    # argument.
35400    path="$complete"
35401    arguments="EOL"
35402    new_path="$path"
35403
35404  windows_path="$new_path"
35405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35406    unix_path=`$CYGPATH -u "$windows_path"`
35407    new_path="$unix_path"
35408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35410    new_path="$unix_path"
35411  fi
35412
35413
35414    new_path=`$WHICH "$new_path" 2> /dev/null`
35415    # bat and cmd files are not always considered executable in MSYS causing which
35416    # to not find them
35417    if test "x$new_path" = x \
35418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35420      new_path="$path"
35421
35422  windows_path="$new_path"
35423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35424    unix_path=`$CYGPATH -u "$windows_path"`
35425    new_path="$unix_path"
35426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35428    new_path="$unix_path"
35429  fi
35430
35431    fi
35432
35433    if test "x$new_path" = x; then
35434      # It's still not found. Now this is an unrecoverable error.
35435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35436$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35437      has_space=`$ECHO "$complete" | $GREP " "`
35438      if test "x$has_space" != x; then
35439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35441      fi
35442      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35443    fi
35444  fi
35445
35446  # Now new_path has a complete unix path to the binary
35447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35448    # Keep paths in /bin as-is, but remove trailing .exe if any
35449    new_path="${new_path/%.exe/}"
35450    # Do not save /bin paths to all_fixpath_prefixes!
35451  else
35452    # Not in mixed or Windows style, start by that.
35453    new_path=`cmd //c echo $new_path`
35454
35455  input_path="$new_path"
35456  # Check if we need to convert this using DOS-style short mode. If the path
35457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35458  # take no chances and rewrite it.
35459  # Note: m4 eats our [], so we need to use [ and ] instead.
35460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35461  if test "x$has_forbidden_chars" != x; then
35462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35464  fi
35465
35466    # Output is in $new_path
35467
35468  windows_path="$new_path"
35469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35470    unix_path=`$CYGPATH -u "$windows_path"`
35471    new_path="$unix_path"
35472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35474    new_path="$unix_path"
35475  fi
35476
35477    # remove trailing .exe if any
35478    new_path="${new_path/%.exe/}"
35479
35480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35482  fi
35483
35484    else
35485      # We're on a unix platform. Hooray! :)
35486      # First separate the path from the arguments. This will split at the first
35487      # space.
35488      complete="$DUMPBIN"
35489      path="${complete%% *}"
35490      tmp="$complete EOL"
35491      arguments="${tmp#* }"
35492
35493      # Cannot rely on the command "which" here since it doesn't always work.
35494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35495      if test -z "$is_absolute_path"; then
35496        # Path to executable is not absolute. Find it.
35497        IFS_save="$IFS"
35498        IFS=:
35499        for p in $PATH; do
35500          if test -f "$p/$path" && test -x "$p/$path"; then
35501            new_path="$p/$path"
35502            break
35503          fi
35504        done
35505        IFS="$IFS_save"
35506      else
35507        # This is an absolute path, we can use it without further modifications.
35508        new_path="$path"
35509      fi
35510
35511      if test "x$new_path" = x; then
35512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35513$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35514        has_space=`$ECHO "$complete" | $GREP " "`
35515        if test "x$has_space" != x; then
35516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35518        fi
35519        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35520      fi
35521    fi
35522
35523    # Now join together the path and the arguments once again
35524    if test "x$arguments" != xEOL; then
35525      new_complete="$new_path ${arguments% *}"
35526    else
35527      new_complete="$new_path"
35528    fi
35529
35530    if test "x$complete" != "x$new_complete"; then
35531      DUMPBIN="$new_complete"
35532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35533$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35534    fi
35535  fi
35536
35537    # We need to check for 'msbuild.exe' because at the place where we expect to
35538    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35539    # won't find the 'msbuild.exe' executable in that case (and the
35540    # 'ac_executable_extensions' is unusable due to performance reasons).
35541    # Notice that we intentionally don't fix up the path to MSBUILD because we
35542    # will call it in a DOS shell during freetype detection on Windows (see
35543    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35544    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35545set dummy msbuild.exe; ac_word=$2
35546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35547$as_echo_n "checking for $ac_word... " >&6; }
35548if ${ac_cv_prog_MSBUILD+:} false; then :
35549  $as_echo_n "(cached) " >&6
35550else
35551  if test -n "$MSBUILD"; then
35552  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35553else
35554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35555for as_dir in $PATH
35556do
35557  IFS=$as_save_IFS
35558  test -z "$as_dir" && as_dir=.
35559    for ac_exec_ext in '' $ac_executable_extensions; do
35560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35561    ac_cv_prog_MSBUILD="msbuild.exe"
35562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35563    break 2
35564  fi
35565done
35566  done
35567IFS=$as_save_IFS
35568
35569fi
35570fi
35571MSBUILD=$ac_cv_prog_MSBUILD
35572if test -n "$MSBUILD"; then
35573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35574$as_echo "$MSBUILD" >&6; }
35575else
35576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35577$as_echo "no" >&6; }
35578fi
35579
35580
35581  fi
35582
35583  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35584
35585
35586  # Publish this variable in the help.
35587
35588
35589  if test "x$STRIP" = x; then
35590    # The variable is not set by user, try to locate tool using the code snippet
35591    for ac_prog in strip
35592do
35593  # Extract the first word of "$ac_prog", so it can be a program name with args.
35594set dummy $ac_prog; ac_word=$2
35595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35596$as_echo_n "checking for $ac_word... " >&6; }
35597if ${ac_cv_path_STRIP+:} false; then :
35598  $as_echo_n "(cached) " >&6
35599else
35600  case $STRIP in
35601  [\\/]* | ?:[\\/]*)
35602  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35603  ;;
35604  *)
35605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35606for as_dir in $PATH
35607do
35608  IFS=$as_save_IFS
35609  test -z "$as_dir" && as_dir=.
35610    for ac_exec_ext in '' $ac_executable_extensions; do
35611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35612    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35614    break 2
35615  fi
35616done
35617  done
35618IFS=$as_save_IFS
35619
35620  ;;
35621esac
35622fi
35623STRIP=$ac_cv_path_STRIP
35624if test -n "$STRIP"; then
35625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35626$as_echo "$STRIP" >&6; }
35627else
35628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35629$as_echo "no" >&6; }
35630fi
35631
35632
35633  test -n "$STRIP" && break
35634done
35635
35636  else
35637    # The variable is set, but is it from the command line or the environment?
35638
35639    # Try to remove the string !STRIP! from our list.
35640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35642      # If it failed, the variable was not from the command line. Ignore it,
35643      # but warn the user (except for BASH, which is always set by the calling BASH).
35644      if test "xSTRIP" != xBASH; then
35645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35646$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35647      fi
35648      # Try to locate tool using the code snippet
35649      for ac_prog in strip
35650do
35651  # Extract the first word of "$ac_prog", so it can be a program name with args.
35652set dummy $ac_prog; ac_word=$2
35653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35654$as_echo_n "checking for $ac_word... " >&6; }
35655if ${ac_cv_path_STRIP+:} false; then :
35656  $as_echo_n "(cached) " >&6
35657else
35658  case $STRIP in
35659  [\\/]* | ?:[\\/]*)
35660  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35661  ;;
35662  *)
35663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35664for as_dir in $PATH
35665do
35666  IFS=$as_save_IFS
35667  test -z "$as_dir" && as_dir=.
35668    for ac_exec_ext in '' $ac_executable_extensions; do
35669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35670    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35672    break 2
35673  fi
35674done
35675  done
35676IFS=$as_save_IFS
35677
35678  ;;
35679esac
35680fi
35681STRIP=$ac_cv_path_STRIP
35682if test -n "$STRIP"; then
35683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35684$as_echo "$STRIP" >&6; }
35685else
35686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35687$as_echo "no" >&6; }
35688fi
35689
35690
35691  test -n "$STRIP" && break
35692done
35693
35694    else
35695      # If it succeeded, then it was overridden by the user. We will use it
35696      # for the tool.
35697
35698      # First remove it from the list of overridden variables, so we can test
35699      # for unknown variables in the end.
35700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35701
35702      # Check if the provided tool contains a complete path.
35703      tool_specified="$STRIP"
35704      tool_basename="${tool_specified##*/}"
35705      if test "x$tool_basename" = "x$tool_specified"; then
35706        # A command without a complete path is provided, search $PATH.
35707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35708$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35709        # Extract the first word of "$tool_basename", so it can be a program name with args.
35710set dummy $tool_basename; ac_word=$2
35711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35712$as_echo_n "checking for $ac_word... " >&6; }
35713if ${ac_cv_path_STRIP+:} false; then :
35714  $as_echo_n "(cached) " >&6
35715else
35716  case $STRIP in
35717  [\\/]* | ?:[\\/]*)
35718  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35719  ;;
35720  *)
35721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35722for as_dir in $PATH
35723do
35724  IFS=$as_save_IFS
35725  test -z "$as_dir" && as_dir=.
35726    for ac_exec_ext in '' $ac_executable_extensions; do
35727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35728    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35730    break 2
35731  fi
35732done
35733  done
35734IFS=$as_save_IFS
35735
35736  ;;
35737esac
35738fi
35739STRIP=$ac_cv_path_STRIP
35740if test -n "$STRIP"; then
35741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35742$as_echo "$STRIP" >&6; }
35743else
35744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35745$as_echo "no" >&6; }
35746fi
35747
35748
35749        if test "x$STRIP" = x; then
35750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35751        fi
35752      else
35753        # Otherwise we believe it is a complete path. Use it as it is.
35754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35755$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35757$as_echo_n "checking for STRIP... " >&6; }
35758        if test ! -x "$tool_specified"; then
35759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35760$as_echo "not found" >&6; }
35761          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35762        fi
35763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35764$as_echo "$tool_specified" >&6; }
35765      fi
35766    fi
35767  fi
35768
35769
35770
35771  # Only process if variable expands to non-empty
35772
35773  if test "x$STRIP" != x; then
35774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35775
35776  # First separate the path from the arguments. This will split at the first
35777  # space.
35778  complete="$STRIP"
35779  path="${complete%% *}"
35780  tmp="$complete EOL"
35781  arguments="${tmp#* }"
35782
35783  # Input might be given as Windows format, start by converting to
35784  # unix format.
35785  new_path=`$CYGPATH -u "$path"`
35786
35787  # Now try to locate executable using which
35788  new_path=`$WHICH "$new_path" 2> /dev/null`
35789  # bat and cmd files are not always considered executable in cygwin causing which
35790  # to not find them
35791  if test "x$new_path" = x \
35792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35794    new_path=`$CYGPATH -u "$path"`
35795  fi
35796  if test "x$new_path" = x; then
35797    # Oops. Which didn't find the executable.
35798    # The splitting of arguments from the executable at a space might have been incorrect,
35799    # since paths with space are more likely in Windows. Give it another try with the whole
35800    # argument.
35801    path="$complete"
35802    arguments="EOL"
35803    new_path=`$CYGPATH -u "$path"`
35804    new_path=`$WHICH "$new_path" 2> /dev/null`
35805    # bat and cmd files are not always considered executable in cygwin causing which
35806    # to not find them
35807    if test "x$new_path" = x \
35808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35810      new_path=`$CYGPATH -u "$path"`
35811    fi
35812    if test "x$new_path" = x; then
35813      # It's still not found. Now this is an unrecoverable error.
35814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35815$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35816      has_space=`$ECHO "$complete" | $GREP " "`
35817      if test "x$has_space" != x; then
35818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35820      fi
35821      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35822    fi
35823  fi
35824
35825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35828  # "foo.exe" is OK but "foo" is an error.
35829  #
35830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35831  # It is also a way to make sure we got the proper file name for the real test later on.
35832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35833  if test "x$test_shortpath" = x; then
35834    # Short path failed, file does not exist as specified.
35835    # Try adding .exe or .cmd
35836    if test -f "${new_path}.exe"; then
35837      input_to_shortpath="${new_path}.exe"
35838    elif test -f "${new_path}.cmd"; then
35839      input_to_shortpath="${new_path}.cmd"
35840    else
35841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35842$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35845      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35846    fi
35847  else
35848    input_to_shortpath="$new_path"
35849  fi
35850
35851  # Call helper function which possibly converts this using DOS-style short mode.
35852  # If so, the updated path is stored in $new_path.
35853  new_path="$input_to_shortpath"
35854
35855  input_path="$input_to_shortpath"
35856  # Check if we need to convert this using DOS-style short mode. If the path
35857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35858  # take no chances and rewrite it.
35859  # Note: m4 eats our [], so we need to use [ and ] instead.
35860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35861  if test "x$has_forbidden_chars" != x; then
35862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35866      # Going to short mode and back again did indeed matter. Since short mode is
35867      # case insensitive, let's make it lowercase to improve readability.
35868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35869      # Now convert it back to Unix-style (cygpath)
35870      input_path=`$CYGPATH -u "$shortmode_path"`
35871      new_path="$input_path"
35872    fi
35873  fi
35874
35875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35876  if test "x$test_cygdrive_prefix" = x; then
35877    # As a simple fix, exclude /usr/bin since it's not a real path.
35878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35880      # a path prefixed by /cygdrive for fixpath to work.
35881      new_path="$CYGWIN_ROOT_PATH$input_path"
35882    fi
35883  fi
35884
35885  # remove trailing .exe if any
35886  new_path="${new_path/%.exe/}"
35887
35888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35889
35890  # First separate the path from the arguments. This will split at the first
35891  # space.
35892  complete="$STRIP"
35893  path="${complete%% *}"
35894  tmp="$complete EOL"
35895  arguments="${tmp#* }"
35896
35897  # Input might be given as Windows format, start by converting to
35898  # unix format.
35899  new_path="$path"
35900
35901  windows_path="$new_path"
35902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35903    unix_path=`$CYGPATH -u "$windows_path"`
35904    new_path="$unix_path"
35905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35907    new_path="$unix_path"
35908  fi
35909
35910
35911  # Now try to locate executable using which
35912  new_path=`$WHICH "$new_path" 2> /dev/null`
35913
35914  if test "x$new_path" = x; then
35915    # Oops. Which didn't find the executable.
35916    # The splitting of arguments from the executable at a space might have been incorrect,
35917    # since paths with space are more likely in Windows. Give it another try with the whole
35918    # argument.
35919    path="$complete"
35920    arguments="EOL"
35921    new_path="$path"
35922
35923  windows_path="$new_path"
35924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35925    unix_path=`$CYGPATH -u "$windows_path"`
35926    new_path="$unix_path"
35927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35929    new_path="$unix_path"
35930  fi
35931
35932
35933    new_path=`$WHICH "$new_path" 2> /dev/null`
35934    # bat and cmd files are not always considered executable in MSYS causing which
35935    # to not find them
35936    if test "x$new_path" = x \
35937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35939      new_path="$path"
35940
35941  windows_path="$new_path"
35942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35943    unix_path=`$CYGPATH -u "$windows_path"`
35944    new_path="$unix_path"
35945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35947    new_path="$unix_path"
35948  fi
35949
35950    fi
35951
35952    if test "x$new_path" = x; then
35953      # It's still not found. Now this is an unrecoverable error.
35954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35955$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35956      has_space=`$ECHO "$complete" | $GREP " "`
35957      if test "x$has_space" != x; then
35958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35960      fi
35961      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35962    fi
35963  fi
35964
35965  # Now new_path has a complete unix path to the binary
35966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35967    # Keep paths in /bin as-is, but remove trailing .exe if any
35968    new_path="${new_path/%.exe/}"
35969    # Do not save /bin paths to all_fixpath_prefixes!
35970  else
35971    # Not in mixed or Windows style, start by that.
35972    new_path=`cmd //c echo $new_path`
35973
35974  input_path="$new_path"
35975  # Check if we need to convert this using DOS-style short mode. If the path
35976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35977  # take no chances and rewrite it.
35978  # Note: m4 eats our [], so we need to use [ and ] instead.
35979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35980  if test "x$has_forbidden_chars" != x; then
35981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35983  fi
35984
35985    # Output is in $new_path
35986
35987  windows_path="$new_path"
35988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35989    unix_path=`$CYGPATH -u "$windows_path"`
35990    new_path="$unix_path"
35991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35993    new_path="$unix_path"
35994  fi
35995
35996    # remove trailing .exe if any
35997    new_path="${new_path/%.exe/}"
35998
35999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36001  fi
36002
36003    else
36004      # We're on a unix platform. Hooray! :)
36005      # First separate the path from the arguments. This will split at the first
36006      # space.
36007      complete="$STRIP"
36008      path="${complete%% *}"
36009      tmp="$complete EOL"
36010      arguments="${tmp#* }"
36011
36012      # Cannot rely on the command "which" here since it doesn't always work.
36013      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36014      if test -z "$is_absolute_path"; then
36015        # Path to executable is not absolute. Find it.
36016        IFS_save="$IFS"
36017        IFS=:
36018        for p in $PATH; do
36019          if test -f "$p/$path" && test -x "$p/$path"; then
36020            new_path="$p/$path"
36021            break
36022          fi
36023        done
36024        IFS="$IFS_save"
36025      else
36026        # This is an absolute path, we can use it without further modifications.
36027        new_path="$path"
36028      fi
36029
36030      if test "x$new_path" = x; then
36031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36032$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36033        has_space=`$ECHO "$complete" | $GREP " "`
36034        if test "x$has_space" != x; then
36035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36037        fi
36038        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36039      fi
36040    fi
36041
36042    # Now join together the path and the arguments once again
36043    if test "x$arguments" != xEOL; then
36044      new_complete="$new_path ${arguments% *}"
36045    else
36046      new_complete="$new_path"
36047    fi
36048
36049    if test "x$complete" != "x$new_complete"; then
36050      STRIP="$new_complete"
36051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36052$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36053    fi
36054  fi
36055
36056
36057
36058  # Publish this variable in the help.
36059
36060
36061  if test "x$NM" = x; then
36062    # The variable is not set by user, try to locate tool using the code snippet
36063    for ac_prog in nm
36064do
36065  # Extract the first word of "$ac_prog", so it can be a program name with args.
36066set dummy $ac_prog; ac_word=$2
36067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36068$as_echo_n "checking for $ac_word... " >&6; }
36069if ${ac_cv_path_NM+:} false; then :
36070  $as_echo_n "(cached) " >&6
36071else
36072  case $NM in
36073  [\\/]* | ?:[\\/]*)
36074  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36075  ;;
36076  *)
36077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36078for as_dir in $PATH
36079do
36080  IFS=$as_save_IFS
36081  test -z "$as_dir" && as_dir=.
36082    for ac_exec_ext in '' $ac_executable_extensions; do
36083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36084    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36086    break 2
36087  fi
36088done
36089  done
36090IFS=$as_save_IFS
36091
36092  ;;
36093esac
36094fi
36095NM=$ac_cv_path_NM
36096if test -n "$NM"; then
36097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36098$as_echo "$NM" >&6; }
36099else
36100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36101$as_echo "no" >&6; }
36102fi
36103
36104
36105  test -n "$NM" && break
36106done
36107
36108  else
36109    # The variable is set, but is it from the command line or the environment?
36110
36111    # Try to remove the string !NM! from our list.
36112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36114      # If it failed, the variable was not from the command line. Ignore it,
36115      # but warn the user (except for BASH, which is always set by the calling BASH).
36116      if test "xNM" != xBASH; then
36117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36118$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36119      fi
36120      # Try to locate tool using the code snippet
36121      for ac_prog in nm
36122do
36123  # Extract the first word of "$ac_prog", so it can be a program name with args.
36124set dummy $ac_prog; ac_word=$2
36125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36126$as_echo_n "checking for $ac_word... " >&6; }
36127if ${ac_cv_path_NM+:} false; then :
36128  $as_echo_n "(cached) " >&6
36129else
36130  case $NM in
36131  [\\/]* | ?:[\\/]*)
36132  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36133  ;;
36134  *)
36135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36136for as_dir in $PATH
36137do
36138  IFS=$as_save_IFS
36139  test -z "$as_dir" && as_dir=.
36140    for ac_exec_ext in '' $ac_executable_extensions; do
36141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36142    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36144    break 2
36145  fi
36146done
36147  done
36148IFS=$as_save_IFS
36149
36150  ;;
36151esac
36152fi
36153NM=$ac_cv_path_NM
36154if test -n "$NM"; then
36155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36156$as_echo "$NM" >&6; }
36157else
36158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36159$as_echo "no" >&6; }
36160fi
36161
36162
36163  test -n "$NM" && break
36164done
36165
36166    else
36167      # If it succeeded, then it was overridden by the user. We will use it
36168      # for the tool.
36169
36170      # First remove it from the list of overridden variables, so we can test
36171      # for unknown variables in the end.
36172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36173
36174      # Check if the provided tool contains a complete path.
36175      tool_specified="$NM"
36176      tool_basename="${tool_specified##*/}"
36177      if test "x$tool_basename" = "x$tool_specified"; then
36178        # A command without a complete path is provided, search $PATH.
36179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36180$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36181        # Extract the first word of "$tool_basename", so it can be a program name with args.
36182set dummy $tool_basename; ac_word=$2
36183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36184$as_echo_n "checking for $ac_word... " >&6; }
36185if ${ac_cv_path_NM+:} false; then :
36186  $as_echo_n "(cached) " >&6
36187else
36188  case $NM in
36189  [\\/]* | ?:[\\/]*)
36190  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36191  ;;
36192  *)
36193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36194for as_dir in $PATH
36195do
36196  IFS=$as_save_IFS
36197  test -z "$as_dir" && as_dir=.
36198    for ac_exec_ext in '' $ac_executable_extensions; do
36199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36200    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36202    break 2
36203  fi
36204done
36205  done
36206IFS=$as_save_IFS
36207
36208  ;;
36209esac
36210fi
36211NM=$ac_cv_path_NM
36212if test -n "$NM"; then
36213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36214$as_echo "$NM" >&6; }
36215else
36216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36217$as_echo "no" >&6; }
36218fi
36219
36220
36221        if test "x$NM" = x; then
36222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36223        fi
36224      else
36225        # Otherwise we believe it is a complete path. Use it as it is.
36226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36227$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36229$as_echo_n "checking for NM... " >&6; }
36230        if test ! -x "$tool_specified"; then
36231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36232$as_echo "not found" >&6; }
36233          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36234        fi
36235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36236$as_echo "$tool_specified" >&6; }
36237      fi
36238    fi
36239  fi
36240
36241
36242
36243  # Only process if variable expands to non-empty
36244
36245  if test "x$NM" != x; then
36246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36247
36248  # First separate the path from the arguments. This will split at the first
36249  # space.
36250  complete="$NM"
36251  path="${complete%% *}"
36252  tmp="$complete EOL"
36253  arguments="${tmp#* }"
36254
36255  # Input might be given as Windows format, start by converting to
36256  # unix format.
36257  new_path=`$CYGPATH -u "$path"`
36258
36259  # Now try to locate executable using which
36260  new_path=`$WHICH "$new_path" 2> /dev/null`
36261  # bat and cmd files are not always considered executable in cygwin causing which
36262  # to not find them
36263  if test "x$new_path" = x \
36264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36266    new_path=`$CYGPATH -u "$path"`
36267  fi
36268  if test "x$new_path" = x; then
36269    # Oops. Which didn't find the executable.
36270    # The splitting of arguments from the executable at a space might have been incorrect,
36271    # since paths with space are more likely in Windows. Give it another try with the whole
36272    # argument.
36273    path="$complete"
36274    arguments="EOL"
36275    new_path=`$CYGPATH -u "$path"`
36276    new_path=`$WHICH "$new_path" 2> /dev/null`
36277    # bat and cmd files are not always considered executable in cygwin causing which
36278    # to not find them
36279    if test "x$new_path" = x \
36280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36282      new_path=`$CYGPATH -u "$path"`
36283    fi
36284    if test "x$new_path" = x; then
36285      # It's still not found. Now this is an unrecoverable error.
36286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36287$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36288      has_space=`$ECHO "$complete" | $GREP " "`
36289      if test "x$has_space" != x; then
36290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36292      fi
36293      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36294    fi
36295  fi
36296
36297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36300  # "foo.exe" is OK but "foo" is an error.
36301  #
36302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36303  # It is also a way to make sure we got the proper file name for the real test later on.
36304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36305  if test "x$test_shortpath" = x; then
36306    # Short path failed, file does not exist as specified.
36307    # Try adding .exe or .cmd
36308    if test -f "${new_path}.exe"; then
36309      input_to_shortpath="${new_path}.exe"
36310    elif test -f "${new_path}.cmd"; then
36311      input_to_shortpath="${new_path}.cmd"
36312    else
36313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36314$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36317      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36318    fi
36319  else
36320    input_to_shortpath="$new_path"
36321  fi
36322
36323  # Call helper function which possibly converts this using DOS-style short mode.
36324  # If so, the updated path is stored in $new_path.
36325  new_path="$input_to_shortpath"
36326
36327  input_path="$input_to_shortpath"
36328  # Check if we need to convert this using DOS-style short mode. If the path
36329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36330  # take no chances and rewrite it.
36331  # Note: m4 eats our [], so we need to use [ and ] instead.
36332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36333  if test "x$has_forbidden_chars" != x; then
36334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36338      # Going to short mode and back again did indeed matter. Since short mode is
36339      # case insensitive, let's make it lowercase to improve readability.
36340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36341      # Now convert it back to Unix-style (cygpath)
36342      input_path=`$CYGPATH -u "$shortmode_path"`
36343      new_path="$input_path"
36344    fi
36345  fi
36346
36347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36348  if test "x$test_cygdrive_prefix" = x; then
36349    # As a simple fix, exclude /usr/bin since it's not a real path.
36350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36352      # a path prefixed by /cygdrive for fixpath to work.
36353      new_path="$CYGWIN_ROOT_PATH$input_path"
36354    fi
36355  fi
36356
36357  # remove trailing .exe if any
36358  new_path="${new_path/%.exe/}"
36359
36360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36361
36362  # First separate the path from the arguments. This will split at the first
36363  # space.
36364  complete="$NM"
36365  path="${complete%% *}"
36366  tmp="$complete EOL"
36367  arguments="${tmp#* }"
36368
36369  # Input might be given as Windows format, start by converting to
36370  # unix format.
36371  new_path="$path"
36372
36373  windows_path="$new_path"
36374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36375    unix_path=`$CYGPATH -u "$windows_path"`
36376    new_path="$unix_path"
36377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36379    new_path="$unix_path"
36380  fi
36381
36382
36383  # Now try to locate executable using which
36384  new_path=`$WHICH "$new_path" 2> /dev/null`
36385
36386  if test "x$new_path" = x; then
36387    # Oops. Which didn't find the executable.
36388    # The splitting of arguments from the executable at a space might have been incorrect,
36389    # since paths with space are more likely in Windows. Give it another try with the whole
36390    # argument.
36391    path="$complete"
36392    arguments="EOL"
36393    new_path="$path"
36394
36395  windows_path="$new_path"
36396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36397    unix_path=`$CYGPATH -u "$windows_path"`
36398    new_path="$unix_path"
36399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36401    new_path="$unix_path"
36402  fi
36403
36404
36405    new_path=`$WHICH "$new_path" 2> /dev/null`
36406    # bat and cmd files are not always considered executable in MSYS causing which
36407    # to not find them
36408    if test "x$new_path" = x \
36409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36411      new_path="$path"
36412
36413  windows_path="$new_path"
36414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36415    unix_path=`$CYGPATH -u "$windows_path"`
36416    new_path="$unix_path"
36417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36419    new_path="$unix_path"
36420  fi
36421
36422    fi
36423
36424    if test "x$new_path" = x; then
36425      # It's still not found. Now this is an unrecoverable error.
36426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36427$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36428      has_space=`$ECHO "$complete" | $GREP " "`
36429      if test "x$has_space" != x; then
36430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36432      fi
36433      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36434    fi
36435  fi
36436
36437  # Now new_path has a complete unix path to the binary
36438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36439    # Keep paths in /bin as-is, but remove trailing .exe if any
36440    new_path="${new_path/%.exe/}"
36441    # Do not save /bin paths to all_fixpath_prefixes!
36442  else
36443    # Not in mixed or Windows style, start by that.
36444    new_path=`cmd //c echo $new_path`
36445
36446  input_path="$new_path"
36447  # Check if we need to convert this using DOS-style short mode. If the path
36448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36449  # take no chances and rewrite it.
36450  # Note: m4 eats our [], so we need to use [ and ] instead.
36451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36452  if test "x$has_forbidden_chars" != x; then
36453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36455  fi
36456
36457    # Output is in $new_path
36458
36459  windows_path="$new_path"
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461    unix_path=`$CYGPATH -u "$windows_path"`
36462    new_path="$unix_path"
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36465    new_path="$unix_path"
36466  fi
36467
36468    # remove trailing .exe if any
36469    new_path="${new_path/%.exe/}"
36470
36471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36473  fi
36474
36475    else
36476      # We're on a unix platform. Hooray! :)
36477      # First separate the path from the arguments. This will split at the first
36478      # space.
36479      complete="$NM"
36480      path="${complete%% *}"
36481      tmp="$complete EOL"
36482      arguments="${tmp#* }"
36483
36484      # Cannot rely on the command "which" here since it doesn't always work.
36485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36486      if test -z "$is_absolute_path"; then
36487        # Path to executable is not absolute. Find it.
36488        IFS_save="$IFS"
36489        IFS=:
36490        for p in $PATH; do
36491          if test -f "$p/$path" && test -x "$p/$path"; then
36492            new_path="$p/$path"
36493            break
36494          fi
36495        done
36496        IFS="$IFS_save"
36497      else
36498        # This is an absolute path, we can use it without further modifications.
36499        new_path="$path"
36500      fi
36501
36502      if test "x$new_path" = x; then
36503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36504$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36505        has_space=`$ECHO "$complete" | $GREP " "`
36506        if test "x$has_space" != x; then
36507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36509        fi
36510        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36511      fi
36512    fi
36513
36514    # Now join together the path and the arguments once again
36515    if test "x$arguments" != xEOL; then
36516      new_complete="$new_path ${arguments% *}"
36517    else
36518      new_complete="$new_path"
36519    fi
36520
36521    if test "x$complete" != "x$new_complete"; then
36522      NM="$new_complete"
36523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36524$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36525    fi
36526  fi
36527
36528
36529
36530  # Publish this variable in the help.
36531
36532
36533  if test "x$GNM" = x; then
36534    # The variable is not set by user, try to locate tool using the code snippet
36535    for ac_prog in gnm
36536do
36537  # Extract the first word of "$ac_prog", so it can be a program name with args.
36538set dummy $ac_prog; ac_word=$2
36539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36540$as_echo_n "checking for $ac_word... " >&6; }
36541if ${ac_cv_path_GNM+:} false; then :
36542  $as_echo_n "(cached) " >&6
36543else
36544  case $GNM in
36545  [\\/]* | ?:[\\/]*)
36546  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36547  ;;
36548  *)
36549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36550for as_dir in $PATH
36551do
36552  IFS=$as_save_IFS
36553  test -z "$as_dir" && as_dir=.
36554    for ac_exec_ext in '' $ac_executable_extensions; do
36555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36556    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36558    break 2
36559  fi
36560done
36561  done
36562IFS=$as_save_IFS
36563
36564  ;;
36565esac
36566fi
36567GNM=$ac_cv_path_GNM
36568if test -n "$GNM"; then
36569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36570$as_echo "$GNM" >&6; }
36571else
36572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574fi
36575
36576
36577  test -n "$GNM" && break
36578done
36579
36580  else
36581    # The variable is set, but is it from the command line or the environment?
36582
36583    # Try to remove the string !GNM! from our list.
36584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36586      # If it failed, the variable was not from the command line. Ignore it,
36587      # but warn the user (except for BASH, which is always set by the calling BASH).
36588      if test "xGNM" != xBASH; then
36589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36590$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36591      fi
36592      # Try to locate tool using the code snippet
36593      for ac_prog in gnm
36594do
36595  # Extract the first word of "$ac_prog", so it can be a program name with args.
36596set dummy $ac_prog; ac_word=$2
36597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36598$as_echo_n "checking for $ac_word... " >&6; }
36599if ${ac_cv_path_GNM+:} false; then :
36600  $as_echo_n "(cached) " >&6
36601else
36602  case $GNM in
36603  [\\/]* | ?:[\\/]*)
36604  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36605  ;;
36606  *)
36607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36608for as_dir in $PATH
36609do
36610  IFS=$as_save_IFS
36611  test -z "$as_dir" && as_dir=.
36612    for ac_exec_ext in '' $ac_executable_extensions; do
36613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36614    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36616    break 2
36617  fi
36618done
36619  done
36620IFS=$as_save_IFS
36621
36622  ;;
36623esac
36624fi
36625GNM=$ac_cv_path_GNM
36626if test -n "$GNM"; then
36627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36628$as_echo "$GNM" >&6; }
36629else
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36631$as_echo "no" >&6; }
36632fi
36633
36634
36635  test -n "$GNM" && break
36636done
36637
36638    else
36639      # If it succeeded, then it was overridden by the user. We will use it
36640      # for the tool.
36641
36642      # First remove it from the list of overridden variables, so we can test
36643      # for unknown variables in the end.
36644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36645
36646      # Check if the provided tool contains a complete path.
36647      tool_specified="$GNM"
36648      tool_basename="${tool_specified##*/}"
36649      if test "x$tool_basename" = "x$tool_specified"; then
36650        # A command without a complete path is provided, search $PATH.
36651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36652$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36653        # Extract the first word of "$tool_basename", so it can be a program name with args.
36654set dummy $tool_basename; ac_word=$2
36655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36656$as_echo_n "checking for $ac_word... " >&6; }
36657if ${ac_cv_path_GNM+:} false; then :
36658  $as_echo_n "(cached) " >&6
36659else
36660  case $GNM in
36661  [\\/]* | ?:[\\/]*)
36662  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36663  ;;
36664  *)
36665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36666for as_dir in $PATH
36667do
36668  IFS=$as_save_IFS
36669  test -z "$as_dir" && as_dir=.
36670    for ac_exec_ext in '' $ac_executable_extensions; do
36671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36672    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36674    break 2
36675  fi
36676done
36677  done
36678IFS=$as_save_IFS
36679
36680  ;;
36681esac
36682fi
36683GNM=$ac_cv_path_GNM
36684if test -n "$GNM"; then
36685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36686$as_echo "$GNM" >&6; }
36687else
36688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36689$as_echo "no" >&6; }
36690fi
36691
36692
36693        if test "x$GNM" = x; then
36694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36695        fi
36696      else
36697        # Otherwise we believe it is a complete path. Use it as it is.
36698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36699$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36701$as_echo_n "checking for GNM... " >&6; }
36702        if test ! -x "$tool_specified"; then
36703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36704$as_echo "not found" >&6; }
36705          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36706        fi
36707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36708$as_echo "$tool_specified" >&6; }
36709      fi
36710    fi
36711  fi
36712
36713
36714
36715  # Only process if variable expands to non-empty
36716
36717  if test "x$GNM" != x; then
36718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36719
36720  # First separate the path from the arguments. This will split at the first
36721  # space.
36722  complete="$GNM"
36723  path="${complete%% *}"
36724  tmp="$complete EOL"
36725  arguments="${tmp#* }"
36726
36727  # Input might be given as Windows format, start by converting to
36728  # unix format.
36729  new_path=`$CYGPATH -u "$path"`
36730
36731  # Now try to locate executable using which
36732  new_path=`$WHICH "$new_path" 2> /dev/null`
36733  # bat and cmd files are not always considered executable in cygwin causing which
36734  # to not find them
36735  if test "x$new_path" = x \
36736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36738    new_path=`$CYGPATH -u "$path"`
36739  fi
36740  if test "x$new_path" = x; then
36741    # Oops. Which didn't find the executable.
36742    # The splitting of arguments from the executable at a space might have been incorrect,
36743    # since paths with space are more likely in Windows. Give it another try with the whole
36744    # argument.
36745    path="$complete"
36746    arguments="EOL"
36747    new_path=`$CYGPATH -u "$path"`
36748    new_path=`$WHICH "$new_path" 2> /dev/null`
36749    # bat and cmd files are not always considered executable in cygwin causing which
36750    # to not find them
36751    if test "x$new_path" = x \
36752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36754      new_path=`$CYGPATH -u "$path"`
36755    fi
36756    if test "x$new_path" = x; then
36757      # It's still not found. Now this is an unrecoverable error.
36758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36759$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36760      has_space=`$ECHO "$complete" | $GREP " "`
36761      if test "x$has_space" != x; then
36762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36764      fi
36765      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36766    fi
36767  fi
36768
36769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36772  # "foo.exe" is OK but "foo" is an error.
36773  #
36774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36775  # It is also a way to make sure we got the proper file name for the real test later on.
36776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36777  if test "x$test_shortpath" = x; then
36778    # Short path failed, file does not exist as specified.
36779    # Try adding .exe or .cmd
36780    if test -f "${new_path}.exe"; then
36781      input_to_shortpath="${new_path}.exe"
36782    elif test -f "${new_path}.cmd"; then
36783      input_to_shortpath="${new_path}.cmd"
36784    else
36785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36786$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36789      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36790    fi
36791  else
36792    input_to_shortpath="$new_path"
36793  fi
36794
36795  # Call helper function which possibly converts this using DOS-style short mode.
36796  # If so, the updated path is stored in $new_path.
36797  new_path="$input_to_shortpath"
36798
36799  input_path="$input_to_shortpath"
36800  # Check if we need to convert this using DOS-style short mode. If the path
36801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36802  # take no chances and rewrite it.
36803  # Note: m4 eats our [], so we need to use [ and ] instead.
36804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36805  if test "x$has_forbidden_chars" != x; then
36806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36810      # Going to short mode and back again did indeed matter. Since short mode is
36811      # case insensitive, let's make it lowercase to improve readability.
36812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36813      # Now convert it back to Unix-style (cygpath)
36814      input_path=`$CYGPATH -u "$shortmode_path"`
36815      new_path="$input_path"
36816    fi
36817  fi
36818
36819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36820  if test "x$test_cygdrive_prefix" = x; then
36821    # As a simple fix, exclude /usr/bin since it's not a real path.
36822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36824      # a path prefixed by /cygdrive for fixpath to work.
36825      new_path="$CYGWIN_ROOT_PATH$input_path"
36826    fi
36827  fi
36828
36829  # remove trailing .exe if any
36830  new_path="${new_path/%.exe/}"
36831
36832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36833
36834  # First separate the path from the arguments. This will split at the first
36835  # space.
36836  complete="$GNM"
36837  path="${complete%% *}"
36838  tmp="$complete EOL"
36839  arguments="${tmp#* }"
36840
36841  # Input might be given as Windows format, start by converting to
36842  # unix format.
36843  new_path="$path"
36844
36845  windows_path="$new_path"
36846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36847    unix_path=`$CYGPATH -u "$windows_path"`
36848    new_path="$unix_path"
36849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36851    new_path="$unix_path"
36852  fi
36853
36854
36855  # Now try to locate executable using which
36856  new_path=`$WHICH "$new_path" 2> /dev/null`
36857
36858  if test "x$new_path" = x; then
36859    # Oops. Which didn't find the executable.
36860    # The splitting of arguments from the executable at a space might have been incorrect,
36861    # since paths with space are more likely in Windows. Give it another try with the whole
36862    # argument.
36863    path="$complete"
36864    arguments="EOL"
36865    new_path="$path"
36866
36867  windows_path="$new_path"
36868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36869    unix_path=`$CYGPATH -u "$windows_path"`
36870    new_path="$unix_path"
36871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36873    new_path="$unix_path"
36874  fi
36875
36876
36877    new_path=`$WHICH "$new_path" 2> /dev/null`
36878    # bat and cmd files are not always considered executable in MSYS causing which
36879    # to not find them
36880    if test "x$new_path" = x \
36881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36883      new_path="$path"
36884
36885  windows_path="$new_path"
36886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36887    unix_path=`$CYGPATH -u "$windows_path"`
36888    new_path="$unix_path"
36889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36891    new_path="$unix_path"
36892  fi
36893
36894    fi
36895
36896    if test "x$new_path" = x; then
36897      # It's still not found. Now this is an unrecoverable error.
36898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36899$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36900      has_space=`$ECHO "$complete" | $GREP " "`
36901      if test "x$has_space" != x; then
36902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36904      fi
36905      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36906    fi
36907  fi
36908
36909  # Now new_path has a complete unix path to the binary
36910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36911    # Keep paths in /bin as-is, but remove trailing .exe if any
36912    new_path="${new_path/%.exe/}"
36913    # Do not save /bin paths to all_fixpath_prefixes!
36914  else
36915    # Not in mixed or Windows style, start by that.
36916    new_path=`cmd //c echo $new_path`
36917
36918  input_path="$new_path"
36919  # Check if we need to convert this using DOS-style short mode. If the path
36920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36921  # take no chances and rewrite it.
36922  # Note: m4 eats our [], so we need to use [ and ] instead.
36923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36924  if test "x$has_forbidden_chars" != x; then
36925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36927  fi
36928
36929    # Output is in $new_path
36930
36931  windows_path="$new_path"
36932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36933    unix_path=`$CYGPATH -u "$windows_path"`
36934    new_path="$unix_path"
36935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36937    new_path="$unix_path"
36938  fi
36939
36940    # remove trailing .exe if any
36941    new_path="${new_path/%.exe/}"
36942
36943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36945  fi
36946
36947    else
36948      # We're on a unix platform. Hooray! :)
36949      # First separate the path from the arguments. This will split at the first
36950      # space.
36951      complete="$GNM"
36952      path="${complete%% *}"
36953      tmp="$complete EOL"
36954      arguments="${tmp#* }"
36955
36956      # Cannot rely on the command "which" here since it doesn't always work.
36957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36958      if test -z "$is_absolute_path"; then
36959        # Path to executable is not absolute. Find it.
36960        IFS_save="$IFS"
36961        IFS=:
36962        for p in $PATH; do
36963          if test -f "$p/$path" && test -x "$p/$path"; then
36964            new_path="$p/$path"
36965            break
36966          fi
36967        done
36968        IFS="$IFS_save"
36969      else
36970        # This is an absolute path, we can use it without further modifications.
36971        new_path="$path"
36972      fi
36973
36974      if test "x$new_path" = x; then
36975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36976$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36977        has_space=`$ECHO "$complete" | $GREP " "`
36978        if test "x$has_space" != x; then
36979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36981        fi
36982        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36983      fi
36984    fi
36985
36986    # Now join together the path and the arguments once again
36987    if test "x$arguments" != xEOL; then
36988      new_complete="$new_path ${arguments% *}"
36989    else
36990      new_complete="$new_path"
36991    fi
36992
36993    if test "x$complete" != "x$new_complete"; then
36994      GNM="$new_complete"
36995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36996$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36997    fi
36998  fi
36999
37000  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37001    # FIXME: we should unify this with the solaris case above.
37002
37003
37004  # Publish this variable in the help.
37005
37006
37007  if test "x$STRIP" = x; then
37008    # The variable is not set by user, try to locate tool using the code snippet
37009    if test -n "$ac_tool_prefix"; then
37010  for ac_prog in strip
37011  do
37012    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37013set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37015$as_echo_n "checking for $ac_word... " >&6; }
37016if ${ac_cv_prog_STRIP+:} false; then :
37017  $as_echo_n "(cached) " >&6
37018else
37019  if test -n "$STRIP"; then
37020  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37021else
37022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37023for as_dir in $PATH
37024do
37025  IFS=$as_save_IFS
37026  test -z "$as_dir" && as_dir=.
37027    for ac_exec_ext in '' $ac_executable_extensions; do
37028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37029    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37031    break 2
37032  fi
37033done
37034  done
37035IFS=$as_save_IFS
37036
37037fi
37038fi
37039STRIP=$ac_cv_prog_STRIP
37040if test -n "$STRIP"; then
37041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37042$as_echo "$STRIP" >&6; }
37043else
37044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37045$as_echo "no" >&6; }
37046fi
37047
37048
37049    test -n "$STRIP" && break
37050  done
37051fi
37052if test -z "$STRIP"; then
37053  ac_ct_STRIP=$STRIP
37054  for ac_prog in strip
37055do
37056  # Extract the first word of "$ac_prog", so it can be a program name with args.
37057set dummy $ac_prog; ac_word=$2
37058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37059$as_echo_n "checking for $ac_word... " >&6; }
37060if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37061  $as_echo_n "(cached) " >&6
37062else
37063  if test -n "$ac_ct_STRIP"; then
37064  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37065else
37066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37067for as_dir in $PATH
37068do
37069  IFS=$as_save_IFS
37070  test -z "$as_dir" && as_dir=.
37071    for ac_exec_ext in '' $ac_executable_extensions; do
37072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37073    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37075    break 2
37076  fi
37077done
37078  done
37079IFS=$as_save_IFS
37080
37081fi
37082fi
37083ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37084if test -n "$ac_ct_STRIP"; then
37085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37086$as_echo "$ac_ct_STRIP" >&6; }
37087else
37088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37089$as_echo "no" >&6; }
37090fi
37091
37092
37093  test -n "$ac_ct_STRIP" && break
37094done
37095
37096  if test "x$ac_ct_STRIP" = x; then
37097    STRIP=""
37098  else
37099    case $cross_compiling:$ac_tool_warned in
37100yes:)
37101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37103ac_tool_warned=yes ;;
37104esac
37105    STRIP=$ac_ct_STRIP
37106  fi
37107fi
37108
37109  else
37110    # The variable is set, but is it from the command line or the environment?
37111
37112    # Try to remove the string !STRIP! from our list.
37113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37115      # If it failed, the variable was not from the command line. Ignore it,
37116      # but warn the user (except for BASH, which is always set by the calling BASH).
37117      if test "xSTRIP" != xBASH; then
37118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37119$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37120      fi
37121      # Try to locate tool using the code snippet
37122      if test -n "$ac_tool_prefix"; then
37123  for ac_prog in strip
37124  do
37125    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37126set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37128$as_echo_n "checking for $ac_word... " >&6; }
37129if ${ac_cv_prog_STRIP+:} false; then :
37130  $as_echo_n "(cached) " >&6
37131else
37132  if test -n "$STRIP"; then
37133  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37134else
37135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37136for as_dir in $PATH
37137do
37138  IFS=$as_save_IFS
37139  test -z "$as_dir" && as_dir=.
37140    for ac_exec_ext in '' $ac_executable_extensions; do
37141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37142    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37144    break 2
37145  fi
37146done
37147  done
37148IFS=$as_save_IFS
37149
37150fi
37151fi
37152STRIP=$ac_cv_prog_STRIP
37153if test -n "$STRIP"; then
37154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37155$as_echo "$STRIP" >&6; }
37156else
37157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37158$as_echo "no" >&6; }
37159fi
37160
37161
37162    test -n "$STRIP" && break
37163  done
37164fi
37165if test -z "$STRIP"; then
37166  ac_ct_STRIP=$STRIP
37167  for ac_prog in strip
37168do
37169  # Extract the first word of "$ac_prog", so it can be a program name with args.
37170set dummy $ac_prog; ac_word=$2
37171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37172$as_echo_n "checking for $ac_word... " >&6; }
37173if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37174  $as_echo_n "(cached) " >&6
37175else
37176  if test -n "$ac_ct_STRIP"; then
37177  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37178else
37179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37180for as_dir in $PATH
37181do
37182  IFS=$as_save_IFS
37183  test -z "$as_dir" && as_dir=.
37184    for ac_exec_ext in '' $ac_executable_extensions; do
37185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37186    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37188    break 2
37189  fi
37190done
37191  done
37192IFS=$as_save_IFS
37193
37194fi
37195fi
37196ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37197if test -n "$ac_ct_STRIP"; then
37198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37199$as_echo "$ac_ct_STRIP" >&6; }
37200else
37201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37202$as_echo "no" >&6; }
37203fi
37204
37205
37206  test -n "$ac_ct_STRIP" && break
37207done
37208
37209  if test "x$ac_ct_STRIP" = x; then
37210    STRIP=""
37211  else
37212    case $cross_compiling:$ac_tool_warned in
37213yes:)
37214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37216ac_tool_warned=yes ;;
37217esac
37218    STRIP=$ac_ct_STRIP
37219  fi
37220fi
37221
37222    else
37223      # If it succeeded, then it was overridden by the user. We will use it
37224      # for the tool.
37225
37226      # First remove it from the list of overridden variables, so we can test
37227      # for unknown variables in the end.
37228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37229
37230      # Check if the provided tool contains a complete path.
37231      tool_specified="$STRIP"
37232      tool_basename="${tool_specified##*/}"
37233      if test "x$tool_basename" = "x$tool_specified"; then
37234        # A command without a complete path is provided, search $PATH.
37235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37236$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37237        # Extract the first word of "$tool_basename", so it can be a program name with args.
37238set dummy $tool_basename; ac_word=$2
37239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37240$as_echo_n "checking for $ac_word... " >&6; }
37241if ${ac_cv_path_STRIP+:} false; then :
37242  $as_echo_n "(cached) " >&6
37243else
37244  case $STRIP in
37245  [\\/]* | ?:[\\/]*)
37246  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37247  ;;
37248  *)
37249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37250for as_dir in $PATH
37251do
37252  IFS=$as_save_IFS
37253  test -z "$as_dir" && as_dir=.
37254    for ac_exec_ext in '' $ac_executable_extensions; do
37255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37256    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37258    break 2
37259  fi
37260done
37261  done
37262IFS=$as_save_IFS
37263
37264  ;;
37265esac
37266fi
37267STRIP=$ac_cv_path_STRIP
37268if test -n "$STRIP"; then
37269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37270$as_echo "$STRIP" >&6; }
37271else
37272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37273$as_echo "no" >&6; }
37274fi
37275
37276
37277        if test "x$STRIP" = x; then
37278          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37279        fi
37280      else
37281        # Otherwise we believe it is a complete path. Use it as it is.
37282        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37283$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37285$as_echo_n "checking for STRIP... " >&6; }
37286        if test ! -x "$tool_specified"; then
37287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37288$as_echo "not found" >&6; }
37289          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37290        fi
37291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37292$as_echo "$tool_specified" >&6; }
37293      fi
37294    fi
37295  fi
37296
37297
37298
37299  # Only process if variable expands to non-empty
37300
37301  if test "x$STRIP" != x; then
37302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37303
37304  # First separate the path from the arguments. This will split at the first
37305  # space.
37306  complete="$STRIP"
37307  path="${complete%% *}"
37308  tmp="$complete EOL"
37309  arguments="${tmp#* }"
37310
37311  # Input might be given as Windows format, start by converting to
37312  # unix format.
37313  new_path=`$CYGPATH -u "$path"`
37314
37315  # Now try to locate executable using which
37316  new_path=`$WHICH "$new_path" 2> /dev/null`
37317  # bat and cmd files are not always considered executable in cygwin causing which
37318  # to not find them
37319  if test "x$new_path" = x \
37320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37322    new_path=`$CYGPATH -u "$path"`
37323  fi
37324  if test "x$new_path" = x; then
37325    # Oops. Which didn't find the executable.
37326    # The splitting of arguments from the executable at a space might have been incorrect,
37327    # since paths with space are more likely in Windows. Give it another try with the whole
37328    # argument.
37329    path="$complete"
37330    arguments="EOL"
37331    new_path=`$CYGPATH -u "$path"`
37332    new_path=`$WHICH "$new_path" 2> /dev/null`
37333    # bat and cmd files are not always considered executable in cygwin causing which
37334    # to not find them
37335    if test "x$new_path" = x \
37336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37338      new_path=`$CYGPATH -u "$path"`
37339    fi
37340    if test "x$new_path" = x; then
37341      # It's still not found. Now this is an unrecoverable error.
37342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37343$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37344      has_space=`$ECHO "$complete" | $GREP " "`
37345      if test "x$has_space" != x; then
37346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37348      fi
37349      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37350    fi
37351  fi
37352
37353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37356  # "foo.exe" is OK but "foo" is an error.
37357  #
37358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37359  # It is also a way to make sure we got the proper file name for the real test later on.
37360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37361  if test "x$test_shortpath" = x; then
37362    # Short path failed, file does not exist as specified.
37363    # Try adding .exe or .cmd
37364    if test -f "${new_path}.exe"; then
37365      input_to_shortpath="${new_path}.exe"
37366    elif test -f "${new_path}.cmd"; then
37367      input_to_shortpath="${new_path}.cmd"
37368    else
37369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37370$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37373      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37374    fi
37375  else
37376    input_to_shortpath="$new_path"
37377  fi
37378
37379  # Call helper function which possibly converts this using DOS-style short mode.
37380  # If so, the updated path is stored in $new_path.
37381  new_path="$input_to_shortpath"
37382
37383  input_path="$input_to_shortpath"
37384  # Check if we need to convert this using DOS-style short mode. If the path
37385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37386  # take no chances and rewrite it.
37387  # Note: m4 eats our [], so we need to use [ and ] instead.
37388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37389  if test "x$has_forbidden_chars" != x; then
37390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37394      # Going to short mode and back again did indeed matter. Since short mode is
37395      # case insensitive, let's make it lowercase to improve readability.
37396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37397      # Now convert it back to Unix-style (cygpath)
37398      input_path=`$CYGPATH -u "$shortmode_path"`
37399      new_path="$input_path"
37400    fi
37401  fi
37402
37403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37404  if test "x$test_cygdrive_prefix" = x; then
37405    # As a simple fix, exclude /usr/bin since it's not a real path.
37406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37408      # a path prefixed by /cygdrive for fixpath to work.
37409      new_path="$CYGWIN_ROOT_PATH$input_path"
37410    fi
37411  fi
37412
37413  # remove trailing .exe if any
37414  new_path="${new_path/%.exe/}"
37415
37416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37417
37418  # First separate the path from the arguments. This will split at the first
37419  # space.
37420  complete="$STRIP"
37421  path="${complete%% *}"
37422  tmp="$complete EOL"
37423  arguments="${tmp#* }"
37424
37425  # Input might be given as Windows format, start by converting to
37426  # unix format.
37427  new_path="$path"
37428
37429  windows_path="$new_path"
37430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37431    unix_path=`$CYGPATH -u "$windows_path"`
37432    new_path="$unix_path"
37433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37435    new_path="$unix_path"
37436  fi
37437
37438
37439  # Now try to locate executable using which
37440  new_path=`$WHICH "$new_path" 2> /dev/null`
37441
37442  if test "x$new_path" = x; then
37443    # Oops. Which didn't find the executable.
37444    # The splitting of arguments from the executable at a space might have been incorrect,
37445    # since paths with space are more likely in Windows. Give it another try with the whole
37446    # argument.
37447    path="$complete"
37448    arguments="EOL"
37449    new_path="$path"
37450
37451  windows_path="$new_path"
37452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37453    unix_path=`$CYGPATH -u "$windows_path"`
37454    new_path="$unix_path"
37455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37457    new_path="$unix_path"
37458  fi
37459
37460
37461    new_path=`$WHICH "$new_path" 2> /dev/null`
37462    # bat and cmd files are not always considered executable in MSYS causing which
37463    # to not find them
37464    if test "x$new_path" = x \
37465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37467      new_path="$path"
37468
37469  windows_path="$new_path"
37470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37471    unix_path=`$CYGPATH -u "$windows_path"`
37472    new_path="$unix_path"
37473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37475    new_path="$unix_path"
37476  fi
37477
37478    fi
37479
37480    if test "x$new_path" = x; then
37481      # It's still not found. Now this is an unrecoverable error.
37482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37483$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37484      has_space=`$ECHO "$complete" | $GREP " "`
37485      if test "x$has_space" != x; then
37486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37488      fi
37489      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37490    fi
37491  fi
37492
37493  # Now new_path has a complete unix path to the binary
37494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37495    # Keep paths in /bin as-is, but remove trailing .exe if any
37496    new_path="${new_path/%.exe/}"
37497    # Do not save /bin paths to all_fixpath_prefixes!
37498  else
37499    # Not in mixed or Windows style, start by that.
37500    new_path=`cmd //c echo $new_path`
37501
37502  input_path="$new_path"
37503  # Check if we need to convert this using DOS-style short mode. If the path
37504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37505  # take no chances and rewrite it.
37506  # Note: m4 eats our [], so we need to use [ and ] instead.
37507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37508  if test "x$has_forbidden_chars" != x; then
37509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37511  fi
37512
37513    # Output is in $new_path
37514
37515  windows_path="$new_path"
37516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37517    unix_path=`$CYGPATH -u "$windows_path"`
37518    new_path="$unix_path"
37519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37521    new_path="$unix_path"
37522  fi
37523
37524    # remove trailing .exe if any
37525    new_path="${new_path/%.exe/}"
37526
37527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37529  fi
37530
37531    else
37532      # We're on a unix platform. Hooray! :)
37533      # First separate the path from the arguments. This will split at the first
37534      # space.
37535      complete="$STRIP"
37536      path="${complete%% *}"
37537      tmp="$complete EOL"
37538      arguments="${tmp#* }"
37539
37540      # Cannot rely on the command "which" here since it doesn't always work.
37541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37542      if test -z "$is_absolute_path"; then
37543        # Path to executable is not absolute. Find it.
37544        IFS_save="$IFS"
37545        IFS=:
37546        for p in $PATH; do
37547          if test -f "$p/$path" && test -x "$p/$path"; then
37548            new_path="$p/$path"
37549            break
37550          fi
37551        done
37552        IFS="$IFS_save"
37553      else
37554        # This is an absolute path, we can use it without further modifications.
37555        new_path="$path"
37556      fi
37557
37558      if test "x$new_path" = x; then
37559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37560$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37561        has_space=`$ECHO "$complete" | $GREP " "`
37562        if test "x$has_space" != x; then
37563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37565        fi
37566        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37567      fi
37568    fi
37569
37570    # Now join together the path and the arguments once again
37571    if test "x$arguments" != xEOL; then
37572      new_complete="$new_path ${arguments% *}"
37573    else
37574      new_complete="$new_path"
37575    fi
37576
37577    if test "x$complete" != "x$new_complete"; then
37578      STRIP="$new_complete"
37579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37580$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37581    fi
37582  fi
37583
37584
37585
37586  # Publish this variable in the help.
37587
37588
37589  if test "x$NM" = x; then
37590    # The variable is not set by user, try to locate tool using the code snippet
37591    if test -n "$ac_tool_prefix"; then
37592  for ac_prog in nm
37593  do
37594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37597$as_echo_n "checking for $ac_word... " >&6; }
37598if ${ac_cv_prog_NM+:} false; then :
37599  $as_echo_n "(cached) " >&6
37600else
37601  if test -n "$NM"; then
37602  ac_cv_prog_NM="$NM" # Let the user override the test.
37603else
37604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37605for as_dir in $PATH
37606do
37607  IFS=$as_save_IFS
37608  test -z "$as_dir" && as_dir=.
37609    for ac_exec_ext in '' $ac_executable_extensions; do
37610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37611    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37613    break 2
37614  fi
37615done
37616  done
37617IFS=$as_save_IFS
37618
37619fi
37620fi
37621NM=$ac_cv_prog_NM
37622if test -n "$NM"; then
37623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37624$as_echo "$NM" >&6; }
37625else
37626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37627$as_echo "no" >&6; }
37628fi
37629
37630
37631    test -n "$NM" && break
37632  done
37633fi
37634if test -z "$NM"; then
37635  ac_ct_NM=$NM
37636  for ac_prog in nm
37637do
37638  # Extract the first word of "$ac_prog", so it can be a program name with args.
37639set dummy $ac_prog; ac_word=$2
37640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37641$as_echo_n "checking for $ac_word... " >&6; }
37642if ${ac_cv_prog_ac_ct_NM+:} false; then :
37643  $as_echo_n "(cached) " >&6
37644else
37645  if test -n "$ac_ct_NM"; then
37646  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37647else
37648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37649for as_dir in $PATH
37650do
37651  IFS=$as_save_IFS
37652  test -z "$as_dir" && as_dir=.
37653    for ac_exec_ext in '' $ac_executable_extensions; do
37654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37655    ac_cv_prog_ac_ct_NM="$ac_prog"
37656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37657    break 2
37658  fi
37659done
37660  done
37661IFS=$as_save_IFS
37662
37663fi
37664fi
37665ac_ct_NM=$ac_cv_prog_ac_ct_NM
37666if test -n "$ac_ct_NM"; then
37667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37668$as_echo "$ac_ct_NM" >&6; }
37669else
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37671$as_echo "no" >&6; }
37672fi
37673
37674
37675  test -n "$ac_ct_NM" && break
37676done
37677
37678  if test "x$ac_ct_NM" = x; then
37679    NM=""
37680  else
37681    case $cross_compiling:$ac_tool_warned in
37682yes:)
37683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37685ac_tool_warned=yes ;;
37686esac
37687    NM=$ac_ct_NM
37688  fi
37689fi
37690
37691  else
37692    # The variable is set, but is it from the command line or the environment?
37693
37694    # Try to remove the string !NM! from our list.
37695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37697      # If it failed, the variable was not from the command line. Ignore it,
37698      # but warn the user (except for BASH, which is always set by the calling BASH).
37699      if test "xNM" != xBASH; then
37700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37701$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37702      fi
37703      # Try to locate tool using the code snippet
37704      if test -n "$ac_tool_prefix"; then
37705  for ac_prog in nm
37706  do
37707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37710$as_echo_n "checking for $ac_word... " >&6; }
37711if ${ac_cv_prog_NM+:} false; then :
37712  $as_echo_n "(cached) " >&6
37713else
37714  if test -n "$NM"; then
37715  ac_cv_prog_NM="$NM" # Let the user override the test.
37716else
37717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37718for as_dir in $PATH
37719do
37720  IFS=$as_save_IFS
37721  test -z "$as_dir" && as_dir=.
37722    for ac_exec_ext in '' $ac_executable_extensions; do
37723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37724    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37726    break 2
37727  fi
37728done
37729  done
37730IFS=$as_save_IFS
37731
37732fi
37733fi
37734NM=$ac_cv_prog_NM
37735if test -n "$NM"; then
37736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37737$as_echo "$NM" >&6; }
37738else
37739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37740$as_echo "no" >&6; }
37741fi
37742
37743
37744    test -n "$NM" && break
37745  done
37746fi
37747if test -z "$NM"; then
37748  ac_ct_NM=$NM
37749  for ac_prog in nm
37750do
37751  # Extract the first word of "$ac_prog", so it can be a program name with args.
37752set dummy $ac_prog; ac_word=$2
37753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37754$as_echo_n "checking for $ac_word... " >&6; }
37755if ${ac_cv_prog_ac_ct_NM+:} false; then :
37756  $as_echo_n "(cached) " >&6
37757else
37758  if test -n "$ac_ct_NM"; then
37759  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37760else
37761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37762for as_dir in $PATH
37763do
37764  IFS=$as_save_IFS
37765  test -z "$as_dir" && as_dir=.
37766    for ac_exec_ext in '' $ac_executable_extensions; do
37767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37768    ac_cv_prog_ac_ct_NM="$ac_prog"
37769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37770    break 2
37771  fi
37772done
37773  done
37774IFS=$as_save_IFS
37775
37776fi
37777fi
37778ac_ct_NM=$ac_cv_prog_ac_ct_NM
37779if test -n "$ac_ct_NM"; then
37780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37781$as_echo "$ac_ct_NM" >&6; }
37782else
37783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37784$as_echo "no" >&6; }
37785fi
37786
37787
37788  test -n "$ac_ct_NM" && break
37789done
37790
37791  if test "x$ac_ct_NM" = x; then
37792    NM=""
37793  else
37794    case $cross_compiling:$ac_tool_warned in
37795yes:)
37796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37798ac_tool_warned=yes ;;
37799esac
37800    NM=$ac_ct_NM
37801  fi
37802fi
37803
37804    else
37805      # If it succeeded, then it was overridden by the user. We will use it
37806      # for the tool.
37807
37808      # First remove it from the list of overridden variables, so we can test
37809      # for unknown variables in the end.
37810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37811
37812      # Check if the provided tool contains a complete path.
37813      tool_specified="$NM"
37814      tool_basename="${tool_specified##*/}"
37815      if test "x$tool_basename" = "x$tool_specified"; then
37816        # A command without a complete path is provided, search $PATH.
37817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37818$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37819        # Extract the first word of "$tool_basename", so it can be a program name with args.
37820set dummy $tool_basename; ac_word=$2
37821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37822$as_echo_n "checking for $ac_word... " >&6; }
37823if ${ac_cv_path_NM+:} false; then :
37824  $as_echo_n "(cached) " >&6
37825else
37826  case $NM in
37827  [\\/]* | ?:[\\/]*)
37828  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37829  ;;
37830  *)
37831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37832for as_dir in $PATH
37833do
37834  IFS=$as_save_IFS
37835  test -z "$as_dir" && as_dir=.
37836    for ac_exec_ext in '' $ac_executable_extensions; do
37837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37838    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37840    break 2
37841  fi
37842done
37843  done
37844IFS=$as_save_IFS
37845
37846  ;;
37847esac
37848fi
37849NM=$ac_cv_path_NM
37850if test -n "$NM"; then
37851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37852$as_echo "$NM" >&6; }
37853else
37854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37855$as_echo "no" >&6; }
37856fi
37857
37858
37859        if test "x$NM" = x; then
37860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37861        fi
37862      else
37863        # Otherwise we believe it is a complete path. Use it as it is.
37864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37865$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37867$as_echo_n "checking for NM... " >&6; }
37868        if test ! -x "$tool_specified"; then
37869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37870$as_echo "not found" >&6; }
37871          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37872        fi
37873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37874$as_echo "$tool_specified" >&6; }
37875      fi
37876    fi
37877  fi
37878
37879
37880
37881  # Only process if variable expands to non-empty
37882
37883  if test "x$NM" != x; then
37884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37885
37886  # First separate the path from the arguments. This will split at the first
37887  # space.
37888  complete="$NM"
37889  path="${complete%% *}"
37890  tmp="$complete EOL"
37891  arguments="${tmp#* }"
37892
37893  # Input might be given as Windows format, start by converting to
37894  # unix format.
37895  new_path=`$CYGPATH -u "$path"`
37896
37897  # Now try to locate executable using which
37898  new_path=`$WHICH "$new_path" 2> /dev/null`
37899  # bat and cmd files are not always considered executable in cygwin causing which
37900  # to not find them
37901  if test "x$new_path" = x \
37902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37904    new_path=`$CYGPATH -u "$path"`
37905  fi
37906  if test "x$new_path" = x; then
37907    # Oops. Which didn't find the executable.
37908    # The splitting of arguments from the executable at a space might have been incorrect,
37909    # since paths with space are more likely in Windows. Give it another try with the whole
37910    # argument.
37911    path="$complete"
37912    arguments="EOL"
37913    new_path=`$CYGPATH -u "$path"`
37914    new_path=`$WHICH "$new_path" 2> /dev/null`
37915    # bat and cmd files are not always considered executable in cygwin causing which
37916    # to not find them
37917    if test "x$new_path" = x \
37918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37920      new_path=`$CYGPATH -u "$path"`
37921    fi
37922    if test "x$new_path" = x; then
37923      # It's still not found. Now this is an unrecoverable error.
37924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37925$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37926      has_space=`$ECHO "$complete" | $GREP " "`
37927      if test "x$has_space" != x; then
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37930      fi
37931      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37932    fi
37933  fi
37934
37935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37938  # "foo.exe" is OK but "foo" is an error.
37939  #
37940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37941  # It is also a way to make sure we got the proper file name for the real test later on.
37942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37943  if test "x$test_shortpath" = x; then
37944    # Short path failed, file does not exist as specified.
37945    # Try adding .exe or .cmd
37946    if test -f "${new_path}.exe"; then
37947      input_to_shortpath="${new_path}.exe"
37948    elif test -f "${new_path}.cmd"; then
37949      input_to_shortpath="${new_path}.cmd"
37950    else
37951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37952$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37955      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37956    fi
37957  else
37958    input_to_shortpath="$new_path"
37959  fi
37960
37961  # Call helper function which possibly converts this using DOS-style short mode.
37962  # If so, the updated path is stored in $new_path.
37963  new_path="$input_to_shortpath"
37964
37965  input_path="$input_to_shortpath"
37966  # Check if we need to convert this using DOS-style short mode. If the path
37967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37968  # take no chances and rewrite it.
37969  # Note: m4 eats our [], so we need to use [ and ] instead.
37970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37971  if test "x$has_forbidden_chars" != x; then
37972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37976      # Going to short mode and back again did indeed matter. Since short mode is
37977      # case insensitive, let's make it lowercase to improve readability.
37978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37979      # Now convert it back to Unix-style (cygpath)
37980      input_path=`$CYGPATH -u "$shortmode_path"`
37981      new_path="$input_path"
37982    fi
37983  fi
37984
37985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37986  if test "x$test_cygdrive_prefix" = x; then
37987    # As a simple fix, exclude /usr/bin since it's not a real path.
37988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37990      # a path prefixed by /cygdrive for fixpath to work.
37991      new_path="$CYGWIN_ROOT_PATH$input_path"
37992    fi
37993  fi
37994
37995  # remove trailing .exe if any
37996  new_path="${new_path/%.exe/}"
37997
37998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37999
38000  # First separate the path from the arguments. This will split at the first
38001  # space.
38002  complete="$NM"
38003  path="${complete%% *}"
38004  tmp="$complete EOL"
38005  arguments="${tmp#* }"
38006
38007  # Input might be given as Windows format, start by converting to
38008  # unix format.
38009  new_path="$path"
38010
38011  windows_path="$new_path"
38012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38013    unix_path=`$CYGPATH -u "$windows_path"`
38014    new_path="$unix_path"
38015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38017    new_path="$unix_path"
38018  fi
38019
38020
38021  # Now try to locate executable using which
38022  new_path=`$WHICH "$new_path" 2> /dev/null`
38023
38024  if test "x$new_path" = x; then
38025    # Oops. Which didn't find the executable.
38026    # The splitting of arguments from the executable at a space might have been incorrect,
38027    # since paths with space are more likely in Windows. Give it another try with the whole
38028    # argument.
38029    path="$complete"
38030    arguments="EOL"
38031    new_path="$path"
38032
38033  windows_path="$new_path"
38034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38035    unix_path=`$CYGPATH -u "$windows_path"`
38036    new_path="$unix_path"
38037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38039    new_path="$unix_path"
38040  fi
38041
38042
38043    new_path=`$WHICH "$new_path" 2> /dev/null`
38044    # bat and cmd files are not always considered executable in MSYS causing which
38045    # to not find them
38046    if test "x$new_path" = x \
38047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38049      new_path="$path"
38050
38051  windows_path="$new_path"
38052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38053    unix_path=`$CYGPATH -u "$windows_path"`
38054    new_path="$unix_path"
38055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38057    new_path="$unix_path"
38058  fi
38059
38060    fi
38061
38062    if test "x$new_path" = x; then
38063      # It's still not found. Now this is an unrecoverable error.
38064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38065$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38066      has_space=`$ECHO "$complete" | $GREP " "`
38067      if test "x$has_space" != x; then
38068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38070      fi
38071      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38072    fi
38073  fi
38074
38075  # Now new_path has a complete unix path to the binary
38076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38077    # Keep paths in /bin as-is, but remove trailing .exe if any
38078    new_path="${new_path/%.exe/}"
38079    # Do not save /bin paths to all_fixpath_prefixes!
38080  else
38081    # Not in mixed or Windows style, start by that.
38082    new_path=`cmd //c echo $new_path`
38083
38084  input_path="$new_path"
38085  # Check if we need to convert this using DOS-style short mode. If the path
38086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38087  # take no chances and rewrite it.
38088  # Note: m4 eats our [], so we need to use [ and ] instead.
38089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38090  if test "x$has_forbidden_chars" != x; then
38091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38093  fi
38094
38095    # Output is in $new_path
38096
38097  windows_path="$new_path"
38098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38099    unix_path=`$CYGPATH -u "$windows_path"`
38100    new_path="$unix_path"
38101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38103    new_path="$unix_path"
38104  fi
38105
38106    # remove trailing .exe if any
38107    new_path="${new_path/%.exe/}"
38108
38109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38111  fi
38112
38113    else
38114      # We're on a unix platform. Hooray! :)
38115      # First separate the path from the arguments. This will split at the first
38116      # space.
38117      complete="$NM"
38118      path="${complete%% *}"
38119      tmp="$complete EOL"
38120      arguments="${tmp#* }"
38121
38122      # Cannot rely on the command "which" here since it doesn't always work.
38123      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38124      if test -z "$is_absolute_path"; then
38125        # Path to executable is not absolute. Find it.
38126        IFS_save="$IFS"
38127        IFS=:
38128        for p in $PATH; do
38129          if test -f "$p/$path" && test -x "$p/$path"; then
38130            new_path="$p/$path"
38131            break
38132          fi
38133        done
38134        IFS="$IFS_save"
38135      else
38136        # This is an absolute path, we can use it without further modifications.
38137        new_path="$path"
38138      fi
38139
38140      if test "x$new_path" = x; then
38141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38142$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38143        has_space=`$ECHO "$complete" | $GREP " "`
38144        if test "x$has_space" != x; then
38145          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38147        fi
38148        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38149      fi
38150    fi
38151
38152    # Now join together the path and the arguments once again
38153    if test "x$arguments" != xEOL; then
38154      new_complete="$new_path ${arguments% *}"
38155    else
38156      new_complete="$new_path"
38157    fi
38158
38159    if test "x$complete" != "x$new_complete"; then
38160      NM="$new_complete"
38161      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38162$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38163    fi
38164  fi
38165
38166    GNM="$NM"
38167
38168  fi
38169
38170  # objcopy is used for moving debug symbols to separate files when
38171  # full debug symbols are enabled.
38172  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38173
38174
38175  # Publish this variable in the help.
38176
38177
38178  if test "x$OBJCOPY" = x; then
38179    # The variable is not set by user, try to locate tool using the code snippet
38180    if test -n "$ac_tool_prefix"; then
38181  for ac_prog in gobjcopy objcopy
38182  do
38183    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38184set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38186$as_echo_n "checking for $ac_word... " >&6; }
38187if ${ac_cv_prog_OBJCOPY+:} false; then :
38188  $as_echo_n "(cached) " >&6
38189else
38190  if test -n "$OBJCOPY"; then
38191  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38192else
38193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38194for as_dir in $PATH
38195do
38196  IFS=$as_save_IFS
38197  test -z "$as_dir" && as_dir=.
38198    for ac_exec_ext in '' $ac_executable_extensions; do
38199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38200    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38202    break 2
38203  fi
38204done
38205  done
38206IFS=$as_save_IFS
38207
38208fi
38209fi
38210OBJCOPY=$ac_cv_prog_OBJCOPY
38211if test -n "$OBJCOPY"; then
38212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38213$as_echo "$OBJCOPY" >&6; }
38214else
38215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38216$as_echo "no" >&6; }
38217fi
38218
38219
38220    test -n "$OBJCOPY" && break
38221  done
38222fi
38223if test -z "$OBJCOPY"; then
38224  ac_ct_OBJCOPY=$OBJCOPY
38225  for ac_prog in gobjcopy objcopy
38226do
38227  # Extract the first word of "$ac_prog", so it can be a program name with args.
38228set dummy $ac_prog; ac_word=$2
38229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38230$as_echo_n "checking for $ac_word... " >&6; }
38231if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38232  $as_echo_n "(cached) " >&6
38233else
38234  if test -n "$ac_ct_OBJCOPY"; then
38235  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38236else
38237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38238for as_dir in $PATH
38239do
38240  IFS=$as_save_IFS
38241  test -z "$as_dir" && as_dir=.
38242    for ac_exec_ext in '' $ac_executable_extensions; do
38243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38244    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38246    break 2
38247  fi
38248done
38249  done
38250IFS=$as_save_IFS
38251
38252fi
38253fi
38254ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38255if test -n "$ac_ct_OBJCOPY"; then
38256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38257$as_echo "$ac_ct_OBJCOPY" >&6; }
38258else
38259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38260$as_echo "no" >&6; }
38261fi
38262
38263
38264  test -n "$ac_ct_OBJCOPY" && break
38265done
38266
38267  if test "x$ac_ct_OBJCOPY" = x; then
38268    OBJCOPY=""
38269  else
38270    case $cross_compiling:$ac_tool_warned in
38271yes:)
38272{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38273$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38274ac_tool_warned=yes ;;
38275esac
38276    OBJCOPY=$ac_ct_OBJCOPY
38277  fi
38278fi
38279
38280  else
38281    # The variable is set, but is it from the command line or the environment?
38282
38283    # Try to remove the string !OBJCOPY! from our list.
38284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38286      # If it failed, the variable was not from the command line. Ignore it,
38287      # but warn the user (except for BASH, which is always set by the calling BASH).
38288      if test "xOBJCOPY" != xBASH; then
38289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38290$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38291      fi
38292      # Try to locate tool using the code snippet
38293      if test -n "$ac_tool_prefix"; then
38294  for ac_prog in gobjcopy objcopy
38295  do
38296    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38297set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38299$as_echo_n "checking for $ac_word... " >&6; }
38300if ${ac_cv_prog_OBJCOPY+:} false; then :
38301  $as_echo_n "(cached) " >&6
38302else
38303  if test -n "$OBJCOPY"; then
38304  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38305else
38306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38307for as_dir in $PATH
38308do
38309  IFS=$as_save_IFS
38310  test -z "$as_dir" && as_dir=.
38311    for ac_exec_ext in '' $ac_executable_extensions; do
38312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38313    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38315    break 2
38316  fi
38317done
38318  done
38319IFS=$as_save_IFS
38320
38321fi
38322fi
38323OBJCOPY=$ac_cv_prog_OBJCOPY
38324if test -n "$OBJCOPY"; then
38325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38326$as_echo "$OBJCOPY" >&6; }
38327else
38328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38329$as_echo "no" >&6; }
38330fi
38331
38332
38333    test -n "$OBJCOPY" && break
38334  done
38335fi
38336if test -z "$OBJCOPY"; then
38337  ac_ct_OBJCOPY=$OBJCOPY
38338  for ac_prog in gobjcopy objcopy
38339do
38340  # Extract the first word of "$ac_prog", so it can be a program name with args.
38341set dummy $ac_prog; ac_word=$2
38342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38343$as_echo_n "checking for $ac_word... " >&6; }
38344if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38345  $as_echo_n "(cached) " >&6
38346else
38347  if test -n "$ac_ct_OBJCOPY"; then
38348  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38349else
38350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38351for as_dir in $PATH
38352do
38353  IFS=$as_save_IFS
38354  test -z "$as_dir" && as_dir=.
38355    for ac_exec_ext in '' $ac_executable_extensions; do
38356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38357    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38359    break 2
38360  fi
38361done
38362  done
38363IFS=$as_save_IFS
38364
38365fi
38366fi
38367ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38368if test -n "$ac_ct_OBJCOPY"; then
38369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38370$as_echo "$ac_ct_OBJCOPY" >&6; }
38371else
38372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38373$as_echo "no" >&6; }
38374fi
38375
38376
38377  test -n "$ac_ct_OBJCOPY" && break
38378done
38379
38380  if test "x$ac_ct_OBJCOPY" = x; then
38381    OBJCOPY=""
38382  else
38383    case $cross_compiling:$ac_tool_warned in
38384yes:)
38385{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38386$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38387ac_tool_warned=yes ;;
38388esac
38389    OBJCOPY=$ac_ct_OBJCOPY
38390  fi
38391fi
38392
38393    else
38394      # If it succeeded, then it was overridden by the user. We will use it
38395      # for the tool.
38396
38397      # First remove it from the list of overridden variables, so we can test
38398      # for unknown variables in the end.
38399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38400
38401      # Check if the provided tool contains a complete path.
38402      tool_specified="$OBJCOPY"
38403      tool_basename="${tool_specified##*/}"
38404      if test "x$tool_basename" = "x$tool_specified"; then
38405        # A command without a complete path is provided, search $PATH.
38406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38407$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38408        # Extract the first word of "$tool_basename", so it can be a program name with args.
38409set dummy $tool_basename; ac_word=$2
38410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38411$as_echo_n "checking for $ac_word... " >&6; }
38412if ${ac_cv_path_OBJCOPY+:} false; then :
38413  $as_echo_n "(cached) " >&6
38414else
38415  case $OBJCOPY in
38416  [\\/]* | ?:[\\/]*)
38417  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38418  ;;
38419  *)
38420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38421for as_dir in $PATH
38422do
38423  IFS=$as_save_IFS
38424  test -z "$as_dir" && as_dir=.
38425    for ac_exec_ext in '' $ac_executable_extensions; do
38426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38427    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38429    break 2
38430  fi
38431done
38432  done
38433IFS=$as_save_IFS
38434
38435  ;;
38436esac
38437fi
38438OBJCOPY=$ac_cv_path_OBJCOPY
38439if test -n "$OBJCOPY"; then
38440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38441$as_echo "$OBJCOPY" >&6; }
38442else
38443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38444$as_echo "no" >&6; }
38445fi
38446
38447
38448        if test "x$OBJCOPY" = x; then
38449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38450        fi
38451      else
38452        # Otherwise we believe it is a complete path. Use it as it is.
38453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38454$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38456$as_echo_n "checking for OBJCOPY... " >&6; }
38457        if test ! -x "$tool_specified"; then
38458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38459$as_echo "not found" >&6; }
38460          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38461        fi
38462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38463$as_echo "$tool_specified" >&6; }
38464      fi
38465    fi
38466  fi
38467
38468
38469    # Only call fixup if objcopy was found.
38470    if test -n "$OBJCOPY"; then
38471
38472  # Only process if variable expands to non-empty
38473
38474  if test "x$OBJCOPY" != x; then
38475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38476
38477  # First separate the path from the arguments. This will split at the first
38478  # space.
38479  complete="$OBJCOPY"
38480  path="${complete%% *}"
38481  tmp="$complete EOL"
38482  arguments="${tmp#* }"
38483
38484  # Input might be given as Windows format, start by converting to
38485  # unix format.
38486  new_path=`$CYGPATH -u "$path"`
38487
38488  # Now try to locate executable using which
38489  new_path=`$WHICH "$new_path" 2> /dev/null`
38490  # bat and cmd files are not always considered executable in cygwin causing which
38491  # to not find them
38492  if test "x$new_path" = x \
38493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38495    new_path=`$CYGPATH -u "$path"`
38496  fi
38497  if test "x$new_path" = x; then
38498    # Oops. Which didn't find the executable.
38499    # The splitting of arguments from the executable at a space might have been incorrect,
38500    # since paths with space are more likely in Windows. Give it another try with the whole
38501    # argument.
38502    path="$complete"
38503    arguments="EOL"
38504    new_path=`$CYGPATH -u "$path"`
38505    new_path=`$WHICH "$new_path" 2> /dev/null`
38506    # bat and cmd files are not always considered executable in cygwin causing which
38507    # to not find them
38508    if test "x$new_path" = x \
38509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38511      new_path=`$CYGPATH -u "$path"`
38512    fi
38513    if test "x$new_path" = x; then
38514      # It's still not found. Now this is an unrecoverable error.
38515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38516$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38517      has_space=`$ECHO "$complete" | $GREP " "`
38518      if test "x$has_space" != x; then
38519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38521      fi
38522      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38523    fi
38524  fi
38525
38526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38529  # "foo.exe" is OK but "foo" is an error.
38530  #
38531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38532  # It is also a way to make sure we got the proper file name for the real test later on.
38533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38534  if test "x$test_shortpath" = x; then
38535    # Short path failed, file does not exist as specified.
38536    # Try adding .exe or .cmd
38537    if test -f "${new_path}.exe"; then
38538      input_to_shortpath="${new_path}.exe"
38539    elif test -f "${new_path}.cmd"; then
38540      input_to_shortpath="${new_path}.cmd"
38541    else
38542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38543$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38546      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38547    fi
38548  else
38549    input_to_shortpath="$new_path"
38550  fi
38551
38552  # Call helper function which possibly converts this using DOS-style short mode.
38553  # If so, the updated path is stored in $new_path.
38554  new_path="$input_to_shortpath"
38555
38556  input_path="$input_to_shortpath"
38557  # Check if we need to convert this using DOS-style short mode. If the path
38558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38559  # take no chances and rewrite it.
38560  # Note: m4 eats our [], so we need to use [ and ] instead.
38561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38562  if test "x$has_forbidden_chars" != x; then
38563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38567      # Going to short mode and back again did indeed matter. Since short mode is
38568      # case insensitive, let's make it lowercase to improve readability.
38569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38570      # Now convert it back to Unix-style (cygpath)
38571      input_path=`$CYGPATH -u "$shortmode_path"`
38572      new_path="$input_path"
38573    fi
38574  fi
38575
38576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38577  if test "x$test_cygdrive_prefix" = x; then
38578    # As a simple fix, exclude /usr/bin since it's not a real path.
38579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38581      # a path prefixed by /cygdrive for fixpath to work.
38582      new_path="$CYGWIN_ROOT_PATH$input_path"
38583    fi
38584  fi
38585
38586  # remove trailing .exe if any
38587  new_path="${new_path/%.exe/}"
38588
38589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38590
38591  # First separate the path from the arguments. This will split at the first
38592  # space.
38593  complete="$OBJCOPY"
38594  path="${complete%% *}"
38595  tmp="$complete EOL"
38596  arguments="${tmp#* }"
38597
38598  # Input might be given as Windows format, start by converting to
38599  # unix format.
38600  new_path="$path"
38601
38602  windows_path="$new_path"
38603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38604    unix_path=`$CYGPATH -u "$windows_path"`
38605    new_path="$unix_path"
38606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38608    new_path="$unix_path"
38609  fi
38610
38611
38612  # Now try to locate executable using which
38613  new_path=`$WHICH "$new_path" 2> /dev/null`
38614
38615  if test "x$new_path" = x; then
38616    # Oops. Which didn't find the executable.
38617    # The splitting of arguments from the executable at a space might have been incorrect,
38618    # since paths with space are more likely in Windows. Give it another try with the whole
38619    # argument.
38620    path="$complete"
38621    arguments="EOL"
38622    new_path="$path"
38623
38624  windows_path="$new_path"
38625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38626    unix_path=`$CYGPATH -u "$windows_path"`
38627    new_path="$unix_path"
38628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38630    new_path="$unix_path"
38631  fi
38632
38633
38634    new_path=`$WHICH "$new_path" 2> /dev/null`
38635    # bat and cmd files are not always considered executable in MSYS causing which
38636    # to not find them
38637    if test "x$new_path" = x \
38638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38640      new_path="$path"
38641
38642  windows_path="$new_path"
38643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38644    unix_path=`$CYGPATH -u "$windows_path"`
38645    new_path="$unix_path"
38646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38648    new_path="$unix_path"
38649  fi
38650
38651    fi
38652
38653    if test "x$new_path" = x; then
38654      # It's still not found. Now this is an unrecoverable error.
38655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38656$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38657      has_space=`$ECHO "$complete" | $GREP " "`
38658      if test "x$has_space" != x; then
38659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38661      fi
38662      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38663    fi
38664  fi
38665
38666  # Now new_path has a complete unix path to the binary
38667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38668    # Keep paths in /bin as-is, but remove trailing .exe if any
38669    new_path="${new_path/%.exe/}"
38670    # Do not save /bin paths to all_fixpath_prefixes!
38671  else
38672    # Not in mixed or Windows style, start by that.
38673    new_path=`cmd //c echo $new_path`
38674
38675  input_path="$new_path"
38676  # Check if we need to convert this using DOS-style short mode. If the path
38677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38678  # take no chances and rewrite it.
38679  # Note: m4 eats our [], so we need to use [ and ] instead.
38680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38681  if test "x$has_forbidden_chars" != x; then
38682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38684  fi
38685
38686    # Output is in $new_path
38687
38688  windows_path="$new_path"
38689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38690    unix_path=`$CYGPATH -u "$windows_path"`
38691    new_path="$unix_path"
38692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38694    new_path="$unix_path"
38695  fi
38696
38697    # remove trailing .exe if any
38698    new_path="${new_path/%.exe/}"
38699
38700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38702  fi
38703
38704    else
38705      # We're on a unix platform. Hooray! :)
38706      # First separate the path from the arguments. This will split at the first
38707      # space.
38708      complete="$OBJCOPY"
38709      path="${complete%% *}"
38710      tmp="$complete EOL"
38711      arguments="${tmp#* }"
38712
38713      # Cannot rely on the command "which" here since it doesn't always work.
38714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38715      if test -z "$is_absolute_path"; then
38716        # Path to executable is not absolute. Find it.
38717        IFS_save="$IFS"
38718        IFS=:
38719        for p in $PATH; do
38720          if test -f "$p/$path" && test -x "$p/$path"; then
38721            new_path="$p/$path"
38722            break
38723          fi
38724        done
38725        IFS="$IFS_save"
38726      else
38727        # This is an absolute path, we can use it without further modifications.
38728        new_path="$path"
38729      fi
38730
38731      if test "x$new_path" = x; then
38732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38733$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38734        has_space=`$ECHO "$complete" | $GREP " "`
38735        if test "x$has_space" != x; then
38736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38738        fi
38739        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38740      fi
38741    fi
38742
38743    # Now join together the path and the arguments once again
38744    if test "x$arguments" != xEOL; then
38745      new_complete="$new_path ${arguments% *}"
38746    else
38747      new_complete="$new_path"
38748    fi
38749
38750    if test "x$complete" != "x$new_complete"; then
38751      OBJCOPY="$new_complete"
38752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38753$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38754    fi
38755  fi
38756
38757      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38758        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38759        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38760        # - version number is last blank separate word on first line
38761        # - version number formats that have been seen:
38762        #   - <major>.<minor>
38763        #   - <major>.<minor>.<micro>
38764        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38765        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38766         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38767              -e 's/.* //' \
38768              -e '/^[01]\./b bad' \
38769              -e '/^2\./{' \
38770              -e '  s/^2\.//' \
38771              -e '  /^[0-9]$/b bad' \
38772              -e '  /^[0-9]\./b bad' \
38773              -e '  /^1[0-9]$/b bad' \
38774              -e '  /^1[0-9]\./b bad' \
38775              -e '  /^20\./b bad' \
38776              -e '  /^21\.0$/b bad' \
38777              -e '  /^21\.0\./b bad' \
38778              -e '}' \
38779              -e ':good' \
38780              -e 's/.*/VALID_VERSION/p' \
38781              -e 'q' \
38782              -e ':bad' \
38783              -e 's/.*/BAD_VERSION/p' \
38784              -e 'q'`
38785        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38786          OBJCOPY=
38787          { $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
38788$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38789          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38790$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38791          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38792$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38793          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38794$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38795          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38796$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38797        fi
38798      fi
38799    fi
38800  fi
38801
38802
38803
38804  # Publish this variable in the help.
38805
38806
38807  if test "x$OBJDUMP" = x; then
38808    # The variable is not set by user, try to locate tool using the code snippet
38809    if test -n "$ac_tool_prefix"; then
38810  for ac_prog in gobjdump objdump
38811  do
38812    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38813set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38815$as_echo_n "checking for $ac_word... " >&6; }
38816if ${ac_cv_prog_OBJDUMP+:} false; then :
38817  $as_echo_n "(cached) " >&6
38818else
38819  if test -n "$OBJDUMP"; then
38820  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38821else
38822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38823for as_dir in $PATH
38824do
38825  IFS=$as_save_IFS
38826  test -z "$as_dir" && as_dir=.
38827    for ac_exec_ext in '' $ac_executable_extensions; do
38828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38829    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38831    break 2
38832  fi
38833done
38834  done
38835IFS=$as_save_IFS
38836
38837fi
38838fi
38839OBJDUMP=$ac_cv_prog_OBJDUMP
38840if test -n "$OBJDUMP"; then
38841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38842$as_echo "$OBJDUMP" >&6; }
38843else
38844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38845$as_echo "no" >&6; }
38846fi
38847
38848
38849    test -n "$OBJDUMP" && break
38850  done
38851fi
38852if test -z "$OBJDUMP"; then
38853  ac_ct_OBJDUMP=$OBJDUMP
38854  for ac_prog in gobjdump objdump
38855do
38856  # Extract the first word of "$ac_prog", so it can be a program name with args.
38857set dummy $ac_prog; ac_word=$2
38858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38859$as_echo_n "checking for $ac_word... " >&6; }
38860if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38861  $as_echo_n "(cached) " >&6
38862else
38863  if test -n "$ac_ct_OBJDUMP"; then
38864  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38865else
38866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38867for as_dir in $PATH
38868do
38869  IFS=$as_save_IFS
38870  test -z "$as_dir" && as_dir=.
38871    for ac_exec_ext in '' $ac_executable_extensions; do
38872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38873    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38875    break 2
38876  fi
38877done
38878  done
38879IFS=$as_save_IFS
38880
38881fi
38882fi
38883ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38884if test -n "$ac_ct_OBJDUMP"; then
38885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38886$as_echo "$ac_ct_OBJDUMP" >&6; }
38887else
38888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38889$as_echo "no" >&6; }
38890fi
38891
38892
38893  test -n "$ac_ct_OBJDUMP" && break
38894done
38895
38896  if test "x$ac_ct_OBJDUMP" = x; then
38897    OBJDUMP=""
38898  else
38899    case $cross_compiling:$ac_tool_warned in
38900yes:)
38901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38903ac_tool_warned=yes ;;
38904esac
38905    OBJDUMP=$ac_ct_OBJDUMP
38906  fi
38907fi
38908
38909  else
38910    # The variable is set, but is it from the command line or the environment?
38911
38912    # Try to remove the string !OBJDUMP! from our list.
38913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38915      # If it failed, the variable was not from the command line. Ignore it,
38916      # but warn the user (except for BASH, which is always set by the calling BASH).
38917      if test "xOBJDUMP" != xBASH; then
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38919$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38920      fi
38921      # Try to locate tool using the code snippet
38922      if test -n "$ac_tool_prefix"; then
38923  for ac_prog in gobjdump objdump
38924  do
38925    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38926set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38928$as_echo_n "checking for $ac_word... " >&6; }
38929if ${ac_cv_prog_OBJDUMP+:} false; then :
38930  $as_echo_n "(cached) " >&6
38931else
38932  if test -n "$OBJDUMP"; then
38933  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38934else
38935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38936for as_dir in $PATH
38937do
38938  IFS=$as_save_IFS
38939  test -z "$as_dir" && as_dir=.
38940    for ac_exec_ext in '' $ac_executable_extensions; do
38941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38942    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38944    break 2
38945  fi
38946done
38947  done
38948IFS=$as_save_IFS
38949
38950fi
38951fi
38952OBJDUMP=$ac_cv_prog_OBJDUMP
38953if test -n "$OBJDUMP"; then
38954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38955$as_echo "$OBJDUMP" >&6; }
38956else
38957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38958$as_echo "no" >&6; }
38959fi
38960
38961
38962    test -n "$OBJDUMP" && break
38963  done
38964fi
38965if test -z "$OBJDUMP"; then
38966  ac_ct_OBJDUMP=$OBJDUMP
38967  for ac_prog in gobjdump objdump
38968do
38969  # Extract the first word of "$ac_prog", so it can be a program name with args.
38970set dummy $ac_prog; ac_word=$2
38971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38972$as_echo_n "checking for $ac_word... " >&6; }
38973if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38974  $as_echo_n "(cached) " >&6
38975else
38976  if test -n "$ac_ct_OBJDUMP"; then
38977  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38978else
38979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38980for as_dir in $PATH
38981do
38982  IFS=$as_save_IFS
38983  test -z "$as_dir" && as_dir=.
38984    for ac_exec_ext in '' $ac_executable_extensions; do
38985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38986    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38988    break 2
38989  fi
38990done
38991  done
38992IFS=$as_save_IFS
38993
38994fi
38995fi
38996ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38997if test -n "$ac_ct_OBJDUMP"; then
38998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38999$as_echo "$ac_ct_OBJDUMP" >&6; }
39000else
39001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39002$as_echo "no" >&6; }
39003fi
39004
39005
39006  test -n "$ac_ct_OBJDUMP" && break
39007done
39008
39009  if test "x$ac_ct_OBJDUMP" = x; then
39010    OBJDUMP=""
39011  else
39012    case $cross_compiling:$ac_tool_warned in
39013yes:)
39014{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39015$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39016ac_tool_warned=yes ;;
39017esac
39018    OBJDUMP=$ac_ct_OBJDUMP
39019  fi
39020fi
39021
39022    else
39023      # If it succeeded, then it was overridden by the user. We will use it
39024      # for the tool.
39025
39026      # First remove it from the list of overridden variables, so we can test
39027      # for unknown variables in the end.
39028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39029
39030      # Check if the provided tool contains a complete path.
39031      tool_specified="$OBJDUMP"
39032      tool_basename="${tool_specified##*/}"
39033      if test "x$tool_basename" = "x$tool_specified"; then
39034        # A command without a complete path is provided, search $PATH.
39035        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39036$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39037        # Extract the first word of "$tool_basename", so it can be a program name with args.
39038set dummy $tool_basename; ac_word=$2
39039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39040$as_echo_n "checking for $ac_word... " >&6; }
39041if ${ac_cv_path_OBJDUMP+:} false; then :
39042  $as_echo_n "(cached) " >&6
39043else
39044  case $OBJDUMP in
39045  [\\/]* | ?:[\\/]*)
39046  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39047  ;;
39048  *)
39049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39050for as_dir in $PATH
39051do
39052  IFS=$as_save_IFS
39053  test -z "$as_dir" && as_dir=.
39054    for ac_exec_ext in '' $ac_executable_extensions; do
39055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39056    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39058    break 2
39059  fi
39060done
39061  done
39062IFS=$as_save_IFS
39063
39064  ;;
39065esac
39066fi
39067OBJDUMP=$ac_cv_path_OBJDUMP
39068if test -n "$OBJDUMP"; then
39069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39070$as_echo "$OBJDUMP" >&6; }
39071else
39072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39073$as_echo "no" >&6; }
39074fi
39075
39076
39077        if test "x$OBJDUMP" = x; then
39078          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39079        fi
39080      else
39081        # Otherwise we believe it is a complete path. Use it as it is.
39082        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39083$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39085$as_echo_n "checking for OBJDUMP... " >&6; }
39086        if test ! -x "$tool_specified"; then
39087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39088$as_echo "not found" >&6; }
39089          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39090        fi
39091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39092$as_echo "$tool_specified" >&6; }
39093      fi
39094    fi
39095  fi
39096
39097
39098  if test "x$OBJDUMP" != x; then
39099    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39100    # bails if argument is missing.
39101
39102  # Only process if variable expands to non-empty
39103
39104  if test "x$OBJDUMP" != x; then
39105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39106
39107  # First separate the path from the arguments. This will split at the first
39108  # space.
39109  complete="$OBJDUMP"
39110  path="${complete%% *}"
39111  tmp="$complete EOL"
39112  arguments="${tmp#* }"
39113
39114  # Input might be given as Windows format, start by converting to
39115  # unix format.
39116  new_path=`$CYGPATH -u "$path"`
39117
39118  # Now try to locate executable using which
39119  new_path=`$WHICH "$new_path" 2> /dev/null`
39120  # bat and cmd files are not always considered executable in cygwin causing which
39121  # to not find them
39122  if test "x$new_path" = x \
39123      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39124      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39125    new_path=`$CYGPATH -u "$path"`
39126  fi
39127  if test "x$new_path" = x; then
39128    # Oops. Which didn't find the executable.
39129    # The splitting of arguments from the executable at a space might have been incorrect,
39130    # since paths with space are more likely in Windows. Give it another try with the whole
39131    # argument.
39132    path="$complete"
39133    arguments="EOL"
39134    new_path=`$CYGPATH -u "$path"`
39135    new_path=`$WHICH "$new_path" 2> /dev/null`
39136    # bat and cmd files are not always considered executable in cygwin causing which
39137    # to not find them
39138    if test "x$new_path" = x \
39139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39141      new_path=`$CYGPATH -u "$path"`
39142    fi
39143    if test "x$new_path" = x; then
39144      # It's still not found. Now this is an unrecoverable error.
39145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39146$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39147      has_space=`$ECHO "$complete" | $GREP " "`
39148      if test "x$has_space" != x; then
39149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39151      fi
39152      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39153    fi
39154  fi
39155
39156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39159  # "foo.exe" is OK but "foo" is an error.
39160  #
39161  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39162  # It is also a way to make sure we got the proper file name for the real test later on.
39163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39164  if test "x$test_shortpath" = x; then
39165    # Short path failed, file does not exist as specified.
39166    # Try adding .exe or .cmd
39167    if test -f "${new_path}.exe"; then
39168      input_to_shortpath="${new_path}.exe"
39169    elif test -f "${new_path}.cmd"; then
39170      input_to_shortpath="${new_path}.cmd"
39171    else
39172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39173$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39174      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39175$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39176      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39177    fi
39178  else
39179    input_to_shortpath="$new_path"
39180  fi
39181
39182  # Call helper function which possibly converts this using DOS-style short mode.
39183  # If so, the updated path is stored in $new_path.
39184  new_path="$input_to_shortpath"
39185
39186  input_path="$input_to_shortpath"
39187  # Check if we need to convert this using DOS-style short mode. If the path
39188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39189  # take no chances and rewrite it.
39190  # Note: m4 eats our [], so we need to use [ and ] instead.
39191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39192  if test "x$has_forbidden_chars" != x; then
39193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39197      # Going to short mode and back again did indeed matter. Since short mode is
39198      # case insensitive, let's make it lowercase to improve readability.
39199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39200      # Now convert it back to Unix-style (cygpath)
39201      input_path=`$CYGPATH -u "$shortmode_path"`
39202      new_path="$input_path"
39203    fi
39204  fi
39205
39206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39207  if test "x$test_cygdrive_prefix" = x; then
39208    # As a simple fix, exclude /usr/bin since it's not a real path.
39209    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39211      # a path prefixed by /cygdrive for fixpath to work.
39212      new_path="$CYGWIN_ROOT_PATH$input_path"
39213    fi
39214  fi
39215
39216  # remove trailing .exe if any
39217  new_path="${new_path/%.exe/}"
39218
39219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39220
39221  # First separate the path from the arguments. This will split at the first
39222  # space.
39223  complete="$OBJDUMP"
39224  path="${complete%% *}"
39225  tmp="$complete EOL"
39226  arguments="${tmp#* }"
39227
39228  # Input might be given as Windows format, start by converting to
39229  # unix format.
39230  new_path="$path"
39231
39232  windows_path="$new_path"
39233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39234    unix_path=`$CYGPATH -u "$windows_path"`
39235    new_path="$unix_path"
39236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39238    new_path="$unix_path"
39239  fi
39240
39241
39242  # Now try to locate executable using which
39243  new_path=`$WHICH "$new_path" 2> /dev/null`
39244
39245  if test "x$new_path" = x; then
39246    # Oops. Which didn't find the executable.
39247    # The splitting of arguments from the executable at a space might have been incorrect,
39248    # since paths with space are more likely in Windows. Give it another try with the whole
39249    # argument.
39250    path="$complete"
39251    arguments="EOL"
39252    new_path="$path"
39253
39254  windows_path="$new_path"
39255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39256    unix_path=`$CYGPATH -u "$windows_path"`
39257    new_path="$unix_path"
39258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39260    new_path="$unix_path"
39261  fi
39262
39263
39264    new_path=`$WHICH "$new_path" 2> /dev/null`
39265    # bat and cmd files are not always considered executable in MSYS causing which
39266    # to not find them
39267    if test "x$new_path" = x \
39268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39270      new_path="$path"
39271
39272  windows_path="$new_path"
39273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39274    unix_path=`$CYGPATH -u "$windows_path"`
39275    new_path="$unix_path"
39276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39278    new_path="$unix_path"
39279  fi
39280
39281    fi
39282
39283    if test "x$new_path" = x; then
39284      # It's still not found. Now this is an unrecoverable error.
39285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39286$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39287      has_space=`$ECHO "$complete" | $GREP " "`
39288      if test "x$has_space" != x; then
39289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39291      fi
39292      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39293    fi
39294  fi
39295
39296  # Now new_path has a complete unix path to the binary
39297  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39298    # Keep paths in /bin as-is, but remove trailing .exe if any
39299    new_path="${new_path/%.exe/}"
39300    # Do not save /bin paths to all_fixpath_prefixes!
39301  else
39302    # Not in mixed or Windows style, start by that.
39303    new_path=`cmd //c echo $new_path`
39304
39305  input_path="$new_path"
39306  # Check if we need to convert this using DOS-style short mode. If the path
39307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39308  # take no chances and rewrite it.
39309  # Note: m4 eats our [], so we need to use [ and ] instead.
39310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39311  if test "x$has_forbidden_chars" != x; then
39312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39314  fi
39315
39316    # Output is in $new_path
39317
39318  windows_path="$new_path"
39319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39320    unix_path=`$CYGPATH -u "$windows_path"`
39321    new_path="$unix_path"
39322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39324    new_path="$unix_path"
39325  fi
39326
39327    # remove trailing .exe if any
39328    new_path="${new_path/%.exe/}"
39329
39330    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39331    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39332  fi
39333
39334    else
39335      # We're on a unix platform. Hooray! :)
39336      # First separate the path from the arguments. This will split at the first
39337      # space.
39338      complete="$OBJDUMP"
39339      path="${complete%% *}"
39340      tmp="$complete EOL"
39341      arguments="${tmp#* }"
39342
39343      # Cannot rely on the command "which" here since it doesn't always work.
39344      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39345      if test -z "$is_absolute_path"; then
39346        # Path to executable is not absolute. Find it.
39347        IFS_save="$IFS"
39348        IFS=:
39349        for p in $PATH; do
39350          if test -f "$p/$path" && test -x "$p/$path"; then
39351            new_path="$p/$path"
39352            break
39353          fi
39354        done
39355        IFS="$IFS_save"
39356      else
39357        # This is an absolute path, we can use it without further modifications.
39358        new_path="$path"
39359      fi
39360
39361      if test "x$new_path" = x; then
39362        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39363$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39364        has_space=`$ECHO "$complete" | $GREP " "`
39365        if test "x$has_space" != x; then
39366          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39367$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39368        fi
39369        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39370      fi
39371    fi
39372
39373    # Now join together the path and the arguments once again
39374    if test "x$arguments" != xEOL; then
39375      new_complete="$new_path ${arguments% *}"
39376    else
39377      new_complete="$new_path"
39378    fi
39379
39380    if test "x$complete" != "x$new_complete"; then
39381      OBJDUMP="$new_complete"
39382      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39383$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39384    fi
39385  fi
39386
39387  fi
39388
39389
39390  # Restore old path.
39391  PATH="$OLD_PATH"
39392
39393  # Restore the flags to the user specified values.
39394  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39395  CFLAGS="$ORG_CFLAGS"
39396  CXXFLAGS="$ORG_CXXFLAGS"
39397
39398
39399# Finally do some processing after the detection phase
39400
39401  if test "x$COMPILE_TYPE" = "xcross"; then
39402    # Now we need to find a C/C++ compiler that can build executables for the
39403    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39404    # used once. Also, we need to do this without adding a tools dir to the
39405    # path, otherwise we might pick up cross-compilers which don't use standard
39406    # naming.
39407
39408    # FIXME: we should list the discovered compilers as an exclude pattern!
39409    # If we do that, we can do this detection before POST_DETECTION, and still
39410    # find the build compilers in the tools dir, if needed.
39411
39412
39413  # Publish this variable in the help.
39414
39415
39416  if test "x$BUILD_CC" = x; then
39417    # The variable is not set by user, try to locate tool using the code snippet
39418    for ac_prog in cl cc gcc
39419do
39420  # Extract the first word of "$ac_prog", so it can be a program name with args.
39421set dummy $ac_prog; ac_word=$2
39422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39423$as_echo_n "checking for $ac_word... " >&6; }
39424if ${ac_cv_path_BUILD_CC+:} false; then :
39425  $as_echo_n "(cached) " >&6
39426else
39427  case $BUILD_CC in
39428  [\\/]* | ?:[\\/]*)
39429  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39430  ;;
39431  *)
39432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39433for as_dir in $PATH
39434do
39435  IFS=$as_save_IFS
39436  test -z "$as_dir" && as_dir=.
39437    for ac_exec_ext in '' $ac_executable_extensions; do
39438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39439    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39441    break 2
39442  fi
39443done
39444  done
39445IFS=$as_save_IFS
39446
39447  ;;
39448esac
39449fi
39450BUILD_CC=$ac_cv_path_BUILD_CC
39451if test -n "$BUILD_CC"; then
39452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39453$as_echo "$BUILD_CC" >&6; }
39454else
39455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39456$as_echo "no" >&6; }
39457fi
39458
39459
39460  test -n "$BUILD_CC" && break
39461done
39462
39463  else
39464    # The variable is set, but is it from the command line or the environment?
39465
39466    # Try to remove the string !BUILD_CC! from our list.
39467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39469      # If it failed, the variable was not from the command line. Ignore it,
39470      # but warn the user (except for BASH, which is always set by the calling BASH).
39471      if test "xBUILD_CC" != xBASH; then
39472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39473$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39474      fi
39475      # Try to locate tool using the code snippet
39476      for ac_prog in cl cc gcc
39477do
39478  # Extract the first word of "$ac_prog", so it can be a program name with args.
39479set dummy $ac_prog; ac_word=$2
39480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39481$as_echo_n "checking for $ac_word... " >&6; }
39482if ${ac_cv_path_BUILD_CC+:} false; then :
39483  $as_echo_n "(cached) " >&6
39484else
39485  case $BUILD_CC in
39486  [\\/]* | ?:[\\/]*)
39487  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39488  ;;
39489  *)
39490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39491for as_dir in $PATH
39492do
39493  IFS=$as_save_IFS
39494  test -z "$as_dir" && as_dir=.
39495    for ac_exec_ext in '' $ac_executable_extensions; do
39496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39497    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39499    break 2
39500  fi
39501done
39502  done
39503IFS=$as_save_IFS
39504
39505  ;;
39506esac
39507fi
39508BUILD_CC=$ac_cv_path_BUILD_CC
39509if test -n "$BUILD_CC"; then
39510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39511$as_echo "$BUILD_CC" >&6; }
39512else
39513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39514$as_echo "no" >&6; }
39515fi
39516
39517
39518  test -n "$BUILD_CC" && break
39519done
39520
39521    else
39522      # If it succeeded, then it was overridden by the user. We will use it
39523      # for the tool.
39524
39525      # First remove it from the list of overridden variables, so we can test
39526      # for unknown variables in the end.
39527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39528
39529      # Check if the provided tool contains a complete path.
39530      tool_specified="$BUILD_CC"
39531      tool_basename="${tool_specified##*/}"
39532      if test "x$tool_basename" = "x$tool_specified"; then
39533        # A command without a complete path is provided, search $PATH.
39534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39535$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39536        # Extract the first word of "$tool_basename", so it can be a program name with args.
39537set dummy $tool_basename; ac_word=$2
39538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39539$as_echo_n "checking for $ac_word... " >&6; }
39540if ${ac_cv_path_BUILD_CC+:} false; then :
39541  $as_echo_n "(cached) " >&6
39542else
39543  case $BUILD_CC in
39544  [\\/]* | ?:[\\/]*)
39545  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39546  ;;
39547  *)
39548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39549for as_dir in $PATH
39550do
39551  IFS=$as_save_IFS
39552  test -z "$as_dir" && as_dir=.
39553    for ac_exec_ext in '' $ac_executable_extensions; do
39554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39555    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39557    break 2
39558  fi
39559done
39560  done
39561IFS=$as_save_IFS
39562
39563  ;;
39564esac
39565fi
39566BUILD_CC=$ac_cv_path_BUILD_CC
39567if test -n "$BUILD_CC"; then
39568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39569$as_echo "$BUILD_CC" >&6; }
39570else
39571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39572$as_echo "no" >&6; }
39573fi
39574
39575
39576        if test "x$BUILD_CC" = x; then
39577          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39578        fi
39579      else
39580        # Otherwise we believe it is a complete path. Use it as it is.
39581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39582$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39584$as_echo_n "checking for BUILD_CC... " >&6; }
39585        if test ! -x "$tool_specified"; then
39586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39587$as_echo "not found" >&6; }
39588          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39589        fi
39590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39591$as_echo "$tool_specified" >&6; }
39592      fi
39593    fi
39594  fi
39595
39596
39597
39598  # Only process if variable expands to non-empty
39599
39600  if test "x$BUILD_CC" != x; then
39601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39602
39603  # First separate the path from the arguments. This will split at the first
39604  # space.
39605  complete="$BUILD_CC"
39606  path="${complete%% *}"
39607  tmp="$complete EOL"
39608  arguments="${tmp#* }"
39609
39610  # Input might be given as Windows format, start by converting to
39611  # unix format.
39612  new_path=`$CYGPATH -u "$path"`
39613
39614  # Now try to locate executable using which
39615  new_path=`$WHICH "$new_path" 2> /dev/null`
39616  # bat and cmd files are not always considered executable in cygwin causing which
39617  # to not find them
39618  if test "x$new_path" = x \
39619      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39620      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39621    new_path=`$CYGPATH -u "$path"`
39622  fi
39623  if test "x$new_path" = x; then
39624    # Oops. Which didn't find the executable.
39625    # The splitting of arguments from the executable at a space might have been incorrect,
39626    # since paths with space are more likely in Windows. Give it another try with the whole
39627    # argument.
39628    path="$complete"
39629    arguments="EOL"
39630    new_path=`$CYGPATH -u "$path"`
39631    new_path=`$WHICH "$new_path" 2> /dev/null`
39632    # bat and cmd files are not always considered executable in cygwin causing which
39633    # to not find them
39634    if test "x$new_path" = x \
39635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39637      new_path=`$CYGPATH -u "$path"`
39638    fi
39639    if test "x$new_path" = x; then
39640      # It's still not found. Now this is an unrecoverable error.
39641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39642$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39643      has_space=`$ECHO "$complete" | $GREP " "`
39644      if test "x$has_space" != x; then
39645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39647      fi
39648      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39649    fi
39650  fi
39651
39652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39655  # "foo.exe" is OK but "foo" is an error.
39656  #
39657  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39658  # It is also a way to make sure we got the proper file name for the real test later on.
39659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39660  if test "x$test_shortpath" = x; then
39661    # Short path failed, file does not exist as specified.
39662    # Try adding .exe or .cmd
39663    if test -f "${new_path}.exe"; then
39664      input_to_shortpath="${new_path}.exe"
39665    elif test -f "${new_path}.cmd"; then
39666      input_to_shortpath="${new_path}.cmd"
39667    else
39668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39669$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39670      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39671$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39672      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39673    fi
39674  else
39675    input_to_shortpath="$new_path"
39676  fi
39677
39678  # Call helper function which possibly converts this using DOS-style short mode.
39679  # If so, the updated path is stored in $new_path.
39680  new_path="$input_to_shortpath"
39681
39682  input_path="$input_to_shortpath"
39683  # Check if we need to convert this using DOS-style short mode. If the path
39684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39685  # take no chances and rewrite it.
39686  # Note: m4 eats our [], so we need to use [ and ] instead.
39687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39688  if test "x$has_forbidden_chars" != x; then
39689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39693      # Going to short mode and back again did indeed matter. Since short mode is
39694      # case insensitive, let's make it lowercase to improve readability.
39695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39696      # Now convert it back to Unix-style (cygpath)
39697      input_path=`$CYGPATH -u "$shortmode_path"`
39698      new_path="$input_path"
39699    fi
39700  fi
39701
39702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39703  if test "x$test_cygdrive_prefix" = x; then
39704    # As a simple fix, exclude /usr/bin since it's not a real path.
39705    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39707      # a path prefixed by /cygdrive for fixpath to work.
39708      new_path="$CYGWIN_ROOT_PATH$input_path"
39709    fi
39710  fi
39711
39712  # remove trailing .exe if any
39713  new_path="${new_path/%.exe/}"
39714
39715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39716
39717  # First separate the path from the arguments. This will split at the first
39718  # space.
39719  complete="$BUILD_CC"
39720  path="${complete%% *}"
39721  tmp="$complete EOL"
39722  arguments="${tmp#* }"
39723
39724  # Input might be given as Windows format, start by converting to
39725  # unix format.
39726  new_path="$path"
39727
39728  windows_path="$new_path"
39729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39730    unix_path=`$CYGPATH -u "$windows_path"`
39731    new_path="$unix_path"
39732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39734    new_path="$unix_path"
39735  fi
39736
39737
39738  # Now try to locate executable using which
39739  new_path=`$WHICH "$new_path" 2> /dev/null`
39740
39741  if test "x$new_path" = x; then
39742    # Oops. Which didn't find the executable.
39743    # The splitting of arguments from the executable at a space might have been incorrect,
39744    # since paths with space are more likely in Windows. Give it another try with the whole
39745    # argument.
39746    path="$complete"
39747    arguments="EOL"
39748    new_path="$path"
39749
39750  windows_path="$new_path"
39751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752    unix_path=`$CYGPATH -u "$windows_path"`
39753    new_path="$unix_path"
39754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39756    new_path="$unix_path"
39757  fi
39758
39759
39760    new_path=`$WHICH "$new_path" 2> /dev/null`
39761    # bat and cmd files are not always considered executable in MSYS causing which
39762    # to not find them
39763    if test "x$new_path" = x \
39764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39766      new_path="$path"
39767
39768  windows_path="$new_path"
39769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39770    unix_path=`$CYGPATH -u "$windows_path"`
39771    new_path="$unix_path"
39772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39774    new_path="$unix_path"
39775  fi
39776
39777    fi
39778
39779    if test "x$new_path" = x; then
39780      # It's still not found. Now this is an unrecoverable error.
39781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39782$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39783      has_space=`$ECHO "$complete" | $GREP " "`
39784      if test "x$has_space" != x; then
39785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39787      fi
39788      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39789    fi
39790  fi
39791
39792  # Now new_path has a complete unix path to the binary
39793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39794    # Keep paths in /bin as-is, but remove trailing .exe if any
39795    new_path="${new_path/%.exe/}"
39796    # Do not save /bin paths to all_fixpath_prefixes!
39797  else
39798    # Not in mixed or Windows style, start by that.
39799    new_path=`cmd //c echo $new_path`
39800
39801  input_path="$new_path"
39802  # Check if we need to convert this using DOS-style short mode. If the path
39803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39804  # take no chances and rewrite it.
39805  # Note: m4 eats our [], so we need to use [ and ] instead.
39806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39807  if test "x$has_forbidden_chars" != x; then
39808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39810  fi
39811
39812    # Output is in $new_path
39813
39814  windows_path="$new_path"
39815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39816    unix_path=`$CYGPATH -u "$windows_path"`
39817    new_path="$unix_path"
39818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39820    new_path="$unix_path"
39821  fi
39822
39823    # remove trailing .exe if any
39824    new_path="${new_path/%.exe/}"
39825
39826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39828  fi
39829
39830    else
39831      # We're on a unix platform. Hooray! :)
39832      # First separate the path from the arguments. This will split at the first
39833      # space.
39834      complete="$BUILD_CC"
39835      path="${complete%% *}"
39836      tmp="$complete EOL"
39837      arguments="${tmp#* }"
39838
39839      # Cannot rely on the command "which" here since it doesn't always work.
39840      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39841      if test -z "$is_absolute_path"; then
39842        # Path to executable is not absolute. Find it.
39843        IFS_save="$IFS"
39844        IFS=:
39845        for p in $PATH; do
39846          if test -f "$p/$path" && test -x "$p/$path"; then
39847            new_path="$p/$path"
39848            break
39849          fi
39850        done
39851        IFS="$IFS_save"
39852      else
39853        # This is an absolute path, we can use it without further modifications.
39854        new_path="$path"
39855      fi
39856
39857      if test "x$new_path" = x; then
39858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39859$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39860        has_space=`$ECHO "$complete" | $GREP " "`
39861        if test "x$has_space" != x; then
39862          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39864        fi
39865        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39866      fi
39867    fi
39868
39869    # Now join together the path and the arguments once again
39870    if test "x$arguments" != xEOL; then
39871      new_complete="$new_path ${arguments% *}"
39872    else
39873      new_complete="$new_path"
39874    fi
39875
39876    if test "x$complete" != "x$new_complete"; then
39877      BUILD_CC="$new_complete"
39878      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39879$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39880    fi
39881  fi
39882
39883
39884
39885  # Publish this variable in the help.
39886
39887
39888  if test "x$BUILD_CXX" = x; then
39889    # The variable is not set by user, try to locate tool using the code snippet
39890    for ac_prog in cl CC g++
39891do
39892  # Extract the first word of "$ac_prog", so it can be a program name with args.
39893set dummy $ac_prog; ac_word=$2
39894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39895$as_echo_n "checking for $ac_word... " >&6; }
39896if ${ac_cv_path_BUILD_CXX+:} false; then :
39897  $as_echo_n "(cached) " >&6
39898else
39899  case $BUILD_CXX in
39900  [\\/]* | ?:[\\/]*)
39901  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39902  ;;
39903  *)
39904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39905for as_dir in $PATH
39906do
39907  IFS=$as_save_IFS
39908  test -z "$as_dir" && as_dir=.
39909    for ac_exec_ext in '' $ac_executable_extensions; do
39910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39911    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39913    break 2
39914  fi
39915done
39916  done
39917IFS=$as_save_IFS
39918
39919  ;;
39920esac
39921fi
39922BUILD_CXX=$ac_cv_path_BUILD_CXX
39923if test -n "$BUILD_CXX"; then
39924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39925$as_echo "$BUILD_CXX" >&6; }
39926else
39927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39928$as_echo "no" >&6; }
39929fi
39930
39931
39932  test -n "$BUILD_CXX" && break
39933done
39934
39935  else
39936    # The variable is set, but is it from the command line or the environment?
39937
39938    # Try to remove the string !BUILD_CXX! from our list.
39939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39941      # If it failed, the variable was not from the command line. Ignore it,
39942      # but warn the user (except for BASH, which is always set by the calling BASH).
39943      if test "xBUILD_CXX" != xBASH; then
39944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39945$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39946      fi
39947      # Try to locate tool using the code snippet
39948      for ac_prog in cl CC g++
39949do
39950  # Extract the first word of "$ac_prog", so it can be a program name with args.
39951set dummy $ac_prog; ac_word=$2
39952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39953$as_echo_n "checking for $ac_word... " >&6; }
39954if ${ac_cv_path_BUILD_CXX+:} false; then :
39955  $as_echo_n "(cached) " >&6
39956else
39957  case $BUILD_CXX in
39958  [\\/]* | ?:[\\/]*)
39959  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39960  ;;
39961  *)
39962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39963for as_dir in $PATH
39964do
39965  IFS=$as_save_IFS
39966  test -z "$as_dir" && as_dir=.
39967    for ac_exec_ext in '' $ac_executable_extensions; do
39968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39969    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39971    break 2
39972  fi
39973done
39974  done
39975IFS=$as_save_IFS
39976
39977  ;;
39978esac
39979fi
39980BUILD_CXX=$ac_cv_path_BUILD_CXX
39981if test -n "$BUILD_CXX"; then
39982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39983$as_echo "$BUILD_CXX" >&6; }
39984else
39985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39986$as_echo "no" >&6; }
39987fi
39988
39989
39990  test -n "$BUILD_CXX" && break
39991done
39992
39993    else
39994      # If it succeeded, then it was overridden by the user. We will use it
39995      # for the tool.
39996
39997      # First remove it from the list of overridden variables, so we can test
39998      # for unknown variables in the end.
39999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40000
40001      # Check if the provided tool contains a complete path.
40002      tool_specified="$BUILD_CXX"
40003      tool_basename="${tool_specified##*/}"
40004      if test "x$tool_basename" = "x$tool_specified"; then
40005        # A command without a complete path is provided, search $PATH.
40006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40007$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40008        # Extract the first word of "$tool_basename", so it can be a program name with args.
40009set dummy $tool_basename; ac_word=$2
40010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40011$as_echo_n "checking for $ac_word... " >&6; }
40012if ${ac_cv_path_BUILD_CXX+:} false; then :
40013  $as_echo_n "(cached) " >&6
40014else
40015  case $BUILD_CXX in
40016  [\\/]* | ?:[\\/]*)
40017  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40018  ;;
40019  *)
40020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40021for as_dir in $PATH
40022do
40023  IFS=$as_save_IFS
40024  test -z "$as_dir" && as_dir=.
40025    for ac_exec_ext in '' $ac_executable_extensions; do
40026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40027    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40029    break 2
40030  fi
40031done
40032  done
40033IFS=$as_save_IFS
40034
40035  ;;
40036esac
40037fi
40038BUILD_CXX=$ac_cv_path_BUILD_CXX
40039if test -n "$BUILD_CXX"; then
40040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40041$as_echo "$BUILD_CXX" >&6; }
40042else
40043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40044$as_echo "no" >&6; }
40045fi
40046
40047
40048        if test "x$BUILD_CXX" = x; then
40049          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40050        fi
40051      else
40052        # Otherwise we believe it is a complete path. Use it as it is.
40053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40054$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40056$as_echo_n "checking for BUILD_CXX... " >&6; }
40057        if test ! -x "$tool_specified"; then
40058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40059$as_echo "not found" >&6; }
40060          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40061        fi
40062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40063$as_echo "$tool_specified" >&6; }
40064      fi
40065    fi
40066  fi
40067
40068
40069
40070  # Only process if variable expands to non-empty
40071
40072  if test "x$BUILD_CXX" != x; then
40073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40074
40075  # First separate the path from the arguments. This will split at the first
40076  # space.
40077  complete="$BUILD_CXX"
40078  path="${complete%% *}"
40079  tmp="$complete EOL"
40080  arguments="${tmp#* }"
40081
40082  # Input might be given as Windows format, start by converting to
40083  # unix format.
40084  new_path=`$CYGPATH -u "$path"`
40085
40086  # Now try to locate executable using which
40087  new_path=`$WHICH "$new_path" 2> /dev/null`
40088  # bat and cmd files are not always considered executable in cygwin causing which
40089  # to not find them
40090  if test "x$new_path" = x \
40091      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40092      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40093    new_path=`$CYGPATH -u "$path"`
40094  fi
40095  if test "x$new_path" = x; then
40096    # Oops. Which didn't find the executable.
40097    # The splitting of arguments from the executable at a space might have been incorrect,
40098    # since paths with space are more likely in Windows. Give it another try with the whole
40099    # argument.
40100    path="$complete"
40101    arguments="EOL"
40102    new_path=`$CYGPATH -u "$path"`
40103    new_path=`$WHICH "$new_path" 2> /dev/null`
40104    # bat and cmd files are not always considered executable in cygwin causing which
40105    # to not find them
40106    if test "x$new_path" = x \
40107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40109      new_path=`$CYGPATH -u "$path"`
40110    fi
40111    if test "x$new_path" = x; then
40112      # It's still not found. Now this is an unrecoverable error.
40113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40114$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40115      has_space=`$ECHO "$complete" | $GREP " "`
40116      if test "x$has_space" != x; then
40117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40119      fi
40120      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40121    fi
40122  fi
40123
40124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40127  # "foo.exe" is OK but "foo" is an error.
40128  #
40129  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40130  # It is also a way to make sure we got the proper file name for the real test later on.
40131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40132  if test "x$test_shortpath" = x; then
40133    # Short path failed, file does not exist as specified.
40134    # Try adding .exe or .cmd
40135    if test -f "${new_path}.exe"; then
40136      input_to_shortpath="${new_path}.exe"
40137    elif test -f "${new_path}.cmd"; then
40138      input_to_shortpath="${new_path}.cmd"
40139    else
40140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40141$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40142      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40143$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40144      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40145    fi
40146  else
40147    input_to_shortpath="$new_path"
40148  fi
40149
40150  # Call helper function which possibly converts this using DOS-style short mode.
40151  # If so, the updated path is stored in $new_path.
40152  new_path="$input_to_shortpath"
40153
40154  input_path="$input_to_shortpath"
40155  # Check if we need to convert this using DOS-style short mode. If the path
40156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40157  # take no chances and rewrite it.
40158  # Note: m4 eats our [], so we need to use [ and ] instead.
40159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40160  if test "x$has_forbidden_chars" != x; then
40161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40165      # Going to short mode and back again did indeed matter. Since short mode is
40166      # case insensitive, let's make it lowercase to improve readability.
40167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40168      # Now convert it back to Unix-style (cygpath)
40169      input_path=`$CYGPATH -u "$shortmode_path"`
40170      new_path="$input_path"
40171    fi
40172  fi
40173
40174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40175  if test "x$test_cygdrive_prefix" = x; then
40176    # As a simple fix, exclude /usr/bin since it's not a real path.
40177    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40179      # a path prefixed by /cygdrive for fixpath to work.
40180      new_path="$CYGWIN_ROOT_PATH$input_path"
40181    fi
40182  fi
40183
40184  # remove trailing .exe if any
40185  new_path="${new_path/%.exe/}"
40186
40187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40188
40189  # First separate the path from the arguments. This will split at the first
40190  # space.
40191  complete="$BUILD_CXX"
40192  path="${complete%% *}"
40193  tmp="$complete EOL"
40194  arguments="${tmp#* }"
40195
40196  # Input might be given as Windows format, start by converting to
40197  # unix format.
40198  new_path="$path"
40199
40200  windows_path="$new_path"
40201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40202    unix_path=`$CYGPATH -u "$windows_path"`
40203    new_path="$unix_path"
40204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40206    new_path="$unix_path"
40207  fi
40208
40209
40210  # Now try to locate executable using which
40211  new_path=`$WHICH "$new_path" 2> /dev/null`
40212
40213  if test "x$new_path" = x; then
40214    # Oops. Which didn't find the executable.
40215    # The splitting of arguments from the executable at a space might have been incorrect,
40216    # since paths with space are more likely in Windows. Give it another try with the whole
40217    # argument.
40218    path="$complete"
40219    arguments="EOL"
40220    new_path="$path"
40221
40222  windows_path="$new_path"
40223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40224    unix_path=`$CYGPATH -u "$windows_path"`
40225    new_path="$unix_path"
40226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40228    new_path="$unix_path"
40229  fi
40230
40231
40232    new_path=`$WHICH "$new_path" 2> /dev/null`
40233    # bat and cmd files are not always considered executable in MSYS causing which
40234    # to not find them
40235    if test "x$new_path" = x \
40236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40238      new_path="$path"
40239
40240  windows_path="$new_path"
40241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40242    unix_path=`$CYGPATH -u "$windows_path"`
40243    new_path="$unix_path"
40244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40246    new_path="$unix_path"
40247  fi
40248
40249    fi
40250
40251    if test "x$new_path" = x; then
40252      # It's still not found. Now this is an unrecoverable error.
40253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40254$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40255      has_space=`$ECHO "$complete" | $GREP " "`
40256      if test "x$has_space" != x; then
40257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40259      fi
40260      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40261    fi
40262  fi
40263
40264  # Now new_path has a complete unix path to the binary
40265  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40266    # Keep paths in /bin as-is, but remove trailing .exe if any
40267    new_path="${new_path/%.exe/}"
40268    # Do not save /bin paths to all_fixpath_prefixes!
40269  else
40270    # Not in mixed or Windows style, start by that.
40271    new_path=`cmd //c echo $new_path`
40272
40273  input_path="$new_path"
40274  # Check if we need to convert this using DOS-style short mode. If the path
40275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40276  # take no chances and rewrite it.
40277  # Note: m4 eats our [], so we need to use [ and ] instead.
40278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40279  if test "x$has_forbidden_chars" != x; then
40280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40282  fi
40283
40284    # Output is in $new_path
40285
40286  windows_path="$new_path"
40287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40288    unix_path=`$CYGPATH -u "$windows_path"`
40289    new_path="$unix_path"
40290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40292    new_path="$unix_path"
40293  fi
40294
40295    # remove trailing .exe if any
40296    new_path="${new_path/%.exe/}"
40297
40298    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40299    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40300  fi
40301
40302    else
40303      # We're on a unix platform. Hooray! :)
40304      # First separate the path from the arguments. This will split at the first
40305      # space.
40306      complete="$BUILD_CXX"
40307      path="${complete%% *}"
40308      tmp="$complete EOL"
40309      arguments="${tmp#* }"
40310
40311      # Cannot rely on the command "which" here since it doesn't always work.
40312      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40313      if test -z "$is_absolute_path"; then
40314        # Path to executable is not absolute. Find it.
40315        IFS_save="$IFS"
40316        IFS=:
40317        for p in $PATH; do
40318          if test -f "$p/$path" && test -x "$p/$path"; then
40319            new_path="$p/$path"
40320            break
40321          fi
40322        done
40323        IFS="$IFS_save"
40324      else
40325        # This is an absolute path, we can use it without further modifications.
40326        new_path="$path"
40327      fi
40328
40329      if test "x$new_path" = x; then
40330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40331$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40332        has_space=`$ECHO "$complete" | $GREP " "`
40333        if test "x$has_space" != x; then
40334          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40336        fi
40337        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40338      fi
40339    fi
40340
40341    # Now join together the path and the arguments once again
40342    if test "x$arguments" != xEOL; then
40343      new_complete="$new_path ${arguments% *}"
40344    else
40345      new_complete="$new_path"
40346    fi
40347
40348    if test "x$complete" != "x$new_complete"; then
40349      BUILD_CXX="$new_complete"
40350      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40351$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40352    fi
40353  fi
40354
40355
40356
40357  # Publish this variable in the help.
40358
40359
40360  if test "x$BUILD_LD" = x; then
40361    # The variable is not set by user, try to locate tool using the code snippet
40362    for ac_prog in ld
40363do
40364  # Extract the first word of "$ac_prog", so it can be a program name with args.
40365set dummy $ac_prog; ac_word=$2
40366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40367$as_echo_n "checking for $ac_word... " >&6; }
40368if ${ac_cv_path_BUILD_LD+:} false; then :
40369  $as_echo_n "(cached) " >&6
40370else
40371  case $BUILD_LD in
40372  [\\/]* | ?:[\\/]*)
40373  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40374  ;;
40375  *)
40376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40377for as_dir in $PATH
40378do
40379  IFS=$as_save_IFS
40380  test -z "$as_dir" && as_dir=.
40381    for ac_exec_ext in '' $ac_executable_extensions; do
40382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40383    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40385    break 2
40386  fi
40387done
40388  done
40389IFS=$as_save_IFS
40390
40391  ;;
40392esac
40393fi
40394BUILD_LD=$ac_cv_path_BUILD_LD
40395if test -n "$BUILD_LD"; then
40396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40397$as_echo "$BUILD_LD" >&6; }
40398else
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40400$as_echo "no" >&6; }
40401fi
40402
40403
40404  test -n "$BUILD_LD" && break
40405done
40406
40407  else
40408    # The variable is set, but is it from the command line or the environment?
40409
40410    # Try to remove the string !BUILD_LD! from our list.
40411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40413      # If it failed, the variable was not from the command line. Ignore it,
40414      # but warn the user (except for BASH, which is always set by the calling BASH).
40415      if test "xBUILD_LD" != xBASH; then
40416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40417$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40418      fi
40419      # Try to locate tool using the code snippet
40420      for ac_prog in ld
40421do
40422  # Extract the first word of "$ac_prog", so it can be a program name with args.
40423set dummy $ac_prog; ac_word=$2
40424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40425$as_echo_n "checking for $ac_word... " >&6; }
40426if ${ac_cv_path_BUILD_LD+:} false; then :
40427  $as_echo_n "(cached) " >&6
40428else
40429  case $BUILD_LD in
40430  [\\/]* | ?:[\\/]*)
40431  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40432  ;;
40433  *)
40434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40435for as_dir in $PATH
40436do
40437  IFS=$as_save_IFS
40438  test -z "$as_dir" && as_dir=.
40439    for ac_exec_ext in '' $ac_executable_extensions; do
40440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40441    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40443    break 2
40444  fi
40445done
40446  done
40447IFS=$as_save_IFS
40448
40449  ;;
40450esac
40451fi
40452BUILD_LD=$ac_cv_path_BUILD_LD
40453if test -n "$BUILD_LD"; then
40454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40455$as_echo "$BUILD_LD" >&6; }
40456else
40457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40458$as_echo "no" >&6; }
40459fi
40460
40461
40462  test -n "$BUILD_LD" && break
40463done
40464
40465    else
40466      # If it succeeded, then it was overridden by the user. We will use it
40467      # for the tool.
40468
40469      # First remove it from the list of overridden variables, so we can test
40470      # for unknown variables in the end.
40471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40472
40473      # Check if the provided tool contains a complete path.
40474      tool_specified="$BUILD_LD"
40475      tool_basename="${tool_specified##*/}"
40476      if test "x$tool_basename" = "x$tool_specified"; then
40477        # A command without a complete path is provided, search $PATH.
40478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40479$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40480        # Extract the first word of "$tool_basename", so it can be a program name with args.
40481set dummy $tool_basename; ac_word=$2
40482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40483$as_echo_n "checking for $ac_word... " >&6; }
40484if ${ac_cv_path_BUILD_LD+:} false; then :
40485  $as_echo_n "(cached) " >&6
40486else
40487  case $BUILD_LD in
40488  [\\/]* | ?:[\\/]*)
40489  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40490  ;;
40491  *)
40492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40493for as_dir in $PATH
40494do
40495  IFS=$as_save_IFS
40496  test -z "$as_dir" && as_dir=.
40497    for ac_exec_ext in '' $ac_executable_extensions; do
40498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40499    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40501    break 2
40502  fi
40503done
40504  done
40505IFS=$as_save_IFS
40506
40507  ;;
40508esac
40509fi
40510BUILD_LD=$ac_cv_path_BUILD_LD
40511if test -n "$BUILD_LD"; then
40512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40513$as_echo "$BUILD_LD" >&6; }
40514else
40515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40516$as_echo "no" >&6; }
40517fi
40518
40519
40520        if test "x$BUILD_LD" = x; then
40521          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40522        fi
40523      else
40524        # Otherwise we believe it is a complete path. Use it as it is.
40525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40526$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40528$as_echo_n "checking for BUILD_LD... " >&6; }
40529        if test ! -x "$tool_specified"; then
40530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40531$as_echo "not found" >&6; }
40532          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40533        fi
40534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40535$as_echo "$tool_specified" >&6; }
40536      fi
40537    fi
40538  fi
40539
40540
40541
40542  # Only process if variable expands to non-empty
40543
40544  if test "x$BUILD_LD" != x; then
40545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40546
40547  # First separate the path from the arguments. This will split at the first
40548  # space.
40549  complete="$BUILD_LD"
40550  path="${complete%% *}"
40551  tmp="$complete EOL"
40552  arguments="${tmp#* }"
40553
40554  # Input might be given as Windows format, start by converting to
40555  # unix format.
40556  new_path=`$CYGPATH -u "$path"`
40557
40558  # Now try to locate executable using which
40559  new_path=`$WHICH "$new_path" 2> /dev/null`
40560  # bat and cmd files are not always considered executable in cygwin causing which
40561  # to not find them
40562  if test "x$new_path" = x \
40563      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40564      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40565    new_path=`$CYGPATH -u "$path"`
40566  fi
40567  if test "x$new_path" = x; then
40568    # Oops. Which didn't find the executable.
40569    # The splitting of arguments from the executable at a space might have been incorrect,
40570    # since paths with space are more likely in Windows. Give it another try with the whole
40571    # argument.
40572    path="$complete"
40573    arguments="EOL"
40574    new_path=`$CYGPATH -u "$path"`
40575    new_path=`$WHICH "$new_path" 2> /dev/null`
40576    # bat and cmd files are not always considered executable in cygwin causing which
40577    # to not find them
40578    if test "x$new_path" = x \
40579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40581      new_path=`$CYGPATH -u "$path"`
40582    fi
40583    if test "x$new_path" = x; then
40584      # It's still not found. Now this is an unrecoverable error.
40585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40586$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40587      has_space=`$ECHO "$complete" | $GREP " "`
40588      if test "x$has_space" != x; then
40589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40591      fi
40592      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40593    fi
40594  fi
40595
40596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40599  # "foo.exe" is OK but "foo" is an error.
40600  #
40601  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40602  # It is also a way to make sure we got the proper file name for the real test later on.
40603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40604  if test "x$test_shortpath" = x; then
40605    # Short path failed, file does not exist as specified.
40606    # Try adding .exe or .cmd
40607    if test -f "${new_path}.exe"; then
40608      input_to_shortpath="${new_path}.exe"
40609    elif test -f "${new_path}.cmd"; then
40610      input_to_shortpath="${new_path}.cmd"
40611    else
40612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40613$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40616      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40617    fi
40618  else
40619    input_to_shortpath="$new_path"
40620  fi
40621
40622  # Call helper function which possibly converts this using DOS-style short mode.
40623  # If so, the updated path is stored in $new_path.
40624  new_path="$input_to_shortpath"
40625
40626  input_path="$input_to_shortpath"
40627  # Check if we need to convert this using DOS-style short mode. If the path
40628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40629  # take no chances and rewrite it.
40630  # Note: m4 eats our [], so we need to use [ and ] instead.
40631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40632  if test "x$has_forbidden_chars" != x; then
40633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40637      # Going to short mode and back again did indeed matter. Since short mode is
40638      # case insensitive, let's make it lowercase to improve readability.
40639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40640      # Now convert it back to Unix-style (cygpath)
40641      input_path=`$CYGPATH -u "$shortmode_path"`
40642      new_path="$input_path"
40643    fi
40644  fi
40645
40646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40647  if test "x$test_cygdrive_prefix" = x; then
40648    # As a simple fix, exclude /usr/bin since it's not a real path.
40649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40651      # a path prefixed by /cygdrive for fixpath to work.
40652      new_path="$CYGWIN_ROOT_PATH$input_path"
40653    fi
40654  fi
40655
40656  # remove trailing .exe if any
40657  new_path="${new_path/%.exe/}"
40658
40659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40660
40661  # First separate the path from the arguments. This will split at the first
40662  # space.
40663  complete="$BUILD_LD"
40664  path="${complete%% *}"
40665  tmp="$complete EOL"
40666  arguments="${tmp#* }"
40667
40668  # Input might be given as Windows format, start by converting to
40669  # unix format.
40670  new_path="$path"
40671
40672  windows_path="$new_path"
40673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40674    unix_path=`$CYGPATH -u "$windows_path"`
40675    new_path="$unix_path"
40676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40678    new_path="$unix_path"
40679  fi
40680
40681
40682  # Now try to locate executable using which
40683  new_path=`$WHICH "$new_path" 2> /dev/null`
40684
40685  if test "x$new_path" = x; then
40686    # Oops. Which didn't find the executable.
40687    # The splitting of arguments from the executable at a space might have been incorrect,
40688    # since paths with space are more likely in Windows. Give it another try with the whole
40689    # argument.
40690    path="$complete"
40691    arguments="EOL"
40692    new_path="$path"
40693
40694  windows_path="$new_path"
40695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40696    unix_path=`$CYGPATH -u "$windows_path"`
40697    new_path="$unix_path"
40698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40700    new_path="$unix_path"
40701  fi
40702
40703
40704    new_path=`$WHICH "$new_path" 2> /dev/null`
40705    # bat and cmd files are not always considered executable in MSYS causing which
40706    # to not find them
40707    if test "x$new_path" = x \
40708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40710      new_path="$path"
40711
40712  windows_path="$new_path"
40713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40714    unix_path=`$CYGPATH -u "$windows_path"`
40715    new_path="$unix_path"
40716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40718    new_path="$unix_path"
40719  fi
40720
40721    fi
40722
40723    if test "x$new_path" = x; then
40724      # It's still not found. Now this is an unrecoverable error.
40725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40726$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40727      has_space=`$ECHO "$complete" | $GREP " "`
40728      if test "x$has_space" != x; then
40729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40731      fi
40732      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40733    fi
40734  fi
40735
40736  # Now new_path has a complete unix path to the binary
40737  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40738    # Keep paths in /bin as-is, but remove trailing .exe if any
40739    new_path="${new_path/%.exe/}"
40740    # Do not save /bin paths to all_fixpath_prefixes!
40741  else
40742    # Not in mixed or Windows style, start by that.
40743    new_path=`cmd //c echo $new_path`
40744
40745  input_path="$new_path"
40746  # Check if we need to convert this using DOS-style short mode. If the path
40747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40748  # take no chances and rewrite it.
40749  # Note: m4 eats our [], so we need to use [ and ] instead.
40750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40751  if test "x$has_forbidden_chars" != x; then
40752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40754  fi
40755
40756    # Output is in $new_path
40757
40758  windows_path="$new_path"
40759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40760    unix_path=`$CYGPATH -u "$windows_path"`
40761    new_path="$unix_path"
40762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40764    new_path="$unix_path"
40765  fi
40766
40767    # remove trailing .exe if any
40768    new_path="${new_path/%.exe/}"
40769
40770    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40771    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40772  fi
40773
40774    else
40775      # We're on a unix platform. Hooray! :)
40776      # First separate the path from the arguments. This will split at the first
40777      # space.
40778      complete="$BUILD_LD"
40779      path="${complete%% *}"
40780      tmp="$complete EOL"
40781      arguments="${tmp#* }"
40782
40783      # Cannot rely on the command "which" here since it doesn't always work.
40784      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40785      if test -z "$is_absolute_path"; then
40786        # Path to executable is not absolute. Find it.
40787        IFS_save="$IFS"
40788        IFS=:
40789        for p in $PATH; do
40790          if test -f "$p/$path" && test -x "$p/$path"; then
40791            new_path="$p/$path"
40792            break
40793          fi
40794        done
40795        IFS="$IFS_save"
40796      else
40797        # This is an absolute path, we can use it without further modifications.
40798        new_path="$path"
40799      fi
40800
40801      if test "x$new_path" = x; then
40802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40803$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40804        has_space=`$ECHO "$complete" | $GREP " "`
40805        if test "x$has_space" != x; then
40806          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40807$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40808        fi
40809        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40810      fi
40811    fi
40812
40813    # Now join together the path and the arguments once again
40814    if test "x$arguments" != xEOL; then
40815      new_complete="$new_path ${arguments% *}"
40816    else
40817      new_complete="$new_path"
40818    fi
40819
40820    if test "x$complete" != "x$new_complete"; then
40821      BUILD_LD="$new_complete"
40822      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40823$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40824    fi
40825  fi
40826
40827  else
40828    # If we are not cross compiling, use the normal target compilers for
40829    # building the build platform executables.
40830    BUILD_CC="$CC"
40831    BUILD_CXX="$CXX"
40832    BUILD_LD="$LD"
40833  fi
40834
40835
40836
40837
40838
40839
40840  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40841    # For hotspot, we need these in Windows mixed path,
40842    # so rewrite them all. Need added .exe suffix.
40843    HOTSPOT_CXX="$CXX.exe"
40844    HOTSPOT_LD="$LD.exe"
40845    HOTSPOT_MT="$MT.exe"
40846    HOTSPOT_RC="$RC.exe"
40847
40848  unix_path="$HOTSPOT_CXX"
40849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850    windows_path=`$CYGPATH -m "$unix_path"`
40851    HOTSPOT_CXX="$windows_path"
40852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853    windows_path=`cmd //c echo $unix_path`
40854    HOTSPOT_CXX="$windows_path"
40855  fi
40856
40857
40858  unix_path="$HOTSPOT_LD"
40859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40860    windows_path=`$CYGPATH -m "$unix_path"`
40861    HOTSPOT_LD="$windows_path"
40862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40863    windows_path=`cmd //c echo $unix_path`
40864    HOTSPOT_LD="$windows_path"
40865  fi
40866
40867
40868  unix_path="$HOTSPOT_MT"
40869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40870    windows_path=`$CYGPATH -m "$unix_path"`
40871    HOTSPOT_MT="$windows_path"
40872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40873    windows_path=`cmd //c echo $unix_path`
40874    HOTSPOT_MT="$windows_path"
40875  fi
40876
40877
40878  unix_path="$HOTSPOT_RC"
40879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40880    windows_path=`$CYGPATH -m "$unix_path"`
40881    HOTSPOT_RC="$windows_path"
40882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40883    windows_path=`cmd //c echo $unix_path`
40884    HOTSPOT_RC="$windows_path"
40885  fi
40886
40887
40888
40889  else
40890    HOTSPOT_CXX="$CXX"
40891    HOTSPOT_LD="$LD"
40892  fi
40893
40894
40895
40896  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40897    USE_CLANG=true
40898  fi
40899
40900
40901
40902
40903
40904  # The package path is used only on macosx?
40905  # FIXME: clean this up, and/or move it elsewhere.
40906  PACKAGE_PATH=/opt/local
40907
40908
40909  # Check for extra potential brokenness.
40910  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40911    # On Windows, double-check that we got the right compiler.
40912    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40913    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40914    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40915      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40916        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
40917      fi
40918    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40919      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40920        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40921      fi
40922    fi
40923  fi
40924
40925  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40926    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40927    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40928    # This is later checked when setting flags.
40929
40930    # "-Og" suppported for GCC 4.8 and later
40931    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40932
40933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40934$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40935  supports=yes
40936
40937  saved_cflags="$CFLAGS"
40938  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40939  ac_ext=c
40940ac_cpp='$CPP $CPPFLAGS'
40941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40943ac_compiler_gnu=$ac_cv_c_compiler_gnu
40944
40945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40946/* end confdefs.h.  */
40947int i;
40948_ACEOF
40949if ac_fn_c_try_compile "$LINENO"; then :
40950
40951else
40952  supports=no
40953fi
40954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40955  ac_ext=cpp
40956ac_cpp='$CXXCPP $CPPFLAGS'
40957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40960
40961  CFLAGS="$saved_cflags"
40962
40963  saved_cxxflags="$CXXFLAGS"
40964  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40965  ac_ext=cpp
40966ac_cpp='$CXXCPP $CPPFLAGS'
40967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40970
40971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40972/* end confdefs.h.  */
40973int i;
40974_ACEOF
40975if ac_fn_cxx_try_compile "$LINENO"; then :
40976
40977else
40978  supports=no
40979fi
40980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40981  ac_ext=cpp
40982ac_cpp='$CXXCPP $CPPFLAGS'
40983ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40984ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40985ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40986
40987  CXXFLAGS="$saved_cxxflags"
40988
40989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40990$as_echo "$supports" >&6; }
40991  if test "x$supports" = "xyes" ; then
40992    HAS_CFLAG_OPTIMIZE_DEBUG=true
40993  else
40994    HAS_CFLAG_OPTIMIZE_DEBUG=false
40995  fi
40996
40997
40998    # "-z relro" supported in GNU binutils 2.17 and later
40999    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41000
41001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41002$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41003  supports=yes
41004
41005  saved_ldflags="$LDFLAGS"
41006  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41007  ac_ext=c
41008ac_cpp='$CPP $CPPFLAGS'
41009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41011ac_compiler_gnu=$ac_cv_c_compiler_gnu
41012
41013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41014/* end confdefs.h.  */
41015
41016int
41017main ()
41018{
41019
41020  ;
41021  return 0;
41022}
41023_ACEOF
41024if ac_fn_c_try_link "$LINENO"; then :
41025
41026else
41027  supports=no
41028fi
41029rm -f core conftest.err conftest.$ac_objext \
41030    conftest$ac_exeext conftest.$ac_ext
41031  ac_ext=cpp
41032ac_cpp='$CXXCPP $CPPFLAGS'
41033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41036
41037  LDFLAGS="$saved_ldflags"
41038
41039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41040$as_echo "$supports" >&6; }
41041  if test "x$supports" = "xyes" ; then
41042    HAS_LINKER_RELRO=true
41043  else
41044    HAS_LINKER_RELRO=false
41045  fi
41046
41047
41048    # "-z now" supported in GNU binutils 2.11 and later
41049    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41050
41051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41052$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41053  supports=yes
41054
41055  saved_ldflags="$LDFLAGS"
41056  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41057  ac_ext=c
41058ac_cpp='$CPP $CPPFLAGS'
41059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41061ac_compiler_gnu=$ac_cv_c_compiler_gnu
41062
41063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41064/* end confdefs.h.  */
41065
41066int
41067main ()
41068{
41069
41070  ;
41071  return 0;
41072}
41073_ACEOF
41074if ac_fn_c_try_link "$LINENO"; then :
41075
41076else
41077  supports=no
41078fi
41079rm -f core conftest.err conftest.$ac_objext \
41080    conftest$ac_exeext conftest.$ac_ext
41081  ac_ext=cpp
41082ac_cpp='$CXXCPP $CPPFLAGS'
41083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41086
41087  LDFLAGS="$saved_ldflags"
41088
41089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41090$as_echo "$supports" >&6; }
41091  if test "x$supports" = "xyes" ; then
41092    HAS_LINKER_NOW=true
41093  else
41094    HAS_LINKER_NOW=false
41095  fi
41096
41097  fi
41098
41099  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41100  # in executable.'
41101  USING_BROKEN_SUSE_LD=no
41102  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41104$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41105    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41106    $ECHO "int main() { }" > main.c
41107    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41109$as_echo "no" >&6; }
41110      USING_BROKEN_SUSE_LD=no
41111    else
41112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41113$as_echo "yes" >&6; }
41114      USING_BROKEN_SUSE_LD=yes
41115    fi
41116    rm -rf version-script.map main.c a.out
41117  fi
41118
41119
41120
41121# Setup the JTReg Regression Test Harness.
41122
41123
41124# Check whether --with-jtreg was given.
41125if test "${with_jtreg+set}" = set; then :
41126  withval=$with_jtreg;
41127else
41128  with_jtreg=no
41129fi
41130
41131
41132  if test "x$with_jtreg" = xno; then
41133    # jtreg disabled
41134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41135$as_echo_n "checking for jtreg... " >&6; }
41136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41137$as_echo "no" >&6; }
41138  else
41139    if test "x$with_jtreg" != xyes; then
41140      # with path specified.
41141      JT_HOME="$with_jtreg"
41142    fi
41143
41144    if test "x$JT_HOME" != x; then
41145      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41146$as_echo_n "checking for jtreg... " >&6; }
41147
41148      # use JT_HOME enviroment var.
41149
41150  # Only process if variable expands to non-empty
41151
41152  if test "x$JT_HOME" != x; then
41153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41154
41155  # Input might be given as Windows format, start by converting to
41156  # unix format.
41157  path="$JT_HOME"
41158  new_path=`$CYGPATH -u "$path"`
41159
41160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41163  # "foo.exe" is OK but "foo" is an error.
41164  #
41165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41166  # It is also a way to make sure we got the proper file name for the real test later on.
41167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41168  if test "x$test_shortpath" = x; then
41169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41170$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41171    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41172  fi
41173
41174  # Call helper function which possibly converts this using DOS-style short mode.
41175  # If so, the updated path is stored in $new_path.
41176
41177  input_path="$new_path"
41178  # Check if we need to convert this using DOS-style short mode. If the path
41179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41180  # take no chances and rewrite it.
41181  # Note: m4 eats our [], so we need to use [ and ] instead.
41182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41183  if test "x$has_forbidden_chars" != x; then
41184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41188      # Going to short mode and back again did indeed matter. Since short mode is
41189      # case insensitive, let's make it lowercase to improve readability.
41190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41191      # Now convert it back to Unix-style (cygpath)
41192      input_path=`$CYGPATH -u "$shortmode_path"`
41193      new_path="$input_path"
41194    fi
41195  fi
41196
41197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41198  if test "x$test_cygdrive_prefix" = x; then
41199    # As a simple fix, exclude /usr/bin since it's not a real path.
41200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41202      # a path prefixed by /cygdrive for fixpath to work.
41203      new_path="$CYGWIN_ROOT_PATH$input_path"
41204    fi
41205  fi
41206
41207
41208  if test "x$path" != "x$new_path"; then
41209    JT_HOME="$new_path"
41210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41211$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41212  fi
41213
41214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41215
41216  path="$JT_HOME"
41217  has_colon=`$ECHO $path | $GREP ^.:`
41218  new_path="$path"
41219  if test "x$has_colon" = x; then
41220    # Not in mixed or Windows style, start by that.
41221    new_path=`cmd //c echo $path`
41222  fi
41223
41224
41225  input_path="$new_path"
41226  # Check if we need to convert this using DOS-style short mode. If the path
41227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41228  # take no chances and rewrite it.
41229  # Note: m4 eats our [], so we need to use [ and ] instead.
41230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41231  if test "x$has_forbidden_chars" != x; then
41232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41234  fi
41235
41236
41237  windows_path="$new_path"
41238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41239    unix_path=`$CYGPATH -u "$windows_path"`
41240    new_path="$unix_path"
41241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41243    new_path="$unix_path"
41244  fi
41245
41246  if test "x$path" != "x$new_path"; then
41247    JT_HOME="$new_path"
41248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41249$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41250  fi
41251
41252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41254
41255    else
41256      # We're on a unix platform. Hooray! :)
41257      path="$JT_HOME"
41258      has_space=`$ECHO "$path" | $GREP " "`
41259      if test "x$has_space" != x; then
41260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41261$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41263      fi
41264
41265      # Use eval to expand a potential ~
41266      eval path="$path"
41267      if test ! -f "$path" && test ! -d "$path"; then
41268        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41269      fi
41270
41271      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41272    fi
41273  fi
41274
41275
41276      # jtreg win32 script works for everybody
41277      JTREGEXE="$JT_HOME/bin/jtreg"
41278
41279      if test ! -f "$JTREGEXE"; then
41280        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41281      fi
41282
41283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41284$as_echo "$JTREGEXE" >&6; }
41285    else
41286      # try to find jtreg on path
41287
41288
41289
41290  # Publish this variable in the help.
41291
41292
41293  if test "x$JTREGEXE" = x; then
41294    # The variable is not set by user, try to locate tool using the code snippet
41295    for ac_prog in jtreg
41296do
41297  # Extract the first word of "$ac_prog", so it can be a program name with args.
41298set dummy $ac_prog; ac_word=$2
41299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41300$as_echo_n "checking for $ac_word... " >&6; }
41301if ${ac_cv_path_JTREGEXE+:} false; then :
41302  $as_echo_n "(cached) " >&6
41303else
41304  case $JTREGEXE in
41305  [\\/]* | ?:[\\/]*)
41306  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41307  ;;
41308  *)
41309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41310for as_dir in $PATH
41311do
41312  IFS=$as_save_IFS
41313  test -z "$as_dir" && as_dir=.
41314    for ac_exec_ext in '' $ac_executable_extensions; do
41315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41316    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41318    break 2
41319  fi
41320done
41321  done
41322IFS=$as_save_IFS
41323
41324  ;;
41325esac
41326fi
41327JTREGEXE=$ac_cv_path_JTREGEXE
41328if test -n "$JTREGEXE"; then
41329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41330$as_echo "$JTREGEXE" >&6; }
41331else
41332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41333$as_echo "no" >&6; }
41334fi
41335
41336
41337  test -n "$JTREGEXE" && break
41338done
41339
41340  else
41341    # The variable is set, but is it from the command line or the environment?
41342
41343    # Try to remove the string !JTREGEXE! from our list.
41344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41346      # If it failed, the variable was not from the command line. Ignore it,
41347      # but warn the user (except for BASH, which is always set by the calling BASH).
41348      if test "xJTREGEXE" != xBASH; then
41349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41350$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41351      fi
41352      # Try to locate tool using the code snippet
41353      for ac_prog in jtreg
41354do
41355  # Extract the first word of "$ac_prog", so it can be a program name with args.
41356set dummy $ac_prog; ac_word=$2
41357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41358$as_echo_n "checking for $ac_word... " >&6; }
41359if ${ac_cv_path_JTREGEXE+:} false; then :
41360  $as_echo_n "(cached) " >&6
41361else
41362  case $JTREGEXE in
41363  [\\/]* | ?:[\\/]*)
41364  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41365  ;;
41366  *)
41367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41368for as_dir in $PATH
41369do
41370  IFS=$as_save_IFS
41371  test -z "$as_dir" && as_dir=.
41372    for ac_exec_ext in '' $ac_executable_extensions; do
41373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41374    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41376    break 2
41377  fi
41378done
41379  done
41380IFS=$as_save_IFS
41381
41382  ;;
41383esac
41384fi
41385JTREGEXE=$ac_cv_path_JTREGEXE
41386if test -n "$JTREGEXE"; then
41387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41388$as_echo "$JTREGEXE" >&6; }
41389else
41390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41391$as_echo "no" >&6; }
41392fi
41393
41394
41395  test -n "$JTREGEXE" && break
41396done
41397
41398    else
41399      # If it succeeded, then it was overridden by the user. We will use it
41400      # for the tool.
41401
41402      # First remove it from the list of overridden variables, so we can test
41403      # for unknown variables in the end.
41404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41405
41406      # Check if the provided tool contains a complete path.
41407      tool_specified="$JTREGEXE"
41408      tool_basename="${tool_specified##*/}"
41409      if test "x$tool_basename" = "x$tool_specified"; then
41410        # A command without a complete path is provided, search $PATH.
41411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41412$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41413        # Extract the first word of "$tool_basename", so it can be a program name with args.
41414set dummy $tool_basename; ac_word=$2
41415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41416$as_echo_n "checking for $ac_word... " >&6; }
41417if ${ac_cv_path_JTREGEXE+:} false; then :
41418  $as_echo_n "(cached) " >&6
41419else
41420  case $JTREGEXE in
41421  [\\/]* | ?:[\\/]*)
41422  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41423  ;;
41424  *)
41425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41426for as_dir in $PATH
41427do
41428  IFS=$as_save_IFS
41429  test -z "$as_dir" && as_dir=.
41430    for ac_exec_ext in '' $ac_executable_extensions; do
41431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41432    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41434    break 2
41435  fi
41436done
41437  done
41438IFS=$as_save_IFS
41439
41440  ;;
41441esac
41442fi
41443JTREGEXE=$ac_cv_path_JTREGEXE
41444if test -n "$JTREGEXE"; then
41445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41446$as_echo "$JTREGEXE" >&6; }
41447else
41448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41449$as_echo "no" >&6; }
41450fi
41451
41452
41453        if test "x$JTREGEXE" = x; then
41454          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41455        fi
41456      else
41457        # Otherwise we believe it is a complete path. Use it as it is.
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41459$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41461$as_echo_n "checking for JTREGEXE... " >&6; }
41462        if test ! -x "$tool_specified"; then
41463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41464$as_echo "not found" >&6; }
41465          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41466        fi
41467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41468$as_echo "$tool_specified" >&6; }
41469      fi
41470    fi
41471  fi
41472
41473
41474
41475  if test "x$JTREGEXE" = x; then
41476    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41477  fi
41478
41479
41480      JT_HOME="`$DIRNAME $JTREGEXE`"
41481    fi
41482  fi
41483
41484
41485
41486
41487
41488
41489  # Option used to tell the compiler whether to create 32- or 64-bit executables
41490  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41491    COMPILER_TARGET_BITS_FLAG="-q"
41492  else
41493    COMPILER_TARGET_BITS_FLAG="-m"
41494  fi
41495
41496
41497  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41498  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41499    ARFLAGS="-r"
41500  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41501    ARFLAGS="-X64"
41502  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41503    # lib.exe is used as AR to create static libraries.
41504    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41505  else
41506    ARFLAGS=""
41507  fi
41508
41509
41510  ## Setup strip.
41511  # FIXME: should this really be per platform, or should it be per toolchain type?
41512  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41513  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41514  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41515    STRIPFLAGS="-g"
41516  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41517    STRIPFLAGS="-x"
41518  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41519    STRIPFLAGS="-S"
41520  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41521    STRIPFLAGS="-X32_64"
41522  fi
41523
41524  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41525    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41526  fi
41527
41528
41529  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41530    CC_OUT_OPTION=-Fo
41531    EXE_OUT_OPTION=-out:
41532    LD_OUT_OPTION=-out:
41533    AR_OUT_OPTION=-out:
41534  else
41535    # The option used to specify the target .o,.a or .so file.
41536    # When compiling, how to specify the to be created object file.
41537    CC_OUT_OPTION='-o$(SPACE)'
41538    # When linking, how to specify the to be created executable.
41539    EXE_OUT_OPTION='-o$(SPACE)'
41540    # When linking, how to specify the to be created dynamically linkable library.
41541    LD_OUT_OPTION='-o$(SPACE)'
41542    # When archiving, how to specify the to be create static archive for object files.
41543    AR_OUT_OPTION='rcs$(SPACE)'
41544  fi
41545
41546
41547
41548
41549
41550  # On Windows, we need to set RC flags.
41551  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41552    RC_FLAGS="-nologo -l0x409"
41553    if test "x$VARIANT" = xOPT; then
41554      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41555    fi
41556
41557    # The version variables used to create RC_FLAGS may be overridden
41558    # in a custom configure script, or possibly the command line.
41559    # Let those variables be expanded at make time in spec.gmk.
41560    # The \$ are escaped to the shell, and the $(...) variables
41561    # are evaluated by make.
41562    RC_FLAGS="$RC_FLAGS \
41563        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41564        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41565        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41566        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
41567        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41568        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41569        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41570  fi
41571
41572
41573  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41574    # silence copyright notice and other headers.
41575    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41576  fi
41577
41578  if test "x$SYSROOT" != "x"; then
41579    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41580      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41581        # Solaris Studio does not have a concept of sysroot. Instead we must
41582        # make sure the default include and lib dirs are appended to each
41583        # compile and link command line.
41584        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41585        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41586            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41587            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41588      fi
41589    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41590      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41591      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41592      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41593    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41594      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41595      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41596    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41597      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41598      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41599    fi
41600    # Propagate the sysroot args to hotspot
41601    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41602    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41603    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41604  fi
41605
41606  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41607  # set this here so it doesn't have to be peppered throughout the forest
41608  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41609    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41610    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41611  fi
41612
41613
41614
41615
41616
41617# FIXME: Currently we must test this after toolchain but before flags. Fix!
41618
41619# Now we can test some aspects on the target using configure macros.
41620
41621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41622$as_echo_n "checking for ANSI C header files... " >&6; }
41623if ${ac_cv_header_stdc+:} false; then :
41624  $as_echo_n "(cached) " >&6
41625else
41626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41627/* end confdefs.h.  */
41628#include <stdlib.h>
41629#include <stdarg.h>
41630#include <string.h>
41631#include <float.h>
41632
41633int
41634main ()
41635{
41636
41637  ;
41638  return 0;
41639}
41640_ACEOF
41641if ac_fn_cxx_try_compile "$LINENO"; then :
41642  ac_cv_header_stdc=yes
41643else
41644  ac_cv_header_stdc=no
41645fi
41646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41647
41648if test $ac_cv_header_stdc = yes; then
41649  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41650  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41651/* end confdefs.h.  */
41652#include <string.h>
41653
41654_ACEOF
41655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41656  $EGREP "memchr" >/dev/null 2>&1; then :
41657
41658else
41659  ac_cv_header_stdc=no
41660fi
41661rm -f conftest*
41662
41663fi
41664
41665if test $ac_cv_header_stdc = yes; then
41666  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41668/* end confdefs.h.  */
41669#include <stdlib.h>
41670
41671_ACEOF
41672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41673  $EGREP "free" >/dev/null 2>&1; then :
41674
41675else
41676  ac_cv_header_stdc=no
41677fi
41678rm -f conftest*
41679
41680fi
41681
41682if test $ac_cv_header_stdc = yes; then
41683  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41684  if test "$cross_compiling" = yes; then :
41685  :
41686else
41687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41688/* end confdefs.h.  */
41689#include <ctype.h>
41690#include <stdlib.h>
41691#if ((' ' & 0x0FF) == 0x020)
41692# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41693# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41694#else
41695# define ISLOWER(c) \
41696		   (('a' <= (c) && (c) <= 'i') \
41697		     || ('j' <= (c) && (c) <= 'r') \
41698		     || ('s' <= (c) && (c) <= 'z'))
41699# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41700#endif
41701
41702#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41703int
41704main ()
41705{
41706  int i;
41707  for (i = 0; i < 256; i++)
41708    if (XOR (islower (i), ISLOWER (i))
41709	|| toupper (i) != TOUPPER (i))
41710      return 2;
41711  return 0;
41712}
41713_ACEOF
41714if ac_fn_cxx_try_run "$LINENO"; then :
41715
41716else
41717  ac_cv_header_stdc=no
41718fi
41719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41720  conftest.$ac_objext conftest.beam conftest.$ac_ext
41721fi
41722
41723fi
41724fi
41725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41726$as_echo "$ac_cv_header_stdc" >&6; }
41727if test $ac_cv_header_stdc = yes; then
41728
41729$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41730
41731fi
41732
41733# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41734for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41735		  inttypes.h stdint.h unistd.h
41736do :
41737  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41738ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41739"
41740if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41741  cat >>confdefs.h <<_ACEOF
41742#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41743_ACEOF
41744
41745fi
41746
41747done
41748
41749
41750
41751  ###############################################################################
41752  #
41753  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41754  # (The JVM can use 32 or 64 bit Java pointers but that decision
41755  # is made at runtime.)
41756  #
41757
41758  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41759    # Always specify -m flag on Solaris
41760    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41761
41762  # When we add flags to the "official" CFLAGS etc, we need to
41763  # keep track of these additions in ADDED_CFLAGS etc. These
41764  # will later be checked to make sure only controlled additions
41765  # have been made to CFLAGS etc.
41766  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41767  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41768  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41769
41770  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41771  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41772  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41773
41774  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41775  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41776  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41777
41778  elif test "x$COMPILE_TYPE" = xreduced; then
41779    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41780      # Specify -m if running reduced on unix platforms
41781
41782  # When we add flags to the "official" CFLAGS etc, we need to
41783  # keep track of these additions in ADDED_CFLAGS etc. These
41784  # will later be checked to make sure only controlled additions
41785  # have been made to CFLAGS etc.
41786  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41787  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41788  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41789
41790  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41791  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41792  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41793
41794  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41795  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41796  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41797
41798    fi
41799  fi
41800
41801  # Make compilation sanity check
41802  for ac_header in stdio.h
41803do :
41804  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41805if test "x$ac_cv_header_stdio_h" = xyes; then :
41806  cat >>confdefs.h <<_ACEOF
41807#define HAVE_STDIO_H 1
41808_ACEOF
41809
41810else
41811
41812    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41813$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41814    if test "x$COMPILE_TYPE" = xreduced; then
41815      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41816$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41817    elif test "x$COMPILE_TYPE" = xcross; then
41818      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41819$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41820    fi
41821    as_fn_error $? "Cannot continue." "$LINENO" 5
41822
41823fi
41824
41825done
41826
41827
41828  # The cast to long int works around a bug in the HP C Compiler
41829# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41830# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41831# This bug is HP SR number 8606223364.
41832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41833$as_echo_n "checking size of int *... " >&6; }
41834if ${ac_cv_sizeof_int_p+:} false; then :
41835  $as_echo_n "(cached) " >&6
41836else
41837  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41838
41839else
41840  if test "$ac_cv_type_int_p" = yes; then
41841     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41843as_fn_error 77 "cannot compute sizeof (int *)
41844See \`config.log' for more details" "$LINENO" 5; }
41845   else
41846     ac_cv_sizeof_int_p=0
41847   fi
41848fi
41849
41850fi
41851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41852$as_echo "$ac_cv_sizeof_int_p" >&6; }
41853
41854
41855
41856cat >>confdefs.h <<_ACEOF
41857#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41858_ACEOF
41859
41860
41861
41862  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41863  if test "x$ac_cv_sizeof_int_p" = x; then
41864    # The test failed, lets stick to the assumed value.
41865    { $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
41866$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41867  else
41868    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41869
41870    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41871      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41872      # Let's try to implicitely set the compilers target architecture and retry the test
41873      { $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
41874$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;}
41875      { $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
41876$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;}
41877
41878  # When we add flags to the "official" CFLAGS etc, we need to
41879  # keep track of these additions in ADDED_CFLAGS etc. These
41880  # will later be checked to make sure only controlled additions
41881  # have been made to CFLAGS etc.
41882  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41883  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41884  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41885
41886  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41887  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41888  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41889
41890  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41891  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41892  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41893
41894
41895      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41896      unset ac_cv_sizeof_int_p
41897      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41898      cat >>confdefs.h <<_ACEOF
41899#undef SIZEOF_INT_P
41900_ACEOF
41901
41902      # The cast to long int works around a bug in the HP C Compiler
41903# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41904# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41905# This bug is HP SR number 8606223364.
41906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41907$as_echo_n "checking size of int *... " >&6; }
41908if ${ac_cv_sizeof_int_p+:} false; then :
41909  $as_echo_n "(cached) " >&6
41910else
41911  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41912
41913else
41914  if test "$ac_cv_type_int_p" = yes; then
41915     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41917as_fn_error 77 "cannot compute sizeof (int *)
41918See \`config.log' for more details" "$LINENO" 5; }
41919   else
41920     ac_cv_sizeof_int_p=0
41921   fi
41922fi
41923
41924fi
41925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41926$as_echo "$ac_cv_sizeof_int_p" >&6; }
41927
41928
41929
41930cat >>confdefs.h <<_ACEOF
41931#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41932_ACEOF
41933
41934
41935
41936      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41937
41938      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41939        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
41940      fi
41941    fi
41942  fi
41943
41944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41945$as_echo_n "checking for target address size... " >&6; }
41946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41947$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41948
41949
41950  ###############################################################################
41951  #
41952  # Is the target little of big endian?
41953  #
41954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41955$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41956if ${ac_cv_c_bigendian+:} false; then :
41957  $as_echo_n "(cached) " >&6
41958else
41959  ac_cv_c_bigendian=unknown
41960    # See if we're dealing with a universal compiler.
41961    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41962/* end confdefs.h.  */
41963#ifndef __APPLE_CC__
41964	       not a universal capable compiler
41965	     #endif
41966	     typedef int dummy;
41967
41968_ACEOF
41969if ac_fn_cxx_try_compile "$LINENO"; then :
41970
41971	# Check for potential -arch flags.  It is not universal unless
41972	# there are at least two -arch flags with different values.
41973	ac_arch=
41974	ac_prev=
41975	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41976	 if test -n "$ac_prev"; then
41977	   case $ac_word in
41978	     i?86 | x86_64 | ppc | ppc64)
41979	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41980		 ac_arch=$ac_word
41981	       else
41982		 ac_cv_c_bigendian=universal
41983		 break
41984	       fi
41985	       ;;
41986	   esac
41987	   ac_prev=
41988	 elif test "x$ac_word" = "x-arch"; then
41989	   ac_prev=arch
41990	 fi
41991       done
41992fi
41993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41994    if test $ac_cv_c_bigendian = unknown; then
41995      # See if sys/param.h defines the BYTE_ORDER macro.
41996      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41997/* end confdefs.h.  */
41998#include <sys/types.h>
41999	     #include <sys/param.h>
42000
42001int
42002main ()
42003{
42004#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42005		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42006		     && LITTLE_ENDIAN)
42007	      bogus endian macros
42008	     #endif
42009
42010  ;
42011  return 0;
42012}
42013_ACEOF
42014if ac_fn_cxx_try_compile "$LINENO"; then :
42015  # It does; now see whether it defined to BIG_ENDIAN or not.
42016	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42017/* end confdefs.h.  */
42018#include <sys/types.h>
42019		#include <sys/param.h>
42020
42021int
42022main ()
42023{
42024#if BYTE_ORDER != BIG_ENDIAN
42025		 not big endian
42026		#endif
42027
42028  ;
42029  return 0;
42030}
42031_ACEOF
42032if ac_fn_cxx_try_compile "$LINENO"; then :
42033  ac_cv_c_bigendian=yes
42034else
42035  ac_cv_c_bigendian=no
42036fi
42037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42038fi
42039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42040    fi
42041    if test $ac_cv_c_bigendian = unknown; then
42042      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42043      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42044/* end confdefs.h.  */
42045#include <limits.h>
42046
42047int
42048main ()
42049{
42050#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42051	      bogus endian macros
42052	     #endif
42053
42054  ;
42055  return 0;
42056}
42057_ACEOF
42058if ac_fn_cxx_try_compile "$LINENO"; then :
42059  # It does; now see whether it defined to _BIG_ENDIAN or not.
42060	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42061/* end confdefs.h.  */
42062#include <limits.h>
42063
42064int
42065main ()
42066{
42067#ifndef _BIG_ENDIAN
42068		 not big endian
42069		#endif
42070
42071  ;
42072  return 0;
42073}
42074_ACEOF
42075if ac_fn_cxx_try_compile "$LINENO"; then :
42076  ac_cv_c_bigendian=yes
42077else
42078  ac_cv_c_bigendian=no
42079fi
42080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42081fi
42082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42083    fi
42084    if test $ac_cv_c_bigendian = unknown; then
42085      # Compile a test program.
42086      if test "$cross_compiling" = yes; then :
42087  # Try to guess by grepping values from an object file.
42088	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42089/* end confdefs.h.  */
42090short int ascii_mm[] =
42091		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42092		short int ascii_ii[] =
42093		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42094		int use_ascii (int i) {
42095		  return ascii_mm[i] + ascii_ii[i];
42096		}
42097		short int ebcdic_ii[] =
42098		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42099		short int ebcdic_mm[] =
42100		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42101		int use_ebcdic (int i) {
42102		  return ebcdic_mm[i] + ebcdic_ii[i];
42103		}
42104		extern int foo;
42105
42106int
42107main ()
42108{
42109return use_ascii (foo) == use_ebcdic (foo);
42110  ;
42111  return 0;
42112}
42113_ACEOF
42114if ac_fn_cxx_try_compile "$LINENO"; then :
42115  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42116	      ac_cv_c_bigendian=yes
42117	    fi
42118	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42119	      if test "$ac_cv_c_bigendian" = unknown; then
42120		ac_cv_c_bigendian=no
42121	      else
42122		# finding both strings is unlikely to happen, but who knows?
42123		ac_cv_c_bigendian=unknown
42124	      fi
42125	    fi
42126fi
42127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42128else
42129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42130/* end confdefs.h.  */
42131$ac_includes_default
42132int
42133main ()
42134{
42135
42136	     /* Are we little or big endian?  From Harbison&Steele.  */
42137	     union
42138	     {
42139	       long int l;
42140	       char c[sizeof (long int)];
42141	     } u;
42142	     u.l = 1;
42143	     return u.c[sizeof (long int) - 1] == 1;
42144
42145  ;
42146  return 0;
42147}
42148_ACEOF
42149if ac_fn_cxx_try_run "$LINENO"; then :
42150  ac_cv_c_bigendian=no
42151else
42152  ac_cv_c_bigendian=yes
42153fi
42154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42155  conftest.$ac_objext conftest.beam conftest.$ac_ext
42156fi
42157
42158    fi
42159fi
42160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42161$as_echo "$ac_cv_c_bigendian" >&6; }
42162 case $ac_cv_c_bigendian in #(
42163   yes)
42164     ENDIAN="big";; #(
42165   no)
42166     ENDIAN="little" ;; #(
42167   universal)
42168     ENDIAN="universal_endianness"
42169     ;; #(
42170   *)
42171     ENDIAN="unknown" ;;
42172 esac
42173
42174
42175  if test "x$ENDIAN" = xuniversal_endianness; then
42176    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42177  fi
42178  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42179    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
42180  fi
42181
42182
42183# Configure flags for the tools
42184
42185  ###############################################################################
42186  #
42187  # How to compile shared libraries.
42188  #
42189
42190  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42191    PICFLAG="-fPIC"
42192    C_FLAG_REORDER=''
42193    CXX_FLAG_REORDER=''
42194
42195    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42196      # Linking is different on MacOSX
42197      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42198      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42199      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42200      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42201      SET_SHARED_LIBRARY_MAPFILE=''
42202    else
42203      # Default works for linux, might work on other platforms as well.
42204      SHARED_LIBRARY_FLAGS='-shared'
42205      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42206      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42207      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42208      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42209    fi
42210  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42211    PICFLAG=''
42212    C_FLAG_REORDER=''
42213    CXX_FLAG_REORDER=''
42214
42215    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42216      # Linking is different on MacOSX
42217      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42218      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42219      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42220      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42221      SET_SHARED_LIBRARY_MAPFILE=''
42222    else
42223      # Default works for linux, might work on other platforms as well.
42224      SHARED_LIBRARY_FLAGS='-shared'
42225      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42226      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42227      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42228      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42229    fi
42230  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42231    PICFLAG="-KPIC"
42232    C_FLAG_REORDER='-xF'
42233    CXX_FLAG_REORDER='-xF'
42234    SHARED_LIBRARY_FLAGS="-G"
42235    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42236    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42237    SET_SHARED_LIBRARY_NAME=''
42238    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42239  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42240    PICFLAG="-qpic=large"
42241    C_FLAG_REORDER=''
42242    CXX_FLAG_REORDER=''
42243    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42244    SET_EXECUTABLE_ORIGIN=""
42245    SET_SHARED_LIBRARY_ORIGIN=''
42246    SET_SHARED_LIBRARY_NAME=''
42247    SET_SHARED_LIBRARY_MAPFILE=''
42248  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42249    PICFLAG=""
42250    C_FLAG_REORDER=''
42251    CXX_FLAG_REORDER=''
42252    SHARED_LIBRARY_FLAGS="-LD"
42253    SET_EXECUTABLE_ORIGIN=''
42254    SET_SHARED_LIBRARY_ORIGIN=''
42255    SET_SHARED_LIBRARY_NAME=''
42256    SET_SHARED_LIBRARY_MAPFILE=''
42257  fi
42258
42259
42260
42261
42262
42263
42264
42265
42266  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42267    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42268    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42269    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42270  fi
42271  # The (cross) compiler is now configured, we can now test capabilities
42272  # of the target platform.
42273
42274
42275
42276  ###############################################################################
42277  #
42278  # Setup the opt flags for different compilers
42279  # and different operating systems.
42280  #
42281
42282  # FIXME: this was indirectly the old default, but just inherited.
42283  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42284  #   C_FLAG_DEPS="-MMD -MF"
42285  # fi
42286
42287  # Generate make dependency files
42288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42289    C_FLAG_DEPS="-MMD -MF"
42290  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42291    C_FLAG_DEPS="-MMD -MF"
42292  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42293    C_FLAG_DEPS="-xMMD -xMF"
42294  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42295    C_FLAG_DEPS="-qmakedep=gcc -MF"
42296  fi
42297  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42298
42299
42300
42301  # Debug symbols
42302  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42303    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42304      # reduce from default "-g2" option to save space
42305      CFLAGS_DEBUG_SYMBOLS="-g1"
42306      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42307    else
42308      CFLAGS_DEBUG_SYMBOLS="-g"
42309      CXXFLAGS_DEBUG_SYMBOLS="-g"
42310    fi
42311  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42312    CFLAGS_DEBUG_SYMBOLS="-g"
42313    CXXFLAGS_DEBUG_SYMBOLS="-g"
42314  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42315    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42316    # FIXME: likely a bug, this disables debug symbols rather than enables them
42317    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42318  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42319    CFLAGS_DEBUG_SYMBOLS="-g"
42320    CXXFLAGS_DEBUG_SYMBOLS="-g"
42321  fi
42322
42323
42324
42325  # bounds, memory and behavior checking options
42326  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42327    case $DEBUG_LEVEL in
42328    release )
42329      # no adjustment
42330      ;;
42331    fastdebug )
42332      # no adjustment
42333      ;;
42334    slowdebug )
42335      # Add runtime stack smashing and undefined behavior checks.
42336      # Not all versions of gcc support -fstack-protector
42337      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42338
42339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42340$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42341  supports=yes
42342
42343  saved_cflags="$CFLAGS"
42344  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42345  ac_ext=c
42346ac_cpp='$CPP $CPPFLAGS'
42347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42349ac_compiler_gnu=$ac_cv_c_compiler_gnu
42350
42351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42352/* end confdefs.h.  */
42353int i;
42354_ACEOF
42355if ac_fn_c_try_compile "$LINENO"; then :
42356
42357else
42358  supports=no
42359fi
42360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42361  ac_ext=cpp
42362ac_cpp='$CXXCPP $CPPFLAGS'
42363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42366
42367  CFLAGS="$saved_cflags"
42368
42369  saved_cxxflags="$CXXFLAGS"
42370  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42371  ac_ext=cpp
42372ac_cpp='$CXXCPP $CPPFLAGS'
42373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42376
42377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42378/* end confdefs.h.  */
42379int i;
42380_ACEOF
42381if ac_fn_cxx_try_compile "$LINENO"; then :
42382
42383else
42384  supports=no
42385fi
42386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42387  ac_ext=cpp
42388ac_cpp='$CXXCPP $CPPFLAGS'
42389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42392
42393  CXXFLAGS="$saved_cxxflags"
42394
42395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42396$as_echo "$supports" >&6; }
42397  if test "x$supports" = "xyes" ; then
42398    :
42399  else
42400    STACK_PROTECTOR_CFLAG=""
42401  fi
42402
42403
42404      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42405      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42406      ;;
42407    esac
42408  fi
42409
42410  # Optimization levels
42411  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42412    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42413
42414    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42415      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42416      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42417      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42418      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42419      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42420      C_O_FLAG_NONE="-xregs=no%frameptr"
42421      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42422      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42423      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42424      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42425      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42426      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42427        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42428        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42429      fi
42430    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42431      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42432      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42433      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42434      C_O_FLAG_DEBUG=""
42435      C_O_FLAG_NONE=""
42436      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42437      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42438      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42439      C_O_FLAG_DEBUG=""
42440      CXX_O_FLAG_NONE=""
42441    fi
42442  else
42443    # The remaining toolchains share opt flags between CC and CXX;
42444    # setup for C and duplicate afterwards.
42445    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42446      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42447        # On MacOSX we optimize for size, something
42448        # we should do for all platforms?
42449        C_O_FLAG_HIGHEST="-Os"
42450        C_O_FLAG_HI="-Os"
42451        C_O_FLAG_NORM="-Os"
42452      else
42453        C_O_FLAG_HIGHEST="-O3"
42454        C_O_FLAG_HI="-O3"
42455        C_O_FLAG_NORM="-O2"
42456      fi
42457      C_O_FLAG_DEBUG="-O0"
42458      C_O_FLAG_NONE="-O0"
42459    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42460      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42461        # On MacOSX we optimize for size, something
42462        # we should do for all platforms?
42463        C_O_FLAG_HIGHEST="-Os"
42464        C_O_FLAG_HI="-Os"
42465        C_O_FLAG_NORM="-Os"
42466      else
42467        C_O_FLAG_HIGHEST="-O3"
42468        C_O_FLAG_HI="-O3"
42469        C_O_FLAG_NORM="-O2"
42470      fi
42471      C_O_FLAG_DEBUG="-O0"
42472      C_O_FLAG_NONE="-O0"
42473    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42474      C_O_FLAG_HIGHEST="-O3"
42475      C_O_FLAG_HI="-O3 -qstrict"
42476      C_O_FLAG_NORM="-O2"
42477      C_O_FLAG_DEBUG="-qnoopt"
42478      C_O_FLAG_NONE="-qnoop"
42479    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42480      C_O_FLAG_HIGHEST="-O2"
42481      C_O_FLAG_HI="-O1"
42482      C_O_FLAG_NORM="-O1"
42483      C_O_FLAG_DEBUG="-Od"
42484      C_O_FLAG_NONE="-Od"
42485    fi
42486    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42487    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42488    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42489    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42490    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42491  fi
42492
42493  # Adjust optimization flags according to debug level.
42494  case $DEBUG_LEVEL in
42495    release )
42496      # no adjustment
42497      ;;
42498    fastdebug )
42499      # Not quite so much optimization
42500      C_O_FLAG_HI="$C_O_FLAG_NORM"
42501      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42502      ;;
42503    slowdebug )
42504      # Disable optimization
42505      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42506      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42507      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42508      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42509      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42510      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42511      ;;
42512  esac
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522
42523
42524
42525
42526  # Special extras...
42527  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42528    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42529      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42530      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42531    fi
42532    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42533    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42534  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42535    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42536    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42537  fi
42538
42539  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42540    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42541$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42542  fi
42543
42544  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42545    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42546$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42547  fi
42548
42549  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42550    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42551$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42552  fi
42553
42554
42555# Check whether --with-extra-cflags was given.
42556if test "${with_extra_cflags+set}" = set; then :
42557  withval=$with_extra_cflags;
42558fi
42559
42560
42561
42562# Check whether --with-extra-cxxflags was given.
42563if test "${with_extra_cxxflags+set}" = set; then :
42564  withval=$with_extra_cxxflags;
42565fi
42566
42567
42568
42569# Check whether --with-extra-ldflags was given.
42570if test "${with_extra_ldflags+set}" = set; then :
42571  withval=$with_extra_ldflags;
42572fi
42573
42574
42575  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42576  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42577  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42578
42579  # Hotspot needs these set in their legacy form
42580  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42581  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42582  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42583
42584
42585
42586
42587
42588  ###############################################################################
42589  #
42590  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42591  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42592  #
42593
42594  # Setup compiler/platform specific flags into
42595  #    CFLAGS_JDK    - C Compiler flags
42596  #    CXXFLAGS_JDK  - C++ Compiler flags
42597  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42598  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42599    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42600      # Force compatibility with i586 on 32 bit intel platforms.
42601      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42602    fi
42603    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42604        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42605    case $OPENJDK_TARGET_CPU_ARCH in
42606      arm )
42607        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42608        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42609        ;;
42610      ppc )
42611        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42612        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42613        ;;
42614      * )
42615        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42616        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42617        ;;
42618    esac
42619  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42620    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42621    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42622      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42623    fi
42624
42625    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42626    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42627  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42628    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42629    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42630  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42631    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42632        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42633        -DWIN32_LEAN_AND_MEAN \
42634        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42635        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42636        -DWIN32 -DIAL"
42637    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42638      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42639    else
42640      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42641    fi
42642    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42643    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42644    # studio.
42645    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42646      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42647          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42648    fi
42649  fi
42650
42651  ###############################################################################
42652
42653  # Adjust flags according to debug level.
42654  case $DEBUG_LEVEL in
42655    fastdebug | slowdebug )
42656      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42657      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42658      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42659      ;;
42660    release )
42661      ;;
42662    * )
42663      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42664      ;;
42665  esac
42666
42667  # Setup LP64
42668  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42669
42670  # Set some common defines. These works for all compilers, but assume
42671  # -D is universally accepted.
42672
42673  # Setup endianness
42674  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42675    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42676    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42677    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42678    #   Note: -Dmacro         is the same as    #define macro 1
42679    #         -Dmacro=        is the same as    #define macro
42680    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42681      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42682    else
42683      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42684    fi
42685  else
42686    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42687    # are defined in the system?
42688    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42689      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42690    else
42691      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42692    fi
42693  fi
42694
42695  # Setup target OS define. Use OS target name but in upper case.
42696  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42697  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42698
42699  # Setup target CPU
42700  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42701
42702  # Setup debug/release defines
42703  if test "x$DEBUG_LEVEL" = xrelease; then
42704    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42705    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42706      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42707    fi
42708  else
42709    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42710  fi
42711
42712  # Set some additional per-OS defines.
42713  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42714    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42715  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42716    # FIXME: PPC64 should not be here.
42717    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42718  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42719    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42720  fi
42721
42722  # Additional macosx handling
42723  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42724    # Setting these parameters makes it an error to link to macosx APIs that are
42725    # newer than the given OS version and makes the linked binaries compatible
42726    # even if built on a newer version of the OS.
42727    # The expected format is X.Y.Z
42728    MACOSX_VERSION_MIN=10.7.0
42729
42730
42731    # The macro takes the version with no dots, ex: 1070
42732    # Let the flags variables get resolved in make for easier override on make
42733    # command line.
42734    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42735    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42736  fi
42737
42738  # Setup some hard coded includes
42739  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42740      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42741      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42742      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42743
42744  # The shared libraries are compiled using the picflag.
42745  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42746  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42747
42748  # Executable flags
42749  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42750  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42751
42752
42753
42754
42755
42756
42757  # Flags for compiling test libraries
42758  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42759  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42760
42761  # Flags for compiling test executables
42762  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42763  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42764
42765
42766
42767
42768
42769
42770  # Setup LDFLAGS et al.
42771  #
42772
42773  # Now this is odd. The JDK native libraries have to link against libjvm.so
42774  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42775  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42776  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42777  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42778  # libraries will link to whatever is in memory. Yuck.
42779  #
42780  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42781  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42782    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42783    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42784      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42785    fi
42786    # TODO: make -debug optional "--disable-full-debug-symbols"
42787    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42788  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42789    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42790    # We have previously set HAS_GNU_HASH if this is the case
42791    if test -n "$HAS_GNU_HASH"; then
42792      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42793    fi
42794    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42795      # And since we now know that the linker is gnu, then add -z defs, to forbid
42796      # undefined symbols in object files.
42797      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42798      case $DEBUG_LEVEL in
42799        release )
42800          # tell linker to optimize libraries.
42801          # Should this be supplied to the OSS linker as well?
42802          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42803          ;;
42804        slowdebug )
42805          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42806            # do relocations at load
42807            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42808            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42809          fi
42810          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42811            # mark relocations read only
42812            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42813            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42814          fi
42815          ;;
42816        fastdebug )
42817          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42818            # mark relocations read only
42819            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42820            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42821          fi
42822          ;;
42823        * )
42824          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42825          ;;
42826        esac
42827    fi
42828  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42829    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42830    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42831  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42832    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42833  fi
42834
42835  # Customize LDFLAGS for executables
42836
42837  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42838
42839  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42840    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42841      LDFLAGS_STACK_SIZE=1048576
42842    else
42843      LDFLAGS_STACK_SIZE=327680
42844    fi
42845    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42846  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42847    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42848  fi
42849
42850  # Customize LDFLAGS for libs
42851  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42852
42853  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42854    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42855    LDFLAGS_JDKLIB_SUFFIX=""
42856  else
42857    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42858        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42859
42860    # On some platforms (mac) the linker warns about non existing -L dirs.
42861    # Add server first if available. Linking aginst client does not always produce the same results.
42862    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42863    # Default to server for other variants.
42864    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42865      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42866    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42867      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42868    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42869      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42870    else
42871      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42872    fi
42873
42874    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42875    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42876      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42877    fi
42878  fi
42879
42880
42881
42882
42883
42884
42885
42886  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42887  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42888  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42889  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42890
42891
42892
42893
42894
42895
42896
42897  # Some Zero and Shark settings.
42898  # ZERO_ARCHFLAG tells the compiler which mode to build for
42899  case "${OPENJDK_TARGET_CPU}" in
42900    s390)
42901      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42902      ;;
42903    *)
42904      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42905  esac
42906
42907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42908$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42909  supports=yes
42910
42911  saved_cflags="$CFLAGS"
42912  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42913  ac_ext=c
42914ac_cpp='$CPP $CPPFLAGS'
42915ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42916ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42917ac_compiler_gnu=$ac_cv_c_compiler_gnu
42918
42919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42920/* end confdefs.h.  */
42921int i;
42922_ACEOF
42923if ac_fn_c_try_compile "$LINENO"; then :
42924
42925else
42926  supports=no
42927fi
42928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42929  ac_ext=cpp
42930ac_cpp='$CXXCPP $CPPFLAGS'
42931ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42932ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42933ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42934
42935  CFLAGS="$saved_cflags"
42936
42937  saved_cxxflags="$CXXFLAGS"
42938  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42939  ac_ext=cpp
42940ac_cpp='$CXXCPP $CPPFLAGS'
42941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42944
42945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42946/* end confdefs.h.  */
42947int i;
42948_ACEOF
42949if ac_fn_cxx_try_compile "$LINENO"; then :
42950
42951else
42952  supports=no
42953fi
42954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42955  ac_ext=cpp
42956ac_cpp='$CXXCPP $CPPFLAGS'
42957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42960
42961  CXXFLAGS="$saved_cxxflags"
42962
42963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42964$as_echo "$supports" >&6; }
42965  if test "x$supports" = "xyes" ; then
42966    :
42967  else
42968    ZERO_ARCHFLAG=""
42969  fi
42970
42971
42972
42973  # Check that the compiler supports -mX (or -qX on AIX) flags
42974  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42975
42976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42977$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42978  supports=yes
42979
42980  saved_cflags="$CFLAGS"
42981  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42982  ac_ext=c
42983ac_cpp='$CPP $CPPFLAGS'
42984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42986ac_compiler_gnu=$ac_cv_c_compiler_gnu
42987
42988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42989/* end confdefs.h.  */
42990int i;
42991_ACEOF
42992if ac_fn_c_try_compile "$LINENO"; then :
42993
42994else
42995  supports=no
42996fi
42997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42998  ac_ext=cpp
42999ac_cpp='$CXXCPP $CPPFLAGS'
43000ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43001ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43002ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43003
43004  CFLAGS="$saved_cflags"
43005
43006  saved_cxxflags="$CXXFLAGS"
43007  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43008  ac_ext=cpp
43009ac_cpp='$CXXCPP $CPPFLAGS'
43010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43013
43014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43015/* end confdefs.h.  */
43016int i;
43017_ACEOF
43018if ac_fn_cxx_try_compile "$LINENO"; then :
43019
43020else
43021  supports=no
43022fi
43023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43024  ac_ext=cpp
43025ac_cpp='$CXXCPP $CPPFLAGS'
43026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43029
43030  CXXFLAGS="$saved_cxxflags"
43031
43032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43033$as_echo "$supports" >&6; }
43034  if test "x$supports" = "xyes" ; then
43035    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43036  else
43037    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43038  fi
43039
43040
43041
43042  # Check whether --enable-warnings-as-errors was given.
43043if test "${enable_warnings_as_errors+set}" = set; then :
43044  enableval=$enable_warnings_as_errors;
43045fi
43046
43047
43048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43049$as_echo_n "checking if native warnings are errors... " >&6; }
43050  if test "x$enable_warnings_as_errors" = "xyes"; then
43051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43052$as_echo "yes (explicitely set)" >&6; }
43053    WARNINGS_AS_ERRORS=true
43054  elif test "x$enable_warnings_as_errors" = "xno"; then
43055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43056$as_echo "no" >&6; }
43057    WARNINGS_AS_ERRORS=false
43058  elif test "x$enable_warnings_as_errors" = "x"; then
43059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43060$as_echo "yes (default)" >&6; }
43061    WARNINGS_AS_ERRORS=true
43062  else
43063    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43064  fi
43065
43066
43067  case "${TOOLCHAIN_TYPE}" in
43068    microsoft)
43069      DISABLE_WARNING_PREFIX="-wd"
43070      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43071      ;;
43072    solstudio)
43073      DISABLE_WARNING_PREFIX="-erroff="
43074      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43075      ;;
43076    gcc)
43077      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43078
43079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43080$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43081  supports=yes
43082
43083  saved_cflags="$CFLAGS"
43084  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43085  ac_ext=c
43086ac_cpp='$CPP $CPPFLAGS'
43087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43089ac_compiler_gnu=$ac_cv_c_compiler_gnu
43090
43091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43092/* end confdefs.h.  */
43093int i;
43094_ACEOF
43095if ac_fn_c_try_compile "$LINENO"; then :
43096
43097else
43098  supports=no
43099fi
43100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43101  ac_ext=cpp
43102ac_cpp='$CXXCPP $CPPFLAGS'
43103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43106
43107  CFLAGS="$saved_cflags"
43108
43109  saved_cxxflags="$CXXFLAGS"
43110  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43111  ac_ext=cpp
43112ac_cpp='$CXXCPP $CPPFLAGS'
43113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43116
43117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43118/* end confdefs.h.  */
43119int i;
43120_ACEOF
43121if ac_fn_cxx_try_compile "$LINENO"; then :
43122
43123else
43124  supports=no
43125fi
43126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43127  ac_ext=cpp
43128ac_cpp='$CXXCPP $CPPFLAGS'
43129ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43130ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43131ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43132
43133  CXXFLAGS="$saved_cxxflags"
43134
43135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43136$as_echo "$supports" >&6; }
43137  if test "x$supports" = "xyes" ; then
43138    GCC_CAN_DISABLE_WARNINGS=true
43139  else
43140    GCC_CAN_DISABLE_WARNINGS=false
43141
43142  fi
43143
43144      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43145        DISABLE_WARNING_PREFIX="-Wno-"
43146      else
43147        DISABLE_WARNING_PREFIX=
43148      fi
43149      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43150      ;;
43151    clang)
43152      DISABLE_WARNING_PREFIX="-Wno-"
43153      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43154      ;;
43155  esac
43156
43157
43158
43159
43160# Setup debug symbols (need objcopy from the toolchain for that)
43161
43162  #
43163  # ENABLE_DEBUG_SYMBOLS
43164  # This must be done after the toolchain is setup, since we're looking at objcopy.
43165  #
43166  # Check whether --enable-debug-symbols was given.
43167if test "${enable_debug_symbols+set}" = set; then :
43168  enableval=$enable_debug_symbols;
43169fi
43170
43171
43172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43173$as_echo_n "checking if we should generate debug symbols... " >&6; }
43174
43175  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43176    # explicit enabling of enable-debug-symbols and can't find objcopy
43177    #   this is an error
43178    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43179  fi
43180
43181  if test "x$enable_debug_symbols" = "xyes"; then
43182    ENABLE_DEBUG_SYMBOLS=true
43183  elif test "x$enable_debug_symbols" = "xno"; then
43184    ENABLE_DEBUG_SYMBOLS=false
43185  else
43186    # Default is on if objcopy is found
43187    if test "x$OBJCOPY" != x; then
43188      ENABLE_DEBUG_SYMBOLS=true
43189    # MacOS X and Windows don't use objcopy but default is on for those OSes
43190    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43191      ENABLE_DEBUG_SYMBOLS=true
43192    else
43193      ENABLE_DEBUG_SYMBOLS=false
43194    fi
43195  fi
43196
43197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43198$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43199
43200  #
43201  # ZIP_DEBUGINFO_FILES
43202  #
43203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43204$as_echo_n "checking if we should zip debug-info files... " >&6; }
43205  # Check whether --enable-zip-debug-info was given.
43206if test "${enable_zip_debug_info+set}" = set; then :
43207  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43208else
43209  enable_zip_debug_info="yes"
43210fi
43211
43212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43213$as_echo "${enable_zip_debug_info}" >&6; }
43214
43215  if test "x${enable_zip_debug_info}" = "xno"; then
43216    ZIP_DEBUGINFO_FILES=false
43217  else
43218    ZIP_DEBUGINFO_FILES=true
43219  fi
43220
43221
43222
43223
43224
43225  # Check whether --enable-native-coverage was given.
43226if test "${enable_native_coverage+set}" = set; then :
43227  enableval=$enable_native_coverage;
43228fi
43229
43230  GCOV_ENABLED="false"
43231  if test "x$enable_native_coverage" = "xyes"; then
43232    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43234$as_echo_n "checking if native coverage is enabled... " >&6; }
43235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43236$as_echo "yes" >&6; }
43237      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43238      GCOV_LDFLAGS="-fprofile-arcs"
43239      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43240      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43241      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43242      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43243      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43244      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43245      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43246      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43247      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43248      GCOV_ENABLED="true"
43249    else
43250      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43251    fi
43252  elif test "x$enable_native_coverage" = "xno"; then
43253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43254$as_echo_n "checking if native coverage is enabled... " >&6; }
43255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43256$as_echo "no" >&6; }
43257  elif test "x$enable_native_coverage" != "x"; then
43258    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43259  fi
43260
43261
43262
43263
43264###############################################################################
43265#
43266# Check dependencies for external and internal libraries.
43267#
43268###############################################################################
43269
43270# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43271
43272  # When using cygwin or msys, we need a wrapper binary that renames
43273  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43274  # @files and rewrites these too! This wrapper binary is
43275  # called fixpath.
43276  FIXPATH=
43277  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43279$as_echo_n "checking if fixpath can be created... " >&6; }
43280    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43281    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43282    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43283    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43284      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43285      FIXPATH="$FIXPATH_BIN -c"
43286    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43287      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43288      # @ was chosen as separator to minimize risk of other tools messing around with it
43289      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43290          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43291      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43292      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43293    fi
43294    FIXPATH_SRC_W="$FIXPATH_SRC"
43295    FIXPATH_BIN_W="$FIXPATH_BIN"
43296
43297  unix_path="$FIXPATH_SRC_W"
43298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43299    windows_path=`$CYGPATH -m "$unix_path"`
43300    FIXPATH_SRC_W="$windows_path"
43301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43302    windows_path=`cmd //c echo $unix_path`
43303    FIXPATH_SRC_W="$windows_path"
43304  fi
43305
43306
43307  unix_path="$FIXPATH_BIN_W"
43308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43309    windows_path=`$CYGPATH -m "$unix_path"`
43310    FIXPATH_BIN_W="$windows_path"
43311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43312    windows_path=`cmd //c echo $unix_path`
43313    FIXPATH_BIN_W="$windows_path"
43314  fi
43315
43316    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43317    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43318    cd $FIXPATH_DIR
43319    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43320    cd $CURDIR
43321
43322    if test ! -x $FIXPATH_BIN; then
43323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43324$as_echo "no" >&6; }
43325      cat $FIXPATH_DIR/fixpath1.log
43326      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43327    fi
43328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43329$as_echo "yes" >&6; }
43330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43331$as_echo_n "checking if fixpath.exe works... " >&6; }
43332    cd $FIXPATH_DIR
43333    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43334        > $FIXPATH_DIR/fixpath2.log 2>&1
43335    cd $CURDIR
43336    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43338$as_echo "no" >&6; }
43339      cat $FIXPATH_DIR/fixpath2.log
43340      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43341    fi
43342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43343$as_echo "yes" >&6; }
43344  fi
43345
43346
43347
43348
43349
43350
43351  ###############################################################################
43352  #
43353  # OS specific settings that we never will need to probe.
43354  #
43355  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43357$as_echo_n "checking what is not needed on Linux?... " >&6; }
43358    PULSE_NOT_NEEDED=yes
43359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43360$as_echo "pulse" >&6; }
43361  fi
43362
43363  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43365$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43366    ALSA_NOT_NEEDED=yes
43367    PULSE_NOT_NEEDED=yes
43368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43369$as_echo "alsa pulse" >&6; }
43370  fi
43371
43372  if test "x$OPENJDK_TARGET_OS" = xaix; then
43373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43374$as_echo_n "checking what is not needed on AIX?... " >&6; }
43375    ALSA_NOT_NEEDED=yes
43376    PULSE_NOT_NEEDED=yes
43377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43378$as_echo "alsa pulse" >&6; }
43379  fi
43380
43381
43382  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43384$as_echo_n "checking what is not needed on Windows?... " >&6; }
43385    CUPS_NOT_NEEDED=yes
43386    ALSA_NOT_NEEDED=yes
43387    PULSE_NOT_NEEDED=yes
43388    X11_NOT_NEEDED=yes
43389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43390$as_echo "alsa cups pulse x11" >&6; }
43391  fi
43392
43393  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43395$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43396    ALSA_NOT_NEEDED=yes
43397    PULSE_NOT_NEEDED=yes
43398    X11_NOT_NEEDED=yes
43399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43400$as_echo "alsa pulse x11" >&6; }
43401  fi
43402
43403  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43405$as_echo_n "checking what is not needed on bsd?... " >&6; }
43406    ALSA_NOT_NEEDED=yes
43407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43408$as_echo "alsa" >&6; }
43409  fi
43410
43411  if test "x$OPENJDK" = "xfalse"; then
43412    FREETYPE_NOT_NEEDED=yes
43413  fi
43414
43415  if test "x$SUPPORT_HEADFUL" = xno; then
43416    X11_NOT_NEEDED=yes
43417  fi
43418
43419
43420
43421  ###############################################################################
43422  #
43423  # Check for X Windows
43424  #
43425
43426  if test "x$X11_NOT_NEEDED" = xyes; then
43427    if test "x${with_x}" != x; then
43428      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43429$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43430    fi
43431    X_CFLAGS=
43432    X_LIBS=
43433  else
43434    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43435    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43436    # --x-libraries for the sysroot, if that seems to be correct.
43437    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43438      if test "x$SYSROOT" != "x"; then
43439        if test "x$x_includes" = xNONE; then
43440          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43441            x_includes="$SYSROOT/usr/X11R6/include"
43442          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43443            x_includes="$SYSROOT/usr/include"
43444          fi
43445        fi
43446        if test "x$x_libraries" = xNONE; then
43447          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43448            x_libraries="$SYSROOT/usr/X11R6/lib"
43449          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43450            x_libraries="$SYSROOT/usr/lib64"
43451          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43452            x_libraries="$SYSROOT/usr/lib"
43453          fi
43454        fi
43455      fi
43456    fi
43457
43458    # Now let autoconf do it's magic
43459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43460$as_echo_n "checking for X... " >&6; }
43461
43462
43463# Check whether --with-x was given.
43464if test "${with_x+set}" = set; then :
43465  withval=$with_x;
43466fi
43467
43468# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43469if test "x$with_x" = xno; then
43470  # The user explicitly disabled X.
43471  have_x=disabled
43472else
43473  case $x_includes,$x_libraries in #(
43474    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43475    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43476  $as_echo_n "(cached) " >&6
43477else
43478  # One or both of the vars are not set, and there is no cached value.
43479ac_x_includes=no ac_x_libraries=no
43480rm -f -r conftest.dir
43481if mkdir conftest.dir; then
43482  cd conftest.dir
43483  cat >Imakefile <<'_ACEOF'
43484incroot:
43485	@echo incroot='${INCROOT}'
43486usrlibdir:
43487	@echo usrlibdir='${USRLIBDIR}'
43488libdir:
43489	@echo libdir='${LIBDIR}'
43490_ACEOF
43491  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43492    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43493    for ac_var in incroot usrlibdir libdir; do
43494      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43495    done
43496    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43497    for ac_extension in a so sl dylib la dll; do
43498      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43499	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43500	ac_im_usrlibdir=$ac_im_libdir; break
43501      fi
43502    done
43503    # Screen out bogus values from the imake configuration.  They are
43504    # bogus both because they are the default anyway, and because
43505    # using them would break gcc on systems where it needs fixed includes.
43506    case $ac_im_incroot in
43507	/usr/include) ac_x_includes= ;;
43508	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43509    esac
43510    case $ac_im_usrlibdir in
43511	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43512	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43513    esac
43514  fi
43515  cd ..
43516  rm -f -r conftest.dir
43517fi
43518
43519# Standard set of common directories for X headers.
43520# Check X11 before X11Rn because it is often a symlink to the current release.
43521ac_x_header_dirs='
43522/usr/X11/include
43523/usr/X11R7/include
43524/usr/X11R6/include
43525/usr/X11R5/include
43526/usr/X11R4/include
43527
43528/usr/include/X11
43529/usr/include/X11R7
43530/usr/include/X11R6
43531/usr/include/X11R5
43532/usr/include/X11R4
43533
43534/usr/local/X11/include
43535/usr/local/X11R7/include
43536/usr/local/X11R6/include
43537/usr/local/X11R5/include
43538/usr/local/X11R4/include
43539
43540/usr/local/include/X11
43541/usr/local/include/X11R7
43542/usr/local/include/X11R6
43543/usr/local/include/X11R5
43544/usr/local/include/X11R4
43545
43546/usr/X386/include
43547/usr/x386/include
43548/usr/XFree86/include/X11
43549
43550/usr/include
43551/usr/local/include
43552/usr/unsupported/include
43553/usr/athena/include
43554/usr/local/x11r5/include
43555/usr/lpp/Xamples/include
43556
43557/usr/openwin/include
43558/usr/openwin/share/include'
43559
43560if test "$ac_x_includes" = no; then
43561  # Guess where to find include files, by looking for Xlib.h.
43562  # First, try using that file with no special directory specified.
43563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43564/* end confdefs.h.  */
43565#include <X11/Xlib.h>
43566_ACEOF
43567if ac_fn_cxx_try_cpp "$LINENO"; then :
43568  # We can compile using X headers with no special include directory.
43569ac_x_includes=
43570else
43571  for ac_dir in $ac_x_header_dirs; do
43572  if test -r "$ac_dir/X11/Xlib.h"; then
43573    ac_x_includes=$ac_dir
43574    break
43575  fi
43576done
43577fi
43578rm -f conftest.err conftest.i conftest.$ac_ext
43579fi # $ac_x_includes = no
43580
43581if test "$ac_x_libraries" = no; then
43582  # Check for the libraries.
43583  # See if we find them without any special options.
43584  # Don't add to $LIBS permanently.
43585  ac_save_LIBS=$LIBS
43586  LIBS="-lX11 $LIBS"
43587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43588/* end confdefs.h.  */
43589#include <X11/Xlib.h>
43590int
43591main ()
43592{
43593XrmInitialize ()
43594  ;
43595  return 0;
43596}
43597_ACEOF
43598if ac_fn_cxx_try_link "$LINENO"; then :
43599  LIBS=$ac_save_LIBS
43600# We can link X programs with no special library path.
43601ac_x_libraries=
43602else
43603  LIBS=$ac_save_LIBS
43604for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43605do
43606  # Don't even attempt the hair of trying to link an X program!
43607  for ac_extension in a so sl dylib la dll; do
43608    if test -r "$ac_dir/libX11.$ac_extension"; then
43609      ac_x_libraries=$ac_dir
43610      break 2
43611    fi
43612  done
43613done
43614fi
43615rm -f core conftest.err conftest.$ac_objext \
43616    conftest$ac_exeext conftest.$ac_ext
43617fi # $ac_x_libraries = no
43618
43619case $ac_x_includes,$ac_x_libraries in #(
43620  no,* | *,no | *\'*)
43621    # Didn't find X, or a directory has "'" in its name.
43622    ac_cv_have_x="have_x=no";; #(
43623  *)
43624    # Record where we found X for the cache.
43625    ac_cv_have_x="have_x=yes\
43626	ac_x_includes='$ac_x_includes'\
43627	ac_x_libraries='$ac_x_libraries'"
43628esac
43629fi
43630;; #(
43631    *) have_x=yes;;
43632  esac
43633  eval "$ac_cv_have_x"
43634fi # $with_x != no
43635
43636if test "$have_x" != yes; then
43637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43638$as_echo "$have_x" >&6; }
43639  no_x=yes
43640else
43641  # If each of the values was on the command line, it overrides each guess.
43642  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43643  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43644  # Update the cache value to reflect the command line values.
43645  ac_cv_have_x="have_x=yes\
43646	ac_x_includes='$x_includes'\
43647	ac_x_libraries='$x_libraries'"
43648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43649$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43650fi
43651
43652    if test "$no_x" = yes; then
43653  # Not all programs may use this symbol, but it does not hurt to define it.
43654
43655$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43656
43657  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43658else
43659  if test -n "$x_includes"; then
43660    X_CFLAGS="$X_CFLAGS -I$x_includes"
43661  fi
43662
43663  # It would also be nice to do this for all -L options, not just this one.
43664  if test -n "$x_libraries"; then
43665    X_LIBS="$X_LIBS -L$x_libraries"
43666    # For Solaris; some versions of Sun CC require a space after -R and
43667    # others require no space.  Words are not sufficient . . . .
43668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43669$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43670    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43671    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43672    ac_cxx_werror_flag=yes
43673    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43674/* end confdefs.h.  */
43675
43676int
43677main ()
43678{
43679
43680  ;
43681  return 0;
43682}
43683_ACEOF
43684if ac_fn_cxx_try_link "$LINENO"; then :
43685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43686$as_echo "no" >&6; }
43687       X_LIBS="$X_LIBS -R$x_libraries"
43688else
43689  LIBS="$ac_xsave_LIBS -R $x_libraries"
43690       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43691/* end confdefs.h.  */
43692
43693int
43694main ()
43695{
43696
43697  ;
43698  return 0;
43699}
43700_ACEOF
43701if ac_fn_cxx_try_link "$LINENO"; then :
43702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43703$as_echo "yes" >&6; }
43704	  X_LIBS="$X_LIBS -R $x_libraries"
43705else
43706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43707$as_echo "neither works" >&6; }
43708fi
43709rm -f core conftest.err conftest.$ac_objext \
43710    conftest$ac_exeext conftest.$ac_ext
43711fi
43712rm -f core conftest.err conftest.$ac_objext \
43713    conftest$ac_exeext conftest.$ac_ext
43714    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43715    LIBS=$ac_xsave_LIBS
43716  fi
43717
43718  # Check for system-dependent libraries X programs must link with.
43719  # Do this before checking for the system-independent R6 libraries
43720  # (-lICE), since we may need -lsocket or whatever for X linking.
43721
43722  if test "$ISC" = yes; then
43723    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43724  else
43725    # Martyn Johnson says this is needed for Ultrix, if the X
43726    # libraries were built with DECnet support.  And Karl Berry says
43727    # the Alpha needs dnet_stub (dnet does not exist).
43728    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43729    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43730/* end confdefs.h.  */
43731
43732/* Override any GCC internal prototype to avoid an error.
43733   Use char because int might match the return type of a GCC
43734   builtin and then its argument prototype would still apply.  */
43735#ifdef __cplusplus
43736extern "C"
43737#endif
43738char XOpenDisplay ();
43739int
43740main ()
43741{
43742return XOpenDisplay ();
43743  ;
43744  return 0;
43745}
43746_ACEOF
43747if ac_fn_cxx_try_link "$LINENO"; then :
43748
43749else
43750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43751$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43752if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43753  $as_echo_n "(cached) " >&6
43754else
43755  ac_check_lib_save_LIBS=$LIBS
43756LIBS="-ldnet  $LIBS"
43757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43758/* end confdefs.h.  */
43759
43760/* Override any GCC internal prototype to avoid an error.
43761   Use char because int might match the return type of a GCC
43762   builtin and then its argument prototype would still apply.  */
43763#ifdef __cplusplus
43764extern "C"
43765#endif
43766char dnet_ntoa ();
43767int
43768main ()
43769{
43770return dnet_ntoa ();
43771  ;
43772  return 0;
43773}
43774_ACEOF
43775if ac_fn_cxx_try_link "$LINENO"; then :
43776  ac_cv_lib_dnet_dnet_ntoa=yes
43777else
43778  ac_cv_lib_dnet_dnet_ntoa=no
43779fi
43780rm -f core conftest.err conftest.$ac_objext \
43781    conftest$ac_exeext conftest.$ac_ext
43782LIBS=$ac_check_lib_save_LIBS
43783fi
43784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43785$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43786if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43787  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43788fi
43789
43790    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43792$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43793if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43794  $as_echo_n "(cached) " >&6
43795else
43796  ac_check_lib_save_LIBS=$LIBS
43797LIBS="-ldnet_stub  $LIBS"
43798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43799/* end confdefs.h.  */
43800
43801/* Override any GCC internal prototype to avoid an error.
43802   Use char because int might match the return type of a GCC
43803   builtin and then its argument prototype would still apply.  */
43804#ifdef __cplusplus
43805extern "C"
43806#endif
43807char dnet_ntoa ();
43808int
43809main ()
43810{
43811return dnet_ntoa ();
43812  ;
43813  return 0;
43814}
43815_ACEOF
43816if ac_fn_cxx_try_link "$LINENO"; then :
43817  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43818else
43819  ac_cv_lib_dnet_stub_dnet_ntoa=no
43820fi
43821rm -f core conftest.err conftest.$ac_objext \
43822    conftest$ac_exeext conftest.$ac_ext
43823LIBS=$ac_check_lib_save_LIBS
43824fi
43825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43826$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43827if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43828  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43829fi
43830
43831    fi
43832fi
43833rm -f core conftest.err conftest.$ac_objext \
43834    conftest$ac_exeext conftest.$ac_ext
43835    LIBS="$ac_xsave_LIBS"
43836
43837    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43838    # to get the SysV transport functions.
43839    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43840    # needs -lnsl.
43841    # The nsl library prevents programs from opening the X display
43842    # on Irix 5.2, according to T.E. Dickey.
43843    # The functions gethostbyname, getservbyname, and inet_addr are
43844    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43845    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43846if test "x$ac_cv_func_gethostbyname" = xyes; then :
43847
43848fi
43849
43850    if test $ac_cv_func_gethostbyname = no; then
43851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43852$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43853if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43854  $as_echo_n "(cached) " >&6
43855else
43856  ac_check_lib_save_LIBS=$LIBS
43857LIBS="-lnsl  $LIBS"
43858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43859/* end confdefs.h.  */
43860
43861/* Override any GCC internal prototype to avoid an error.
43862   Use char because int might match the return type of a GCC
43863   builtin and then its argument prototype would still apply.  */
43864#ifdef __cplusplus
43865extern "C"
43866#endif
43867char gethostbyname ();
43868int
43869main ()
43870{
43871return gethostbyname ();
43872  ;
43873  return 0;
43874}
43875_ACEOF
43876if ac_fn_cxx_try_link "$LINENO"; then :
43877  ac_cv_lib_nsl_gethostbyname=yes
43878else
43879  ac_cv_lib_nsl_gethostbyname=no
43880fi
43881rm -f core conftest.err conftest.$ac_objext \
43882    conftest$ac_exeext conftest.$ac_ext
43883LIBS=$ac_check_lib_save_LIBS
43884fi
43885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43886$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43887if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43888  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43889fi
43890
43891      if test $ac_cv_lib_nsl_gethostbyname = no; then
43892	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43893$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43894if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43895  $as_echo_n "(cached) " >&6
43896else
43897  ac_check_lib_save_LIBS=$LIBS
43898LIBS="-lbsd  $LIBS"
43899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43900/* end confdefs.h.  */
43901
43902/* Override any GCC internal prototype to avoid an error.
43903   Use char because int might match the return type of a GCC
43904   builtin and then its argument prototype would still apply.  */
43905#ifdef __cplusplus
43906extern "C"
43907#endif
43908char gethostbyname ();
43909int
43910main ()
43911{
43912return gethostbyname ();
43913  ;
43914  return 0;
43915}
43916_ACEOF
43917if ac_fn_cxx_try_link "$LINENO"; then :
43918  ac_cv_lib_bsd_gethostbyname=yes
43919else
43920  ac_cv_lib_bsd_gethostbyname=no
43921fi
43922rm -f core conftest.err conftest.$ac_objext \
43923    conftest$ac_exeext conftest.$ac_ext
43924LIBS=$ac_check_lib_save_LIBS
43925fi
43926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43927$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43928if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43929  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43930fi
43931
43932      fi
43933    fi
43934
43935    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43936    # socket/setsockopt and other routines are undefined under SCO ODT
43937    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43938    # on later versions), says Simon Leinen: it contains gethostby*
43939    # variants that don't use the name server (or something).  -lsocket
43940    # must be given before -lnsl if both are needed.  We assume that
43941    # if connect needs -lnsl, so does gethostbyname.
43942    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43943if test "x$ac_cv_func_connect" = xyes; then :
43944
43945fi
43946
43947    if test $ac_cv_func_connect = no; then
43948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43949$as_echo_n "checking for connect in -lsocket... " >&6; }
43950if ${ac_cv_lib_socket_connect+:} false; then :
43951  $as_echo_n "(cached) " >&6
43952else
43953  ac_check_lib_save_LIBS=$LIBS
43954LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43956/* end confdefs.h.  */
43957
43958/* Override any GCC internal prototype to avoid an error.
43959   Use char because int might match the return type of a GCC
43960   builtin and then its argument prototype would still apply.  */
43961#ifdef __cplusplus
43962extern "C"
43963#endif
43964char connect ();
43965int
43966main ()
43967{
43968return connect ();
43969  ;
43970  return 0;
43971}
43972_ACEOF
43973if ac_fn_cxx_try_link "$LINENO"; then :
43974  ac_cv_lib_socket_connect=yes
43975else
43976  ac_cv_lib_socket_connect=no
43977fi
43978rm -f core conftest.err conftest.$ac_objext \
43979    conftest$ac_exeext conftest.$ac_ext
43980LIBS=$ac_check_lib_save_LIBS
43981fi
43982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43983$as_echo "$ac_cv_lib_socket_connect" >&6; }
43984if test "x$ac_cv_lib_socket_connect" = xyes; then :
43985  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43986fi
43987
43988    fi
43989
43990    # Guillermo Gomez says -lposix is necessary on A/UX.
43991    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43992if test "x$ac_cv_func_remove" = xyes; then :
43993
43994fi
43995
43996    if test $ac_cv_func_remove = no; then
43997      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43998$as_echo_n "checking for remove in -lposix... " >&6; }
43999if ${ac_cv_lib_posix_remove+:} false; then :
44000  $as_echo_n "(cached) " >&6
44001else
44002  ac_check_lib_save_LIBS=$LIBS
44003LIBS="-lposix  $LIBS"
44004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44005/* end confdefs.h.  */
44006
44007/* Override any GCC internal prototype to avoid an error.
44008   Use char because int might match the return type of a GCC
44009   builtin and then its argument prototype would still apply.  */
44010#ifdef __cplusplus
44011extern "C"
44012#endif
44013char remove ();
44014int
44015main ()
44016{
44017return remove ();
44018  ;
44019  return 0;
44020}
44021_ACEOF
44022if ac_fn_cxx_try_link "$LINENO"; then :
44023  ac_cv_lib_posix_remove=yes
44024else
44025  ac_cv_lib_posix_remove=no
44026fi
44027rm -f core conftest.err conftest.$ac_objext \
44028    conftest$ac_exeext conftest.$ac_ext
44029LIBS=$ac_check_lib_save_LIBS
44030fi
44031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44032$as_echo "$ac_cv_lib_posix_remove" >&6; }
44033if test "x$ac_cv_lib_posix_remove" = xyes; then :
44034  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44035fi
44036
44037    fi
44038
44039    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44040    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44041if test "x$ac_cv_func_shmat" = xyes; then :
44042
44043fi
44044
44045    if test $ac_cv_func_shmat = no; then
44046      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44047$as_echo_n "checking for shmat in -lipc... " >&6; }
44048if ${ac_cv_lib_ipc_shmat+:} false; then :
44049  $as_echo_n "(cached) " >&6
44050else
44051  ac_check_lib_save_LIBS=$LIBS
44052LIBS="-lipc  $LIBS"
44053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44054/* end confdefs.h.  */
44055
44056/* Override any GCC internal prototype to avoid an error.
44057   Use char because int might match the return type of a GCC
44058   builtin and then its argument prototype would still apply.  */
44059#ifdef __cplusplus
44060extern "C"
44061#endif
44062char shmat ();
44063int
44064main ()
44065{
44066return shmat ();
44067  ;
44068  return 0;
44069}
44070_ACEOF
44071if ac_fn_cxx_try_link "$LINENO"; then :
44072  ac_cv_lib_ipc_shmat=yes
44073else
44074  ac_cv_lib_ipc_shmat=no
44075fi
44076rm -f core conftest.err conftest.$ac_objext \
44077    conftest$ac_exeext conftest.$ac_ext
44078LIBS=$ac_check_lib_save_LIBS
44079fi
44080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44081$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44082if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44083  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44084fi
44085
44086    fi
44087  fi
44088
44089  # Check for libraries that X11R6 Xt/Xaw programs need.
44090  ac_save_LDFLAGS=$LDFLAGS
44091  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44092  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44093  # check for ICE first), but we must link in the order -lSM -lICE or
44094  # we get undefined symbols.  So assume we have SM if we have ICE.
44095  # These have to be linked with before -lX11, unlike the other
44096  # libraries we check for below, so use a different variable.
44097  # John Interrante, Karl Berry
44098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44099$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44100if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44101  $as_echo_n "(cached) " >&6
44102else
44103  ac_check_lib_save_LIBS=$LIBS
44104LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44106/* end confdefs.h.  */
44107
44108/* Override any GCC internal prototype to avoid an error.
44109   Use char because int might match the return type of a GCC
44110   builtin and then its argument prototype would still apply.  */
44111#ifdef __cplusplus
44112extern "C"
44113#endif
44114char IceConnectionNumber ();
44115int
44116main ()
44117{
44118return IceConnectionNumber ();
44119  ;
44120  return 0;
44121}
44122_ACEOF
44123if ac_fn_cxx_try_link "$LINENO"; then :
44124  ac_cv_lib_ICE_IceConnectionNumber=yes
44125else
44126  ac_cv_lib_ICE_IceConnectionNumber=no
44127fi
44128rm -f core conftest.err conftest.$ac_objext \
44129    conftest$ac_exeext conftest.$ac_ext
44130LIBS=$ac_check_lib_save_LIBS
44131fi
44132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44133$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44134if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44135  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44136fi
44137
44138  LDFLAGS=$ac_save_LDFLAGS
44139
44140fi
44141
44142
44143    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44144    # this doesn't make sense so we remove it.
44145    if test "x$COMPILE_TYPE" = xcross; then
44146      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44147    fi
44148
44149    if test "x$no_x" = xyes; then
44150
44151  # Print a helpful message on how to acquire the necessary build dependency.
44152  # x11 is the help tag: freetype, cups, pulse, alsa etc
44153  MISSING_DEPENDENCY=x11
44154
44155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44156    cygwin_help $MISSING_DEPENDENCY
44157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44158    msys_help $MISSING_DEPENDENCY
44159  else
44160    PKGHANDLER_COMMAND=
44161
44162    case $PKGHANDLER in
44163      apt-get)
44164        apt_help     $MISSING_DEPENDENCY ;;
44165      yum)
44166        yum_help     $MISSING_DEPENDENCY ;;
44167      port)
44168        port_help    $MISSING_DEPENDENCY ;;
44169      pkgutil)
44170        pkgutil_help $MISSING_DEPENDENCY ;;
44171      pkgadd)
44172        pkgadd_help  $MISSING_DEPENDENCY ;;
44173    esac
44174
44175    if test "x$PKGHANDLER_COMMAND" != x; then
44176      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44177    fi
44178  fi
44179
44180      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44181    fi
44182
44183    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44184      OPENWIN_HOME="/usr/openwin"
44185      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44186      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44187          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44188          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44189          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44190    fi
44191
44192    ac_ext=c
44193ac_cpp='$CPP $CPPFLAGS'
44194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44196ac_compiler_gnu=$ac_cv_c_compiler_gnu
44197
44198    OLD_CFLAGS="$CFLAGS"
44199    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44200
44201    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44202    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44203do :
44204  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44205ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44206          # include <X11/Xlib.h>
44207          # include <X11/Xutil.h>
44208
44209
44210"
44211if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44212  cat >>confdefs.h <<_ACEOF
44213#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44214_ACEOF
44215 X11_HEADERS_OK=yes
44216else
44217  X11_HEADERS_OK=no; break
44218fi
44219
44220done
44221
44222
44223    if test "x$X11_HEADERS_OK" = xno; then
44224
44225  # Print a helpful message on how to acquire the necessary build dependency.
44226  # x11 is the help tag: freetype, cups, pulse, alsa etc
44227  MISSING_DEPENDENCY=x11
44228
44229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44230    cygwin_help $MISSING_DEPENDENCY
44231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44232    msys_help $MISSING_DEPENDENCY
44233  else
44234    PKGHANDLER_COMMAND=
44235
44236    case $PKGHANDLER in
44237      apt-get)
44238        apt_help     $MISSING_DEPENDENCY ;;
44239      yum)
44240        yum_help     $MISSING_DEPENDENCY ;;
44241      port)
44242        port_help    $MISSING_DEPENDENCY ;;
44243      pkgutil)
44244        pkgutil_help $MISSING_DEPENDENCY ;;
44245      pkgadd)
44246        pkgadd_help  $MISSING_DEPENDENCY ;;
44247    esac
44248
44249    if test "x$PKGHANDLER_COMMAND" != x; then
44250      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44251    fi
44252  fi
44253
44254      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44255    fi
44256
44257    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44258    # defined in libawt_xawt.
44259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44260$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44262/* end confdefs.h.  */
44263#include <X11/extensions/Xrender.h>
44264int
44265main ()
44266{
44267XLinearGradient x;
44268  ;
44269  return 0;
44270}
44271_ACEOF
44272if ac_fn_c_try_compile "$LINENO"; then :
44273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44274$as_echo "yes" >&6; }
44275else
44276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44277$as_echo "no" >&6; }
44278         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44279fi
44280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44281
44282    CFLAGS="$OLD_CFLAGS"
44283    ac_ext=cpp
44284ac_cpp='$CXXCPP $CPPFLAGS'
44285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44288
44289  fi # X11_NOT_NEEDED
44290
44291
44292
44293
44294
44295
44296  ###############################################################################
44297  #
44298  # The common unix printing system cups is used to print from java.
44299  #
44300
44301# Check whether --with-cups was given.
44302if test "${with_cups+set}" = set; then :
44303  withval=$with_cups;
44304fi
44305
44306
44307# Check whether --with-cups-include was given.
44308if test "${with_cups_include+set}" = set; then :
44309  withval=$with_cups_include;
44310fi
44311
44312
44313  if test "x$CUPS_NOT_NEEDED" = xyes; then
44314    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44315      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44316$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44317    fi
44318    CUPS_CFLAGS=
44319  else
44320    CUPS_FOUND=no
44321
44322    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44323      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44324    fi
44325
44326    if test "x${with_cups}" != x; then
44327      CUPS_CFLAGS="-I${with_cups}/include"
44328      CUPS_FOUND=yes
44329    fi
44330    if test "x${with_cups_include}" != x; then
44331      CUPS_CFLAGS="-I${with_cups_include}"
44332      CUPS_FOUND=yes
44333    fi
44334    if test "x$CUPS_FOUND" = xno; then
44335
44336
44337  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44338    # Source the builddeps file again, to make sure it uses the latest variables!
44339    . $builddepsfile
44340    # Look for a target and build machine specific resource!
44341    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44342    if test "x$resource" = x; then
44343      # Ok, lets instead look for a target specific resource
44344      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44345    fi
44346    if test "x$resource" = x; then
44347      # Ok, lets instead look for a build specific resource
44348      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44349    fi
44350    if test "x$resource" = x; then
44351      # Ok, lets instead look for a generic resource
44352      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44353      resource=${builddep_cups}
44354    fi
44355    if test "x$resource" != x; then
44356      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44357$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44358      # If the resource in the builddeps.conf file is an existing directory,
44359      # for example /java/linux/cups
44360      if test -d ${resource}; then
44361        depdir=${resource}
44362      else
44363
44364  # cups is for example mymodule
44365  # $resource is for example libs/general/libmymod_1_2_3.zip
44366  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44367  # $with_builddeps_dir is for example /localhome/builddeps
44368  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44369  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44370  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44371  filename=`basename $resource`
44372  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44373  filebase=${filename%%.*}
44374  extension=${filename#*.}
44375  installdir=$with_builddeps_dir/$filebase
44376  if test ! -f $installdir/$filename.unpacked; then
44377    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44378$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44379    if test ! -d $installdir; then
44380      mkdir -p $installdir
44381    fi
44382    if test ! -d $installdir; then
44383      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44384    fi
44385    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44386    touch $tmpfile
44387    if test ! -f $tmpfile; then
44388      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44389    fi
44390
44391  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44392  # $tmpfile is the local file name for the downloaded file.
44393  VALID_TOOL=no
44394  if test "x$BDEPS_FTP" = xwget; then
44395    VALID_TOOL=yes
44396    wget -O $tmpfile $with_builddeps_server/$resource
44397  fi
44398  if test "x$BDEPS_FTP" = xlftp; then
44399    VALID_TOOL=yes
44400    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44401  fi
44402  if test "x$BDEPS_FTP" = xftp; then
44403    VALID_TOOL=yes
44404    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44405    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44406    FTPUSERPWD=${FTPSERVER%%@*}
44407    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44408      FTPUSER=${userpwd%%:*}
44409      FTPPWD=${userpwd#*@}
44410      FTPSERVER=${FTPSERVER#*@}
44411    else
44412      FTPUSER=ftp
44413      FTPPWD=ftp
44414    fi
44415    # the "pass" command does not work on some
44416    # ftp clients (read ftp.exe) but if it works,
44417    # passive mode is better!
44418    ( \
44419        echo "user $FTPUSER $FTPPWD"        ; \
44420        echo "pass"                         ; \
44421        echo "bin"                          ; \
44422        echo "get $FTPPATH $tmpfile"              ; \
44423    ) | ftp -in $FTPSERVER
44424  fi
44425  if test "x$VALID_TOOL" != xyes; then
44426    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44427  fi
44428
44429    mv $tmpfile $installdir/$filename
44430    if test ! -s $installdir/$filename; then
44431      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44432    fi
44433    case "$extension" in
44434      zip)  echo "Unzipping $installdir/$filename..."
44435        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44436        ;;
44437      tar.gz) echo "Untaring $installdir/$filename..."
44438        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44439        ;;
44440      tgz) echo "Untaring $installdir/$filename..."
44441        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44442        ;;
44443      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44444        ;;
44445    esac
44446  fi
44447  if test -f $installdir/$filename.unpacked; then
44448    depdir=$installdir
44449  fi
44450
44451      fi
44452      # Source the builddeps file again, because in the previous command, the depdir
44453      # was updated to point at the current build dependency install directory.
44454      . $builddepsfile
44455      # Now extract variables from the builddeps.conf files.
44456      theroot=${builddep_cups_ROOT}
44457      thecflags=${builddep_cups_CFLAGS}
44458      thelibs=${builddep_cups_LIBS}
44459      if test "x$depdir" = x; then
44460        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44461      fi
44462      CUPS=$depdir
44463      if test "x$theroot" != x; then
44464        CUPS="$theroot"
44465      fi
44466      if test "x$thecflags" != x; then
44467        CUPS_CFLAGS="$thecflags"
44468      fi
44469      if test "x$thelibs" != x; then
44470        CUPS_LIBS="$thelibs"
44471      fi
44472      CUPS_FOUND=yes
44473
44474    fi
44475
44476  fi
44477
44478    fi
44479    if test "x$CUPS_FOUND" = xno; then
44480      # Are the cups headers installed in the default /usr/include location?
44481      for ac_header in cups/cups.h cups/ppd.h
44482do :
44483  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44484ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44485if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44486  cat >>confdefs.h <<_ACEOF
44487#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44488_ACEOF
44489
44490            CUPS_FOUND=yes
44491            CUPS_CFLAGS=
44492            DEFAULT_CUPS=yes
44493
44494
44495fi
44496
44497done
44498
44499    fi
44500    if test "x$CUPS_FOUND" = xno; then
44501      # Getting nervous now? Lets poke around for standard Solaris third-party
44502      # package installation locations.
44503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44504$as_echo_n "checking for cups headers... " >&6; }
44505      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44506        # An SFW package seems to be installed!
44507        CUPS_FOUND=yes
44508        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44509      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44510        # A CSW package seems to be installed!
44511        CUPS_FOUND=yes
44512        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44513      fi
44514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44515$as_echo "$CUPS_FOUND" >&6; }
44516    fi
44517    if test "x$CUPS_FOUND" = xno; then
44518
44519  # Print a helpful message on how to acquire the necessary build dependency.
44520  # cups is the help tag: freetype, cups, pulse, alsa etc
44521  MISSING_DEPENDENCY=cups
44522
44523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44524    cygwin_help $MISSING_DEPENDENCY
44525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44526    msys_help $MISSING_DEPENDENCY
44527  else
44528    PKGHANDLER_COMMAND=
44529
44530    case $PKGHANDLER in
44531      apt-get)
44532        apt_help     $MISSING_DEPENDENCY ;;
44533      yum)
44534        yum_help     $MISSING_DEPENDENCY ;;
44535      port)
44536        port_help    $MISSING_DEPENDENCY ;;
44537      pkgutil)
44538        pkgutil_help $MISSING_DEPENDENCY ;;
44539      pkgadd)
44540        pkgadd_help  $MISSING_DEPENDENCY ;;
44541    esac
44542
44543    if test "x$PKGHANDLER_COMMAND" != x; then
44544      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44545    fi
44546  fi
44547
44548      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44549    fi
44550  fi
44551
44552
44553
44554
44555
44556
44557  ###############################################################################
44558  #
44559  # The ubiquitous freetype library is used to render fonts.
44560  #
44561
44562# Check whether --with-freetype was given.
44563if test "${with_freetype+set}" = set; then :
44564  withval=$with_freetype;
44565fi
44566
44567
44568# Check whether --with-freetype-include was given.
44569if test "${with_freetype_include+set}" = set; then :
44570  withval=$with_freetype_include;
44571fi
44572
44573
44574# Check whether --with-freetype-lib was given.
44575if test "${with_freetype_lib+set}" = set; then :
44576  withval=$with_freetype_lib;
44577fi
44578
44579
44580# Check whether --with-freetype-src was given.
44581if test "${with_freetype_src+set}" = set; then :
44582  withval=$with_freetype_src;
44583fi
44584
44585  # Check whether --enable-freetype-bundling was given.
44586if test "${enable_freetype_bundling+set}" = set; then :
44587  enableval=$enable_freetype_bundling;
44588fi
44589
44590
44591  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44592  FREETYPE_BASE_NAME=freetype
44593  FREETYPE_CFLAGS=
44594  FREETYPE_LIBS=
44595  FREETYPE_BUNDLE_LIB_PATH=
44596
44597  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44598    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
44599      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44600$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44601    fi
44602    if test "x$enable_freetype_bundling" != x; then
44603      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44604$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44605    fi
44606  else
44607    # freetype is needed to build; go get it!
44608
44609    BUNDLE_FREETYPE="$enable_freetype_bundling"
44610
44611    if  test "x$with_freetype_src" != x; then
44612      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44613        # Try to build freetype if --with-freetype-src was given on Windows
44614
44615  FREETYPE_SRC_PATH="$with_freetype_src"
44616  BUILD_FREETYPE=yes
44617
44618  # Check if the freetype sources are acessible..
44619  if ! test -d $FREETYPE_SRC_PATH; then
44620    { $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
44621$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44622    BUILD_FREETYPE=no
44623  fi
44624  # ..and contain a vc2010 project file
44625  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44626  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44627    { $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
44628$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44629    BUILD_FREETYPE=no
44630  fi
44631  # Now check if configure found a version of 'msbuild.exe'
44632  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44633    { $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
44634$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;}
44635    BUILD_FREETYPE=no
44636  fi
44637
44638  # Ready to go..
44639  if test "x$BUILD_FREETYPE" = xyes; then
44640
44641    # msbuild requires trailing slashes for output directories
44642    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44643    freetype_lib_path_unix="$freetype_lib_path"
44644    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44645
44646  unix_path="$vcxproj_path"
44647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44648    windows_path=`$CYGPATH -m "$unix_path"`
44649    vcxproj_path="$windows_path"
44650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44651    windows_path=`cmd //c echo $unix_path`
44652    vcxproj_path="$windows_path"
44653  fi
44654
44655
44656  unix_path="$freetype_lib_path"
44657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44658    windows_path=`$CYGPATH -m "$unix_path"`
44659    freetype_lib_path="$windows_path"
44660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44661    windows_path=`cmd //c echo $unix_path`
44662    freetype_lib_path="$windows_path"
44663  fi
44664
44665
44666  unix_path="$freetype_obj_path"
44667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44668    windows_path=`$CYGPATH -m "$unix_path"`
44669    freetype_obj_path="$windows_path"
44670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44671    windows_path=`cmd //c echo $unix_path`
44672    freetype_obj_path="$windows_path"
44673  fi
44674
44675    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44676      freetype_platform=x64
44677    else
44678      freetype_platform=win32
44679    fi
44680
44681    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44682    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44683    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44684    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44685    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44686$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44687
44688    # First we try to build the freetype.dll
44689    $ECHO -e "@echo off\n"\
44690	     "$MSBUILD $vcxproj_path "\
44691		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44692		       "/p:Configuration=\"Release Multithreaded\" "\
44693		       "/p:Platform=$freetype_platform "\
44694		       "/p:ConfigurationType=DynamicLibrary "\
44695		       "/p:TargetName=freetype "\
44696		       "/p:OutDir=\"$freetype_lib_path\" "\
44697		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44698    cmd /c freetype.bat
44699
44700    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44701      # If that succeeds we also build freetype.lib
44702      $ECHO -e "@echo off\n"\
44703	       "$MSBUILD $vcxproj_path "\
44704			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44705			 "/p:Configuration=\"Release Multithreaded\" "\
44706			 "/p:Platform=$freetype_platform "\
44707			 "/p:ConfigurationType=StaticLibrary "\
44708			 "/p:TargetName=freetype "\
44709			 "/p:OutDir=\"$freetype_lib_path\" "\
44710			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44711      cmd /c freetype.bat
44712
44713      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44714	# Once we build both, lib and dll, set freetype lib and include path appropriately
44715	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44716	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44717	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44718$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44719      else
44720	BUILD_FREETYPE=no
44721      fi
44722    else
44723      BUILD_FREETYPE=no
44724    fi
44725  fi
44726
44727        if test "x$BUILD_FREETYPE" = xyes; then
44728          # Okay, we built it. Check that it works.
44729
44730  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44731  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44732  METHOD="--with-freetype-src"
44733
44734  # Let's start with an optimistic view of the world :-)
44735  FOUND_FREETYPE=yes
44736
44737  # First look for the canonical freetype main include file ft2build.h.
44738  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44739    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44740    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44741    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44742      # Fail.
44743      FOUND_FREETYPE=no
44744    fi
44745  fi
44746
44747  if test "x$FOUND_FREETYPE" = xyes; then
44748    # Include file found, let's continue the sanity check.
44749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44750$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44751
44752    # Reset to default value
44753    FREETYPE_BASE_NAME=freetype
44754    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44755    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44756      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44758        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44759        # for the .6 version explicitly.
44760        FREETYPE_BASE_NAME=freetype.6
44761        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44762        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44763$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44764      else
44765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44767        FOUND_FREETYPE=no
44768      fi
44769    else
44770      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44771        # On Windows, we will need both .lib and .dll file.
44772        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44773          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44775          FOUND_FREETYPE=no
44776        fi
44777      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44778          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44779        # Found lib in isa dir, use that instead.
44780        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44781        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44782$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44783      fi
44784    fi
44785  fi
44786
44787  if test "x$FOUND_FREETYPE" = xyes; then
44788
44789  # Only process if variable expands to non-empty
44790
44791  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44793
44794  # Input might be given as Windows format, start by converting to
44795  # unix format.
44796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44797  new_path=`$CYGPATH -u "$path"`
44798
44799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44802  # "foo.exe" is OK but "foo" is an error.
44803  #
44804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44805  # It is also a way to make sure we got the proper file name for the real test later on.
44806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44807  if test "x$test_shortpath" = x; then
44808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44811  fi
44812
44813  # Call helper function which possibly converts this using DOS-style short mode.
44814  # If so, the updated path is stored in $new_path.
44815
44816  input_path="$new_path"
44817  # Check if we need to convert this using DOS-style short mode. If the path
44818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44819  # take no chances and rewrite it.
44820  # Note: m4 eats our [], so we need to use [ and ] instead.
44821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44822  if test "x$has_forbidden_chars" != x; then
44823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44827      # Going to short mode and back again did indeed matter. Since short mode is
44828      # case insensitive, let's make it lowercase to improve readability.
44829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44830      # Now convert it back to Unix-style (cygpath)
44831      input_path=`$CYGPATH -u "$shortmode_path"`
44832      new_path="$input_path"
44833    fi
44834  fi
44835
44836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44837  if test "x$test_cygdrive_prefix" = x; then
44838    # As a simple fix, exclude /usr/bin since it's not a real path.
44839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44841      # a path prefixed by /cygdrive for fixpath to work.
44842      new_path="$CYGWIN_ROOT_PATH$input_path"
44843    fi
44844  fi
44845
44846
44847  if test "x$path" != "x$new_path"; then
44848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44851  fi
44852
44853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44854
44855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44856  has_colon=`$ECHO $path | $GREP ^.:`
44857  new_path="$path"
44858  if test "x$has_colon" = x; then
44859    # Not in mixed or Windows style, start by that.
44860    new_path=`cmd //c echo $path`
44861  fi
44862
44863
44864  input_path="$new_path"
44865  # Check if we need to convert this using DOS-style short mode. If the path
44866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44867  # take no chances and rewrite it.
44868  # Note: m4 eats our [], so we need to use [ and ] instead.
44869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44870  if test "x$has_forbidden_chars" != x; then
44871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44873  fi
44874
44875
44876  windows_path="$new_path"
44877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44878    unix_path=`$CYGPATH -u "$windows_path"`
44879    new_path="$unix_path"
44880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44882    new_path="$unix_path"
44883  fi
44884
44885  if test "x$path" != "x$new_path"; then
44886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44889  fi
44890
44891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44893
44894    else
44895      # We're on a unix platform. Hooray! :)
44896      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44897      has_space=`$ECHO "$path" | $GREP " "`
44898      if test "x$has_space" != x; then
44899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44902      fi
44903
44904      # Use eval to expand a potential ~
44905      eval path="$path"
44906      if test ! -f "$path" && test ! -d "$path"; then
44907        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44908      fi
44909
44910      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44911    fi
44912  fi
44913
44914
44915  # Only process if variable expands to non-empty
44916
44917  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919
44920  # Input might be given as Windows format, start by converting to
44921  # unix format.
44922  path="$POTENTIAL_FREETYPE_LIB_PATH"
44923  new_path=`$CYGPATH -u "$path"`
44924
44925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44928  # "foo.exe" is OK but "foo" is an error.
44929  #
44930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44931  # It is also a way to make sure we got the proper file name for the real test later on.
44932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44933  if test "x$test_shortpath" = x; then
44934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44936    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44937  fi
44938
44939  # Call helper function which possibly converts this using DOS-style short mode.
44940  # If so, the updated path is stored in $new_path.
44941
44942  input_path="$new_path"
44943  # Check if we need to convert this using DOS-style short mode. If the path
44944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44945  # take no chances and rewrite it.
44946  # Note: m4 eats our [], so we need to use [ and ] instead.
44947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44948  if test "x$has_forbidden_chars" != x; then
44949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44953      # Going to short mode and back again did indeed matter. Since short mode is
44954      # case insensitive, let's make it lowercase to improve readability.
44955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44956      # Now convert it back to Unix-style (cygpath)
44957      input_path=`$CYGPATH -u "$shortmode_path"`
44958      new_path="$input_path"
44959    fi
44960  fi
44961
44962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44963  if test "x$test_cygdrive_prefix" = x; then
44964    # As a simple fix, exclude /usr/bin since it's not a real path.
44965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44967      # a path prefixed by /cygdrive for fixpath to work.
44968      new_path="$CYGWIN_ROOT_PATH$input_path"
44969    fi
44970  fi
44971
44972
44973  if test "x$path" != "x$new_path"; then
44974    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44977  fi
44978
44979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44980
44981  path="$POTENTIAL_FREETYPE_LIB_PATH"
44982  has_colon=`$ECHO $path | $GREP ^.:`
44983  new_path="$path"
44984  if test "x$has_colon" = x; then
44985    # Not in mixed or Windows style, start by that.
44986    new_path=`cmd //c echo $path`
44987  fi
44988
44989
44990  input_path="$new_path"
44991  # Check if we need to convert this using DOS-style short mode. If the path
44992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44993  # take no chances and rewrite it.
44994  # Note: m4 eats our [], so we need to use [ and ] instead.
44995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44996  if test "x$has_forbidden_chars" != x; then
44997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44999  fi
45000
45001
45002  windows_path="$new_path"
45003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45004    unix_path=`$CYGPATH -u "$windows_path"`
45005    new_path="$unix_path"
45006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45008    new_path="$unix_path"
45009  fi
45010
45011  if test "x$path" != "x$new_path"; then
45012    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45015  fi
45016
45017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45019
45020    else
45021      # We're on a unix platform. Hooray! :)
45022      path="$POTENTIAL_FREETYPE_LIB_PATH"
45023      has_space=`$ECHO "$path" | $GREP " "`
45024      if test "x$has_space" != x; then
45025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45027        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45028      fi
45029
45030      # Use eval to expand a potential ~
45031      eval path="$path"
45032      if test ! -f "$path" && test ! -d "$path"; then
45033        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45034      fi
45035
45036      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45037    fi
45038  fi
45039
45040
45041    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45043$as_echo_n "checking for freetype includes... " >&6; }
45044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45045$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45046    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45048$as_echo_n "checking for freetype libraries... " >&6; }
45049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45050$as_echo "$FREETYPE_LIB_PATH" >&6; }
45051  fi
45052
45053          if test "x$FOUND_FREETYPE" != xyes; then
45054            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45055          fi
45056        else
45057          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45058$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45059          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45060        fi
45061      else
45062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45063$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45064      fi
45065    fi
45066
45067    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45068      # User has specified settings
45069
45070      if test "x$BUNDLE_FREETYPE" = x; then
45071        # If not specified, default is to bundle freetype
45072        BUNDLE_FREETYPE=yes
45073      fi
45074
45075      if test "x$with_freetype" != x; then
45076        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45077        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45078      fi
45079
45080      # Allow --with-freetype-lib and --with-freetype-include to override
45081      if test "x$with_freetype_include" != x; then
45082        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45083      fi
45084      if test "x$with_freetype_lib" != x; then
45085        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45086      fi
45087
45088      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45089        # Okay, we got it. Check that it works.
45090
45091  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45092  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45093  METHOD="--with-freetype"
45094
45095  # Let's start with an optimistic view of the world :-)
45096  FOUND_FREETYPE=yes
45097
45098  # First look for the canonical freetype main include file ft2build.h.
45099  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45100    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45101    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45102    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45103      # Fail.
45104      FOUND_FREETYPE=no
45105    fi
45106  fi
45107
45108  if test "x$FOUND_FREETYPE" = xyes; then
45109    # Include file found, let's continue the sanity check.
45110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45111$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45112
45113    # Reset to default value
45114    FREETYPE_BASE_NAME=freetype
45115    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45116    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45117      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45119        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45120        # for the .6 version explicitly.
45121        FREETYPE_BASE_NAME=freetype.6
45122        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45123        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45124$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45125      else
45126        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45127$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45128        FOUND_FREETYPE=no
45129      fi
45130    else
45131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45132        # On Windows, we will need both .lib and .dll file.
45133        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45134          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45135$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45136          FOUND_FREETYPE=no
45137        fi
45138      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45139          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45140        # Found lib in isa dir, use that instead.
45141        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45142        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45143$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45144      fi
45145    fi
45146  fi
45147
45148  if test "x$FOUND_FREETYPE" = xyes; then
45149
45150  # Only process if variable expands to non-empty
45151
45152  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45154
45155  # Input might be given as Windows format, start by converting to
45156  # unix format.
45157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45158  new_path=`$CYGPATH -u "$path"`
45159
45160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45163  # "foo.exe" is OK but "foo" is an error.
45164  #
45165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45166  # It is also a way to make sure we got the proper file name for the real test later on.
45167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45168  if test "x$test_shortpath" = x; then
45169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45171    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45172  fi
45173
45174  # Call helper function which possibly converts this using DOS-style short mode.
45175  # If so, the updated path is stored in $new_path.
45176
45177  input_path="$new_path"
45178  # Check if we need to convert this using DOS-style short mode. If the path
45179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45180  # take no chances and rewrite it.
45181  # Note: m4 eats our [], so we need to use [ and ] instead.
45182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45183  if test "x$has_forbidden_chars" != x; then
45184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45188      # Going to short mode and back again did indeed matter. Since short mode is
45189      # case insensitive, let's make it lowercase to improve readability.
45190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45191      # Now convert it back to Unix-style (cygpath)
45192      input_path=`$CYGPATH -u "$shortmode_path"`
45193      new_path="$input_path"
45194    fi
45195  fi
45196
45197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45198  if test "x$test_cygdrive_prefix" = x; then
45199    # As a simple fix, exclude /usr/bin since it's not a real path.
45200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45202      # a path prefixed by /cygdrive for fixpath to work.
45203      new_path="$CYGWIN_ROOT_PATH$input_path"
45204    fi
45205  fi
45206
45207
45208  if test "x$path" != "x$new_path"; then
45209    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45212  fi
45213
45214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45215
45216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45217  has_colon=`$ECHO $path | $GREP ^.:`
45218  new_path="$path"
45219  if test "x$has_colon" = x; then
45220    # Not in mixed or Windows style, start by that.
45221    new_path=`cmd //c echo $path`
45222  fi
45223
45224
45225  input_path="$new_path"
45226  # Check if we need to convert this using DOS-style short mode. If the path
45227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45228  # take no chances and rewrite it.
45229  # Note: m4 eats our [], so we need to use [ and ] instead.
45230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45231  if test "x$has_forbidden_chars" != x; then
45232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45234  fi
45235
45236
45237  windows_path="$new_path"
45238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45239    unix_path=`$CYGPATH -u "$windows_path"`
45240    new_path="$unix_path"
45241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45243    new_path="$unix_path"
45244  fi
45245
45246  if test "x$path" != "x$new_path"; then
45247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45250  fi
45251
45252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45254
45255    else
45256      # We're on a unix platform. Hooray! :)
45257      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45258      has_space=`$ECHO "$path" | $GREP " "`
45259      if test "x$has_space" != x; then
45260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45263      fi
45264
45265      # Use eval to expand a potential ~
45266      eval path="$path"
45267      if test ! -f "$path" && test ! -d "$path"; then
45268        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45269      fi
45270
45271      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45272    fi
45273  fi
45274
45275
45276  # Only process if variable expands to non-empty
45277
45278  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45280
45281  # Input might be given as Windows format, start by converting to
45282  # unix format.
45283  path="$POTENTIAL_FREETYPE_LIB_PATH"
45284  new_path=`$CYGPATH -u "$path"`
45285
45286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45289  # "foo.exe" is OK but "foo" is an error.
45290  #
45291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45292  # It is also a way to make sure we got the proper file name for the real test later on.
45293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45294  if test "x$test_shortpath" = x; then
45295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45297    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45298  fi
45299
45300  # Call helper function which possibly converts this using DOS-style short mode.
45301  # If so, the updated path is stored in $new_path.
45302
45303  input_path="$new_path"
45304  # Check if we need to convert this using DOS-style short mode. If the path
45305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45306  # take no chances and rewrite it.
45307  # Note: m4 eats our [], so we need to use [ and ] instead.
45308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45309  if test "x$has_forbidden_chars" != x; then
45310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45314      # Going to short mode and back again did indeed matter. Since short mode is
45315      # case insensitive, let's make it lowercase to improve readability.
45316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45317      # Now convert it back to Unix-style (cygpath)
45318      input_path=`$CYGPATH -u "$shortmode_path"`
45319      new_path="$input_path"
45320    fi
45321  fi
45322
45323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45324  if test "x$test_cygdrive_prefix" = x; then
45325    # As a simple fix, exclude /usr/bin since it's not a real path.
45326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45328      # a path prefixed by /cygdrive for fixpath to work.
45329      new_path="$CYGWIN_ROOT_PATH$input_path"
45330    fi
45331  fi
45332
45333
45334  if test "x$path" != "x$new_path"; then
45335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45338  fi
45339
45340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45341
45342  path="$POTENTIAL_FREETYPE_LIB_PATH"
45343  has_colon=`$ECHO $path | $GREP ^.:`
45344  new_path="$path"
45345  if test "x$has_colon" = x; then
45346    # Not in mixed or Windows style, start by that.
45347    new_path=`cmd //c echo $path`
45348  fi
45349
45350
45351  input_path="$new_path"
45352  # Check if we need to convert this using DOS-style short mode. If the path
45353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45354  # take no chances and rewrite it.
45355  # Note: m4 eats our [], so we need to use [ and ] instead.
45356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45357  if test "x$has_forbidden_chars" != x; then
45358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45360  fi
45361
45362
45363  windows_path="$new_path"
45364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45365    unix_path=`$CYGPATH -u "$windows_path"`
45366    new_path="$unix_path"
45367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45369    new_path="$unix_path"
45370  fi
45371
45372  if test "x$path" != "x$new_path"; then
45373    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45376  fi
45377
45378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45380
45381    else
45382      # We're on a unix platform. Hooray! :)
45383      path="$POTENTIAL_FREETYPE_LIB_PATH"
45384      has_space=`$ECHO "$path" | $GREP " "`
45385      if test "x$has_space" != x; then
45386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45389      fi
45390
45391      # Use eval to expand a potential ~
45392      eval path="$path"
45393      if test ! -f "$path" && test ! -d "$path"; then
45394        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45395      fi
45396
45397      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45398    fi
45399  fi
45400
45401
45402    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45404$as_echo_n "checking for freetype includes... " >&6; }
45405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45406$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45407    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45409$as_echo_n "checking for freetype libraries... " >&6; }
45410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45411$as_echo "$FREETYPE_LIB_PATH" >&6; }
45412  fi
45413
45414        if test "x$FOUND_FREETYPE" != xyes; then
45415          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45416        fi
45417      else
45418        # User specified only one of lib or include. This is an error.
45419        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45420          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45421$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45422          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45423        else
45424          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45425$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45426          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45427        fi
45428      fi
45429    else
45430      # User did not specify settings, but we need freetype. Try to locate it.
45431
45432      if test "x$BUNDLE_FREETYPE" = x; then
45433        # If not specified, default is to bundle freetype only on windows
45434        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45435          BUNDLE_FREETYPE=yes
45436        else
45437          BUNDLE_FREETYPE=no
45438        fi
45439      fi
45440
45441      if test "x$FOUND_FREETYPE" != xyes; then
45442        # Check builddeps
45443
45444
45445  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45446    # Source the builddeps file again, to make sure it uses the latest variables!
45447    . $builddepsfile
45448    # Look for a target and build machine specific resource!
45449    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45450    if test "x$resource" = x; then
45451      # Ok, lets instead look for a target specific resource
45452      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45453    fi
45454    if test "x$resource" = x; then
45455      # Ok, lets instead look for a build specific resource
45456      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45457    fi
45458    if test "x$resource" = x; then
45459      # Ok, lets instead look for a generic resource
45460      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45461      resource=${builddep_freetype2}
45462    fi
45463    if test "x$resource" != x; then
45464      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45465$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45466      # If the resource in the builddeps.conf file is an existing directory,
45467      # for example /java/linux/cups
45468      if test -d ${resource}; then
45469        depdir=${resource}
45470      else
45471
45472  # freetype2 is for example mymodule
45473  # $resource is for example libs/general/libmymod_1_2_3.zip
45474  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45475  # $with_builddeps_dir is for example /localhome/builddeps
45476  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45477  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45478  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45479  filename=`basename $resource`
45480  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45481  filebase=${filename%%.*}
45482  extension=${filename#*.}
45483  installdir=$with_builddeps_dir/$filebase
45484  if test ! -f $installdir/$filename.unpacked; then
45485    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45486$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45487    if test ! -d $installdir; then
45488      mkdir -p $installdir
45489    fi
45490    if test ! -d $installdir; then
45491      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45492    fi
45493    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45494    touch $tmpfile
45495    if test ! -f $tmpfile; then
45496      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45497    fi
45498
45499  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45500  # $tmpfile is the local file name for the downloaded file.
45501  VALID_TOOL=no
45502  if test "x$BDEPS_FTP" = xwget; then
45503    VALID_TOOL=yes
45504    wget -O $tmpfile $with_builddeps_server/$resource
45505  fi
45506  if test "x$BDEPS_FTP" = xlftp; then
45507    VALID_TOOL=yes
45508    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45509  fi
45510  if test "x$BDEPS_FTP" = xftp; then
45511    VALID_TOOL=yes
45512    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45513    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45514    FTPUSERPWD=${FTPSERVER%%@*}
45515    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45516      FTPUSER=${userpwd%%:*}
45517      FTPPWD=${userpwd#*@}
45518      FTPSERVER=${FTPSERVER#*@}
45519    else
45520      FTPUSER=ftp
45521      FTPPWD=ftp
45522    fi
45523    # the "pass" command does not work on some
45524    # ftp clients (read ftp.exe) but if it works,
45525    # passive mode is better!
45526    ( \
45527        echo "user $FTPUSER $FTPPWD"        ; \
45528        echo "pass"                         ; \
45529        echo "bin"                          ; \
45530        echo "get $FTPPATH $tmpfile"              ; \
45531    ) | ftp -in $FTPSERVER
45532  fi
45533  if test "x$VALID_TOOL" != xyes; then
45534    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45535  fi
45536
45537    mv $tmpfile $installdir/$filename
45538    if test ! -s $installdir/$filename; then
45539      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45540    fi
45541    case "$extension" in
45542      zip)  echo "Unzipping $installdir/$filename..."
45543        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45544        ;;
45545      tar.gz) echo "Untaring $installdir/$filename..."
45546        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45547        ;;
45548      tgz) echo "Untaring $installdir/$filename..."
45549        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45550        ;;
45551      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45552        ;;
45553    esac
45554  fi
45555  if test -f $installdir/$filename.unpacked; then
45556    depdir=$installdir
45557  fi
45558
45559      fi
45560      # Source the builddeps file again, because in the previous command, the depdir
45561      # was updated to point at the current build dependency install directory.
45562      . $builddepsfile
45563      # Now extract variables from the builddeps.conf files.
45564      theroot=${builddep_freetype2_ROOT}
45565      thecflags=${builddep_freetype2_CFLAGS}
45566      thelibs=${builddep_freetype2_LIBS}
45567      if test "x$depdir" = x; then
45568        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45569      fi
45570      FREETYPE=$depdir
45571      if test "x$theroot" != x; then
45572        FREETYPE="$theroot"
45573      fi
45574      if test "x$thecflags" != x; then
45575        FREETYPE_CFLAGS="$thecflags"
45576      fi
45577      if test "x$thelibs" != x; then
45578        FREETYPE_LIBS="$thelibs"
45579      fi
45580      FOUND_FREETYPE=yes
45581      else FOUND_FREETYPE=no
45582
45583    fi
45584    else FOUND_FREETYPE=no
45585
45586  fi
45587
45588        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45589        if test "x$FOUND_FREETYPE" = xyes; then
45590          if test "x$BUNDLE_FREETYPE" = xyes; then
45591            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45592$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45593            FOUND_FREETYPE=no
45594          else
45595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45596$as_echo_n "checking for freetype... " >&6; }
45597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45598$as_echo "yes (using builddeps)" >&6; }
45599          fi
45600        fi
45601      fi
45602
45603      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45604      if test "x$SYSROOT" = x; then
45605        if test "x$FOUND_FREETYPE" != xyes; then
45606          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45607          if test "x$PKG_CONFIG" != x; then
45608
45609pkg_failed=no
45610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45611$as_echo_n "checking for FREETYPE... " >&6; }
45612
45613if test -n "$FREETYPE_CFLAGS"; then
45614    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45615 elif test -n "$PKG_CONFIG"; then
45616    if test -n "$PKG_CONFIG" && \
45617    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45618  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45619  ac_status=$?
45620  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45621  test $ac_status = 0; }; then
45622  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45623else
45624  pkg_failed=yes
45625fi
45626 else
45627    pkg_failed=untried
45628fi
45629if test -n "$FREETYPE_LIBS"; then
45630    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45631 elif test -n "$PKG_CONFIG"; then
45632    if test -n "$PKG_CONFIG" && \
45633    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45634  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45635  ac_status=$?
45636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45637  test $ac_status = 0; }; then
45638  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45639else
45640  pkg_failed=yes
45641fi
45642 else
45643    pkg_failed=untried
45644fi
45645
45646
45647
45648if test $pkg_failed = yes; then
45649
45650if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45651        _pkg_short_errors_supported=yes
45652else
45653        _pkg_short_errors_supported=no
45654fi
45655        if test $_pkg_short_errors_supported = yes; then
45656	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45657        else
45658	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45659        fi
45660	# Put the nasty error message in config.log where it belongs
45661	echo "$FREETYPE_PKG_ERRORS" >&5
45662
45663	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45664$as_echo "no" >&6; }
45665                FOUND_FREETYPE=no
45666elif test $pkg_failed = untried; then
45667	FOUND_FREETYPE=no
45668else
45669	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45670	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45672$as_echo "yes" >&6; }
45673	FOUND_FREETYPE=yes
45674fi
45675            if test "x$FOUND_FREETYPE" = xyes; then
45676              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45677              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45678              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45679              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45680                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45681              fi
45682              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45683              if test "x$BUNDLE_FREETYPE" = xyes; then
45684                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45685$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45686                FOUND_FREETYPE=no
45687              else
45688                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45689$as_echo_n "checking for freetype... " >&6; }
45690                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45691$as_echo "yes (using pkg-config)" >&6; }
45692              fi
45693            fi
45694          fi
45695        fi
45696      fi
45697
45698      if test "x$FOUND_FREETYPE" != xyes; then
45699        # Check in well-known locations
45700        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45701          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45702
45703  windows_path="$FREETYPE_BASE_DIR"
45704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45705    unix_path=`$CYGPATH -u "$windows_path"`
45706    FREETYPE_BASE_DIR="$unix_path"
45707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45709    FREETYPE_BASE_DIR="$unix_path"
45710  fi
45711
45712
45713  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45714  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45715  METHOD="well-known location"
45716
45717  # Let's start with an optimistic view of the world :-)
45718  FOUND_FREETYPE=yes
45719
45720  # First look for the canonical freetype main include file ft2build.h.
45721  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45722    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45723    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45724    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45725      # Fail.
45726      FOUND_FREETYPE=no
45727    fi
45728  fi
45729
45730  if test "x$FOUND_FREETYPE" = xyes; then
45731    # Include file found, let's continue the sanity check.
45732    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45733$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45734
45735    # Reset to default value
45736    FREETYPE_BASE_NAME=freetype
45737    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45738    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45739      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45740          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45741        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45742        # for the .6 version explicitly.
45743        FREETYPE_BASE_NAME=freetype.6
45744        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45745        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45746$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45747      else
45748        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45749$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45750        FOUND_FREETYPE=no
45751      fi
45752    else
45753      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45754        # On Windows, we will need both .lib and .dll file.
45755        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45756          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45757$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45758          FOUND_FREETYPE=no
45759        fi
45760      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45761          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45762        # Found lib in isa dir, use that instead.
45763        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45764        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45765$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45766      fi
45767    fi
45768  fi
45769
45770  if test "x$FOUND_FREETYPE" = xyes; then
45771
45772  # Only process if variable expands to non-empty
45773
45774  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45776
45777  # Input might be given as Windows format, start by converting to
45778  # unix format.
45779  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45780  new_path=`$CYGPATH -u "$path"`
45781
45782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45785  # "foo.exe" is OK but "foo" is an error.
45786  #
45787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45788  # It is also a way to make sure we got the proper file name for the real test later on.
45789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45790  if test "x$test_shortpath" = x; then
45791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45792$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45793    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45794  fi
45795
45796  # Call helper function which possibly converts this using DOS-style short mode.
45797  # If so, the updated path is stored in $new_path.
45798
45799  input_path="$new_path"
45800  # Check if we need to convert this using DOS-style short mode. If the path
45801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45802  # take no chances and rewrite it.
45803  # Note: m4 eats our [], so we need to use [ and ] instead.
45804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45805  if test "x$has_forbidden_chars" != x; then
45806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45810      # Going to short mode and back again did indeed matter. Since short mode is
45811      # case insensitive, let's make it lowercase to improve readability.
45812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45813      # Now convert it back to Unix-style (cygpath)
45814      input_path=`$CYGPATH -u "$shortmode_path"`
45815      new_path="$input_path"
45816    fi
45817  fi
45818
45819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45820  if test "x$test_cygdrive_prefix" = x; then
45821    # As a simple fix, exclude /usr/bin since it's not a real path.
45822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45824      # a path prefixed by /cygdrive for fixpath to work.
45825      new_path="$CYGWIN_ROOT_PATH$input_path"
45826    fi
45827  fi
45828
45829
45830  if test "x$path" != "x$new_path"; then
45831    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45833$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45834  fi
45835
45836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45837
45838  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45839  has_colon=`$ECHO $path | $GREP ^.:`
45840  new_path="$path"
45841  if test "x$has_colon" = x; then
45842    # Not in mixed or Windows style, start by that.
45843    new_path=`cmd //c echo $path`
45844  fi
45845
45846
45847  input_path="$new_path"
45848  # Check if we need to convert this using DOS-style short mode. If the path
45849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45850  # take no chances and rewrite it.
45851  # Note: m4 eats our [], so we need to use [ and ] instead.
45852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45853  if test "x$has_forbidden_chars" != x; then
45854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45856  fi
45857
45858
45859  windows_path="$new_path"
45860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45861    unix_path=`$CYGPATH -u "$windows_path"`
45862    new_path="$unix_path"
45863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45865    new_path="$unix_path"
45866  fi
45867
45868  if test "x$path" != "x$new_path"; then
45869    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45872  fi
45873
45874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45876
45877    else
45878      # We're on a unix platform. Hooray! :)
45879      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45880      has_space=`$ECHO "$path" | $GREP " "`
45881      if test "x$has_space" != x; then
45882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45883$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45885      fi
45886
45887      # Use eval to expand a potential ~
45888      eval path="$path"
45889      if test ! -f "$path" && test ! -d "$path"; then
45890        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45891      fi
45892
45893      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45894    fi
45895  fi
45896
45897
45898  # Only process if variable expands to non-empty
45899
45900  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45902
45903  # Input might be given as Windows format, start by converting to
45904  # unix format.
45905  path="$POTENTIAL_FREETYPE_LIB_PATH"
45906  new_path=`$CYGPATH -u "$path"`
45907
45908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45911  # "foo.exe" is OK but "foo" is an error.
45912  #
45913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45914  # It is also a way to make sure we got the proper file name for the real test later on.
45915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45916  if test "x$test_shortpath" = x; then
45917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45918$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45919    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45920  fi
45921
45922  # Call helper function which possibly converts this using DOS-style short mode.
45923  # If so, the updated path is stored in $new_path.
45924
45925  input_path="$new_path"
45926  # Check if we need to convert this using DOS-style short mode. If the path
45927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45928  # take no chances and rewrite it.
45929  # Note: m4 eats our [], so we need to use [ and ] instead.
45930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45931  if test "x$has_forbidden_chars" != x; then
45932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45936      # Going to short mode and back again did indeed matter. Since short mode is
45937      # case insensitive, let's make it lowercase to improve readability.
45938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45939      # Now convert it back to Unix-style (cygpath)
45940      input_path=`$CYGPATH -u "$shortmode_path"`
45941      new_path="$input_path"
45942    fi
45943  fi
45944
45945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45946  if test "x$test_cygdrive_prefix" = x; then
45947    # As a simple fix, exclude /usr/bin since it's not a real path.
45948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45950      # a path prefixed by /cygdrive for fixpath to work.
45951      new_path="$CYGWIN_ROOT_PATH$input_path"
45952    fi
45953  fi
45954
45955
45956  if test "x$path" != "x$new_path"; then
45957    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45959$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45960  fi
45961
45962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45963
45964  path="$POTENTIAL_FREETYPE_LIB_PATH"
45965  has_colon=`$ECHO $path | $GREP ^.:`
45966  new_path="$path"
45967  if test "x$has_colon" = x; then
45968    # Not in mixed or Windows style, start by that.
45969    new_path=`cmd //c echo $path`
45970  fi
45971
45972
45973  input_path="$new_path"
45974  # Check if we need to convert this using DOS-style short mode. If the path
45975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45976  # take no chances and rewrite it.
45977  # Note: m4 eats our [], so we need to use [ and ] instead.
45978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45979  if test "x$has_forbidden_chars" != x; then
45980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45982  fi
45983
45984
45985  windows_path="$new_path"
45986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45987    unix_path=`$CYGPATH -u "$windows_path"`
45988    new_path="$unix_path"
45989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45991    new_path="$unix_path"
45992  fi
45993
45994  if test "x$path" != "x$new_path"; then
45995    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45998  fi
45999
46000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46002
46003    else
46004      # We're on a unix platform. Hooray! :)
46005      path="$POTENTIAL_FREETYPE_LIB_PATH"
46006      has_space=`$ECHO "$path" | $GREP " "`
46007      if test "x$has_space" != x; then
46008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46009$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46010        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46011      fi
46012
46013      # Use eval to expand a potential ~
46014      eval path="$path"
46015      if test ! -f "$path" && test ! -d "$path"; then
46016        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46017      fi
46018
46019      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46020    fi
46021  fi
46022
46023
46024    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46026$as_echo_n "checking for freetype includes... " >&6; }
46027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46028$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46029    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46031$as_echo_n "checking for freetype libraries... " >&6; }
46032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46033$as_echo "$FREETYPE_LIB_PATH" >&6; }
46034  fi
46035
46036          if test "x$FOUND_FREETYPE" != xyes; then
46037            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
46038
46039  windows_path="$FREETYPE_BASE_DIR"
46040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46041    unix_path=`$CYGPATH -u "$windows_path"`
46042    FREETYPE_BASE_DIR="$unix_path"
46043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46045    FREETYPE_BASE_DIR="$unix_path"
46046  fi
46047
46048
46049  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46050  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46051  METHOD="well-known location"
46052
46053  # Let's start with an optimistic view of the world :-)
46054  FOUND_FREETYPE=yes
46055
46056  # First look for the canonical freetype main include file ft2build.h.
46057  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46058    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46059    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46060    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46061      # Fail.
46062      FOUND_FREETYPE=no
46063    fi
46064  fi
46065
46066  if test "x$FOUND_FREETYPE" = xyes; then
46067    # Include file found, let's continue the sanity check.
46068    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46069$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46070
46071    # Reset to default value
46072    FREETYPE_BASE_NAME=freetype
46073    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46074    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46075      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46076          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46077        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46078        # for the .6 version explicitly.
46079        FREETYPE_BASE_NAME=freetype.6
46080        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46081        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46082$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46083      else
46084        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46085$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46086        FOUND_FREETYPE=no
46087      fi
46088    else
46089      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46090        # On Windows, we will need both .lib and .dll file.
46091        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46092          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46093$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46094          FOUND_FREETYPE=no
46095        fi
46096      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46097          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46098        # Found lib in isa dir, use that instead.
46099        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46101$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46102      fi
46103    fi
46104  fi
46105
46106  if test "x$FOUND_FREETYPE" = xyes; then
46107
46108  # Only process if variable expands to non-empty
46109
46110  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46112
46113  # Input might be given as Windows format, start by converting to
46114  # unix format.
46115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46116  new_path=`$CYGPATH -u "$path"`
46117
46118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46121  # "foo.exe" is OK but "foo" is an error.
46122  #
46123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46124  # It is also a way to make sure we got the proper file name for the real test later on.
46125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46126  if test "x$test_shortpath" = x; then
46127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46129    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46130  fi
46131
46132  # Call helper function which possibly converts this using DOS-style short mode.
46133  # If so, the updated path is stored in $new_path.
46134
46135  input_path="$new_path"
46136  # Check if we need to convert this using DOS-style short mode. If the path
46137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46138  # take no chances and rewrite it.
46139  # Note: m4 eats our [], so we need to use [ and ] instead.
46140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46141  if test "x$has_forbidden_chars" != x; then
46142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46146      # Going to short mode and back again did indeed matter. Since short mode is
46147      # case insensitive, let's make it lowercase to improve readability.
46148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46149      # Now convert it back to Unix-style (cygpath)
46150      input_path=`$CYGPATH -u "$shortmode_path"`
46151      new_path="$input_path"
46152    fi
46153  fi
46154
46155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46156  if test "x$test_cygdrive_prefix" = x; then
46157    # As a simple fix, exclude /usr/bin since it's not a real path.
46158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46160      # a path prefixed by /cygdrive for fixpath to work.
46161      new_path="$CYGWIN_ROOT_PATH$input_path"
46162    fi
46163  fi
46164
46165
46166  if test "x$path" != "x$new_path"; then
46167    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46170  fi
46171
46172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46173
46174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46175  has_colon=`$ECHO $path | $GREP ^.:`
46176  new_path="$path"
46177  if test "x$has_colon" = x; then
46178    # Not in mixed or Windows style, start by that.
46179    new_path=`cmd //c echo $path`
46180  fi
46181
46182
46183  input_path="$new_path"
46184  # Check if we need to convert this using DOS-style short mode. If the path
46185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46186  # take no chances and rewrite it.
46187  # Note: m4 eats our [], so we need to use [ and ] instead.
46188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46189  if test "x$has_forbidden_chars" != x; then
46190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46192  fi
46193
46194
46195  windows_path="$new_path"
46196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46197    unix_path=`$CYGPATH -u "$windows_path"`
46198    new_path="$unix_path"
46199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46201    new_path="$unix_path"
46202  fi
46203
46204  if test "x$path" != "x$new_path"; then
46205    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46208  fi
46209
46210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46212
46213    else
46214      # We're on a unix platform. Hooray! :)
46215      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46216      has_space=`$ECHO "$path" | $GREP " "`
46217      if test "x$has_space" != x; then
46218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46219$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46221      fi
46222
46223      # Use eval to expand a potential ~
46224      eval path="$path"
46225      if test ! -f "$path" && test ! -d "$path"; then
46226        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46227      fi
46228
46229      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46230    fi
46231  fi
46232
46233
46234  # Only process if variable expands to non-empty
46235
46236  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46238
46239  # Input might be given as Windows format, start by converting to
46240  # unix format.
46241  path="$POTENTIAL_FREETYPE_LIB_PATH"
46242  new_path=`$CYGPATH -u "$path"`
46243
46244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46247  # "foo.exe" is OK but "foo" is an error.
46248  #
46249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46250  # It is also a way to make sure we got the proper file name for the real test later on.
46251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46252  if test "x$test_shortpath" = x; then
46253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46256  fi
46257
46258  # Call helper function which possibly converts this using DOS-style short mode.
46259  # If so, the updated path is stored in $new_path.
46260
46261  input_path="$new_path"
46262  # Check if we need to convert this using DOS-style short mode. If the path
46263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46264  # take no chances and rewrite it.
46265  # Note: m4 eats our [], so we need to use [ and ] instead.
46266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46267  if test "x$has_forbidden_chars" != x; then
46268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46272      # Going to short mode and back again did indeed matter. Since short mode is
46273      # case insensitive, let's make it lowercase to improve readability.
46274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46275      # Now convert it back to Unix-style (cygpath)
46276      input_path=`$CYGPATH -u "$shortmode_path"`
46277      new_path="$input_path"
46278    fi
46279  fi
46280
46281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46282  if test "x$test_cygdrive_prefix" = x; then
46283    # As a simple fix, exclude /usr/bin since it's not a real path.
46284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46286      # a path prefixed by /cygdrive for fixpath to work.
46287      new_path="$CYGWIN_ROOT_PATH$input_path"
46288    fi
46289  fi
46290
46291
46292  if test "x$path" != "x$new_path"; then
46293    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46296  fi
46297
46298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46299
46300  path="$POTENTIAL_FREETYPE_LIB_PATH"
46301  has_colon=`$ECHO $path | $GREP ^.:`
46302  new_path="$path"
46303  if test "x$has_colon" = x; then
46304    # Not in mixed or Windows style, start by that.
46305    new_path=`cmd //c echo $path`
46306  fi
46307
46308
46309  input_path="$new_path"
46310  # Check if we need to convert this using DOS-style short mode. If the path
46311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46312  # take no chances and rewrite it.
46313  # Note: m4 eats our [], so we need to use [ and ] instead.
46314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46315  if test "x$has_forbidden_chars" != x; then
46316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46318  fi
46319
46320
46321  windows_path="$new_path"
46322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46323    unix_path=`$CYGPATH -u "$windows_path"`
46324    new_path="$unix_path"
46325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46327    new_path="$unix_path"
46328  fi
46329
46330  if test "x$path" != "x$new_path"; then
46331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46334  fi
46335
46336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46338
46339    else
46340      # We're on a unix platform. Hooray! :)
46341      path="$POTENTIAL_FREETYPE_LIB_PATH"
46342      has_space=`$ECHO "$path" | $GREP " "`
46343      if test "x$has_space" != x; then
46344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46347      fi
46348
46349      # Use eval to expand a potential ~
46350      eval path="$path"
46351      if test ! -f "$path" && test ! -d "$path"; then
46352        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46353      fi
46354
46355      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46356    fi
46357  fi
46358
46359
46360    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46362$as_echo_n "checking for freetype includes... " >&6; }
46363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46364$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46365    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46367$as_echo_n "checking for freetype libraries... " >&6; }
46368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46369$as_echo "$FREETYPE_LIB_PATH" >&6; }
46370  fi
46371
46372          fi
46373        else
46374          FREETYPE_BASE_DIR="$SYSROOT/usr"
46375
46376  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46377  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46378  METHOD="well-known location"
46379
46380  # Let's start with an optimistic view of the world :-)
46381  FOUND_FREETYPE=yes
46382
46383  # First look for the canonical freetype main include file ft2build.h.
46384  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46385    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46386    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46387    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46388      # Fail.
46389      FOUND_FREETYPE=no
46390    fi
46391  fi
46392
46393  if test "x$FOUND_FREETYPE" = xyes; then
46394    # Include file found, let's continue the sanity check.
46395    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46396$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46397
46398    # Reset to default value
46399    FREETYPE_BASE_NAME=freetype
46400    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46401    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46402      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46403          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46404        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46405        # for the .6 version explicitly.
46406        FREETYPE_BASE_NAME=freetype.6
46407        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46408        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46409$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46410      else
46411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46412$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46413        FOUND_FREETYPE=no
46414      fi
46415    else
46416      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46417        # On Windows, we will need both .lib and .dll file.
46418        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46419          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46420$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46421          FOUND_FREETYPE=no
46422        fi
46423      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46424          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46425        # Found lib in isa dir, use that instead.
46426        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46427        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46428$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46429      fi
46430    fi
46431  fi
46432
46433  if test "x$FOUND_FREETYPE" = xyes; then
46434
46435  # Only process if variable expands to non-empty
46436
46437  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46439
46440  # Input might be given as Windows format, start by converting to
46441  # unix format.
46442  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46443  new_path=`$CYGPATH -u "$path"`
46444
46445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46448  # "foo.exe" is OK but "foo" is an error.
46449  #
46450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46451  # It is also a way to make sure we got the proper file name for the real test later on.
46452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46453  if test "x$test_shortpath" = x; then
46454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46455$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46456    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46457  fi
46458
46459  # Call helper function which possibly converts this using DOS-style short mode.
46460  # If so, the updated path is stored in $new_path.
46461
46462  input_path="$new_path"
46463  # Check if we need to convert this using DOS-style short mode. If the path
46464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46465  # take no chances and rewrite it.
46466  # Note: m4 eats our [], so we need to use [ and ] instead.
46467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46468  if test "x$has_forbidden_chars" != x; then
46469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46473      # Going to short mode and back again did indeed matter. Since short mode is
46474      # case insensitive, let's make it lowercase to improve readability.
46475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46476      # Now convert it back to Unix-style (cygpath)
46477      input_path=`$CYGPATH -u "$shortmode_path"`
46478      new_path="$input_path"
46479    fi
46480  fi
46481
46482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46483  if test "x$test_cygdrive_prefix" = x; then
46484    # As a simple fix, exclude /usr/bin since it's not a real path.
46485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46487      # a path prefixed by /cygdrive for fixpath to work.
46488      new_path="$CYGWIN_ROOT_PATH$input_path"
46489    fi
46490  fi
46491
46492
46493  if test "x$path" != "x$new_path"; then
46494    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46496$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46497  fi
46498
46499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46500
46501  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46502  has_colon=`$ECHO $path | $GREP ^.:`
46503  new_path="$path"
46504  if test "x$has_colon" = x; then
46505    # Not in mixed or Windows style, start by that.
46506    new_path=`cmd //c echo $path`
46507  fi
46508
46509
46510  input_path="$new_path"
46511  # Check if we need to convert this using DOS-style short mode. If the path
46512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46513  # take no chances and rewrite it.
46514  # Note: m4 eats our [], so we need to use [ and ] instead.
46515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46516  if test "x$has_forbidden_chars" != x; then
46517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46519  fi
46520
46521
46522  windows_path="$new_path"
46523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46524    unix_path=`$CYGPATH -u "$windows_path"`
46525    new_path="$unix_path"
46526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46528    new_path="$unix_path"
46529  fi
46530
46531  if test "x$path" != "x$new_path"; then
46532    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46535  fi
46536
46537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46539
46540    else
46541      # We're on a unix platform. Hooray! :)
46542      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46543      has_space=`$ECHO "$path" | $GREP " "`
46544      if test "x$has_space" != x; then
46545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46548      fi
46549
46550      # Use eval to expand a potential ~
46551      eval path="$path"
46552      if test ! -f "$path" && test ! -d "$path"; then
46553        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46554      fi
46555
46556      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46557    fi
46558  fi
46559
46560
46561  # Only process if variable expands to non-empty
46562
46563  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46565
46566  # Input might be given as Windows format, start by converting to
46567  # unix format.
46568  path="$POTENTIAL_FREETYPE_LIB_PATH"
46569  new_path=`$CYGPATH -u "$path"`
46570
46571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46574  # "foo.exe" is OK but "foo" is an error.
46575  #
46576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46577  # It is also a way to make sure we got the proper file name for the real test later on.
46578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46579  if test "x$test_shortpath" = x; then
46580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46581$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46582    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46583  fi
46584
46585  # Call helper function which possibly converts this using DOS-style short mode.
46586  # If so, the updated path is stored in $new_path.
46587
46588  input_path="$new_path"
46589  # Check if we need to convert this using DOS-style short mode. If the path
46590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46591  # take no chances and rewrite it.
46592  # Note: m4 eats our [], so we need to use [ and ] instead.
46593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46594  if test "x$has_forbidden_chars" != x; then
46595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46599      # Going to short mode and back again did indeed matter. Since short mode is
46600      # case insensitive, let's make it lowercase to improve readability.
46601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46602      # Now convert it back to Unix-style (cygpath)
46603      input_path=`$CYGPATH -u "$shortmode_path"`
46604      new_path="$input_path"
46605    fi
46606  fi
46607
46608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46609  if test "x$test_cygdrive_prefix" = x; then
46610    # As a simple fix, exclude /usr/bin since it's not a real path.
46611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46613      # a path prefixed by /cygdrive for fixpath to work.
46614      new_path="$CYGWIN_ROOT_PATH$input_path"
46615    fi
46616  fi
46617
46618
46619  if test "x$path" != "x$new_path"; then
46620    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46623  fi
46624
46625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46626
46627  path="$POTENTIAL_FREETYPE_LIB_PATH"
46628  has_colon=`$ECHO $path | $GREP ^.:`
46629  new_path="$path"
46630  if test "x$has_colon" = x; then
46631    # Not in mixed or Windows style, start by that.
46632    new_path=`cmd //c echo $path`
46633  fi
46634
46635
46636  input_path="$new_path"
46637  # Check if we need to convert this using DOS-style short mode. If the path
46638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46639  # take no chances and rewrite it.
46640  # Note: m4 eats our [], so we need to use [ and ] instead.
46641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46642  if test "x$has_forbidden_chars" != x; then
46643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46645  fi
46646
46647
46648  windows_path="$new_path"
46649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46650    unix_path=`$CYGPATH -u "$windows_path"`
46651    new_path="$unix_path"
46652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46654    new_path="$unix_path"
46655  fi
46656
46657  if test "x$path" != "x$new_path"; then
46658    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46661  fi
46662
46663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46665
46666    else
46667      # We're on a unix platform. Hooray! :)
46668      path="$POTENTIAL_FREETYPE_LIB_PATH"
46669      has_space=`$ECHO "$path" | $GREP " "`
46670      if test "x$has_space" != x; then
46671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46672$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46674      fi
46675
46676      # Use eval to expand a potential ~
46677      eval path="$path"
46678      if test ! -f "$path" && test ! -d "$path"; then
46679        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46680      fi
46681
46682      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46683    fi
46684  fi
46685
46686
46687    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46689$as_echo_n "checking for freetype includes... " >&6; }
46690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46691$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46692    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46694$as_echo_n "checking for freetype libraries... " >&6; }
46695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46696$as_echo "$FREETYPE_LIB_PATH" >&6; }
46697  fi
46698
46699
46700          if test "x$FOUND_FREETYPE" != xyes; then
46701            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46702
46703  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46704  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46705  METHOD="well-known location"
46706
46707  # Let's start with an optimistic view of the world :-)
46708  FOUND_FREETYPE=yes
46709
46710  # First look for the canonical freetype main include file ft2build.h.
46711  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46712    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46713    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46714    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46715      # Fail.
46716      FOUND_FREETYPE=no
46717    fi
46718  fi
46719
46720  if test "x$FOUND_FREETYPE" = xyes; then
46721    # Include file found, let's continue the sanity check.
46722    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46723$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46724
46725    # Reset to default value
46726    FREETYPE_BASE_NAME=freetype
46727    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46728    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46729      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46730          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46731        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46732        # for the .6 version explicitly.
46733        FREETYPE_BASE_NAME=freetype.6
46734        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46735        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46736$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46737      else
46738        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46739$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46740        FOUND_FREETYPE=no
46741      fi
46742    else
46743      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46744        # On Windows, we will need both .lib and .dll file.
46745        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46746          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46747$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46748          FOUND_FREETYPE=no
46749        fi
46750      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46751          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46752        # Found lib in isa dir, use that instead.
46753        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46754        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46755$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46756      fi
46757    fi
46758  fi
46759
46760  if test "x$FOUND_FREETYPE" = xyes; then
46761
46762  # Only process if variable expands to non-empty
46763
46764  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46766
46767  # Input might be given as Windows format, start by converting to
46768  # unix format.
46769  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46770  new_path=`$CYGPATH -u "$path"`
46771
46772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46775  # "foo.exe" is OK but "foo" is an error.
46776  #
46777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46778  # It is also a way to make sure we got the proper file name for the real test later on.
46779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46780  if test "x$test_shortpath" = x; then
46781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46782$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46783    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46784  fi
46785
46786  # Call helper function which possibly converts this using DOS-style short mode.
46787  # If so, the updated path is stored in $new_path.
46788
46789  input_path="$new_path"
46790  # Check if we need to convert this using DOS-style short mode. If the path
46791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46792  # take no chances and rewrite it.
46793  # Note: m4 eats our [], so we need to use [ and ] instead.
46794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46795  if test "x$has_forbidden_chars" != x; then
46796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46800      # Going to short mode and back again did indeed matter. Since short mode is
46801      # case insensitive, let's make it lowercase to improve readability.
46802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46803      # Now convert it back to Unix-style (cygpath)
46804      input_path=`$CYGPATH -u "$shortmode_path"`
46805      new_path="$input_path"
46806    fi
46807  fi
46808
46809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46810  if test "x$test_cygdrive_prefix" = x; then
46811    # As a simple fix, exclude /usr/bin since it's not a real path.
46812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46814      # a path prefixed by /cygdrive for fixpath to work.
46815      new_path="$CYGWIN_ROOT_PATH$input_path"
46816    fi
46817  fi
46818
46819
46820  if test "x$path" != "x$new_path"; then
46821    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46824  fi
46825
46826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46827
46828  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46829  has_colon=`$ECHO $path | $GREP ^.:`
46830  new_path="$path"
46831  if test "x$has_colon" = x; then
46832    # Not in mixed or Windows style, start by that.
46833    new_path=`cmd //c echo $path`
46834  fi
46835
46836
46837  input_path="$new_path"
46838  # Check if we need to convert this using DOS-style short mode. If the path
46839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46840  # take no chances and rewrite it.
46841  # Note: m4 eats our [], so we need to use [ and ] instead.
46842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46843  if test "x$has_forbidden_chars" != x; then
46844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46846  fi
46847
46848
46849  windows_path="$new_path"
46850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46851    unix_path=`$CYGPATH -u "$windows_path"`
46852    new_path="$unix_path"
46853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46855    new_path="$unix_path"
46856  fi
46857
46858  if test "x$path" != "x$new_path"; then
46859    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46861$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46862  fi
46863
46864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46866
46867    else
46868      # We're on a unix platform. Hooray! :)
46869      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46870      has_space=`$ECHO "$path" | $GREP " "`
46871      if test "x$has_space" != x; then
46872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46875      fi
46876
46877      # Use eval to expand a potential ~
46878      eval path="$path"
46879      if test ! -f "$path" && test ! -d "$path"; then
46880        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46881      fi
46882
46883      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46884    fi
46885  fi
46886
46887
46888  # Only process if variable expands to non-empty
46889
46890  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46892
46893  # Input might be given as Windows format, start by converting to
46894  # unix format.
46895  path="$POTENTIAL_FREETYPE_LIB_PATH"
46896  new_path=`$CYGPATH -u "$path"`
46897
46898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46901  # "foo.exe" is OK but "foo" is an error.
46902  #
46903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46904  # It is also a way to make sure we got the proper file name for the real test later on.
46905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46906  if test "x$test_shortpath" = x; then
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46909    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46910  fi
46911
46912  # Call helper function which possibly converts this using DOS-style short mode.
46913  # If so, the updated path is stored in $new_path.
46914
46915  input_path="$new_path"
46916  # Check if we need to convert this using DOS-style short mode. If the path
46917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46918  # take no chances and rewrite it.
46919  # Note: m4 eats our [], so we need to use [ and ] instead.
46920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46921  if test "x$has_forbidden_chars" != x; then
46922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46926      # Going to short mode and back again did indeed matter. Since short mode is
46927      # case insensitive, let's make it lowercase to improve readability.
46928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46929      # Now convert it back to Unix-style (cygpath)
46930      input_path=`$CYGPATH -u "$shortmode_path"`
46931      new_path="$input_path"
46932    fi
46933  fi
46934
46935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46936  if test "x$test_cygdrive_prefix" = x; then
46937    # As a simple fix, exclude /usr/bin since it's not a real path.
46938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46940      # a path prefixed by /cygdrive for fixpath to work.
46941      new_path="$CYGWIN_ROOT_PATH$input_path"
46942    fi
46943  fi
46944
46945
46946  if test "x$path" != "x$new_path"; then
46947    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46949$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46950  fi
46951
46952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46953
46954  path="$POTENTIAL_FREETYPE_LIB_PATH"
46955  has_colon=`$ECHO $path | $GREP ^.:`
46956  new_path="$path"
46957  if test "x$has_colon" = x; then
46958    # Not in mixed or Windows style, start by that.
46959    new_path=`cmd //c echo $path`
46960  fi
46961
46962
46963  input_path="$new_path"
46964  # Check if we need to convert this using DOS-style short mode. If the path
46965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46966  # take no chances and rewrite it.
46967  # Note: m4 eats our [], so we need to use [ and ] instead.
46968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46969  if test "x$has_forbidden_chars" != x; then
46970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46972  fi
46973
46974
46975  windows_path="$new_path"
46976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46977    unix_path=`$CYGPATH -u "$windows_path"`
46978    new_path="$unix_path"
46979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46981    new_path="$unix_path"
46982  fi
46983
46984  if test "x$path" != "x$new_path"; then
46985    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46987$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46988  fi
46989
46990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46992
46993    else
46994      # We're on a unix platform. Hooray! :)
46995      path="$POTENTIAL_FREETYPE_LIB_PATH"
46996      has_space=`$ECHO "$path" | $GREP " "`
46997      if test "x$has_space" != x; then
46998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47001      fi
47002
47003      # Use eval to expand a potential ~
47004      eval path="$path"
47005      if test ! -f "$path" && test ! -d "$path"; then
47006        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47007      fi
47008
47009      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47010    fi
47011  fi
47012
47013
47014    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47016$as_echo_n "checking for freetype includes... " >&6; }
47017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47018$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47019    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47021$as_echo_n "checking for freetype libraries... " >&6; }
47022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47023$as_echo "$FREETYPE_LIB_PATH" >&6; }
47024  fi
47025
47026          fi
47027
47028          if test "x$FOUND_FREETYPE" != xyes; then
47029            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
47030
47031  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47032  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
47033  METHOD="well-known location"
47034
47035  # Let's start with an optimistic view of the world :-)
47036  FOUND_FREETYPE=yes
47037
47038  # First look for the canonical freetype main include file ft2build.h.
47039  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47040    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47041    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47042    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47043      # Fail.
47044      FOUND_FREETYPE=no
47045    fi
47046  fi
47047
47048  if test "x$FOUND_FREETYPE" = xyes; then
47049    # Include file found, let's continue the sanity check.
47050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47051$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47052
47053    # Reset to default value
47054    FREETYPE_BASE_NAME=freetype
47055    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47056    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47057      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47059        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47060        # for the .6 version explicitly.
47061        FREETYPE_BASE_NAME=freetype.6
47062        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47063        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47064$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47065      else
47066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47067$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47068        FOUND_FREETYPE=no
47069      fi
47070    else
47071      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47072        # On Windows, we will need both .lib and .dll file.
47073        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47074          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47075$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47076          FOUND_FREETYPE=no
47077        fi
47078      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47080        # Found lib in isa dir, use that instead.
47081        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47082        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47083$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47084      fi
47085    fi
47086  fi
47087
47088  if test "x$FOUND_FREETYPE" = xyes; then
47089
47090  # Only process if variable expands to non-empty
47091
47092  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47094
47095  # Input might be given as Windows format, start by converting to
47096  # unix format.
47097  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47098  new_path=`$CYGPATH -u "$path"`
47099
47100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47103  # "foo.exe" is OK but "foo" is an error.
47104  #
47105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47106  # It is also a way to make sure we got the proper file name for the real test later on.
47107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47108  if test "x$test_shortpath" = x; then
47109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47111    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47112  fi
47113
47114  # Call helper function which possibly converts this using DOS-style short mode.
47115  # If so, the updated path is stored in $new_path.
47116
47117  input_path="$new_path"
47118  # Check if we need to convert this using DOS-style short mode. If the path
47119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47120  # take no chances and rewrite it.
47121  # Note: m4 eats our [], so we need to use [ and ] instead.
47122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47123  if test "x$has_forbidden_chars" != x; then
47124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47128      # Going to short mode and back again did indeed matter. Since short mode is
47129      # case insensitive, let's make it lowercase to improve readability.
47130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47131      # Now convert it back to Unix-style (cygpath)
47132      input_path=`$CYGPATH -u "$shortmode_path"`
47133      new_path="$input_path"
47134    fi
47135  fi
47136
47137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47138  if test "x$test_cygdrive_prefix" = x; then
47139    # As a simple fix, exclude /usr/bin since it's not a real path.
47140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47142      # a path prefixed by /cygdrive for fixpath to work.
47143      new_path="$CYGWIN_ROOT_PATH$input_path"
47144    fi
47145  fi
47146
47147
47148  if test "x$path" != "x$new_path"; then
47149    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47152  fi
47153
47154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47155
47156  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47157  has_colon=`$ECHO $path | $GREP ^.:`
47158  new_path="$path"
47159  if test "x$has_colon" = x; then
47160    # Not in mixed or Windows style, start by that.
47161    new_path=`cmd //c echo $path`
47162  fi
47163
47164
47165  input_path="$new_path"
47166  # Check if we need to convert this using DOS-style short mode. If the path
47167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47168  # take no chances and rewrite it.
47169  # Note: m4 eats our [], so we need to use [ and ] instead.
47170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47171  if test "x$has_forbidden_chars" != x; then
47172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47174  fi
47175
47176
47177  windows_path="$new_path"
47178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47179    unix_path=`$CYGPATH -u "$windows_path"`
47180    new_path="$unix_path"
47181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47183    new_path="$unix_path"
47184  fi
47185
47186  if test "x$path" != "x$new_path"; then
47187    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47190  fi
47191
47192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47194
47195    else
47196      # We're on a unix platform. Hooray! :)
47197      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47198      has_space=`$ECHO "$path" | $GREP " "`
47199      if test "x$has_space" != x; then
47200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47203      fi
47204
47205      # Use eval to expand a potential ~
47206      eval path="$path"
47207      if test ! -f "$path" && test ! -d "$path"; then
47208        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47209      fi
47210
47211      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47212    fi
47213  fi
47214
47215
47216  # Only process if variable expands to non-empty
47217
47218  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47220
47221  # Input might be given as Windows format, start by converting to
47222  # unix format.
47223  path="$POTENTIAL_FREETYPE_LIB_PATH"
47224  new_path=`$CYGPATH -u "$path"`
47225
47226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47229  # "foo.exe" is OK but "foo" is an error.
47230  #
47231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47232  # It is also a way to make sure we got the proper file name for the real test later on.
47233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47234  if test "x$test_shortpath" = x; then
47235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47237    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47238  fi
47239
47240  # Call helper function which possibly converts this using DOS-style short mode.
47241  # If so, the updated path is stored in $new_path.
47242
47243  input_path="$new_path"
47244  # Check if we need to convert this using DOS-style short mode. If the path
47245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47246  # take no chances and rewrite it.
47247  # Note: m4 eats our [], so we need to use [ and ] instead.
47248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47249  if test "x$has_forbidden_chars" != x; then
47250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47254      # Going to short mode and back again did indeed matter. Since short mode is
47255      # case insensitive, let's make it lowercase to improve readability.
47256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47257      # Now convert it back to Unix-style (cygpath)
47258      input_path=`$CYGPATH -u "$shortmode_path"`
47259      new_path="$input_path"
47260    fi
47261  fi
47262
47263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47264  if test "x$test_cygdrive_prefix" = x; then
47265    # As a simple fix, exclude /usr/bin since it's not a real path.
47266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47268      # a path prefixed by /cygdrive for fixpath to work.
47269      new_path="$CYGWIN_ROOT_PATH$input_path"
47270    fi
47271  fi
47272
47273
47274  if test "x$path" != "x$new_path"; then
47275    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47278  fi
47279
47280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47281
47282  path="$POTENTIAL_FREETYPE_LIB_PATH"
47283  has_colon=`$ECHO $path | $GREP ^.:`
47284  new_path="$path"
47285  if test "x$has_colon" = x; then
47286    # Not in mixed or Windows style, start by that.
47287    new_path=`cmd //c echo $path`
47288  fi
47289
47290
47291  input_path="$new_path"
47292  # Check if we need to convert this using DOS-style short mode. If the path
47293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47294  # take no chances and rewrite it.
47295  # Note: m4 eats our [], so we need to use [ and ] instead.
47296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47297  if test "x$has_forbidden_chars" != x; then
47298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47300  fi
47301
47302
47303  windows_path="$new_path"
47304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47305    unix_path=`$CYGPATH -u "$windows_path"`
47306    new_path="$unix_path"
47307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47309    new_path="$unix_path"
47310  fi
47311
47312  if test "x$path" != "x$new_path"; then
47313    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47316  fi
47317
47318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47320
47321    else
47322      # We're on a unix platform. Hooray! :)
47323      path="$POTENTIAL_FREETYPE_LIB_PATH"
47324      has_space=`$ECHO "$path" | $GREP " "`
47325      if test "x$has_space" != x; then
47326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47327$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47329      fi
47330
47331      # Use eval to expand a potential ~
47332      eval path="$path"
47333      if test ! -f "$path" && test ! -d "$path"; then
47334        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47335      fi
47336
47337      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47338    fi
47339  fi
47340
47341
47342    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47344$as_echo_n "checking for freetype includes... " >&6; }
47345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47346$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47347    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47349$as_echo_n "checking for freetype libraries... " >&6; }
47350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47351$as_echo "$FREETYPE_LIB_PATH" >&6; }
47352  fi
47353
47354          fi
47355
47356          if test "x$FOUND_FREETYPE" != xyes; then
47357            FREETYPE_BASE_DIR="$SYSROOT/usr"
47358            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47359
47360  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47361  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47362  METHOD="well-known location"
47363
47364  # Let's start with an optimistic view of the world :-)
47365  FOUND_FREETYPE=yes
47366
47367  # First look for the canonical freetype main include file ft2build.h.
47368  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47369    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47370    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47371    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47372      # Fail.
47373      FOUND_FREETYPE=no
47374    fi
47375  fi
47376
47377  if test "x$FOUND_FREETYPE" = xyes; then
47378    # Include file found, let's continue the sanity check.
47379    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47380$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47381
47382    # Reset to default value
47383    FREETYPE_BASE_NAME=freetype
47384    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47385    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47386      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47387          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47388        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47389        # for the .6 version explicitly.
47390        FREETYPE_BASE_NAME=freetype.6
47391        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47392        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47393$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47394      else
47395        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47396$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47397        FOUND_FREETYPE=no
47398      fi
47399    else
47400      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47401        # On Windows, we will need both .lib and .dll file.
47402        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47403          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47404$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47405          FOUND_FREETYPE=no
47406        fi
47407      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47408          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47409        # Found lib in isa dir, use that instead.
47410        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47411        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47412$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47413      fi
47414    fi
47415  fi
47416
47417  if test "x$FOUND_FREETYPE" = xyes; then
47418
47419  # Only process if variable expands to non-empty
47420
47421  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47422    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47423
47424  # Input might be given as Windows format, start by converting to
47425  # unix format.
47426  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47427  new_path=`$CYGPATH -u "$path"`
47428
47429  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47430  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47431  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47432  # "foo.exe" is OK but "foo" is an error.
47433  #
47434  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47435  # It is also a way to make sure we got the proper file name for the real test later on.
47436  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47437  if test "x$test_shortpath" = x; then
47438    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47439$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47440    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47441  fi
47442
47443  # Call helper function which possibly converts this using DOS-style short mode.
47444  # If so, the updated path is stored in $new_path.
47445
47446  input_path="$new_path"
47447  # Check if we need to convert this using DOS-style short mode. If the path
47448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47449  # take no chances and rewrite it.
47450  # Note: m4 eats our [], so we need to use [ and ] instead.
47451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47452  if test "x$has_forbidden_chars" != x; then
47453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47457      # Going to short mode and back again did indeed matter. Since short mode is
47458      # case insensitive, let's make it lowercase to improve readability.
47459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47460      # Now convert it back to Unix-style (cygpath)
47461      input_path=`$CYGPATH -u "$shortmode_path"`
47462      new_path="$input_path"
47463    fi
47464  fi
47465
47466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47467  if test "x$test_cygdrive_prefix" = x; then
47468    # As a simple fix, exclude /usr/bin since it's not a real path.
47469    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47471      # a path prefixed by /cygdrive for fixpath to work.
47472      new_path="$CYGWIN_ROOT_PATH$input_path"
47473    fi
47474  fi
47475
47476
47477  if test "x$path" != "x$new_path"; then
47478    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47480$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47481  fi
47482
47483    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47484
47485  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47486  has_colon=`$ECHO $path | $GREP ^.:`
47487  new_path="$path"
47488  if test "x$has_colon" = x; then
47489    # Not in mixed or Windows style, start by that.
47490    new_path=`cmd //c echo $path`
47491  fi
47492
47493
47494  input_path="$new_path"
47495  # Check if we need to convert this using DOS-style short mode. If the path
47496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47497  # take no chances and rewrite it.
47498  # Note: m4 eats our [], so we need to use [ and ] instead.
47499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47500  if test "x$has_forbidden_chars" != x; then
47501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47503  fi
47504
47505
47506  windows_path="$new_path"
47507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47508    unix_path=`$CYGPATH -u "$windows_path"`
47509    new_path="$unix_path"
47510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47512    new_path="$unix_path"
47513  fi
47514
47515  if test "x$path" != "x$new_path"; then
47516    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47518$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47519  fi
47520
47521  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47522  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47523
47524    else
47525      # We're on a unix platform. Hooray! :)
47526      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47527      has_space=`$ECHO "$path" | $GREP " "`
47528      if test "x$has_space" != x; then
47529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47530$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47531        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47532      fi
47533
47534      # Use eval to expand a potential ~
47535      eval path="$path"
47536      if test ! -f "$path" && test ! -d "$path"; then
47537        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47538      fi
47539
47540      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47541    fi
47542  fi
47543
47544
47545  # Only process if variable expands to non-empty
47546
47547  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47549
47550  # Input might be given as Windows format, start by converting to
47551  # unix format.
47552  path="$POTENTIAL_FREETYPE_LIB_PATH"
47553  new_path=`$CYGPATH -u "$path"`
47554
47555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47558  # "foo.exe" is OK but "foo" is an error.
47559  #
47560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47561  # It is also a way to make sure we got the proper file name for the real test later on.
47562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47563  if test "x$test_shortpath" = x; then
47564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47567  fi
47568
47569  # Call helper function which possibly converts this using DOS-style short mode.
47570  # If so, the updated path is stored in $new_path.
47571
47572  input_path="$new_path"
47573  # Check if we need to convert this using DOS-style short mode. If the path
47574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47575  # take no chances and rewrite it.
47576  # Note: m4 eats our [], so we need to use [ and ] instead.
47577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47578  if test "x$has_forbidden_chars" != x; then
47579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47583      # Going to short mode and back again did indeed matter. Since short mode is
47584      # case insensitive, let's make it lowercase to improve readability.
47585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47586      # Now convert it back to Unix-style (cygpath)
47587      input_path=`$CYGPATH -u "$shortmode_path"`
47588      new_path="$input_path"
47589    fi
47590  fi
47591
47592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47593  if test "x$test_cygdrive_prefix" = x; then
47594    # As a simple fix, exclude /usr/bin since it's not a real path.
47595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47597      # a path prefixed by /cygdrive for fixpath to work.
47598      new_path="$CYGWIN_ROOT_PATH$input_path"
47599    fi
47600  fi
47601
47602
47603  if test "x$path" != "x$new_path"; then
47604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47607  fi
47608
47609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47610
47611  path="$POTENTIAL_FREETYPE_LIB_PATH"
47612  has_colon=`$ECHO $path | $GREP ^.:`
47613  new_path="$path"
47614  if test "x$has_colon" = x; then
47615    # Not in mixed or Windows style, start by that.
47616    new_path=`cmd //c echo $path`
47617  fi
47618
47619
47620  input_path="$new_path"
47621  # Check if we need to convert this using DOS-style short mode. If the path
47622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47623  # take no chances and rewrite it.
47624  # Note: m4 eats our [], so we need to use [ and ] instead.
47625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47626  if test "x$has_forbidden_chars" != x; then
47627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47629  fi
47630
47631
47632  windows_path="$new_path"
47633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47634    unix_path=`$CYGPATH -u "$windows_path"`
47635    new_path="$unix_path"
47636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47638    new_path="$unix_path"
47639  fi
47640
47641  if test "x$path" != "x$new_path"; then
47642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47645  fi
47646
47647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47649
47650    else
47651      # We're on a unix platform. Hooray! :)
47652      path="$POTENTIAL_FREETYPE_LIB_PATH"
47653      has_space=`$ECHO "$path" | $GREP " "`
47654      if test "x$has_space" != x; then
47655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47658      fi
47659
47660      # Use eval to expand a potential ~
47661      eval path="$path"
47662      if test ! -f "$path" && test ! -d "$path"; then
47663        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47664      fi
47665
47666      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47667    fi
47668  fi
47669
47670
47671    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47673$as_echo_n "checking for freetype includes... " >&6; }
47674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47675$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47676    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47678$as_echo_n "checking for freetype libraries... " >&6; }
47679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47680$as_echo "$FREETYPE_LIB_PATH" >&6; }
47681  fi
47682
47683            else
47684
47685  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47686  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47687  METHOD="well-known location"
47688
47689  # Let's start with an optimistic view of the world :-)
47690  FOUND_FREETYPE=yes
47691
47692  # First look for the canonical freetype main include file ft2build.h.
47693  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47694    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47695    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47696    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47697      # Fail.
47698      FOUND_FREETYPE=no
47699    fi
47700  fi
47701
47702  if test "x$FOUND_FREETYPE" = xyes; then
47703    # Include file found, let's continue the sanity check.
47704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47705$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47706
47707    # Reset to default value
47708    FREETYPE_BASE_NAME=freetype
47709    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47710    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47711      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47712          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47713        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47714        # for the .6 version explicitly.
47715        FREETYPE_BASE_NAME=freetype.6
47716        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47717        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47718$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47719      else
47720        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47721$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47722        FOUND_FREETYPE=no
47723      fi
47724    else
47725      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47726        # On Windows, we will need both .lib and .dll file.
47727        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47728          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47729$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47730          FOUND_FREETYPE=no
47731        fi
47732      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47733          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47734        # Found lib in isa dir, use that instead.
47735        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47736        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47737$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47738      fi
47739    fi
47740  fi
47741
47742  if test "x$FOUND_FREETYPE" = xyes; then
47743
47744  # Only process if variable expands to non-empty
47745
47746  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47748
47749  # Input might be given as Windows format, start by converting to
47750  # unix format.
47751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47752  new_path=`$CYGPATH -u "$path"`
47753
47754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47757  # "foo.exe" is OK but "foo" is an error.
47758  #
47759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47760  # It is also a way to make sure we got the proper file name for the real test later on.
47761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47762  if test "x$test_shortpath" = x; then
47763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47765    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47766  fi
47767
47768  # Call helper function which possibly converts this using DOS-style short mode.
47769  # If so, the updated path is stored in $new_path.
47770
47771  input_path="$new_path"
47772  # Check if we need to convert this using DOS-style short mode. If the path
47773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47774  # take no chances and rewrite it.
47775  # Note: m4 eats our [], so we need to use [ and ] instead.
47776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47777  if test "x$has_forbidden_chars" != x; then
47778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47782      # Going to short mode and back again did indeed matter. Since short mode is
47783      # case insensitive, let's make it lowercase to improve readability.
47784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47785      # Now convert it back to Unix-style (cygpath)
47786      input_path=`$CYGPATH -u "$shortmode_path"`
47787      new_path="$input_path"
47788    fi
47789  fi
47790
47791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47792  if test "x$test_cygdrive_prefix" = x; then
47793    # As a simple fix, exclude /usr/bin since it's not a real path.
47794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47796      # a path prefixed by /cygdrive for fixpath to work.
47797      new_path="$CYGWIN_ROOT_PATH$input_path"
47798    fi
47799  fi
47800
47801
47802  if test "x$path" != "x$new_path"; then
47803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47806  fi
47807
47808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47809
47810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47811  has_colon=`$ECHO $path | $GREP ^.:`
47812  new_path="$path"
47813  if test "x$has_colon" = x; then
47814    # Not in mixed or Windows style, start by that.
47815    new_path=`cmd //c echo $path`
47816  fi
47817
47818
47819  input_path="$new_path"
47820  # Check if we need to convert this using DOS-style short mode. If the path
47821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47822  # take no chances and rewrite it.
47823  # Note: m4 eats our [], so we need to use [ and ] instead.
47824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47825  if test "x$has_forbidden_chars" != x; then
47826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47828  fi
47829
47830
47831  windows_path="$new_path"
47832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47833    unix_path=`$CYGPATH -u "$windows_path"`
47834    new_path="$unix_path"
47835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47837    new_path="$unix_path"
47838  fi
47839
47840  if test "x$path" != "x$new_path"; then
47841    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47844  fi
47845
47846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47848
47849    else
47850      # We're on a unix platform. Hooray! :)
47851      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47852      has_space=`$ECHO "$path" | $GREP " "`
47853      if test "x$has_space" != x; then
47854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47857      fi
47858
47859      # Use eval to expand a potential ~
47860      eval path="$path"
47861      if test ! -f "$path" && test ! -d "$path"; then
47862        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47863      fi
47864
47865      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47866    fi
47867  fi
47868
47869
47870  # Only process if variable expands to non-empty
47871
47872  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47874
47875  # Input might be given as Windows format, start by converting to
47876  # unix format.
47877  path="$POTENTIAL_FREETYPE_LIB_PATH"
47878  new_path=`$CYGPATH -u "$path"`
47879
47880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47883  # "foo.exe" is OK but "foo" is an error.
47884  #
47885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47886  # It is also a way to make sure we got the proper file name for the real test later on.
47887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47888  if test "x$test_shortpath" = x; then
47889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47890$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47891    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47892  fi
47893
47894  # Call helper function which possibly converts this using DOS-style short mode.
47895  # If so, the updated path is stored in $new_path.
47896
47897  input_path="$new_path"
47898  # Check if we need to convert this using DOS-style short mode. If the path
47899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47900  # take no chances and rewrite it.
47901  # Note: m4 eats our [], so we need to use [ and ] instead.
47902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47903  if test "x$has_forbidden_chars" != x; then
47904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47908      # Going to short mode and back again did indeed matter. Since short mode is
47909      # case insensitive, let's make it lowercase to improve readability.
47910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47911      # Now convert it back to Unix-style (cygpath)
47912      input_path=`$CYGPATH -u "$shortmode_path"`
47913      new_path="$input_path"
47914    fi
47915  fi
47916
47917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47918  if test "x$test_cygdrive_prefix" = x; then
47919    # As a simple fix, exclude /usr/bin since it's not a real path.
47920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47922      # a path prefixed by /cygdrive for fixpath to work.
47923      new_path="$CYGWIN_ROOT_PATH$input_path"
47924    fi
47925  fi
47926
47927
47928  if test "x$path" != "x$new_path"; then
47929    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47932  fi
47933
47934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47935
47936  path="$POTENTIAL_FREETYPE_LIB_PATH"
47937  has_colon=`$ECHO $path | $GREP ^.:`
47938  new_path="$path"
47939  if test "x$has_colon" = x; then
47940    # Not in mixed or Windows style, start by that.
47941    new_path=`cmd //c echo $path`
47942  fi
47943
47944
47945  input_path="$new_path"
47946  # Check if we need to convert this using DOS-style short mode. If the path
47947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47948  # take no chances and rewrite it.
47949  # Note: m4 eats our [], so we need to use [ and ] instead.
47950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47951  if test "x$has_forbidden_chars" != x; then
47952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47954  fi
47955
47956
47957  windows_path="$new_path"
47958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47959    unix_path=`$CYGPATH -u "$windows_path"`
47960    new_path="$unix_path"
47961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47963    new_path="$unix_path"
47964  fi
47965
47966  if test "x$path" != "x$new_path"; then
47967    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47970  fi
47971
47972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47974
47975    else
47976      # We're on a unix platform. Hooray! :)
47977      path="$POTENTIAL_FREETYPE_LIB_PATH"
47978      has_space=`$ECHO "$path" | $GREP " "`
47979      if test "x$has_space" != x; then
47980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47983      fi
47984
47985      # Use eval to expand a potential ~
47986      eval path="$path"
47987      if test ! -f "$path" && test ! -d "$path"; then
47988        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47989      fi
47990
47991      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47992    fi
47993  fi
47994
47995
47996    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47998$as_echo_n "checking for freetype includes... " >&6; }
47999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48000$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48001    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48003$as_echo_n "checking for freetype libraries... " >&6; }
48004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48005$as_echo "$FREETYPE_LIB_PATH" >&6; }
48006  fi
48007
48008              if test "x$FOUND_FREETYPE" != xyes; then
48009
48010  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48011  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
48012  METHOD="well-known location"
48013
48014  # Let's start with an optimistic view of the world :-)
48015  FOUND_FREETYPE=yes
48016
48017  # First look for the canonical freetype main include file ft2build.h.
48018  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48019    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48020    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48021    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48022      # Fail.
48023      FOUND_FREETYPE=no
48024    fi
48025  fi
48026
48027  if test "x$FOUND_FREETYPE" = xyes; then
48028    # Include file found, let's continue the sanity check.
48029    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48030$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48031
48032    # Reset to default value
48033    FREETYPE_BASE_NAME=freetype
48034    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48035    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48036      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48037          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48038        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48039        # for the .6 version explicitly.
48040        FREETYPE_BASE_NAME=freetype.6
48041        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48042        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48043$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48044      else
48045        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48047        FOUND_FREETYPE=no
48048      fi
48049    else
48050      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48051        # On Windows, we will need both .lib and .dll file.
48052        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48053          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48054$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48055          FOUND_FREETYPE=no
48056        fi
48057      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48059        # Found lib in isa dir, use that instead.
48060        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48061        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48062$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48063      fi
48064    fi
48065  fi
48066
48067  if test "x$FOUND_FREETYPE" = xyes; then
48068
48069  # Only process if variable expands to non-empty
48070
48071  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48073
48074  # Input might be given as Windows format, start by converting to
48075  # unix format.
48076  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48077  new_path=`$CYGPATH -u "$path"`
48078
48079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48082  # "foo.exe" is OK but "foo" is an error.
48083  #
48084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48085  # It is also a way to make sure we got the proper file name for the real test later on.
48086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48087  if test "x$test_shortpath" = x; then
48088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48089$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48090    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48091  fi
48092
48093  # Call helper function which possibly converts this using DOS-style short mode.
48094  # If so, the updated path is stored in $new_path.
48095
48096  input_path="$new_path"
48097  # Check if we need to convert this using DOS-style short mode. If the path
48098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48099  # take no chances and rewrite it.
48100  # Note: m4 eats our [], so we need to use [ and ] instead.
48101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48102  if test "x$has_forbidden_chars" != x; then
48103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48107      # Going to short mode and back again did indeed matter. Since short mode is
48108      # case insensitive, let's make it lowercase to improve readability.
48109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48110      # Now convert it back to Unix-style (cygpath)
48111      input_path=`$CYGPATH -u "$shortmode_path"`
48112      new_path="$input_path"
48113    fi
48114  fi
48115
48116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48117  if test "x$test_cygdrive_prefix" = x; then
48118    # As a simple fix, exclude /usr/bin since it's not a real path.
48119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48121      # a path prefixed by /cygdrive for fixpath to work.
48122      new_path="$CYGWIN_ROOT_PATH$input_path"
48123    fi
48124  fi
48125
48126
48127  if test "x$path" != "x$new_path"; then
48128    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48130$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48131  fi
48132
48133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48134
48135  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48136  has_colon=`$ECHO $path | $GREP ^.:`
48137  new_path="$path"
48138  if test "x$has_colon" = x; then
48139    # Not in mixed or Windows style, start by that.
48140    new_path=`cmd //c echo $path`
48141  fi
48142
48143
48144  input_path="$new_path"
48145  # Check if we need to convert this using DOS-style short mode. If the path
48146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48147  # take no chances and rewrite it.
48148  # Note: m4 eats our [], so we need to use [ and ] instead.
48149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48150  if test "x$has_forbidden_chars" != x; then
48151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48153  fi
48154
48155
48156  windows_path="$new_path"
48157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48158    unix_path=`$CYGPATH -u "$windows_path"`
48159    new_path="$unix_path"
48160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48162    new_path="$unix_path"
48163  fi
48164
48165  if test "x$path" != "x$new_path"; then
48166    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48169  fi
48170
48171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48173
48174    else
48175      # We're on a unix platform. Hooray! :)
48176      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48177      has_space=`$ECHO "$path" | $GREP " "`
48178      if test "x$has_space" != x; then
48179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48180$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48181        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48182      fi
48183
48184      # Use eval to expand a potential ~
48185      eval path="$path"
48186      if test ! -f "$path" && test ! -d "$path"; then
48187        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48188      fi
48189
48190      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48191    fi
48192  fi
48193
48194
48195  # Only process if variable expands to non-empty
48196
48197  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48199
48200  # Input might be given as Windows format, start by converting to
48201  # unix format.
48202  path="$POTENTIAL_FREETYPE_LIB_PATH"
48203  new_path=`$CYGPATH -u "$path"`
48204
48205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48208  # "foo.exe" is OK but "foo" is an error.
48209  #
48210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48211  # It is also a way to make sure we got the proper file name for the real test later on.
48212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48213  if test "x$test_shortpath" = x; then
48214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48217  fi
48218
48219  # Call helper function which possibly converts this using DOS-style short mode.
48220  # If so, the updated path is stored in $new_path.
48221
48222  input_path="$new_path"
48223  # Check if we need to convert this using DOS-style short mode. If the path
48224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48225  # take no chances and rewrite it.
48226  # Note: m4 eats our [], so we need to use [ and ] instead.
48227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48228  if test "x$has_forbidden_chars" != x; then
48229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48233      # Going to short mode and back again did indeed matter. Since short mode is
48234      # case insensitive, let's make it lowercase to improve readability.
48235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48236      # Now convert it back to Unix-style (cygpath)
48237      input_path=`$CYGPATH -u "$shortmode_path"`
48238      new_path="$input_path"
48239    fi
48240  fi
48241
48242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48243  if test "x$test_cygdrive_prefix" = x; then
48244    # As a simple fix, exclude /usr/bin since it's not a real path.
48245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48247      # a path prefixed by /cygdrive for fixpath to work.
48248      new_path="$CYGWIN_ROOT_PATH$input_path"
48249    fi
48250  fi
48251
48252
48253  if test "x$path" != "x$new_path"; then
48254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48257  fi
48258
48259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48260
48261  path="$POTENTIAL_FREETYPE_LIB_PATH"
48262  has_colon=`$ECHO $path | $GREP ^.:`
48263  new_path="$path"
48264  if test "x$has_colon" = x; then
48265    # Not in mixed or Windows style, start by that.
48266    new_path=`cmd //c echo $path`
48267  fi
48268
48269
48270  input_path="$new_path"
48271  # Check if we need to convert this using DOS-style short mode. If the path
48272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48273  # take no chances and rewrite it.
48274  # Note: m4 eats our [], so we need to use [ and ] instead.
48275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48276  if test "x$has_forbidden_chars" != x; then
48277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48279  fi
48280
48281
48282  windows_path="$new_path"
48283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48284    unix_path=`$CYGPATH -u "$windows_path"`
48285    new_path="$unix_path"
48286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48288    new_path="$unix_path"
48289  fi
48290
48291  if test "x$path" != "x$new_path"; then
48292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48295  fi
48296
48297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48299
48300    else
48301      # We're on a unix platform. Hooray! :)
48302      path="$POTENTIAL_FREETYPE_LIB_PATH"
48303      has_space=`$ECHO "$path" | $GREP " "`
48304      if test "x$has_space" != x; then
48305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48308      fi
48309
48310      # Use eval to expand a potential ~
48311      eval path="$path"
48312      if test ! -f "$path" && test ! -d "$path"; then
48313        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48314      fi
48315
48316      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48317    fi
48318  fi
48319
48320
48321    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48323$as_echo_n "checking for freetype includes... " >&6; }
48324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48325$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48326    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48328$as_echo_n "checking for freetype libraries... " >&6; }
48329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48330$as_echo "$FREETYPE_LIB_PATH" >&6; }
48331  fi
48332
48333              fi
48334            fi
48335          fi
48336        fi
48337      fi # end check in well-known locations
48338
48339      if test "x$FOUND_FREETYPE" != xyes; then
48340
48341  # Print a helpful message on how to acquire the necessary build dependency.
48342  # freetype is the help tag: freetype, cups, pulse, alsa etc
48343  MISSING_DEPENDENCY=freetype
48344
48345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48346    cygwin_help $MISSING_DEPENDENCY
48347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48348    msys_help $MISSING_DEPENDENCY
48349  else
48350    PKGHANDLER_COMMAND=
48351
48352    case $PKGHANDLER in
48353      apt-get)
48354        apt_help     $MISSING_DEPENDENCY ;;
48355      yum)
48356        yum_help     $MISSING_DEPENDENCY ;;
48357      port)
48358        port_help    $MISSING_DEPENDENCY ;;
48359      pkgutil)
48360        pkgutil_help $MISSING_DEPENDENCY ;;
48361      pkgadd)
48362        pkgadd_help  $MISSING_DEPENDENCY ;;
48363    esac
48364
48365    if test "x$PKGHANDLER_COMMAND" != x; then
48366      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48367    fi
48368  fi
48369
48370        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48371      fi
48372    fi # end user specified settings
48373
48374    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48375    if test "x$FREETYPE_CFLAGS" = x; then
48376
48377  # Only process if variable expands to non-empty
48378
48379  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48381
48382  # Input might be given as Windows format, start by converting to
48383  # unix format.
48384  path="$FREETYPE_INCLUDE_PATH"
48385  new_path=`$CYGPATH -u "$path"`
48386
48387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48390  # "foo.exe" is OK but "foo" is an error.
48391  #
48392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48393  # It is also a way to make sure we got the proper file name for the real test later on.
48394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48395  if test "x$test_shortpath" = x; then
48396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48397$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48398    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48399  fi
48400
48401  # Call helper function which possibly converts this using DOS-style short mode.
48402  # If so, the updated path is stored in $new_path.
48403
48404  input_path="$new_path"
48405  # Check if we need to convert this using DOS-style short mode. If the path
48406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48407  # take no chances and rewrite it.
48408  # Note: m4 eats our [], so we need to use [ and ] instead.
48409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48410  if test "x$has_forbidden_chars" != x; then
48411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48415      # Going to short mode and back again did indeed matter. Since short mode is
48416      # case insensitive, let's make it lowercase to improve readability.
48417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48418      # Now convert it back to Unix-style (cygpath)
48419      input_path=`$CYGPATH -u "$shortmode_path"`
48420      new_path="$input_path"
48421    fi
48422  fi
48423
48424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48425  if test "x$test_cygdrive_prefix" = x; then
48426    # As a simple fix, exclude /usr/bin since it's not a real path.
48427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48429      # a path prefixed by /cygdrive for fixpath to work.
48430      new_path="$CYGWIN_ROOT_PATH$input_path"
48431    fi
48432  fi
48433
48434
48435  if test "x$path" != "x$new_path"; then
48436    FREETYPE_INCLUDE_PATH="$new_path"
48437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48438$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48439  fi
48440
48441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48442
48443  path="$FREETYPE_INCLUDE_PATH"
48444  has_colon=`$ECHO $path | $GREP ^.:`
48445  new_path="$path"
48446  if test "x$has_colon" = x; then
48447    # Not in mixed or Windows style, start by that.
48448    new_path=`cmd //c echo $path`
48449  fi
48450
48451
48452  input_path="$new_path"
48453  # Check if we need to convert this using DOS-style short mode. If the path
48454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48455  # take no chances and rewrite it.
48456  # Note: m4 eats our [], so we need to use [ and ] instead.
48457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48458  if test "x$has_forbidden_chars" != x; then
48459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48461  fi
48462
48463
48464  windows_path="$new_path"
48465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48466    unix_path=`$CYGPATH -u "$windows_path"`
48467    new_path="$unix_path"
48468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48470    new_path="$unix_path"
48471  fi
48472
48473  if test "x$path" != "x$new_path"; then
48474    FREETYPE_INCLUDE_PATH="$new_path"
48475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48476$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48477  fi
48478
48479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48481
48482    else
48483      # We're on a unix platform. Hooray! :)
48484      path="$FREETYPE_INCLUDE_PATH"
48485      has_space=`$ECHO "$path" | $GREP " "`
48486      if test "x$has_space" != x; then
48487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48488$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48490      fi
48491
48492      # Use eval to expand a potential ~
48493      eval path="$path"
48494      if test ! -f "$path" && test ! -d "$path"; then
48495        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48496      fi
48497
48498      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48499    fi
48500  fi
48501
48502      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48503        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48504      else
48505        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48506      fi
48507    fi
48508
48509    if test "x$FREETYPE_LIBS" = x; then
48510
48511  # Only process if variable expands to non-empty
48512
48513  if test "x$FREETYPE_LIB_PATH" != x; then
48514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48515
48516  # Input might be given as Windows format, start by converting to
48517  # unix format.
48518  path="$FREETYPE_LIB_PATH"
48519  new_path=`$CYGPATH -u "$path"`
48520
48521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48524  # "foo.exe" is OK but "foo" is an error.
48525  #
48526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48527  # It is also a way to make sure we got the proper file name for the real test later on.
48528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48529  if test "x$test_shortpath" = x; then
48530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48531$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48532    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48533  fi
48534
48535  # Call helper function which possibly converts this using DOS-style short mode.
48536  # If so, the updated path is stored in $new_path.
48537
48538  input_path="$new_path"
48539  # Check if we need to convert this using DOS-style short mode. If the path
48540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48541  # take no chances and rewrite it.
48542  # Note: m4 eats our [], so we need to use [ and ] instead.
48543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48544  if test "x$has_forbidden_chars" != x; then
48545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48549      # Going to short mode and back again did indeed matter. Since short mode is
48550      # case insensitive, let's make it lowercase to improve readability.
48551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48552      # Now convert it back to Unix-style (cygpath)
48553      input_path=`$CYGPATH -u "$shortmode_path"`
48554      new_path="$input_path"
48555    fi
48556  fi
48557
48558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48559  if test "x$test_cygdrive_prefix" = x; then
48560    # As a simple fix, exclude /usr/bin since it's not a real path.
48561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48563      # a path prefixed by /cygdrive for fixpath to work.
48564      new_path="$CYGWIN_ROOT_PATH$input_path"
48565    fi
48566  fi
48567
48568
48569  if test "x$path" != "x$new_path"; then
48570    FREETYPE_LIB_PATH="$new_path"
48571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48572$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48573  fi
48574
48575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48576
48577  path="$FREETYPE_LIB_PATH"
48578  has_colon=`$ECHO $path | $GREP ^.:`
48579  new_path="$path"
48580  if test "x$has_colon" = x; then
48581    # Not in mixed or Windows style, start by that.
48582    new_path=`cmd //c echo $path`
48583  fi
48584
48585
48586  input_path="$new_path"
48587  # Check if we need to convert this using DOS-style short mode. If the path
48588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48589  # take no chances and rewrite it.
48590  # Note: m4 eats our [], so we need to use [ and ] instead.
48591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48592  if test "x$has_forbidden_chars" != x; then
48593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48595  fi
48596
48597
48598  windows_path="$new_path"
48599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48600    unix_path=`$CYGPATH -u "$windows_path"`
48601    new_path="$unix_path"
48602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48604    new_path="$unix_path"
48605  fi
48606
48607  if test "x$path" != "x$new_path"; then
48608    FREETYPE_LIB_PATH="$new_path"
48609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48610$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48611  fi
48612
48613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48615
48616    else
48617      # We're on a unix platform. Hooray! :)
48618      path="$FREETYPE_LIB_PATH"
48619      has_space=`$ECHO "$path" | $GREP " "`
48620      if test "x$has_space" != x; then
48621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48622$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48624      fi
48625
48626      # Use eval to expand a potential ~
48627      eval path="$path"
48628      if test ! -f "$path" && test ! -d "$path"; then
48629        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48630      fi
48631
48632      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48633    fi
48634  fi
48635
48636      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48637        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48638      else
48639        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48640      fi
48641    fi
48642
48643    # Try to compile it
48644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48645$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48646    ac_ext=cpp
48647ac_cpp='$CXXCPP $CPPFLAGS'
48648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48651
48652    PREV_CXXCFLAGS="$CXXFLAGS"
48653    PREV_LIBS="$LIBS"
48654    PREV_CXX="$CXX"
48655    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48656    LIBS="$LIBS $FREETYPE_LIBS"
48657    CXX="$FIXPATH $CXX"
48658    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48659/* end confdefs.h.  */
48660
48661          #include<ft2build.h>
48662          #include FT_FREETYPE_H
48663          int main () {
48664            FT_Init_FreeType(NULL);
48665            return 0;
48666          }
48667
48668_ACEOF
48669if ac_fn_cxx_try_link "$LINENO"; then :
48670
48671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48672$as_echo "yes" >&6; }
48673
48674else
48675
48676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48677$as_echo "no" >&6; }
48678          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48679$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48680          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48681$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48682
48683
48684  # Print a helpful message on how to acquire the necessary build dependency.
48685  # freetype is the help tag: freetype, cups, pulse, alsa etc
48686  MISSING_DEPENDENCY=freetype
48687
48688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48689    cygwin_help $MISSING_DEPENDENCY
48690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48691    msys_help $MISSING_DEPENDENCY
48692  else
48693    PKGHANDLER_COMMAND=
48694
48695    case $PKGHANDLER in
48696      apt-get)
48697        apt_help     $MISSING_DEPENDENCY ;;
48698      yum)
48699        yum_help     $MISSING_DEPENDENCY ;;
48700      port)
48701        port_help    $MISSING_DEPENDENCY ;;
48702      pkgutil)
48703        pkgutil_help $MISSING_DEPENDENCY ;;
48704      pkgadd)
48705        pkgadd_help  $MISSING_DEPENDENCY ;;
48706    esac
48707
48708    if test "x$PKGHANDLER_COMMAND" != x; then
48709      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48710    fi
48711  fi
48712
48713
48714          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48715
48716
48717fi
48718rm -f core conftest.err conftest.$ac_objext \
48719    conftest$ac_exeext conftest.$ac_ext
48720    CXXCFLAGS="$PREV_CXXFLAGS"
48721    LIBS="$PREV_LIBS"
48722    CXX="$PREV_CXX"
48723    ac_ext=cpp
48724ac_cpp='$CXXCPP $CPPFLAGS'
48725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48728
48729
48730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48731$as_echo_n "checking if we should bundle freetype... " >&6; }
48732    if test "x$BUNDLE_FREETYPE" = xyes; then
48733      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48734    fi
48735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48736$as_echo "$BUNDLE_FREETYPE" >&6; }
48737
48738  fi # end freetype needed
48739
48740
48741
48742
48743
48744
48745
48746  ###############################################################################
48747  #
48748  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48749  #
48750
48751# Check whether --with-alsa was given.
48752if test "${with_alsa+set}" = set; then :
48753  withval=$with_alsa;
48754fi
48755
48756
48757# Check whether --with-alsa-include was given.
48758if test "${with_alsa_include+set}" = set; then :
48759  withval=$with_alsa_include;
48760fi
48761
48762
48763# Check whether --with-alsa-lib was given.
48764if test "${with_alsa_lib+set}" = set; then :
48765  withval=$with_alsa_lib;
48766fi
48767
48768
48769  if test "x$ALSA_NOT_NEEDED" = xyes; then
48770    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48771      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48772$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48773    fi
48774    ALSA_CFLAGS=
48775    ALSA_LIBS=
48776  else
48777    ALSA_FOUND=no
48778
48779    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48780      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48781    fi
48782
48783    if test "x${with_alsa}" != x; then
48784      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48785      ALSA_CFLAGS="-I${with_alsa}/include"
48786      ALSA_FOUND=yes
48787    fi
48788    if test "x${with_alsa_include}" != x; then
48789      ALSA_CFLAGS="-I${with_alsa_include}"
48790      ALSA_FOUND=yes
48791    fi
48792    if test "x${with_alsa_lib}" != x; then
48793      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48794      ALSA_FOUND=yes
48795    fi
48796    if test "x$ALSA_FOUND" = xno; then
48797
48798
48799  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48800    # Source the builddeps file again, to make sure it uses the latest variables!
48801    . $builddepsfile
48802    # Look for a target and build machine specific resource!
48803    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48804    if test "x$resource" = x; then
48805      # Ok, lets instead look for a target specific resource
48806      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48807    fi
48808    if test "x$resource" = x; then
48809      # Ok, lets instead look for a build specific resource
48810      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48811    fi
48812    if test "x$resource" = x; then
48813      # Ok, lets instead look for a generic resource
48814      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48815      resource=${builddep_alsa}
48816    fi
48817    if test "x$resource" != x; then
48818      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48819$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48820      # If the resource in the builddeps.conf file is an existing directory,
48821      # for example /java/linux/cups
48822      if test -d ${resource}; then
48823        depdir=${resource}
48824      else
48825
48826  # alsa is for example mymodule
48827  # $resource is for example libs/general/libmymod_1_2_3.zip
48828  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48829  # $with_builddeps_dir is for example /localhome/builddeps
48830  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48831  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48832  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48833  filename=`basename $resource`
48834  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48835  filebase=${filename%%.*}
48836  extension=${filename#*.}
48837  installdir=$with_builddeps_dir/$filebase
48838  if test ! -f $installdir/$filename.unpacked; then
48839    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48840$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48841    if test ! -d $installdir; then
48842      mkdir -p $installdir
48843    fi
48844    if test ! -d $installdir; then
48845      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48846    fi
48847    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48848    touch $tmpfile
48849    if test ! -f $tmpfile; then
48850      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48851    fi
48852
48853  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48854  # $tmpfile is the local file name for the downloaded file.
48855  VALID_TOOL=no
48856  if test "x$BDEPS_FTP" = xwget; then
48857    VALID_TOOL=yes
48858    wget -O $tmpfile $with_builddeps_server/$resource
48859  fi
48860  if test "x$BDEPS_FTP" = xlftp; then
48861    VALID_TOOL=yes
48862    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48863  fi
48864  if test "x$BDEPS_FTP" = xftp; then
48865    VALID_TOOL=yes
48866    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48867    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48868    FTPUSERPWD=${FTPSERVER%%@*}
48869    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48870      FTPUSER=${userpwd%%:*}
48871      FTPPWD=${userpwd#*@}
48872      FTPSERVER=${FTPSERVER#*@}
48873    else
48874      FTPUSER=ftp
48875      FTPPWD=ftp
48876    fi
48877    # the "pass" command does not work on some
48878    # ftp clients (read ftp.exe) but if it works,
48879    # passive mode is better!
48880    ( \
48881        echo "user $FTPUSER $FTPPWD"        ; \
48882        echo "pass"                         ; \
48883        echo "bin"                          ; \
48884        echo "get $FTPPATH $tmpfile"              ; \
48885    ) | ftp -in $FTPSERVER
48886  fi
48887  if test "x$VALID_TOOL" != xyes; then
48888    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48889  fi
48890
48891    mv $tmpfile $installdir/$filename
48892    if test ! -s $installdir/$filename; then
48893      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48894    fi
48895    case "$extension" in
48896      zip)  echo "Unzipping $installdir/$filename..."
48897        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48898        ;;
48899      tar.gz) echo "Untaring $installdir/$filename..."
48900        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48901        ;;
48902      tgz) echo "Untaring $installdir/$filename..."
48903        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48904        ;;
48905      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48906        ;;
48907    esac
48908  fi
48909  if test -f $installdir/$filename.unpacked; then
48910    depdir=$installdir
48911  fi
48912
48913      fi
48914      # Source the builddeps file again, because in the previous command, the depdir
48915      # was updated to point at the current build dependency install directory.
48916      . $builddepsfile
48917      # Now extract variables from the builddeps.conf files.
48918      theroot=${builddep_alsa_ROOT}
48919      thecflags=${builddep_alsa_CFLAGS}
48920      thelibs=${builddep_alsa_LIBS}
48921      if test "x$depdir" = x; then
48922        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48923      fi
48924      ALSA=$depdir
48925      if test "x$theroot" != x; then
48926        ALSA="$theroot"
48927      fi
48928      if test "x$thecflags" != x; then
48929        ALSA_CFLAGS="$thecflags"
48930      fi
48931      if test "x$thelibs" != x; then
48932        ALSA_LIBS="$thelibs"
48933      fi
48934      ALSA_FOUND=yes
48935      else ALSA_FOUND=no
48936
48937    fi
48938    else ALSA_FOUND=no
48939
48940  fi
48941
48942    fi
48943    # Do not try pkg-config if we have a sysroot set.
48944    if test "x$SYSROOT" = x; then
48945      if test "x$ALSA_FOUND" = xno; then
48946
48947pkg_failed=no
48948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48949$as_echo_n "checking for ALSA... " >&6; }
48950
48951if test -n "$ALSA_CFLAGS"; then
48952    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48953 elif test -n "$PKG_CONFIG"; then
48954    if test -n "$PKG_CONFIG" && \
48955    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48956  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48957  ac_status=$?
48958  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48959  test $ac_status = 0; }; then
48960  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48961else
48962  pkg_failed=yes
48963fi
48964 else
48965    pkg_failed=untried
48966fi
48967if test -n "$ALSA_LIBS"; then
48968    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48969 elif test -n "$PKG_CONFIG"; then
48970    if test -n "$PKG_CONFIG" && \
48971    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48972  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48973  ac_status=$?
48974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48975  test $ac_status = 0; }; then
48976  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48977else
48978  pkg_failed=yes
48979fi
48980 else
48981    pkg_failed=untried
48982fi
48983
48984
48985
48986if test $pkg_failed = yes; then
48987
48988if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48989        _pkg_short_errors_supported=yes
48990else
48991        _pkg_short_errors_supported=no
48992fi
48993        if test $_pkg_short_errors_supported = yes; then
48994	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48995        else
48996	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48997        fi
48998	# Put the nasty error message in config.log where it belongs
48999	echo "$ALSA_PKG_ERRORS" >&5
49000
49001	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49002$as_echo "no" >&6; }
49003                ALSA_FOUND=no
49004elif test $pkg_failed = untried; then
49005	ALSA_FOUND=no
49006else
49007	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
49008	ALSA_LIBS=$pkg_cv_ALSA_LIBS
49009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49010$as_echo "yes" >&6; }
49011	ALSA_FOUND=yes
49012fi
49013      fi
49014    fi
49015    if test "x$ALSA_FOUND" = xno; then
49016      for ac_header in alsa/asoundlib.h
49017do :
49018  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
49019if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
49020  cat >>confdefs.h <<_ACEOF
49021#define HAVE_ALSA_ASOUNDLIB_H 1
49022_ACEOF
49023
49024            ALSA_FOUND=yes
49025            ALSA_CFLAGS=-Iignoreme
49026            ALSA_LIBS=-lasound
49027            DEFAULT_ALSA=yes
49028
49029else
49030  ALSA_FOUND=no
49031fi
49032
49033done
49034
49035    fi
49036    if test "x$ALSA_FOUND" = xno; then
49037
49038  # Print a helpful message on how to acquire the necessary build dependency.
49039  # alsa is the help tag: freetype, cups, pulse, alsa etc
49040  MISSING_DEPENDENCY=alsa
49041
49042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49043    cygwin_help $MISSING_DEPENDENCY
49044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49045    msys_help $MISSING_DEPENDENCY
49046  else
49047    PKGHANDLER_COMMAND=
49048
49049    case $PKGHANDLER in
49050      apt-get)
49051        apt_help     $MISSING_DEPENDENCY ;;
49052      yum)
49053        yum_help     $MISSING_DEPENDENCY ;;
49054      port)
49055        port_help    $MISSING_DEPENDENCY ;;
49056      pkgutil)
49057        pkgutil_help $MISSING_DEPENDENCY ;;
49058      pkgadd)
49059        pkgadd_help  $MISSING_DEPENDENCY ;;
49060    esac
49061
49062    if test "x$PKGHANDLER_COMMAND" != x; then
49063      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49064    fi
49065  fi
49066
49067      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49068    fi
49069  fi
49070
49071
49072
49073
49074
49075
49076  ###############################################################################
49077  #
49078  # Check for the jpeg library
49079  #
49080
49081
49082# Check whether --with-libjpeg was given.
49083if test "${with_libjpeg+set}" = set; then :
49084  withval=$with_libjpeg;
49085fi
49086
49087
49088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49089$as_echo_n "checking for which libjpeg to use... " >&6; }
49090
49091  # default is bundled
49092  DEFAULT_LIBJPEG=bundled
49093
49094  #
49095  # if user didn't specify, use DEFAULT_LIBJPEG
49096  #
49097  if test "x${with_libjpeg}" = "x"; then
49098    with_libjpeg=${DEFAULT_LIBJPEG}
49099  fi
49100
49101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49102$as_echo "${with_libjpeg}" >&6; }
49103
49104  if test "x${with_libjpeg}" = "xbundled"; then
49105    USE_EXTERNAL_LIBJPEG=false
49106  elif test "x${with_libjpeg}" = "xsystem"; then
49107    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49108if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49109
49110else
49111   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49112fi
49113
49114
49115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49116$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49117if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49118  $as_echo_n "(cached) " >&6
49119else
49120  ac_check_lib_save_LIBS=$LIBS
49121LIBS="-ljpeg  $LIBS"
49122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49123/* end confdefs.h.  */
49124
49125/* Override any GCC internal prototype to avoid an error.
49126   Use char because int might match the return type of a GCC
49127   builtin and then its argument prototype would still apply.  */
49128#ifdef __cplusplus
49129extern "C"
49130#endif
49131char jpeg_CreateDecompress ();
49132int
49133main ()
49134{
49135return jpeg_CreateDecompress ();
49136  ;
49137  return 0;
49138}
49139_ACEOF
49140if ac_fn_cxx_try_link "$LINENO"; then :
49141  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49142else
49143  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49144fi
49145rm -f core conftest.err conftest.$ac_objext \
49146    conftest$ac_exeext conftest.$ac_ext
49147LIBS=$ac_check_lib_save_LIBS
49148fi
49149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49150$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49151if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49152  cat >>confdefs.h <<_ACEOF
49153#define HAVE_LIBJPEG 1
49154_ACEOF
49155
49156  LIBS="-ljpeg $LIBS"
49157
49158else
49159   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49160fi
49161
49162
49163    USE_EXTERNAL_LIBJPEG=true
49164  else
49165    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49166  fi
49167
49168
49169
49170  ###############################################################################
49171  #
49172  # Check for the gif library
49173  #
49174
49175
49176# Check whether --with-giflib was given.
49177if test "${with_giflib+set}" = set; then :
49178  withval=$with_giflib;
49179fi
49180
49181
49182
49183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49184$as_echo_n "checking for which giflib to use... " >&6; }
49185
49186  # default is bundled
49187  DEFAULT_GIFLIB=bundled
49188
49189  #
49190  # if user didn't specify, use DEFAULT_GIFLIB
49191  #
49192  if test "x${with_giflib}" = "x"; then
49193    with_giflib=${DEFAULT_GIFLIB}
49194  fi
49195
49196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49197$as_echo "${with_giflib}" >&6; }
49198
49199  if test "x${with_giflib}" = "xbundled"; then
49200    USE_EXTERNAL_LIBGIF=false
49201  elif test "x${with_giflib}" = "xsystem"; then
49202    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49203if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49204
49205else
49206   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49207fi
49208
49209
49210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49211$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49212if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49213  $as_echo_n "(cached) " >&6
49214else
49215  ac_check_lib_save_LIBS=$LIBS
49216LIBS="-lgif  $LIBS"
49217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49218/* end confdefs.h.  */
49219
49220/* Override any GCC internal prototype to avoid an error.
49221   Use char because int might match the return type of a GCC
49222   builtin and then its argument prototype would still apply.  */
49223#ifdef __cplusplus
49224extern "C"
49225#endif
49226char DGifGetCode ();
49227int
49228main ()
49229{
49230return DGifGetCode ();
49231  ;
49232  return 0;
49233}
49234_ACEOF
49235if ac_fn_cxx_try_link "$LINENO"; then :
49236  ac_cv_lib_gif_DGifGetCode=yes
49237else
49238  ac_cv_lib_gif_DGifGetCode=no
49239fi
49240rm -f core conftest.err conftest.$ac_objext \
49241    conftest$ac_exeext conftest.$ac_ext
49242LIBS=$ac_check_lib_save_LIBS
49243fi
49244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49245$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49246if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49247  cat >>confdefs.h <<_ACEOF
49248#define HAVE_LIBGIF 1
49249_ACEOF
49250
49251  LIBS="-lgif $LIBS"
49252
49253else
49254   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49255fi
49256
49257
49258    USE_EXTERNAL_LIBGIF=true
49259  else
49260    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49261  fi
49262
49263
49264  ###############################################################################
49265  #
49266  # Check for the lcms2 library
49267  #
49268
49269
49270# Check whether --with-lcms was given.
49271if test "${with_lcms+set}" = set; then :
49272  withval=$with_lcms;
49273fi
49274
49275
49276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49277$as_echo_n "checking for which lcms to use... " >&6; }
49278
49279  DEFAULT_LCMS=bundled
49280
49281  #
49282  # If user didn't specify, use DEFAULT_LCMS
49283  #
49284  if test "x${with_lcms}" = "x"; then
49285      with_lcms=${DEFAULT_LCMS}
49286  fi
49287
49288  if test "x${with_lcms}" = "xbundled"; then
49289    USE_EXTERNAL_LCMS=false
49290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49291$as_echo "bundled" >&6; }
49292  elif test "x${with_lcms}" = "xsystem"; then
49293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49294$as_echo "system" >&6; }
49295
49296pkg_failed=no
49297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49298$as_echo_n "checking for LCMS... " >&6; }
49299
49300if test -n "$LCMS_CFLAGS"; then
49301    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49302 elif test -n "$PKG_CONFIG"; then
49303    if test -n "$PKG_CONFIG" && \
49304    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49305  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49306  ac_status=$?
49307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49308  test $ac_status = 0; }; then
49309  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49310else
49311  pkg_failed=yes
49312fi
49313 else
49314    pkg_failed=untried
49315fi
49316if test -n "$LCMS_LIBS"; then
49317    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49318 elif test -n "$PKG_CONFIG"; then
49319    if test -n "$PKG_CONFIG" && \
49320    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49321  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49322  ac_status=$?
49323  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49324  test $ac_status = 0; }; then
49325  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49326else
49327  pkg_failed=yes
49328fi
49329 else
49330    pkg_failed=untried
49331fi
49332
49333
49334
49335if test $pkg_failed = yes; then
49336
49337if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49338        _pkg_short_errors_supported=yes
49339else
49340        _pkg_short_errors_supported=no
49341fi
49342        if test $_pkg_short_errors_supported = yes; then
49343	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49344        else
49345	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49346        fi
49347	# Put the nasty error message in config.log where it belongs
49348	echo "$LCMS_PKG_ERRORS" >&5
49349
49350	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49351$as_echo "no" >&6; }
49352                LCMS_FOUND=no
49353elif test $pkg_failed = untried; then
49354	LCMS_FOUND=no
49355else
49356	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49357	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49359$as_echo "yes" >&6; }
49360	LCMS_FOUND=yes
49361fi
49362    if test "x${LCMS_FOUND}" = "xyes"; then
49363      USE_EXTERNAL_LCMS=true
49364    else
49365      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49366    fi
49367  else
49368    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49369  fi
49370
49371
49372
49373  ###############################################################################
49374  #
49375  # Check for the png library
49376  #
49377
49378
49379# Check whether --with-libpng was given.
49380if test "${with_libpng+set}" = set; then :
49381  withval=$with_libpng;
49382fi
49383
49384
49385
49386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49387$as_echo_n "checking for which libpng to use... " >&6; }
49388
49389  # default is bundled
49390  DEFAULT_LIBPNG=bundled
49391
49392  #
49393  # if user didn't specify, use DEFAULT_LIBPNG
49394  #
49395  if test "x${with_libpng}" = "x"; then
49396      with_libpng=${DEFAULT_LIBPNG}
49397  fi
49398
49399  if test "x${with_libpng}" = "xbundled"; then
49400      USE_EXTERNAL_LIBPNG=false
49401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49402$as_echo "bundled" >&6; }
49403  elif test "x${with_libpng}" = "xsystem"; then
49404
49405pkg_failed=no
49406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49407$as_echo_n "checking for PNG... " >&6; }
49408
49409if test -n "$PNG_CFLAGS"; then
49410    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49411 elif test -n "$PKG_CONFIG"; then
49412    if test -n "$PKG_CONFIG" && \
49413    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49414  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49415  ac_status=$?
49416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49417  test $ac_status = 0; }; then
49418  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49419else
49420  pkg_failed=yes
49421fi
49422 else
49423    pkg_failed=untried
49424fi
49425if test -n "$PNG_LIBS"; then
49426    pkg_cv_PNG_LIBS="$PNG_LIBS"
49427 elif test -n "$PKG_CONFIG"; then
49428    if test -n "$PKG_CONFIG" && \
49429    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49430  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49431  ac_status=$?
49432  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49433  test $ac_status = 0; }; then
49434  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49435else
49436  pkg_failed=yes
49437fi
49438 else
49439    pkg_failed=untried
49440fi
49441
49442
49443
49444if test $pkg_failed = yes; then
49445
49446if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49447        _pkg_short_errors_supported=yes
49448else
49449        _pkg_short_errors_supported=no
49450fi
49451        if test $_pkg_short_errors_supported = yes; then
49452	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49453        else
49454	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49455        fi
49456	# Put the nasty error message in config.log where it belongs
49457	echo "$PNG_PKG_ERRORS" >&5
49458
49459	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49460$as_echo "no" >&6; }
49461                 LIBPNG_FOUND=no
49462elif test $pkg_failed = untried; then
49463	 LIBPNG_FOUND=no
49464else
49465	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49466	PNG_LIBS=$pkg_cv_PNG_LIBS
49467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49468$as_echo "yes" >&6; }
49469	 LIBPNG_FOUND=yes
49470fi
49471      if test "x${LIBPNG_FOUND}" = "xyes"; then
49472          USE_EXTERNAL_LIBPNG=true
49473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49474$as_echo "system" >&6; }
49475      else
49476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49477$as_echo "system not found" >&6; }
49478          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49479      fi
49480  else
49481      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49482  fi
49483
49484
49485  ###############################################################################
49486  #
49487  # Check for the zlib library
49488  #
49489
49490
49491# Check whether --with-zlib was given.
49492if test "${with_zlib+set}" = set; then :
49493  withval=$with_zlib;
49494fi
49495
49496
49497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49498$as_echo_n "checking for compress in -lz... " >&6; }
49499if ${ac_cv_lib_z_compress+:} false; then :
49500  $as_echo_n "(cached) " >&6
49501else
49502  ac_check_lib_save_LIBS=$LIBS
49503LIBS="-lz  $LIBS"
49504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49505/* end confdefs.h.  */
49506
49507/* Override any GCC internal prototype to avoid an error.
49508   Use char because int might match the return type of a GCC
49509   builtin and then its argument prototype would still apply.  */
49510#ifdef __cplusplus
49511extern "C"
49512#endif
49513char compress ();
49514int
49515main ()
49516{
49517return compress ();
49518  ;
49519  return 0;
49520}
49521_ACEOF
49522if ac_fn_cxx_try_link "$LINENO"; then :
49523  ac_cv_lib_z_compress=yes
49524else
49525  ac_cv_lib_z_compress=no
49526fi
49527rm -f core conftest.err conftest.$ac_objext \
49528    conftest$ac_exeext conftest.$ac_ext
49529LIBS=$ac_check_lib_save_LIBS
49530fi
49531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49532$as_echo "$ac_cv_lib_z_compress" >&6; }
49533if test "x$ac_cv_lib_z_compress" = xyes; then :
49534   ZLIB_FOUND=yes
49535else
49536   ZLIB_FOUND=no
49537fi
49538
49539
49540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49541$as_echo_n "checking for which zlib to use... " >&6; }
49542
49543  DEFAULT_ZLIB=bundled
49544  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49545    #
49546    # On macosx default is system...on others default is
49547    #
49548    DEFAULT_ZLIB=system
49549  fi
49550
49551  if test "x${ZLIB_FOUND}" != "xyes"; then
49552    #
49553    # If we don't find any system...set default to bundled
49554    #
49555    DEFAULT_ZLIB=bundled
49556  fi
49557
49558  #
49559  # If user didn't specify, use DEFAULT_ZLIB
49560  #
49561  if test "x${with_zlib}" = "x"; then
49562    with_zlib=${DEFAULT_ZLIB}
49563  fi
49564
49565  if test "x${with_zlib}" = "xbundled"; then
49566    USE_EXTERNAL_LIBZ=false
49567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49568$as_echo "bundled" >&6; }
49569  elif test "x${with_zlib}" = "xsystem"; then
49570    if test "x${ZLIB_FOUND}" = "xyes"; then
49571      USE_EXTERNAL_LIBZ=true
49572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49573$as_echo "system" >&6; }
49574    else
49575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49576$as_echo "system not found" >&6; }
49577      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49578    fi
49579  else
49580    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49581  fi
49582
49583
49584
49585  ###############################################################################
49586  LIBZIP_CAN_USE_MMAP=true
49587
49588
49589
49590  ###############################################################################
49591  #
49592  # Check if altzone exists in time.h
49593  #
49594
49595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49596/* end confdefs.h.  */
49597#include <time.h>
49598int
49599main ()
49600{
49601return (int)altzone;
49602  ;
49603  return 0;
49604}
49605_ACEOF
49606if ac_fn_cxx_try_link "$LINENO"; then :
49607  has_altzone=yes
49608else
49609  has_altzone=no
49610fi
49611rm -f core conftest.err conftest.$ac_objext \
49612    conftest$ac_exeext conftest.$ac_ext
49613  if test "x$has_altzone" = xyes; then
49614
49615$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49616
49617  fi
49618
49619  ###############################################################################
49620  #
49621  # Check the maths library
49622  #
49623
49624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49625$as_echo_n "checking for cos in -lm... " >&6; }
49626if ${ac_cv_lib_m_cos+:} false; then :
49627  $as_echo_n "(cached) " >&6
49628else
49629  ac_check_lib_save_LIBS=$LIBS
49630LIBS="-lm  $LIBS"
49631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49632/* end confdefs.h.  */
49633
49634/* Override any GCC internal prototype to avoid an error.
49635   Use char because int might match the return type of a GCC
49636   builtin and then its argument prototype would still apply.  */
49637#ifdef __cplusplus
49638extern "C"
49639#endif
49640char cos ();
49641int
49642main ()
49643{
49644return cos ();
49645  ;
49646  return 0;
49647}
49648_ACEOF
49649if ac_fn_cxx_try_link "$LINENO"; then :
49650  ac_cv_lib_m_cos=yes
49651else
49652  ac_cv_lib_m_cos=no
49653fi
49654rm -f core conftest.err conftest.$ac_objext \
49655    conftest$ac_exeext conftest.$ac_ext
49656LIBS=$ac_check_lib_save_LIBS
49657fi
49658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49659$as_echo "$ac_cv_lib_m_cos" >&6; }
49660if test "x$ac_cv_lib_m_cos" = xyes; then :
49661  cat >>confdefs.h <<_ACEOF
49662#define HAVE_LIBM 1
49663_ACEOF
49664
49665  LIBS="-lm $LIBS"
49666
49667else
49668
49669        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49670$as_echo "$as_me: Maths library was not found" >&6;}
49671
49672
49673fi
49674
49675
49676
49677  ###############################################################################
49678  #
49679  # Check for libdl.so
49680
49681  save_LIBS="$LIBS"
49682  LIBS=""
49683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49684$as_echo_n "checking for dlopen in -ldl... " >&6; }
49685if ${ac_cv_lib_dl_dlopen+:} false; then :
49686  $as_echo_n "(cached) " >&6
49687else
49688  ac_check_lib_save_LIBS=$LIBS
49689LIBS="-ldl  $LIBS"
49690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49691/* end confdefs.h.  */
49692
49693/* Override any GCC internal prototype to avoid an error.
49694   Use char because int might match the return type of a GCC
49695   builtin and then its argument prototype would still apply.  */
49696#ifdef __cplusplus
49697extern "C"
49698#endif
49699char dlopen ();
49700int
49701main ()
49702{
49703return dlopen ();
49704  ;
49705  return 0;
49706}
49707_ACEOF
49708if ac_fn_cxx_try_link "$LINENO"; then :
49709  ac_cv_lib_dl_dlopen=yes
49710else
49711  ac_cv_lib_dl_dlopen=no
49712fi
49713rm -f core conftest.err conftest.$ac_objext \
49714    conftest$ac_exeext conftest.$ac_ext
49715LIBS=$ac_check_lib_save_LIBS
49716fi
49717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49718$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49719if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49720  cat >>confdefs.h <<_ACEOF
49721#define HAVE_LIBDL 1
49722_ACEOF
49723
49724  LIBS="-ldl $LIBS"
49725
49726fi
49727
49728  LIBDL="$LIBS"
49729
49730  LIBS="$save_LIBS"
49731
49732
49733  ###############################################################################
49734  #
49735  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49736  # dynamic build is configured on command line.
49737  #
49738
49739# Check whether --with-stdc++lib was given.
49740if test "${with_stdc__lib+set}" = set; then :
49741  withval=$with_stdc__lib;
49742        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49743                && test "x$with_stdc__lib" != xdefault; then
49744          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49745        fi
49746
49747else
49748  with_stdc__lib=default
49749
49750fi
49751
49752
49753  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49754    # Test if -lstdc++ works.
49755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49756$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49757    ac_ext=cpp
49758ac_cpp='$CXXCPP $CPPFLAGS'
49759ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49760ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49761ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49762
49763    OLD_CXXFLAGS="$CXXFLAGS"
49764    CXXFLAGS="$CXXFLAGS -lstdc++"
49765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49766/* end confdefs.h.  */
49767
49768int
49769main ()
49770{
49771return 0;
49772  ;
49773  return 0;
49774}
49775_ACEOF
49776if ac_fn_cxx_try_link "$LINENO"; then :
49777  has_dynamic_libstdcxx=yes
49778else
49779  has_dynamic_libstdcxx=no
49780fi
49781rm -f core conftest.err conftest.$ac_objext \
49782    conftest$ac_exeext conftest.$ac_ext
49783    CXXFLAGS="$OLD_CXXFLAGS"
49784    ac_ext=cpp
49785ac_cpp='$CXXCPP $CPPFLAGS'
49786ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49787ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49788ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49789
49790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49791$as_echo "$has_dynamic_libstdcxx" >&6; }
49792
49793    # Test if stdc++ can be linked statically.
49794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49795$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49796    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49797    ac_ext=cpp
49798ac_cpp='$CXXCPP $CPPFLAGS'
49799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49802
49803    OLD_LIBS="$LIBS"
49804    OLD_CXX="$CXX"
49805    LIBS="$STATIC_STDCXX_FLAGS"
49806    CXX="$CC"
49807    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49808/* end confdefs.h.  */
49809
49810int
49811main ()
49812{
49813return 0;
49814  ;
49815  return 0;
49816}
49817_ACEOF
49818if ac_fn_cxx_try_link "$LINENO"; then :
49819  has_static_libstdcxx=yes
49820else
49821  has_static_libstdcxx=no
49822fi
49823rm -f core conftest.err conftest.$ac_objext \
49824    conftest$ac_exeext conftest.$ac_ext
49825    LIBS="$OLD_LIBS"
49826    CXX="$OLD_CXX"
49827    ac_ext=cpp
49828ac_cpp='$CXXCPP $CPPFLAGS'
49829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49832
49833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49834$as_echo "$has_static_libstdcxx" >&6; }
49835
49836    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49837      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49838    fi
49839
49840    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49841      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49842    fi
49843
49844    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49845      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49846    fi
49847
49848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49849$as_echo_n "checking how to link with libstdc++... " >&6; }
49850    # If dynamic was requested, it's available since it would fail above otherwise.
49851    # If dynamic wasn't requested, go with static unless it isn't available.
49852    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49853      LIBCXX="$LIBCXX -lstdc++"
49854      LDCXX="$CXX"
49855      STATIC_CXX_SETTING="STATIC_CXX=false"
49856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49857$as_echo "dynamic" >&6; }
49858    else
49859      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49860      LDCXX="$CC"
49861      STATIC_CXX_SETTING="STATIC_CXX=true"
49862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49863$as_echo "static" >&6; }
49864    fi
49865  fi
49866
49867
49868  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49869    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49870
49871pkg_failed=no
49872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49873$as_echo_n "checking for LIBFFI... " >&6; }
49874
49875if test -n "$LIBFFI_CFLAGS"; then
49876    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49877 elif test -n "$PKG_CONFIG"; then
49878    if test -n "$PKG_CONFIG" && \
49879    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49880  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49881  ac_status=$?
49882  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49883  test $ac_status = 0; }; then
49884  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49885else
49886  pkg_failed=yes
49887fi
49888 else
49889    pkg_failed=untried
49890fi
49891if test -n "$LIBFFI_LIBS"; then
49892    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49893 elif test -n "$PKG_CONFIG"; then
49894    if test -n "$PKG_CONFIG" && \
49895    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49896  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49897  ac_status=$?
49898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49899  test $ac_status = 0; }; then
49900  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49901else
49902  pkg_failed=yes
49903fi
49904 else
49905    pkg_failed=untried
49906fi
49907
49908
49909
49910if test $pkg_failed = yes; then
49911
49912if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49913        _pkg_short_errors_supported=yes
49914else
49915        _pkg_short_errors_supported=no
49916fi
49917        if test $_pkg_short_errors_supported = yes; then
49918	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49919        else
49920	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49921        fi
49922	# Put the nasty error message in config.log where it belongs
49923	echo "$LIBFFI_PKG_ERRORS" >&5
49924
49925	as_fn_error $? "Package requirements (libffi) were not met:
49926
49927$LIBFFI_PKG_ERRORS
49928
49929Consider adjusting the PKG_CONFIG_PATH environment variable if you
49930installed software in a non-standard prefix.
49931
49932Alternatively, you may set the environment variables LIBFFI_CFLAGS
49933and LIBFFI_LIBS to avoid the need to call pkg-config.
49934See the pkg-config man page for more details.
49935" "$LINENO" 5
49936elif test $pkg_failed = untried; then
49937	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49939as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49940is in your PATH or set the PKG_CONFIG environment variable to the full
49941path to pkg-config.
49942
49943Alternatively, you may set the environment variables LIBFFI_CFLAGS
49944and LIBFFI_LIBS to avoid the need to call pkg-config.
49945See the pkg-config man page for more details.
49946
49947To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49948See \`config.log' for more details" "$LINENO" 5; }
49949else
49950	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49951	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49953$as_echo "yes" >&6; }
49954	:
49955fi
49956
49957  fi
49958
49959  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49960    # Extract the first word of "llvm-config", so it can be a program name with args.
49961set dummy llvm-config; ac_word=$2
49962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49963$as_echo_n "checking for $ac_word... " >&6; }
49964if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49965  $as_echo_n "(cached) " >&6
49966else
49967  if test -n "$LLVM_CONFIG"; then
49968  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49969else
49970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49971for as_dir in $PATH
49972do
49973  IFS=$as_save_IFS
49974  test -z "$as_dir" && as_dir=.
49975    for ac_exec_ext in '' $ac_executable_extensions; do
49976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49977    ac_cv_prog_LLVM_CONFIG="llvm-config"
49978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49979    break 2
49980  fi
49981done
49982  done
49983IFS=$as_save_IFS
49984
49985fi
49986fi
49987LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49988if test -n "$LLVM_CONFIG"; then
49989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49990$as_echo "$LLVM_CONFIG" >&6; }
49991else
49992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49993$as_echo "no" >&6; }
49994fi
49995
49996
49997
49998    if test "x$LLVM_CONFIG" != xllvm-config; then
49999      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
50000    fi
50001
50002    llvm_components="jit mcjit engine nativecodegen native"
50003    unset LLVM_CFLAGS
50004    for flag in $("$LLVM_CONFIG" --cxxflags); do
50005      if echo "${flag}" | grep -q '^-[ID]'; then
50006        if test "${flag}" != "-D_DEBUG" ; then
50007          if test "${LLVM_CFLAGS}" != "" ; then
50008            LLVM_CFLAGS="${LLVM_CFLAGS} "
50009          fi
50010          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
50011        fi
50012      fi
50013    done
50014    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
50015    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
50016
50017    unset LLVM_LDFLAGS
50018    for flag in $("${LLVM_CONFIG}" --ldflags); do
50019      if echo "${flag}" | grep -q '^-L'; then
50020        if test "${LLVM_LDFLAGS}" != ""; then
50021          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
50022        fi
50023        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
50024      fi
50025    done
50026
50027    unset LLVM_LIBS
50028    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
50029      if echo "${flag}" | grep -q '^-l'; then
50030        if test "${LLVM_LIBS}" != ""; then
50031          LLVM_LIBS="${LLVM_LIBS} "
50032        fi
50033        LLVM_LIBS="${LLVM_LIBS}${flag}"
50034      fi
50035    done
50036
50037
50038
50039
50040  fi
50041
50042  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50043  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50044    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50045  fi
50046
50047  # TODO better (platform agnostic) test
50048  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50049    LIBCXX="-lstdc++"
50050  fi
50051
50052
50053
50054
50055  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50056
50057
50058# Check whether --with-msvcr-dll was given.
50059if test "${with_msvcr_dll+set}" = set; then :
50060  withval=$with_msvcr_dll;
50061fi
50062
50063
50064  if test "x$with_msvcr_dll" != x; then
50065    # If given explicitely by user, do not probe. If not present, fail directly.
50066
50067  DLL_NAME="$MSVCR_NAME"
50068  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50069  METHOD="--with-msvcr-dll"
50070  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50072$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50073
50074    # Need to check if the found msvcr is correct architecture
50075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50076$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50077    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50079      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50080      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50081      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50082        CORRECT_MSVCR_ARCH="PE32 executable"
50083      else
50084        CORRECT_MSVCR_ARCH="PE32+ executable"
50085      fi
50086    else
50087      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50088        CORRECT_MSVCR_ARCH=386
50089      else
50090        CORRECT_MSVCR_ARCH=x86-64
50091      fi
50092    fi
50093    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50095$as_echo "ok" >&6; }
50096      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50097
50098  # Only process if variable expands to non-empty
50099
50100  if test "x$MSVC_DLL" != x; then
50101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50102
50103  # Input might be given as Windows format, start by converting to
50104  # unix format.
50105  path="$MSVC_DLL"
50106  new_path=`$CYGPATH -u "$path"`
50107
50108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50111  # "foo.exe" is OK but "foo" is an error.
50112  #
50113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50114  # It is also a way to make sure we got the proper file name for the real test later on.
50115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50116  if test "x$test_shortpath" = x; then
50117    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50118$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50119    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50120  fi
50121
50122  # Call helper function which possibly converts this using DOS-style short mode.
50123  # If so, the updated path is stored in $new_path.
50124
50125  input_path="$new_path"
50126  # Check if we need to convert this using DOS-style short mode. If the path
50127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50128  # take no chances and rewrite it.
50129  # Note: m4 eats our [], so we need to use [ and ] instead.
50130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50131  if test "x$has_forbidden_chars" != x; then
50132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50136      # Going to short mode and back again did indeed matter. Since short mode is
50137      # case insensitive, let's make it lowercase to improve readability.
50138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50139      # Now convert it back to Unix-style (cygpath)
50140      input_path=`$CYGPATH -u "$shortmode_path"`
50141      new_path="$input_path"
50142    fi
50143  fi
50144
50145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50146  if test "x$test_cygdrive_prefix" = x; then
50147    # As a simple fix, exclude /usr/bin since it's not a real path.
50148    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50150      # a path prefixed by /cygdrive for fixpath to work.
50151      new_path="$CYGWIN_ROOT_PATH$input_path"
50152    fi
50153  fi
50154
50155
50156  if test "x$path" != "x$new_path"; then
50157    MSVC_DLL="$new_path"
50158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50159$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50160  fi
50161
50162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50163
50164  path="$MSVC_DLL"
50165  has_colon=`$ECHO $path | $GREP ^.:`
50166  new_path="$path"
50167  if test "x$has_colon" = x; then
50168    # Not in mixed or Windows style, start by that.
50169    new_path=`cmd //c echo $path`
50170  fi
50171
50172
50173  input_path="$new_path"
50174  # Check if we need to convert this using DOS-style short mode. If the path
50175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50176  # take no chances and rewrite it.
50177  # Note: m4 eats our [], so we need to use [ and ] instead.
50178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50179  if test "x$has_forbidden_chars" != x; then
50180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50182  fi
50183
50184
50185  windows_path="$new_path"
50186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50187    unix_path=`$CYGPATH -u "$windows_path"`
50188    new_path="$unix_path"
50189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50191    new_path="$unix_path"
50192  fi
50193
50194  if test "x$path" != "x$new_path"; then
50195    MSVC_DLL="$new_path"
50196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50197$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50198  fi
50199
50200  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50201  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50202
50203    else
50204      # We're on a unix platform. Hooray! :)
50205      path="$MSVC_DLL"
50206      has_space=`$ECHO "$path" | $GREP " "`
50207      if test "x$has_space" != x; then
50208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50209$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50210        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50211      fi
50212
50213      # Use eval to expand a potential ~
50214      eval path="$path"
50215      if test ! -f "$path" && test ! -d "$path"; then
50216        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50217      fi
50218
50219      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50220    fi
50221  fi
50222
50223      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50224$as_echo_n "checking for $DLL_NAME... " >&6; }
50225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50226$as_echo "$MSVC_DLL" >&6; }
50227    else
50228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50229$as_echo "incorrect, ignoring" >&6; }
50230      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50231$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50232    fi
50233  fi
50234
50235    if test "x$MSVC_DLL" = x; then
50236      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50237    fi
50238    MSVCR_DLL="$MSVC_DLL"
50239  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50240
50241  DLL_NAME="$MSVCR_NAME"
50242  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50243  METHOD="devkit"
50244  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50246$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50247
50248    # Need to check if the found msvcr is correct architecture
50249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50250$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50251    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50253      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50254      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50256        CORRECT_MSVCR_ARCH="PE32 executable"
50257      else
50258        CORRECT_MSVCR_ARCH="PE32+ executable"
50259      fi
50260    else
50261      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50262        CORRECT_MSVCR_ARCH=386
50263      else
50264        CORRECT_MSVCR_ARCH=x86-64
50265      fi
50266    fi
50267    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50269$as_echo "ok" >&6; }
50270      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50271
50272  # Only process if variable expands to non-empty
50273
50274  if test "x$MSVC_DLL" != x; then
50275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50276
50277  # Input might be given as Windows format, start by converting to
50278  # unix format.
50279  path="$MSVC_DLL"
50280  new_path=`$CYGPATH -u "$path"`
50281
50282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50285  # "foo.exe" is OK but "foo" is an error.
50286  #
50287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50288  # It is also a way to make sure we got the proper file name for the real test later on.
50289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50290  if test "x$test_shortpath" = x; then
50291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50293    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50294  fi
50295
50296  # Call helper function which possibly converts this using DOS-style short mode.
50297  # If so, the updated path is stored in $new_path.
50298
50299  input_path="$new_path"
50300  # Check if we need to convert this using DOS-style short mode. If the path
50301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50302  # take no chances and rewrite it.
50303  # Note: m4 eats our [], so we need to use [ and ] instead.
50304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50305  if test "x$has_forbidden_chars" != x; then
50306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50310      # Going to short mode and back again did indeed matter. Since short mode is
50311      # case insensitive, let's make it lowercase to improve readability.
50312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50313      # Now convert it back to Unix-style (cygpath)
50314      input_path=`$CYGPATH -u "$shortmode_path"`
50315      new_path="$input_path"
50316    fi
50317  fi
50318
50319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50320  if test "x$test_cygdrive_prefix" = x; then
50321    # As a simple fix, exclude /usr/bin since it's not a real path.
50322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50324      # a path prefixed by /cygdrive for fixpath to work.
50325      new_path="$CYGWIN_ROOT_PATH$input_path"
50326    fi
50327  fi
50328
50329
50330  if test "x$path" != "x$new_path"; then
50331    MSVC_DLL="$new_path"
50332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50333$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50334  fi
50335
50336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50337
50338  path="$MSVC_DLL"
50339  has_colon=`$ECHO $path | $GREP ^.:`
50340  new_path="$path"
50341  if test "x$has_colon" = x; then
50342    # Not in mixed or Windows style, start by that.
50343    new_path=`cmd //c echo $path`
50344  fi
50345
50346
50347  input_path="$new_path"
50348  # Check if we need to convert this using DOS-style short mode. If the path
50349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50350  # take no chances and rewrite it.
50351  # Note: m4 eats our [], so we need to use [ and ] instead.
50352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50353  if test "x$has_forbidden_chars" != x; then
50354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50356  fi
50357
50358
50359  windows_path="$new_path"
50360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50361    unix_path=`$CYGPATH -u "$windows_path"`
50362    new_path="$unix_path"
50363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50365    new_path="$unix_path"
50366  fi
50367
50368  if test "x$path" != "x$new_path"; then
50369    MSVC_DLL="$new_path"
50370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50372  fi
50373
50374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50376
50377    else
50378      # We're on a unix platform. Hooray! :)
50379      path="$MSVC_DLL"
50380      has_space=`$ECHO "$path" | $GREP " "`
50381      if test "x$has_space" != x; then
50382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50383$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50385      fi
50386
50387      # Use eval to expand a potential ~
50388      eval path="$path"
50389      if test ! -f "$path" && test ! -d "$path"; then
50390        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50391      fi
50392
50393      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50394    fi
50395  fi
50396
50397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50398$as_echo_n "checking for $DLL_NAME... " >&6; }
50399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50400$as_echo "$MSVC_DLL" >&6; }
50401    else
50402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50403$as_echo "incorrect, ignoring" >&6; }
50404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50406    fi
50407  fi
50408
50409    if test "x$MSVC_DLL" = x; then
50410      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50411    fi
50412    MSVCR_DLL="$MSVC_DLL"
50413  else
50414
50415  DLL_NAME="${MSVCR_NAME}"
50416  MSVC_DLL=
50417
50418  if test "x$MSVC_DLL" = x; then
50419    # Probe: Using well-known location from Visual Studio 10.0
50420    if test "x$VCINSTALLDIR" != x; then
50421      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50422
50423  windows_path="$CYGWIN_VC_INSTALL_DIR"
50424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50425    unix_path=`$CYGPATH -u "$windows_path"`
50426    CYGWIN_VC_INSTALL_DIR="$unix_path"
50427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50429    CYGWIN_VC_INSTALL_DIR="$unix_path"
50430  fi
50431
50432      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50433        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50434      else
50435        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50436      fi
50437      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50438
50439  DLL_NAME="$DLL_NAME"
50440  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50441  METHOD="well-known location in VCINSTALLDIR"
50442  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50443    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50444$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50445
50446    # Need to check if the found msvcr is correct architecture
50447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50448$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50449    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50451      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50452      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50454        CORRECT_MSVCR_ARCH="PE32 executable"
50455      else
50456        CORRECT_MSVCR_ARCH="PE32+ executable"
50457      fi
50458    else
50459      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50460        CORRECT_MSVCR_ARCH=386
50461      else
50462        CORRECT_MSVCR_ARCH=x86-64
50463      fi
50464    fi
50465    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50467$as_echo "ok" >&6; }
50468      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50469
50470  # Only process if variable expands to non-empty
50471
50472  if test "x$MSVC_DLL" != x; then
50473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50474
50475  # Input might be given as Windows format, start by converting to
50476  # unix format.
50477  path="$MSVC_DLL"
50478  new_path=`$CYGPATH -u "$path"`
50479
50480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50483  # "foo.exe" is OK but "foo" is an error.
50484  #
50485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50486  # It is also a way to make sure we got the proper file name for the real test later on.
50487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50488  if test "x$test_shortpath" = x; then
50489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50490$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50491    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50492  fi
50493
50494  # Call helper function which possibly converts this using DOS-style short mode.
50495  # If so, the updated path is stored in $new_path.
50496
50497  input_path="$new_path"
50498  # Check if we need to convert this using DOS-style short mode. If the path
50499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50500  # take no chances and rewrite it.
50501  # Note: m4 eats our [], so we need to use [ and ] instead.
50502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50503  if test "x$has_forbidden_chars" != x; then
50504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50508      # Going to short mode and back again did indeed matter. Since short mode is
50509      # case insensitive, let's make it lowercase to improve readability.
50510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50511      # Now convert it back to Unix-style (cygpath)
50512      input_path=`$CYGPATH -u "$shortmode_path"`
50513      new_path="$input_path"
50514    fi
50515  fi
50516
50517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50518  if test "x$test_cygdrive_prefix" = x; then
50519    # As a simple fix, exclude /usr/bin since it's not a real path.
50520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50522      # a path prefixed by /cygdrive for fixpath to work.
50523      new_path="$CYGWIN_ROOT_PATH$input_path"
50524    fi
50525  fi
50526
50527
50528  if test "x$path" != "x$new_path"; then
50529    MSVC_DLL="$new_path"
50530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50531$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50532  fi
50533
50534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50535
50536  path="$MSVC_DLL"
50537  has_colon=`$ECHO $path | $GREP ^.:`
50538  new_path="$path"
50539  if test "x$has_colon" = x; then
50540    # Not in mixed or Windows style, start by that.
50541    new_path=`cmd //c echo $path`
50542  fi
50543
50544
50545  input_path="$new_path"
50546  # Check if we need to convert this using DOS-style short mode. If the path
50547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50548  # take no chances and rewrite it.
50549  # Note: m4 eats our [], so we need to use [ and ] instead.
50550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50551  if test "x$has_forbidden_chars" != x; then
50552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50554  fi
50555
50556
50557  windows_path="$new_path"
50558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50559    unix_path=`$CYGPATH -u "$windows_path"`
50560    new_path="$unix_path"
50561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50563    new_path="$unix_path"
50564  fi
50565
50566  if test "x$path" != "x$new_path"; then
50567    MSVC_DLL="$new_path"
50568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50569$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50570  fi
50571
50572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50574
50575    else
50576      # We're on a unix platform. Hooray! :)
50577      path="$MSVC_DLL"
50578      has_space=`$ECHO "$path" | $GREP " "`
50579      if test "x$has_space" != x; then
50580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50581$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50583      fi
50584
50585      # Use eval to expand a potential ~
50586      eval path="$path"
50587      if test ! -f "$path" && test ! -d "$path"; then
50588        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50589      fi
50590
50591      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50592    fi
50593  fi
50594
50595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50596$as_echo_n "checking for $DLL_NAME... " >&6; }
50597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50598$as_echo "$MSVC_DLL" >&6; }
50599    else
50600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50601$as_echo "incorrect, ignoring" >&6; }
50602      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50603$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50604    fi
50605  fi
50606
50607    fi
50608  fi
50609
50610  if test "x$MSVC_DLL" = x; then
50611    # Probe: Check in the Boot JDK directory.
50612    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50613
50614  DLL_NAME="$DLL_NAME"
50615  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50616  METHOD="well-known location in Boot JDK"
50617  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50618    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50619$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50620
50621    # Need to check if the found msvcr is correct architecture
50622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50623$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50624    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50626      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50627      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50628      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50629        CORRECT_MSVCR_ARCH="PE32 executable"
50630      else
50631        CORRECT_MSVCR_ARCH="PE32+ executable"
50632      fi
50633    else
50634      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50635        CORRECT_MSVCR_ARCH=386
50636      else
50637        CORRECT_MSVCR_ARCH=x86-64
50638      fi
50639    fi
50640    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50642$as_echo "ok" >&6; }
50643      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50644
50645  # Only process if variable expands to non-empty
50646
50647  if test "x$MSVC_DLL" != x; then
50648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50649
50650  # Input might be given as Windows format, start by converting to
50651  # unix format.
50652  path="$MSVC_DLL"
50653  new_path=`$CYGPATH -u "$path"`
50654
50655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50658  # "foo.exe" is OK but "foo" is an error.
50659  #
50660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50661  # It is also a way to make sure we got the proper file name for the real test later on.
50662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50663  if test "x$test_shortpath" = x; then
50664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50665$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50666    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50667  fi
50668
50669  # Call helper function which possibly converts this using DOS-style short mode.
50670  # If so, the updated path is stored in $new_path.
50671
50672  input_path="$new_path"
50673  # Check if we need to convert this using DOS-style short mode. If the path
50674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50675  # take no chances and rewrite it.
50676  # Note: m4 eats our [], so we need to use [ and ] instead.
50677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50678  if test "x$has_forbidden_chars" != x; then
50679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50683      # Going to short mode and back again did indeed matter. Since short mode is
50684      # case insensitive, let's make it lowercase to improve readability.
50685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50686      # Now convert it back to Unix-style (cygpath)
50687      input_path=`$CYGPATH -u "$shortmode_path"`
50688      new_path="$input_path"
50689    fi
50690  fi
50691
50692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50693  if test "x$test_cygdrive_prefix" = x; then
50694    # As a simple fix, exclude /usr/bin since it's not a real path.
50695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50697      # a path prefixed by /cygdrive for fixpath to work.
50698      new_path="$CYGWIN_ROOT_PATH$input_path"
50699    fi
50700  fi
50701
50702
50703  if test "x$path" != "x$new_path"; then
50704    MSVC_DLL="$new_path"
50705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50706$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50707  fi
50708
50709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50710
50711  path="$MSVC_DLL"
50712  has_colon=`$ECHO $path | $GREP ^.:`
50713  new_path="$path"
50714  if test "x$has_colon" = x; then
50715    # Not in mixed or Windows style, start by that.
50716    new_path=`cmd //c echo $path`
50717  fi
50718
50719
50720  input_path="$new_path"
50721  # Check if we need to convert this using DOS-style short mode. If the path
50722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50723  # take no chances and rewrite it.
50724  # Note: m4 eats our [], so we need to use [ and ] instead.
50725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50726  if test "x$has_forbidden_chars" != x; then
50727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50729  fi
50730
50731
50732  windows_path="$new_path"
50733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50734    unix_path=`$CYGPATH -u "$windows_path"`
50735    new_path="$unix_path"
50736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50738    new_path="$unix_path"
50739  fi
50740
50741  if test "x$path" != "x$new_path"; then
50742    MSVC_DLL="$new_path"
50743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50744$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50745  fi
50746
50747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50749
50750    else
50751      # We're on a unix platform. Hooray! :)
50752      path="$MSVC_DLL"
50753      has_space=`$ECHO "$path" | $GREP " "`
50754      if test "x$has_space" != x; then
50755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50756$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50757        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50758      fi
50759
50760      # Use eval to expand a potential ~
50761      eval path="$path"
50762      if test ! -f "$path" && test ! -d "$path"; then
50763        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50764      fi
50765
50766      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50767    fi
50768  fi
50769
50770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50771$as_echo_n "checking for $DLL_NAME... " >&6; }
50772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50773$as_echo "$MSVC_DLL" >&6; }
50774    else
50775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50776$as_echo "incorrect, ignoring" >&6; }
50777      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50778$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50779    fi
50780  fi
50781
50782  fi
50783
50784  if test "x$MSVC_DLL" = x; then
50785    # Probe: Look in the Windows system32 directory
50786    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50787
50788  windows_path="$CYGWIN_SYSTEMROOT"
50789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50790    unix_path=`$CYGPATH -u "$windows_path"`
50791    CYGWIN_SYSTEMROOT="$unix_path"
50792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50794    CYGWIN_SYSTEMROOT="$unix_path"
50795  fi
50796
50797    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50798
50799  DLL_NAME="$DLL_NAME"
50800  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50801  METHOD="well-known location in SYSTEMROOT"
50802  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50803    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50804$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50805
50806    # Need to check if the found msvcr is correct architecture
50807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50808$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50809    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50811      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50812      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50813      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50814        CORRECT_MSVCR_ARCH="PE32 executable"
50815      else
50816        CORRECT_MSVCR_ARCH="PE32+ executable"
50817      fi
50818    else
50819      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50820        CORRECT_MSVCR_ARCH=386
50821      else
50822        CORRECT_MSVCR_ARCH=x86-64
50823      fi
50824    fi
50825    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50827$as_echo "ok" >&6; }
50828      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50829
50830  # Only process if variable expands to non-empty
50831
50832  if test "x$MSVC_DLL" != x; then
50833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50834
50835  # Input might be given as Windows format, start by converting to
50836  # unix format.
50837  path="$MSVC_DLL"
50838  new_path=`$CYGPATH -u "$path"`
50839
50840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50843  # "foo.exe" is OK but "foo" is an error.
50844  #
50845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50846  # It is also a way to make sure we got the proper file name for the real test later on.
50847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50848  if test "x$test_shortpath" = x; then
50849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50850$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50851    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50852  fi
50853
50854  # Call helper function which possibly converts this using DOS-style short mode.
50855  # If so, the updated path is stored in $new_path.
50856
50857  input_path="$new_path"
50858  # Check if we need to convert this using DOS-style short mode. If the path
50859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50860  # take no chances and rewrite it.
50861  # Note: m4 eats our [], so we need to use [ and ] instead.
50862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50863  if test "x$has_forbidden_chars" != x; then
50864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50868      # Going to short mode and back again did indeed matter. Since short mode is
50869      # case insensitive, let's make it lowercase to improve readability.
50870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50871      # Now convert it back to Unix-style (cygpath)
50872      input_path=`$CYGPATH -u "$shortmode_path"`
50873      new_path="$input_path"
50874    fi
50875  fi
50876
50877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50878  if test "x$test_cygdrive_prefix" = x; then
50879    # As a simple fix, exclude /usr/bin since it's not a real path.
50880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50882      # a path prefixed by /cygdrive for fixpath to work.
50883      new_path="$CYGWIN_ROOT_PATH$input_path"
50884    fi
50885  fi
50886
50887
50888  if test "x$path" != "x$new_path"; then
50889    MSVC_DLL="$new_path"
50890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50891$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50892  fi
50893
50894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50895
50896  path="$MSVC_DLL"
50897  has_colon=`$ECHO $path | $GREP ^.:`
50898  new_path="$path"
50899  if test "x$has_colon" = x; then
50900    # Not in mixed or Windows style, start by that.
50901    new_path=`cmd //c echo $path`
50902  fi
50903
50904
50905  input_path="$new_path"
50906  # Check if we need to convert this using DOS-style short mode. If the path
50907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50908  # take no chances and rewrite it.
50909  # Note: m4 eats our [], so we need to use [ and ] instead.
50910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50911  if test "x$has_forbidden_chars" != x; then
50912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50914  fi
50915
50916
50917  windows_path="$new_path"
50918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50919    unix_path=`$CYGPATH -u "$windows_path"`
50920    new_path="$unix_path"
50921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50923    new_path="$unix_path"
50924  fi
50925
50926  if test "x$path" != "x$new_path"; then
50927    MSVC_DLL="$new_path"
50928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50929$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50930  fi
50931
50932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50934
50935    else
50936      # We're on a unix platform. Hooray! :)
50937      path="$MSVC_DLL"
50938      has_space=`$ECHO "$path" | $GREP " "`
50939      if test "x$has_space" != x; then
50940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50941$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50943      fi
50944
50945      # Use eval to expand a potential ~
50946      eval path="$path"
50947      if test ! -f "$path" && test ! -d "$path"; then
50948        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50949      fi
50950
50951      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50952    fi
50953  fi
50954
50955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50956$as_echo_n "checking for $DLL_NAME... " >&6; }
50957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50958$as_echo "$MSVC_DLL" >&6; }
50959    else
50960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50961$as_echo "incorrect, ignoring" >&6; }
50962      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50963$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50964    fi
50965  fi
50966
50967  fi
50968
50969  if test "x$MSVC_DLL" = x; then
50970    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50971    if test "x$VS100COMNTOOLS" != x; then
50972      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50973
50974  windows_path="$CYGWIN_VS_TOOLS_DIR"
50975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50976    unix_path=`$CYGPATH -u "$windows_path"`
50977    CYGWIN_VS_TOOLS_DIR="$unix_path"
50978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50980    CYGWIN_VS_TOOLS_DIR="$unix_path"
50981  fi
50982
50983      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50984        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50985	    | $GREP -i /x64/ | $HEAD --lines 1`
50986      else
50987        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50988	    | $GREP -i /x86/ | $HEAD --lines 1`
50989      fi
50990
50991  DLL_NAME="$DLL_NAME"
50992  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50993  METHOD="search of VS100COMNTOOLS"
50994  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50995    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50996$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50997
50998    # Need to check if the found msvcr is correct architecture
50999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51000$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51001    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51003      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51004      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51005      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51006        CORRECT_MSVCR_ARCH="PE32 executable"
51007      else
51008        CORRECT_MSVCR_ARCH="PE32+ executable"
51009      fi
51010    else
51011      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51012        CORRECT_MSVCR_ARCH=386
51013      else
51014        CORRECT_MSVCR_ARCH=x86-64
51015      fi
51016    fi
51017    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51019$as_echo "ok" >&6; }
51020      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51021
51022  # Only process if variable expands to non-empty
51023
51024  if test "x$MSVC_DLL" != x; then
51025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51026
51027  # Input might be given as Windows format, start by converting to
51028  # unix format.
51029  path="$MSVC_DLL"
51030  new_path=`$CYGPATH -u "$path"`
51031
51032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51035  # "foo.exe" is OK but "foo" is an error.
51036  #
51037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51038  # It is also a way to make sure we got the proper file name for the real test later on.
51039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51040  if test "x$test_shortpath" = x; then
51041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51042$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51043    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51044  fi
51045
51046  # Call helper function which possibly converts this using DOS-style short mode.
51047  # If so, the updated path is stored in $new_path.
51048
51049  input_path="$new_path"
51050  # Check if we need to convert this using DOS-style short mode. If the path
51051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51052  # take no chances and rewrite it.
51053  # Note: m4 eats our [], so we need to use [ and ] instead.
51054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51055  if test "x$has_forbidden_chars" != x; then
51056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51060      # Going to short mode and back again did indeed matter. Since short mode is
51061      # case insensitive, let's make it lowercase to improve readability.
51062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51063      # Now convert it back to Unix-style (cygpath)
51064      input_path=`$CYGPATH -u "$shortmode_path"`
51065      new_path="$input_path"
51066    fi
51067  fi
51068
51069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51070  if test "x$test_cygdrive_prefix" = x; then
51071    # As a simple fix, exclude /usr/bin since it's not a real path.
51072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51074      # a path prefixed by /cygdrive for fixpath to work.
51075      new_path="$CYGWIN_ROOT_PATH$input_path"
51076    fi
51077  fi
51078
51079
51080  if test "x$path" != "x$new_path"; then
51081    MSVC_DLL="$new_path"
51082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51083$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51084  fi
51085
51086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51087
51088  path="$MSVC_DLL"
51089  has_colon=`$ECHO $path | $GREP ^.:`
51090  new_path="$path"
51091  if test "x$has_colon" = x; then
51092    # Not in mixed or Windows style, start by that.
51093    new_path=`cmd //c echo $path`
51094  fi
51095
51096
51097  input_path="$new_path"
51098  # Check if we need to convert this using DOS-style short mode. If the path
51099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51100  # take no chances and rewrite it.
51101  # Note: m4 eats our [], so we need to use [ and ] instead.
51102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51103  if test "x$has_forbidden_chars" != x; then
51104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51106  fi
51107
51108
51109  windows_path="$new_path"
51110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51111    unix_path=`$CYGPATH -u "$windows_path"`
51112    new_path="$unix_path"
51113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51115    new_path="$unix_path"
51116  fi
51117
51118  if test "x$path" != "x$new_path"; then
51119    MSVC_DLL="$new_path"
51120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51121$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51122  fi
51123
51124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51126
51127    else
51128      # We're on a unix platform. Hooray! :)
51129      path="$MSVC_DLL"
51130      has_space=`$ECHO "$path" | $GREP " "`
51131      if test "x$has_space" != x; then
51132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51133$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51135      fi
51136
51137      # Use eval to expand a potential ~
51138      eval path="$path"
51139      if test ! -f "$path" && test ! -d "$path"; then
51140        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51141      fi
51142
51143      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51144    fi
51145  fi
51146
51147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51148$as_echo_n "checking for $DLL_NAME... " >&6; }
51149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51150$as_echo "$MSVC_DLL" >&6; }
51151    else
51152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51153$as_echo "incorrect, ignoring" >&6; }
51154      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51155$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51156    fi
51157  fi
51158
51159    fi
51160  fi
51161
51162  if test "x$MSVC_DLL" = x; then
51163    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51164    # (This was the original behaviour; kept since it might turn something up)
51165    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51166      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51167        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51168	    | $GREP x64 | $HEAD --lines 1`
51169      else
51170        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51171	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51172        if test "x$POSSIBLE_MSVC_DLL" = x; then
51173          # We're grasping at straws now...
51174          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51175	      | $HEAD --lines 1`
51176        fi
51177      fi
51178
51179
51180  DLL_NAME="$DLL_NAME"
51181  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51182  METHOD="search of VCINSTALLDIR"
51183  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51185$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51186
51187    # Need to check if the found msvcr is correct architecture
51188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51189$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51190    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51192      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51193      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51194      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51195        CORRECT_MSVCR_ARCH="PE32 executable"
51196      else
51197        CORRECT_MSVCR_ARCH="PE32+ executable"
51198      fi
51199    else
51200      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51201        CORRECT_MSVCR_ARCH=386
51202      else
51203        CORRECT_MSVCR_ARCH=x86-64
51204      fi
51205    fi
51206    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51208$as_echo "ok" >&6; }
51209      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51210
51211  # Only process if variable expands to non-empty
51212
51213  if test "x$MSVC_DLL" != x; then
51214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51215
51216  # Input might be given as Windows format, start by converting to
51217  # unix format.
51218  path="$MSVC_DLL"
51219  new_path=`$CYGPATH -u "$path"`
51220
51221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51224  # "foo.exe" is OK but "foo" is an error.
51225  #
51226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51227  # It is also a way to make sure we got the proper file name for the real test later on.
51228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51229  if test "x$test_shortpath" = x; then
51230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51231$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51232    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51233  fi
51234
51235  # Call helper function which possibly converts this using DOS-style short mode.
51236  # If so, the updated path is stored in $new_path.
51237
51238  input_path="$new_path"
51239  # Check if we need to convert this using DOS-style short mode. If the path
51240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51241  # take no chances and rewrite it.
51242  # Note: m4 eats our [], so we need to use [ and ] instead.
51243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51244  if test "x$has_forbidden_chars" != x; then
51245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51249      # Going to short mode and back again did indeed matter. Since short mode is
51250      # case insensitive, let's make it lowercase to improve readability.
51251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51252      # Now convert it back to Unix-style (cygpath)
51253      input_path=`$CYGPATH -u "$shortmode_path"`
51254      new_path="$input_path"
51255    fi
51256  fi
51257
51258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51259  if test "x$test_cygdrive_prefix" = x; then
51260    # As a simple fix, exclude /usr/bin since it's not a real path.
51261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51263      # a path prefixed by /cygdrive for fixpath to work.
51264      new_path="$CYGWIN_ROOT_PATH$input_path"
51265    fi
51266  fi
51267
51268
51269  if test "x$path" != "x$new_path"; then
51270    MSVC_DLL="$new_path"
51271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51272$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51273  fi
51274
51275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51276
51277  path="$MSVC_DLL"
51278  has_colon=`$ECHO $path | $GREP ^.:`
51279  new_path="$path"
51280  if test "x$has_colon" = x; then
51281    # Not in mixed or Windows style, start by that.
51282    new_path=`cmd //c echo $path`
51283  fi
51284
51285
51286  input_path="$new_path"
51287  # Check if we need to convert this using DOS-style short mode. If the path
51288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51289  # take no chances and rewrite it.
51290  # Note: m4 eats our [], so we need to use [ and ] instead.
51291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51292  if test "x$has_forbidden_chars" != x; then
51293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51295  fi
51296
51297
51298  windows_path="$new_path"
51299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51300    unix_path=`$CYGPATH -u "$windows_path"`
51301    new_path="$unix_path"
51302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51304    new_path="$unix_path"
51305  fi
51306
51307  if test "x$path" != "x$new_path"; then
51308    MSVC_DLL="$new_path"
51309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51310$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51311  fi
51312
51313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51315
51316    else
51317      # We're on a unix platform. Hooray! :)
51318      path="$MSVC_DLL"
51319      has_space=`$ECHO "$path" | $GREP " "`
51320      if test "x$has_space" != x; then
51321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51322$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51324      fi
51325
51326      # Use eval to expand a potential ~
51327      eval path="$path"
51328      if test ! -f "$path" && test ! -d "$path"; then
51329        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51330      fi
51331
51332      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51333    fi
51334  fi
51335
51336      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51337$as_echo_n "checking for $DLL_NAME... " >&6; }
51338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51339$as_echo "$MSVC_DLL" >&6; }
51340    else
51341      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51342$as_echo "incorrect, ignoring" >&6; }
51343      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51344$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51345    fi
51346  fi
51347
51348    fi
51349  fi
51350
51351  if test "x$MSVC_DLL" = x; then
51352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51353$as_echo_n "checking for $DLL_NAME... " >&6; }
51354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51355$as_echo "no" >&6; }
51356    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51357  fi
51358
51359    MSVCR_DLL="$MSVC_DLL"
51360  fi
51361
51362
51363
51364# Check whether --with-msvcp-dll was given.
51365if test "${with_msvcp_dll+set}" = set; then :
51366  withval=$with_msvcp_dll;
51367fi
51368
51369
51370  if test "x$MSVCP_NAME" != "x"; then
51371    if test "x$with_msvcp_dll" != x; then
51372      # If given explicitely by user, do not probe. If not present, fail directly.
51373
51374  DLL_NAME="$MSVCP_NAME"
51375  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51376  METHOD="--with-msvcp-dll"
51377  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51378    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51379$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51380
51381    # Need to check if the found msvcr is correct architecture
51382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51383$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51384    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51386      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51387      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51388      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51389        CORRECT_MSVCR_ARCH="PE32 executable"
51390      else
51391        CORRECT_MSVCR_ARCH="PE32+ executable"
51392      fi
51393    else
51394      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51395        CORRECT_MSVCR_ARCH=386
51396      else
51397        CORRECT_MSVCR_ARCH=x86-64
51398      fi
51399    fi
51400    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51402$as_echo "ok" >&6; }
51403      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51404
51405  # Only process if variable expands to non-empty
51406
51407  if test "x$MSVC_DLL" != x; then
51408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51409
51410  # Input might be given as Windows format, start by converting to
51411  # unix format.
51412  path="$MSVC_DLL"
51413  new_path=`$CYGPATH -u "$path"`
51414
51415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51418  # "foo.exe" is OK but "foo" is an error.
51419  #
51420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51421  # It is also a way to make sure we got the proper file name for the real test later on.
51422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51423  if test "x$test_shortpath" = x; then
51424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51425$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51426    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51427  fi
51428
51429  # Call helper function which possibly converts this using DOS-style short mode.
51430  # If so, the updated path is stored in $new_path.
51431
51432  input_path="$new_path"
51433  # Check if we need to convert this using DOS-style short mode. If the path
51434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51435  # take no chances and rewrite it.
51436  # Note: m4 eats our [], so we need to use [ and ] instead.
51437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51438  if test "x$has_forbidden_chars" != x; then
51439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51443      # Going to short mode and back again did indeed matter. Since short mode is
51444      # case insensitive, let's make it lowercase to improve readability.
51445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51446      # Now convert it back to Unix-style (cygpath)
51447      input_path=`$CYGPATH -u "$shortmode_path"`
51448      new_path="$input_path"
51449    fi
51450  fi
51451
51452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51453  if test "x$test_cygdrive_prefix" = x; then
51454    # As a simple fix, exclude /usr/bin since it's not a real path.
51455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51457      # a path prefixed by /cygdrive for fixpath to work.
51458      new_path="$CYGWIN_ROOT_PATH$input_path"
51459    fi
51460  fi
51461
51462
51463  if test "x$path" != "x$new_path"; then
51464    MSVC_DLL="$new_path"
51465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51466$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51467  fi
51468
51469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51470
51471  path="$MSVC_DLL"
51472  has_colon=`$ECHO $path | $GREP ^.:`
51473  new_path="$path"
51474  if test "x$has_colon" = x; then
51475    # Not in mixed or Windows style, start by that.
51476    new_path=`cmd //c echo $path`
51477  fi
51478
51479
51480  input_path="$new_path"
51481  # Check if we need to convert this using DOS-style short mode. If the path
51482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51483  # take no chances and rewrite it.
51484  # Note: m4 eats our [], so we need to use [ and ] instead.
51485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51486  if test "x$has_forbidden_chars" != x; then
51487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51489  fi
51490
51491
51492  windows_path="$new_path"
51493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51494    unix_path=`$CYGPATH -u "$windows_path"`
51495    new_path="$unix_path"
51496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51498    new_path="$unix_path"
51499  fi
51500
51501  if test "x$path" != "x$new_path"; then
51502    MSVC_DLL="$new_path"
51503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51504$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51505  fi
51506
51507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51509
51510    else
51511      # We're on a unix platform. Hooray! :)
51512      path="$MSVC_DLL"
51513      has_space=`$ECHO "$path" | $GREP " "`
51514      if test "x$has_space" != x; then
51515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51516$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51517        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51518      fi
51519
51520      # Use eval to expand a potential ~
51521      eval path="$path"
51522      if test ! -f "$path" && test ! -d "$path"; then
51523        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51524      fi
51525
51526      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51527    fi
51528  fi
51529
51530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51531$as_echo_n "checking for $DLL_NAME... " >&6; }
51532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51533$as_echo "$MSVC_DLL" >&6; }
51534    else
51535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51536$as_echo "incorrect, ignoring" >&6; }
51537      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51538$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51539    fi
51540  fi
51541
51542      if test "x$MSVC_DLL" = x; then
51543        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51544      fi
51545      MSVCP_DLL="$MSVC_DLL"
51546    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51547
51548  DLL_NAME="$MSVCP_NAME"
51549  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51550  METHOD="devkit"
51551  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51553$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51554
51555    # Need to check if the found msvcr is correct architecture
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51557$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51558    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51560      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51561      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51562      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51563        CORRECT_MSVCR_ARCH="PE32 executable"
51564      else
51565        CORRECT_MSVCR_ARCH="PE32+ executable"
51566      fi
51567    else
51568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51569        CORRECT_MSVCR_ARCH=386
51570      else
51571        CORRECT_MSVCR_ARCH=x86-64
51572      fi
51573    fi
51574    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51576$as_echo "ok" >&6; }
51577      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51578
51579  # Only process if variable expands to non-empty
51580
51581  if test "x$MSVC_DLL" != x; then
51582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51583
51584  # Input might be given as Windows format, start by converting to
51585  # unix format.
51586  path="$MSVC_DLL"
51587  new_path=`$CYGPATH -u "$path"`
51588
51589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51592  # "foo.exe" is OK but "foo" is an error.
51593  #
51594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51595  # It is also a way to make sure we got the proper file name for the real test later on.
51596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51597  if test "x$test_shortpath" = x; then
51598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51599$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51600    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51601  fi
51602
51603  # Call helper function which possibly converts this using DOS-style short mode.
51604  # If so, the updated path is stored in $new_path.
51605
51606  input_path="$new_path"
51607  # Check if we need to convert this using DOS-style short mode. If the path
51608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51609  # take no chances and rewrite it.
51610  # Note: m4 eats our [], so we need to use [ and ] instead.
51611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51612  if test "x$has_forbidden_chars" != x; then
51613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51617      # Going to short mode and back again did indeed matter. Since short mode is
51618      # case insensitive, let's make it lowercase to improve readability.
51619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51620      # Now convert it back to Unix-style (cygpath)
51621      input_path=`$CYGPATH -u "$shortmode_path"`
51622      new_path="$input_path"
51623    fi
51624  fi
51625
51626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51627  if test "x$test_cygdrive_prefix" = x; then
51628    # As a simple fix, exclude /usr/bin since it's not a real path.
51629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51631      # a path prefixed by /cygdrive for fixpath to work.
51632      new_path="$CYGWIN_ROOT_PATH$input_path"
51633    fi
51634  fi
51635
51636
51637  if test "x$path" != "x$new_path"; then
51638    MSVC_DLL="$new_path"
51639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51640$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51641  fi
51642
51643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51644
51645  path="$MSVC_DLL"
51646  has_colon=`$ECHO $path | $GREP ^.:`
51647  new_path="$path"
51648  if test "x$has_colon" = x; then
51649    # Not in mixed or Windows style, start by that.
51650    new_path=`cmd //c echo $path`
51651  fi
51652
51653
51654  input_path="$new_path"
51655  # Check if we need to convert this using DOS-style short mode. If the path
51656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51657  # take no chances and rewrite it.
51658  # Note: m4 eats our [], so we need to use [ and ] instead.
51659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51660  if test "x$has_forbidden_chars" != x; then
51661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51663  fi
51664
51665
51666  windows_path="$new_path"
51667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51668    unix_path=`$CYGPATH -u "$windows_path"`
51669    new_path="$unix_path"
51670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51672    new_path="$unix_path"
51673  fi
51674
51675  if test "x$path" != "x$new_path"; then
51676    MSVC_DLL="$new_path"
51677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51678$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51679  fi
51680
51681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51683
51684    else
51685      # We're on a unix platform. Hooray! :)
51686      path="$MSVC_DLL"
51687      has_space=`$ECHO "$path" | $GREP " "`
51688      if test "x$has_space" != x; then
51689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51690$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51692      fi
51693
51694      # Use eval to expand a potential ~
51695      eval path="$path"
51696      if test ! -f "$path" && test ! -d "$path"; then
51697        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51698      fi
51699
51700      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51701    fi
51702  fi
51703
51704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51705$as_echo_n "checking for $DLL_NAME... " >&6; }
51706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51707$as_echo "$MSVC_DLL" >&6; }
51708    else
51709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51710$as_echo "incorrect, ignoring" >&6; }
51711      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51712$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51713    fi
51714  fi
51715
51716      if test "x$MSVC_DLL" = x; then
51717        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51718      fi
51719      MSVCP_DLL="$MSVC_DLL"
51720    else
51721
51722  DLL_NAME="${MSVCP_NAME}"
51723  MSVC_DLL=
51724
51725  if test "x$MSVC_DLL" = x; then
51726    # Probe: Using well-known location from Visual Studio 10.0
51727    if test "x$VCINSTALLDIR" != x; then
51728      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51729
51730  windows_path="$CYGWIN_VC_INSTALL_DIR"
51731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51732    unix_path=`$CYGPATH -u "$windows_path"`
51733    CYGWIN_VC_INSTALL_DIR="$unix_path"
51734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51736    CYGWIN_VC_INSTALL_DIR="$unix_path"
51737  fi
51738
51739      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51740        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51741      else
51742        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51743      fi
51744      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51745
51746  DLL_NAME="$DLL_NAME"
51747  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51748  METHOD="well-known location in VCINSTALLDIR"
51749  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51751$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51752
51753    # Need to check if the found msvcr is correct architecture
51754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51755$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51756    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51758      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51759      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51760      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51761        CORRECT_MSVCR_ARCH="PE32 executable"
51762      else
51763        CORRECT_MSVCR_ARCH="PE32+ executable"
51764      fi
51765    else
51766      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51767        CORRECT_MSVCR_ARCH=386
51768      else
51769        CORRECT_MSVCR_ARCH=x86-64
51770      fi
51771    fi
51772    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51774$as_echo "ok" >&6; }
51775      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51776
51777  # Only process if variable expands to non-empty
51778
51779  if test "x$MSVC_DLL" != x; then
51780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51781
51782  # Input might be given as Windows format, start by converting to
51783  # unix format.
51784  path="$MSVC_DLL"
51785  new_path=`$CYGPATH -u "$path"`
51786
51787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51790  # "foo.exe" is OK but "foo" is an error.
51791  #
51792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51793  # It is also a way to make sure we got the proper file name for the real test later on.
51794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51795  if test "x$test_shortpath" = x; then
51796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51797$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51798    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51799  fi
51800
51801  # Call helper function which possibly converts this using DOS-style short mode.
51802  # If so, the updated path is stored in $new_path.
51803
51804  input_path="$new_path"
51805  # Check if we need to convert this using DOS-style short mode. If the path
51806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51807  # take no chances and rewrite it.
51808  # Note: m4 eats our [], so we need to use [ and ] instead.
51809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51810  if test "x$has_forbidden_chars" != x; then
51811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51815      # Going to short mode and back again did indeed matter. Since short mode is
51816      # case insensitive, let's make it lowercase to improve readability.
51817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51818      # Now convert it back to Unix-style (cygpath)
51819      input_path=`$CYGPATH -u "$shortmode_path"`
51820      new_path="$input_path"
51821    fi
51822  fi
51823
51824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51825  if test "x$test_cygdrive_prefix" = x; then
51826    # As a simple fix, exclude /usr/bin since it's not a real path.
51827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51829      # a path prefixed by /cygdrive for fixpath to work.
51830      new_path="$CYGWIN_ROOT_PATH$input_path"
51831    fi
51832  fi
51833
51834
51835  if test "x$path" != "x$new_path"; then
51836    MSVC_DLL="$new_path"
51837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51838$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51839  fi
51840
51841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51842
51843  path="$MSVC_DLL"
51844  has_colon=`$ECHO $path | $GREP ^.:`
51845  new_path="$path"
51846  if test "x$has_colon" = x; then
51847    # Not in mixed or Windows style, start by that.
51848    new_path=`cmd //c echo $path`
51849  fi
51850
51851
51852  input_path="$new_path"
51853  # Check if we need to convert this using DOS-style short mode. If the path
51854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51855  # take no chances and rewrite it.
51856  # Note: m4 eats our [], so we need to use [ and ] instead.
51857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51858  if test "x$has_forbidden_chars" != x; then
51859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51861  fi
51862
51863
51864  windows_path="$new_path"
51865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51866    unix_path=`$CYGPATH -u "$windows_path"`
51867    new_path="$unix_path"
51868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51870    new_path="$unix_path"
51871  fi
51872
51873  if test "x$path" != "x$new_path"; then
51874    MSVC_DLL="$new_path"
51875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51876$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51877  fi
51878
51879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51881
51882    else
51883      # We're on a unix platform. Hooray! :)
51884      path="$MSVC_DLL"
51885      has_space=`$ECHO "$path" | $GREP " "`
51886      if test "x$has_space" != x; then
51887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51888$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51890      fi
51891
51892      # Use eval to expand a potential ~
51893      eval path="$path"
51894      if test ! -f "$path" && test ! -d "$path"; then
51895        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51896      fi
51897
51898      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51899    fi
51900  fi
51901
51902      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51903$as_echo_n "checking for $DLL_NAME... " >&6; }
51904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51905$as_echo "$MSVC_DLL" >&6; }
51906    else
51907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51908$as_echo "incorrect, ignoring" >&6; }
51909      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51910$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51911    fi
51912  fi
51913
51914    fi
51915  fi
51916
51917  if test "x$MSVC_DLL" = x; then
51918    # Probe: Check in the Boot JDK directory.
51919    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51920
51921  DLL_NAME="$DLL_NAME"
51922  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51923  METHOD="well-known location in Boot JDK"
51924  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51925    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51926$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51927
51928    # Need to check if the found msvcr is correct architecture
51929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51930$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51931    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51933      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51934      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51935      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51936        CORRECT_MSVCR_ARCH="PE32 executable"
51937      else
51938        CORRECT_MSVCR_ARCH="PE32+ executable"
51939      fi
51940    else
51941      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51942        CORRECT_MSVCR_ARCH=386
51943      else
51944        CORRECT_MSVCR_ARCH=x86-64
51945      fi
51946    fi
51947    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51949$as_echo "ok" >&6; }
51950      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51951
51952  # Only process if variable expands to non-empty
51953
51954  if test "x$MSVC_DLL" != x; then
51955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51956
51957  # Input might be given as Windows format, start by converting to
51958  # unix format.
51959  path="$MSVC_DLL"
51960  new_path=`$CYGPATH -u "$path"`
51961
51962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51965  # "foo.exe" is OK but "foo" is an error.
51966  #
51967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51968  # It is also a way to make sure we got the proper file name for the real test later on.
51969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51970  if test "x$test_shortpath" = x; then
51971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51972$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51973    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51974  fi
51975
51976  # Call helper function which possibly converts this using DOS-style short mode.
51977  # If so, the updated path is stored in $new_path.
51978
51979  input_path="$new_path"
51980  # Check if we need to convert this using DOS-style short mode. If the path
51981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51982  # take no chances and rewrite it.
51983  # Note: m4 eats our [], so we need to use [ and ] instead.
51984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51985  if test "x$has_forbidden_chars" != x; then
51986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51990      # Going to short mode and back again did indeed matter. Since short mode is
51991      # case insensitive, let's make it lowercase to improve readability.
51992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51993      # Now convert it back to Unix-style (cygpath)
51994      input_path=`$CYGPATH -u "$shortmode_path"`
51995      new_path="$input_path"
51996    fi
51997  fi
51998
51999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52000  if test "x$test_cygdrive_prefix" = x; then
52001    # As a simple fix, exclude /usr/bin since it's not a real path.
52002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52004      # a path prefixed by /cygdrive for fixpath to work.
52005      new_path="$CYGWIN_ROOT_PATH$input_path"
52006    fi
52007  fi
52008
52009
52010  if test "x$path" != "x$new_path"; then
52011    MSVC_DLL="$new_path"
52012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52013$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52014  fi
52015
52016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52017
52018  path="$MSVC_DLL"
52019  has_colon=`$ECHO $path | $GREP ^.:`
52020  new_path="$path"
52021  if test "x$has_colon" = x; then
52022    # Not in mixed or Windows style, start by that.
52023    new_path=`cmd //c echo $path`
52024  fi
52025
52026
52027  input_path="$new_path"
52028  # Check if we need to convert this using DOS-style short mode. If the path
52029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52030  # take no chances and rewrite it.
52031  # Note: m4 eats our [], so we need to use [ and ] instead.
52032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52033  if test "x$has_forbidden_chars" != x; then
52034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52036  fi
52037
52038
52039  windows_path="$new_path"
52040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52041    unix_path=`$CYGPATH -u "$windows_path"`
52042    new_path="$unix_path"
52043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52045    new_path="$unix_path"
52046  fi
52047
52048  if test "x$path" != "x$new_path"; then
52049    MSVC_DLL="$new_path"
52050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52051$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52052  fi
52053
52054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52056
52057    else
52058      # We're on a unix platform. Hooray! :)
52059      path="$MSVC_DLL"
52060      has_space=`$ECHO "$path" | $GREP " "`
52061      if test "x$has_space" != x; then
52062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52063$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52065      fi
52066
52067      # Use eval to expand a potential ~
52068      eval path="$path"
52069      if test ! -f "$path" && test ! -d "$path"; then
52070        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52071      fi
52072
52073      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52074    fi
52075  fi
52076
52077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52078$as_echo_n "checking for $DLL_NAME... " >&6; }
52079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52080$as_echo "$MSVC_DLL" >&6; }
52081    else
52082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52083$as_echo "incorrect, ignoring" >&6; }
52084      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52085$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52086    fi
52087  fi
52088
52089  fi
52090
52091  if test "x$MSVC_DLL" = x; then
52092    # Probe: Look in the Windows system32 directory
52093    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52094
52095  windows_path="$CYGWIN_SYSTEMROOT"
52096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52097    unix_path=`$CYGPATH -u "$windows_path"`
52098    CYGWIN_SYSTEMROOT="$unix_path"
52099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52101    CYGWIN_SYSTEMROOT="$unix_path"
52102  fi
52103
52104    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52105
52106  DLL_NAME="$DLL_NAME"
52107  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52108  METHOD="well-known location in SYSTEMROOT"
52109  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52111$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52112
52113    # Need to check if the found msvcr is correct architecture
52114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52115$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52116    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52118      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52119      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52121        CORRECT_MSVCR_ARCH="PE32 executable"
52122      else
52123        CORRECT_MSVCR_ARCH="PE32+ executable"
52124      fi
52125    else
52126      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52127        CORRECT_MSVCR_ARCH=386
52128      else
52129        CORRECT_MSVCR_ARCH=x86-64
52130      fi
52131    fi
52132    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52134$as_echo "ok" >&6; }
52135      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52136
52137  # Only process if variable expands to non-empty
52138
52139  if test "x$MSVC_DLL" != x; then
52140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52141
52142  # Input might be given as Windows format, start by converting to
52143  # unix format.
52144  path="$MSVC_DLL"
52145  new_path=`$CYGPATH -u "$path"`
52146
52147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52150  # "foo.exe" is OK but "foo" is an error.
52151  #
52152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52153  # It is also a way to make sure we got the proper file name for the real test later on.
52154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52155  if test "x$test_shortpath" = x; then
52156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52157$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52158    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52159  fi
52160
52161  # Call helper function which possibly converts this using DOS-style short mode.
52162  # If so, the updated path is stored in $new_path.
52163
52164  input_path="$new_path"
52165  # Check if we need to convert this using DOS-style short mode. If the path
52166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52167  # take no chances and rewrite it.
52168  # Note: m4 eats our [], so we need to use [ and ] instead.
52169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52170  if test "x$has_forbidden_chars" != x; then
52171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52175      # Going to short mode and back again did indeed matter. Since short mode is
52176      # case insensitive, let's make it lowercase to improve readability.
52177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52178      # Now convert it back to Unix-style (cygpath)
52179      input_path=`$CYGPATH -u "$shortmode_path"`
52180      new_path="$input_path"
52181    fi
52182  fi
52183
52184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52185  if test "x$test_cygdrive_prefix" = x; then
52186    # As a simple fix, exclude /usr/bin since it's not a real path.
52187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52189      # a path prefixed by /cygdrive for fixpath to work.
52190      new_path="$CYGWIN_ROOT_PATH$input_path"
52191    fi
52192  fi
52193
52194
52195  if test "x$path" != "x$new_path"; then
52196    MSVC_DLL="$new_path"
52197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52198$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52199  fi
52200
52201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52202
52203  path="$MSVC_DLL"
52204  has_colon=`$ECHO $path | $GREP ^.:`
52205  new_path="$path"
52206  if test "x$has_colon" = x; then
52207    # Not in mixed or Windows style, start by that.
52208    new_path=`cmd //c echo $path`
52209  fi
52210
52211
52212  input_path="$new_path"
52213  # Check if we need to convert this using DOS-style short mode. If the path
52214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52215  # take no chances and rewrite it.
52216  # Note: m4 eats our [], so we need to use [ and ] instead.
52217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52218  if test "x$has_forbidden_chars" != x; then
52219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52221  fi
52222
52223
52224  windows_path="$new_path"
52225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52226    unix_path=`$CYGPATH -u "$windows_path"`
52227    new_path="$unix_path"
52228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52230    new_path="$unix_path"
52231  fi
52232
52233  if test "x$path" != "x$new_path"; then
52234    MSVC_DLL="$new_path"
52235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52236$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52237  fi
52238
52239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52241
52242    else
52243      # We're on a unix platform. Hooray! :)
52244      path="$MSVC_DLL"
52245      has_space=`$ECHO "$path" | $GREP " "`
52246      if test "x$has_space" != x; then
52247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52248$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52249        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52250      fi
52251
52252      # Use eval to expand a potential ~
52253      eval path="$path"
52254      if test ! -f "$path" && test ! -d "$path"; then
52255        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52256      fi
52257
52258      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52259    fi
52260  fi
52261
52262      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52263$as_echo_n "checking for $DLL_NAME... " >&6; }
52264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52265$as_echo "$MSVC_DLL" >&6; }
52266    else
52267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52268$as_echo "incorrect, ignoring" >&6; }
52269      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52270$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52271    fi
52272  fi
52273
52274  fi
52275
52276  if test "x$MSVC_DLL" = x; then
52277    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52278    if test "x$VS100COMNTOOLS" != x; then
52279      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52280
52281  windows_path="$CYGWIN_VS_TOOLS_DIR"
52282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52283    unix_path=`$CYGPATH -u "$windows_path"`
52284    CYGWIN_VS_TOOLS_DIR="$unix_path"
52285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52287    CYGWIN_VS_TOOLS_DIR="$unix_path"
52288  fi
52289
52290      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52291        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52292	    | $GREP -i /x64/ | $HEAD --lines 1`
52293      else
52294        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52295	    | $GREP -i /x86/ | $HEAD --lines 1`
52296      fi
52297
52298  DLL_NAME="$DLL_NAME"
52299  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52300  METHOD="search of VS100COMNTOOLS"
52301  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52302    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52303$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52304
52305    # Need to check if the found msvcr is correct architecture
52306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52307$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52308    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52310      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52311      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52312      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52313        CORRECT_MSVCR_ARCH="PE32 executable"
52314      else
52315        CORRECT_MSVCR_ARCH="PE32+ executable"
52316      fi
52317    else
52318      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52319        CORRECT_MSVCR_ARCH=386
52320      else
52321        CORRECT_MSVCR_ARCH=x86-64
52322      fi
52323    fi
52324    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52326$as_echo "ok" >&6; }
52327      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52328
52329  # Only process if variable expands to non-empty
52330
52331  if test "x$MSVC_DLL" != x; then
52332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52333
52334  # Input might be given as Windows format, start by converting to
52335  # unix format.
52336  path="$MSVC_DLL"
52337  new_path=`$CYGPATH -u "$path"`
52338
52339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52342  # "foo.exe" is OK but "foo" is an error.
52343  #
52344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52345  # It is also a way to make sure we got the proper file name for the real test later on.
52346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52347  if test "x$test_shortpath" = x; then
52348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52349$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52350    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52351  fi
52352
52353  # Call helper function which possibly converts this using DOS-style short mode.
52354  # If so, the updated path is stored in $new_path.
52355
52356  input_path="$new_path"
52357  # Check if we need to convert this using DOS-style short mode. If the path
52358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52359  # take no chances and rewrite it.
52360  # Note: m4 eats our [], so we need to use [ and ] instead.
52361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52362  if test "x$has_forbidden_chars" != x; then
52363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52367      # Going to short mode and back again did indeed matter. Since short mode is
52368      # case insensitive, let's make it lowercase to improve readability.
52369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52370      # Now convert it back to Unix-style (cygpath)
52371      input_path=`$CYGPATH -u "$shortmode_path"`
52372      new_path="$input_path"
52373    fi
52374  fi
52375
52376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52377  if test "x$test_cygdrive_prefix" = x; then
52378    # As a simple fix, exclude /usr/bin since it's not a real path.
52379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52381      # a path prefixed by /cygdrive for fixpath to work.
52382      new_path="$CYGWIN_ROOT_PATH$input_path"
52383    fi
52384  fi
52385
52386
52387  if test "x$path" != "x$new_path"; then
52388    MSVC_DLL="$new_path"
52389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52390$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52391  fi
52392
52393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52394
52395  path="$MSVC_DLL"
52396  has_colon=`$ECHO $path | $GREP ^.:`
52397  new_path="$path"
52398  if test "x$has_colon" = x; then
52399    # Not in mixed or Windows style, start by that.
52400    new_path=`cmd //c echo $path`
52401  fi
52402
52403
52404  input_path="$new_path"
52405  # Check if we need to convert this using DOS-style short mode. If the path
52406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52407  # take no chances and rewrite it.
52408  # Note: m4 eats our [], so we need to use [ and ] instead.
52409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52410  if test "x$has_forbidden_chars" != x; then
52411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52413  fi
52414
52415
52416  windows_path="$new_path"
52417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52418    unix_path=`$CYGPATH -u "$windows_path"`
52419    new_path="$unix_path"
52420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52422    new_path="$unix_path"
52423  fi
52424
52425  if test "x$path" != "x$new_path"; then
52426    MSVC_DLL="$new_path"
52427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52429  fi
52430
52431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52433
52434    else
52435      # We're on a unix platform. Hooray! :)
52436      path="$MSVC_DLL"
52437      has_space=`$ECHO "$path" | $GREP " "`
52438      if test "x$has_space" != x; then
52439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52440$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52442      fi
52443
52444      # Use eval to expand a potential ~
52445      eval path="$path"
52446      if test ! -f "$path" && test ! -d "$path"; then
52447        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52448      fi
52449
52450      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52451    fi
52452  fi
52453
52454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52455$as_echo_n "checking for $DLL_NAME... " >&6; }
52456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52457$as_echo "$MSVC_DLL" >&6; }
52458    else
52459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52460$as_echo "incorrect, ignoring" >&6; }
52461      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52462$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52463    fi
52464  fi
52465
52466    fi
52467  fi
52468
52469  if test "x$MSVC_DLL" = x; then
52470    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52471    # (This was the original behaviour; kept since it might turn something up)
52472    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52473      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52474        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52475	    | $GREP x64 | $HEAD --lines 1`
52476      else
52477        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52478	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52479        if test "x$POSSIBLE_MSVC_DLL" = x; then
52480          # We're grasping at straws now...
52481          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52482	      | $HEAD --lines 1`
52483        fi
52484      fi
52485
52486
52487  DLL_NAME="$DLL_NAME"
52488  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52489  METHOD="search of VCINSTALLDIR"
52490  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52492$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52493
52494    # Need to check if the found msvcr is correct architecture
52495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52496$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52497    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52499      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52500      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52502        CORRECT_MSVCR_ARCH="PE32 executable"
52503      else
52504        CORRECT_MSVCR_ARCH="PE32+ executable"
52505      fi
52506    else
52507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52508        CORRECT_MSVCR_ARCH=386
52509      else
52510        CORRECT_MSVCR_ARCH=x86-64
52511      fi
52512    fi
52513    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52515$as_echo "ok" >&6; }
52516      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52517
52518  # Only process if variable expands to non-empty
52519
52520  if test "x$MSVC_DLL" != x; then
52521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52522
52523  # Input might be given as Windows format, start by converting to
52524  # unix format.
52525  path="$MSVC_DLL"
52526  new_path=`$CYGPATH -u "$path"`
52527
52528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52531  # "foo.exe" is OK but "foo" is an error.
52532  #
52533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52534  # It is also a way to make sure we got the proper file name for the real test later on.
52535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52536  if test "x$test_shortpath" = x; then
52537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52538$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52539    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52540  fi
52541
52542  # Call helper function which possibly converts this using DOS-style short mode.
52543  # If so, the updated path is stored in $new_path.
52544
52545  input_path="$new_path"
52546  # Check if we need to convert this using DOS-style short mode. If the path
52547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52548  # take no chances and rewrite it.
52549  # Note: m4 eats our [], so we need to use [ and ] instead.
52550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52551  if test "x$has_forbidden_chars" != x; then
52552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52556      # Going to short mode and back again did indeed matter. Since short mode is
52557      # case insensitive, let's make it lowercase to improve readability.
52558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52559      # Now convert it back to Unix-style (cygpath)
52560      input_path=`$CYGPATH -u "$shortmode_path"`
52561      new_path="$input_path"
52562    fi
52563  fi
52564
52565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52566  if test "x$test_cygdrive_prefix" = x; then
52567    # As a simple fix, exclude /usr/bin since it's not a real path.
52568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52570      # a path prefixed by /cygdrive for fixpath to work.
52571      new_path="$CYGWIN_ROOT_PATH$input_path"
52572    fi
52573  fi
52574
52575
52576  if test "x$path" != "x$new_path"; then
52577    MSVC_DLL="$new_path"
52578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52579$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52580  fi
52581
52582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52583
52584  path="$MSVC_DLL"
52585  has_colon=`$ECHO $path | $GREP ^.:`
52586  new_path="$path"
52587  if test "x$has_colon" = x; then
52588    # Not in mixed or Windows style, start by that.
52589    new_path=`cmd //c echo $path`
52590  fi
52591
52592
52593  input_path="$new_path"
52594  # Check if we need to convert this using DOS-style short mode. If the path
52595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52596  # take no chances and rewrite it.
52597  # Note: m4 eats our [], so we need to use [ and ] instead.
52598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52599  if test "x$has_forbidden_chars" != x; then
52600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52602  fi
52603
52604
52605  windows_path="$new_path"
52606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52607    unix_path=`$CYGPATH -u "$windows_path"`
52608    new_path="$unix_path"
52609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52611    new_path="$unix_path"
52612  fi
52613
52614  if test "x$path" != "x$new_path"; then
52615    MSVC_DLL="$new_path"
52616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52617$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52618  fi
52619
52620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52622
52623    else
52624      # We're on a unix platform. Hooray! :)
52625      path="$MSVC_DLL"
52626      has_space=`$ECHO "$path" | $GREP " "`
52627      if test "x$has_space" != x; then
52628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52629$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52631      fi
52632
52633      # Use eval to expand a potential ~
52634      eval path="$path"
52635      if test ! -f "$path" && test ! -d "$path"; then
52636        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52637      fi
52638
52639      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52640    fi
52641  fi
52642
52643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52644$as_echo_n "checking for $DLL_NAME... " >&6; }
52645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52646$as_echo "$MSVC_DLL" >&6; }
52647    else
52648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52649$as_echo "incorrect, ignoring" >&6; }
52650      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52651$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52652    fi
52653  fi
52654
52655    fi
52656  fi
52657
52658  if test "x$MSVC_DLL" = x; then
52659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52660$as_echo_n "checking for $DLL_NAME... " >&6; }
52661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52662$as_echo "no" >&6; }
52663    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52664  fi
52665
52666      MSVCP_DLL="$MSVC_DLL"
52667    fi
52668
52669  fi
52670
52671
52672
52673# Check whether --with-dxsdk was given.
52674if test "${with_dxsdk+set}" = set; then :
52675  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52676$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52677fi
52678
52679
52680
52681
52682# Check whether --with-dxsdk-lib was given.
52683if test "${with_dxsdk_lib+set}" = set; then :
52684  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52685$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52686fi
52687
52688
52689
52690
52691# Check whether --with-dxsdk-include was given.
52692if test "${with_dxsdk_include+set}" = set; then :
52693  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52694$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52695fi
52696
52697
52698  fi
52699
52700
52701###############################################################################
52702#
52703# We need to do some final tweaking, when everything else is done.
52704#
52705###############################################################################
52706
52707
52708  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52709
52710
52711  # The name of the Service Agent jar.
52712  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52713  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52714    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52715  fi
52716
52717
52718
52719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52720$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52721
52722  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52723    ENABLE_INTREE_EC=yes
52724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52725$as_echo "yes" >&6; }
52726  else
52727    ENABLE_INTREE_EC=no
52728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52729$as_echo "no" >&6; }
52730  fi
52731
52732
52733
52734
52735###############################################################################
52736#
52737# Configure parts of the build that only affect the build performance,
52738# not the result.
52739#
52740###############################################################################
52741
52742
52743  # How many cores do we have on this build system?
52744
52745# Check whether --with-num-cores was given.
52746if test "${with_num_cores+set}" = set; then :
52747  withval=$with_num_cores;
52748fi
52749
52750  if test "x$with_num_cores" = x; then
52751    # The number of cores were not specified, try to probe them.
52752
52753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52754$as_echo_n "checking for number of cores... " >&6; }
52755  NUM_CORES=1
52756  FOUND_CORES=no
52757
52758  if test -f /proc/cpuinfo; then
52759    # Looks like a Linux (or cygwin) system
52760    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52761    FOUND_CORES=yes
52762  elif test -x /usr/sbin/psrinfo; then
52763    # Looks like a Solaris system
52764    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52765    FOUND_CORES=yes
52766  elif test -x /usr/sbin/system_profiler; then
52767    # Looks like a MacOSX system
52768    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52769    FOUND_CORES=yes
52770  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52771    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52772    FOUND_CORES=yes
52773  elif test -n "$NUMBER_OF_PROCESSORS"; then
52774    # On windows, look in the env
52775    NUM_CORES=$NUMBER_OF_PROCESSORS
52776    FOUND_CORES=yes
52777  fi
52778
52779  if test "x$FOUND_CORES" = xyes; then
52780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52781$as_echo "$NUM_CORES" >&6; }
52782  else
52783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52784$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52785    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52786$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52787  fi
52788
52789  else
52790    NUM_CORES=$with_num_cores
52791  fi
52792
52793
52794
52795  # How much memory do we have on this build system?
52796
52797# Check whether --with-memory-size was given.
52798if test "${with_memory_size+set}" = set; then :
52799  withval=$with_memory_size;
52800fi
52801
52802  if test "x$with_memory_size" = x; then
52803    # The memory size was not specified, try to probe it.
52804
52805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52806$as_echo_n "checking for memory size... " >&6; }
52807  # Default to 1024 MB
52808  MEMORY_SIZE=1024
52809  FOUND_MEM=no
52810
52811  if test -f /proc/meminfo; then
52812    # Looks like a Linux (or cygwin) system
52813    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52814    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52815    FOUND_MEM=yes
52816  elif test -x /usr/sbin/prtconf; then
52817    # Looks like a Solaris or AIX system
52818    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52819    FOUND_MEM=yes
52820  elif test -x /usr/sbin/system_profiler; then
52821    # Looks like a MacOSX system
52822    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52823    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52824    FOUND_MEM=yes
52825  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52826    # Windows, but without cygwin
52827    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52828    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52829    FOUND_MEM=yes
52830  fi
52831
52832  if test "x$FOUND_MEM" = xyes; then
52833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52834$as_echo "$MEMORY_SIZE MB" >&6; }
52835  else
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52837$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52838    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52839$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52840  fi
52841
52842  else
52843    MEMORY_SIZE=$with_memory_size
52844  fi
52845
52846
52847
52848  # Provide a decent default number of parallel jobs for make depending on
52849  # number of cores, amount of memory and machine architecture.
52850
52851# Check whether --with-jobs was given.
52852if test "${with_jobs+set}" = set; then :
52853  withval=$with_jobs;
52854fi
52855
52856  if test "x$with_jobs" = x; then
52857    # Number of jobs was not specified, calculate.
52858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52859$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52860    # Approximate memory in GB.
52861    memory_gb=`expr $MEMORY_SIZE / 1024`
52862    # Pick the lowest of memory in gb and number of cores.
52863    if test "$memory_gb" -lt "$NUM_CORES"; then
52864      JOBS="$memory_gb"
52865    else
52866      JOBS="$NUM_CORES"
52867      # On bigger machines, leave some room for other processes to run
52868      if test "$JOBS" -gt "4"; then
52869        JOBS=`expr $JOBS '*' 90 / 100`
52870      fi
52871    fi
52872    # Cap number of jobs to 16
52873    if test "$JOBS" -gt "16"; then
52874      JOBS=16
52875    fi
52876    if test "$JOBS" -eq "0"; then
52877      JOBS=1
52878    fi
52879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52880$as_echo "$JOBS" >&6; }
52881  else
52882    JOBS=$with_jobs
52883  fi
52884
52885
52886
52887# Setup arguments for the boot jdk (after cores and memory have been setup)
52888
52889  ##############################################################################
52890  #
52891  # Specify jvm options for anything that is run with the Boot JDK.
52892  # Not all JVM:s accept the same arguments on the command line.
52893  #
52894
52895# Check whether --with-boot-jdk-jvmargs was given.
52896if test "${with_boot_jdk_jvmargs+set}" = set; then :
52897  withval=$with_boot_jdk_jvmargs;
52898fi
52899
52900
52901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52902$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52903
52904  # Disable special log output when a debug build is used as Boot JDK...
52905
52906  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52907  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52908  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52909  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52910  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52911  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52912    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52913    JVM_ARG_OK=true
52914  else
52915    $ECHO "Arg failed:" >&5
52916    $ECHO "$OUTPUT" >&5
52917    JVM_ARG_OK=false
52918  fi
52919
52920
52921  # Apply user provided options.
52922
52923  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52924  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52925  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52926  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52927  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52928  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52929    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52930    JVM_ARG_OK=true
52931  else
52932    $ECHO "Arg failed:" >&5
52933    $ECHO "$OUTPUT" >&5
52934    JVM_ARG_OK=false
52935  fi
52936
52937
52938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52939$as_echo "$boot_jdk_jvmargs" >&6; }
52940
52941  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52942  JAVA_FLAGS=$boot_jdk_jvmargs
52943
52944
52945
52946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52947$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52948
52949  # Starting amount of heap memory.
52950
52951  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52952  $ECHO "Command: $JAVA -Xms64M -version" >&5
52953  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52954  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52955  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52956  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52957    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52958    JVM_ARG_OK=true
52959  else
52960    $ECHO "Arg failed:" >&5
52961    $ECHO "$OUTPUT" >&5
52962    JVM_ARG_OK=false
52963  fi
52964
52965
52966  # Maximum amount of heap memory.
52967  # Maximum stack size.
52968  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52969  if test "x$BUILD_NUM_BITS" = x32; then
52970    if test "$JVM_MAX_HEAP" -gt "1100"; then
52971      JVM_MAX_HEAP=1100
52972    elif test "$JVM_MAX_HEAP" -lt "512"; then
52973      JVM_MAX_HEAP=512
52974    fi
52975    STACK_SIZE=768
52976  else
52977    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52978    # pointers are used. Apparently, we need to increase the heap and stack
52979    # space for the jvm. More specifically, when running javac to build huge
52980    # jdk batch
52981    if test "$JVM_MAX_HEAP" -gt "1600"; then
52982      JVM_MAX_HEAP=1600
52983    elif test "$JVM_MAX_HEAP" -lt "512"; then
52984      JVM_MAX_HEAP=512
52985    fi
52986    STACK_SIZE=1536
52987  fi
52988
52989  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52990  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52991  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52992  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52993  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52994  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52995    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52996    JVM_ARG_OK=true
52997  else
52998    $ECHO "Arg failed:" >&5
52999    $ECHO "$OUTPUT" >&5
53000    JVM_ARG_OK=false
53001  fi
53002
53003
53004  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53005  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53006  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53007  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53008  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53009  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53010    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53011    JVM_ARG_OK=true
53012  else
53013    $ECHO "Arg failed:" >&5
53014    $ECHO "$OUTPUT" >&5
53015    JVM_ARG_OK=false
53016  fi
53017
53018
53019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53020$as_echo "$boot_jdk_jvmargs_big" >&6; }
53021
53022  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53023
53024
53025
53026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53027$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53028
53029  # Use serial gc for small short lived tools if possible
53030
53031  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53032  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53033  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53034  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53035  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53036  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53037    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53038    JVM_ARG_OK=true
53039  else
53040    $ECHO "Arg failed:" >&5
53041    $ECHO "$OUTPUT" >&5
53042    JVM_ARG_OK=false
53043  fi
53044
53045
53046  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53047  $ECHO "Command: $JAVA -Xms32M -version" >&5
53048  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53049  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53050  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53051  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53052    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53053    JVM_ARG_OK=true
53054  else
53055    $ECHO "Arg failed:" >&5
53056    $ECHO "$OUTPUT" >&5
53057    JVM_ARG_OK=false
53058  fi
53059
53060
53061  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53062  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53063  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53064  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53065  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53066  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53067    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53068    JVM_ARG_OK=true
53069  else
53070    $ECHO "Arg failed:" >&5
53071    $ECHO "$OUTPUT" >&5
53072    JVM_ARG_OK=false
53073  fi
53074
53075
53076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53077$as_echo "$boot_jdk_jvmargs_small" >&6; }
53078
53079  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53080
53081
53082  JAVA_TOOL_FLAGS_SMALL=""
53083  for f in $JAVA_FLAGS_SMALL; do
53084    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53085  done
53086
53087
53088
53089# Setup smart javac (after cores and memory have been setup)
53090
53091
53092# Check whether --with-sjavac-server-java was given.
53093if test "${with_sjavac_server_java+set}" = set; then :
53094  withval=$with_sjavac_server_java;
53095fi
53096
53097
53098  if test "x$with_sjavac_server_java" != x; then
53099    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53100    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53101    if test "x$FOUND_VERSION" = x; then
53102      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53103    fi
53104  else
53105    SJAVAC_SERVER_JAVA="$JAVA"
53106  fi
53107
53108
53109  if test "$MEMORY_SIZE" -gt "3000"; then
53110
53111  $ECHO "Check if jvm arg is ok: -d64" >&5
53112  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53113  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53114  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53115  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53116  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53117    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53118    JVM_ARG_OK=true
53119  else
53120    $ECHO "Arg failed:" >&5
53121    $ECHO "$OUTPUT" >&5
53122    JVM_ARG_OK=false
53123  fi
53124
53125    if test "$JVM_ARG_OK" = true; then
53126      JVM_64BIT=true
53127      JVM_ARG_OK=false
53128    fi
53129  fi
53130
53131  MX_VALUE=`expr $MEMORY_SIZE / 2`
53132  if test "$JVM_64BIT" = true; then
53133    # Set ms lower than mx since more than one instance of the server might
53134    # get launched at the same time before they figure out which instance won.
53135    MS_VALUE=512
53136    if test "$MX_VALUE" -gt "2048"; then
53137      MX_VALUE=2048
53138    fi
53139  else
53140    MS_VALUE=256
53141    if test "$MX_VALUE" -gt "1500"; then
53142      MX_VALUE=1500
53143    fi
53144  fi
53145  if test "$MX_VALUE" -lt "512"; then
53146    MX_VALUE=512
53147  fi
53148
53149  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53150  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53151  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53152  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53153  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53154  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53155    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53156    JVM_ARG_OK=true
53157  else
53158    $ECHO "Arg failed:" >&5
53159    $ECHO "$OUTPUT" >&5
53160    JVM_ARG_OK=false
53161  fi
53162
53163
53164
53165  # Check whether --enable-sjavac was given.
53166if test "${enable_sjavac+set}" = set; then :
53167  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53168else
53169  ENABLE_SJAVAC='no'
53170fi
53171
53172  if test "x$JVM_ARG_OK" = "xfalse"; then
53173    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53174$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53175    ENABLE_SJAVAC=no;
53176  fi
53177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53178$as_echo_n "checking whether to use sjavac... " >&6; }
53179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53180$as_echo "$ENABLE_SJAVAC" >&6; }
53181
53182
53183
53184# Can the C/C++ compiler use precompiled headers?
53185
53186
53187  ###############################################################################
53188  #
53189  # Can the C/C++ compiler use precompiled headers?
53190  #
53191  # Check whether --enable-precompiled-headers was given.
53192if test "${enable_precompiled_headers+set}" = set; then :
53193  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53194else
53195  ENABLE_PRECOMPH=yes
53196fi
53197
53198
53199  USE_PRECOMPILED_HEADER=1
53200  if test "x$ENABLE_PRECOMPH" = xno; then
53201    USE_PRECOMPILED_HEADER=0
53202  fi
53203
53204  if test "x$ENABLE_PRECOMPH" = xyes; then
53205    # Check that the compiler actually supports precomp headers.
53206    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53207      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53208$as_echo_n "checking that precompiled headers work... " >&6; }
53209      echo "int alfa();" > conftest.h
53210      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53211      if test ! -f conftest.hpp.gch; then
53212        USE_PRECOMPILED_HEADER=0
53213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53214$as_echo "no" >&6; }
53215      else
53216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53217$as_echo "yes" >&6; }
53218      fi
53219      rm -f conftest.h conftest.hpp.gch
53220    fi
53221  fi
53222
53223
53224
53225
53226# Setup use of ccache, if available
53227
53228  # Check whether --enable-ccache was given.
53229if test "${enable_ccache+set}" = set; then :
53230  enableval=$enable_ccache;
53231fi
53232
53233
53234  CCACHE=
53235  CCACHE_STATUS=
53236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53237$as_echo_n "checking is ccache enabled... " >&6; }
53238  if test "x$enable_ccache" = xyes; then
53239    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53241$as_echo "yes" >&6; }
53242      OLD_PATH="$PATH"
53243      if test "x$TOOLCHAIN_PATH" != x; then
53244        PATH=$TOOLCHAIN_PATH:$PATH
53245      fi
53246
53247
53248
53249  # Publish this variable in the help.
53250
53251
53252  if test "x$CCACHE" = x; then
53253    # The variable is not set by user, try to locate tool using the code snippet
53254    for ac_prog in ccache
53255do
53256  # Extract the first word of "$ac_prog", so it can be a program name with args.
53257set dummy $ac_prog; ac_word=$2
53258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53259$as_echo_n "checking for $ac_word... " >&6; }
53260if ${ac_cv_path_CCACHE+:} false; then :
53261  $as_echo_n "(cached) " >&6
53262else
53263  case $CCACHE in
53264  [\\/]* | ?:[\\/]*)
53265  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53266  ;;
53267  *)
53268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53269for as_dir in $PATH
53270do
53271  IFS=$as_save_IFS
53272  test -z "$as_dir" && as_dir=.
53273    for ac_exec_ext in '' $ac_executable_extensions; do
53274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53275    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53277    break 2
53278  fi
53279done
53280  done
53281IFS=$as_save_IFS
53282
53283  ;;
53284esac
53285fi
53286CCACHE=$ac_cv_path_CCACHE
53287if test -n "$CCACHE"; then
53288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53289$as_echo "$CCACHE" >&6; }
53290else
53291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53292$as_echo "no" >&6; }
53293fi
53294
53295
53296  test -n "$CCACHE" && break
53297done
53298
53299  else
53300    # The variable is set, but is it from the command line or the environment?
53301
53302    # Try to remove the string !CCACHE! from our list.
53303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53305      # If it failed, the variable was not from the command line. Ignore it,
53306      # but warn the user (except for BASH, which is always set by the calling BASH).
53307      if test "xCCACHE" != xBASH; then
53308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53309$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53310      fi
53311      # Try to locate tool using the code snippet
53312      for ac_prog in ccache
53313do
53314  # Extract the first word of "$ac_prog", so it can be a program name with args.
53315set dummy $ac_prog; ac_word=$2
53316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53317$as_echo_n "checking for $ac_word... " >&6; }
53318if ${ac_cv_path_CCACHE+:} false; then :
53319  $as_echo_n "(cached) " >&6
53320else
53321  case $CCACHE in
53322  [\\/]* | ?:[\\/]*)
53323  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53324  ;;
53325  *)
53326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53327for as_dir in $PATH
53328do
53329  IFS=$as_save_IFS
53330  test -z "$as_dir" && as_dir=.
53331    for ac_exec_ext in '' $ac_executable_extensions; do
53332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53333    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53335    break 2
53336  fi
53337done
53338  done
53339IFS=$as_save_IFS
53340
53341  ;;
53342esac
53343fi
53344CCACHE=$ac_cv_path_CCACHE
53345if test -n "$CCACHE"; then
53346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53347$as_echo "$CCACHE" >&6; }
53348else
53349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53350$as_echo "no" >&6; }
53351fi
53352
53353
53354  test -n "$CCACHE" && break
53355done
53356
53357    else
53358      # If it succeeded, then it was overridden by the user. We will use it
53359      # for the tool.
53360
53361      # First remove it from the list of overridden variables, so we can test
53362      # for unknown variables in the end.
53363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53364
53365      # Check if the provided tool contains a complete path.
53366      tool_specified="$CCACHE"
53367      tool_basename="${tool_specified##*/}"
53368      if test "x$tool_basename" = "x$tool_specified"; then
53369        # A command without a complete path is provided, search $PATH.
53370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53371$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53372        # Extract the first word of "$tool_basename", so it can be a program name with args.
53373set dummy $tool_basename; ac_word=$2
53374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53375$as_echo_n "checking for $ac_word... " >&6; }
53376if ${ac_cv_path_CCACHE+:} false; then :
53377  $as_echo_n "(cached) " >&6
53378else
53379  case $CCACHE in
53380  [\\/]* | ?:[\\/]*)
53381  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53382  ;;
53383  *)
53384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53385for as_dir in $PATH
53386do
53387  IFS=$as_save_IFS
53388  test -z "$as_dir" && as_dir=.
53389    for ac_exec_ext in '' $ac_executable_extensions; do
53390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53391    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53393    break 2
53394  fi
53395done
53396  done
53397IFS=$as_save_IFS
53398
53399  ;;
53400esac
53401fi
53402CCACHE=$ac_cv_path_CCACHE
53403if test -n "$CCACHE"; then
53404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53405$as_echo "$CCACHE" >&6; }
53406else
53407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53408$as_echo "no" >&6; }
53409fi
53410
53411
53412        if test "x$CCACHE" = x; then
53413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53414        fi
53415      else
53416        # Otherwise we believe it is a complete path. Use it as it is.
53417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53418$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53420$as_echo_n "checking for CCACHE... " >&6; }
53421        if test ! -x "$tool_specified"; then
53422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53423$as_echo "not found" >&6; }
53424          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53425        fi
53426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53427$as_echo "$tool_specified" >&6; }
53428      fi
53429    fi
53430  fi
53431
53432
53433
53434  if test "x$CCACHE" = x; then
53435    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53436  fi
53437
53438
53439      PATH="$OLD_PATH"
53440      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53441      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53442    else
53443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53444$as_echo "no" >&6; }
53445      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53446$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53447    fi
53448  elif test "x$enable_ccache" = xno; then
53449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53450$as_echo "no, explicitly disabled" >&6; }
53451    CCACHE_STATUS="Disabled"
53452  elif test "x$enable_ccache" = x; then
53453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53454$as_echo "no" >&6; }
53455  else
53456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53457$as_echo "unknown" >&6; }
53458    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53459  fi
53460
53461
53462
53463# Check whether --with-ccache-dir was given.
53464if test "${with_ccache_dir+set}" = set; then :
53465  withval=$with_ccache_dir;
53466fi
53467
53468
53469  if test "x$with_ccache_dir" != x; then
53470    # When using a non home ccache directory, assume the use is to share ccache files
53471    # with other users. Thus change the umask.
53472    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53473    if test "x$CCACHE" = x; then
53474      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53475$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53476    fi
53477  fi
53478
53479  if test "x$CCACHE" != x; then
53480
53481  if test "x$CCACHE" != x; then
53482    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53483      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53484          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53485      if test "x$HAS_BAD_CCACHE" != "x"; then
53486        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53487      fi
53488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53489$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53490      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53491      PUSHED_FLAGS="$CXXFLAGS"
53492      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53493      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53494/* end confdefs.h.  */
53495
53496int
53497main ()
53498{
53499
53500  ;
53501  return 0;
53502}
53503_ACEOF
53504if ac_fn_cxx_try_compile "$LINENO"; then :
53505  CC_KNOWS_CCACHE_TRICK=yes
53506else
53507  CC_KNOWS_CCACHE_TRICK=no
53508fi
53509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53510      CXXFLAGS="$PUSHED_FLAGS"
53511      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53513$as_echo "yes" >&6; }
53514        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53515
53516        CCACHE_SLOPPINESS=pch_defines,time_macros
53517      else
53518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53519$as_echo "no" >&6; }
53520        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53521      fi
53522    fi
53523
53524    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53525        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53526
53527    if test "x$SET_CCACHE_DIR" != x; then
53528      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53529      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53530    fi
53531  fi
53532
53533  fi
53534
53535
53536###############################################################################
53537#
53538# And now the finish...
53539#
53540###############################################################################
53541
53542# Check for some common pitfalls
53543
53544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53545    file_to_test="$SRC_ROOT/LICENSE"
53546    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53547      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
53548    fi
53549  fi
53550
53551
53552  # Did user specify any unknown variables?
53553
53554  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53555    # Replace the separating ! with spaces before presenting for end user.
53556    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53557    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53558$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53559  fi
53560
53561
53562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53563$as_echo_n "checking if build directory is on local disk... " >&6; }
53564
53565  # df -l lists only local disks; if the given directory is not found then
53566  # a non-zero exit code is given
53567  if test "x$DF" = x; then
53568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53569      # msys does not have df; use Windows "net use" instead.
53570      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53571      if test "x$IS_NETWORK_DISK" = x; then
53572        OUTPUT_DIR_IS_LOCAL="yes"
53573      else
53574        OUTPUT_DIR_IS_LOCAL="no"
53575      fi
53576    else
53577      # No df here, say it's local
53578      OUTPUT_DIR_IS_LOCAL="yes"
53579    fi
53580  else
53581    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53582      OUTPUT_DIR_IS_LOCAL="yes"
53583    else
53584      OUTPUT_DIR_IS_LOCAL="no"
53585    fi
53586  fi
53587
53588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53589$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53590
53591
53592
53593  # Check if the user has any old-style ALT_ variables set.
53594  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53595
53596  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53597  # Since we can't properly handle the dependencies for this, warn the user about the situation
53598  if test -e $OUTPUT_ROOT/spec.gmk; then
53599    IS_RECONFIGURE=yes
53600  else
53601    IS_RECONFIGURE=no
53602  fi
53603
53604
53605# At the end, call the custom hook. (Dummy macro if no custom sources available)
53606
53607
53608# We're messing a bit with internal autoconf variables to put the config.status
53609# in the output directory instead of the current directory.
53610CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53611
53612# Create the actual output files. Now the main work of configure is done.
53613cat >confcache <<\_ACEOF
53614# This file is a shell script that caches the results of configure
53615# tests run on this system so they can be shared between configure
53616# scripts and configure runs, see configure's option --config-cache.
53617# It is not useful on other systems.  If it contains results you don't
53618# want to keep, you may remove or edit it.
53619#
53620# config.status only pays attention to the cache file if you give it
53621# the --recheck option to rerun configure.
53622#
53623# `ac_cv_env_foo' variables (set or unset) will be overridden when
53624# loading this file, other *unset* `ac_cv_foo' will be assigned the
53625# following values.
53626
53627_ACEOF
53628
53629# The following way of writing the cache mishandles newlines in values,
53630# but we know of no workaround that is simple, portable, and efficient.
53631# So, we kill variables containing newlines.
53632# Ultrix sh set writes to stderr and can't be redirected directly,
53633# and sets the high bit in the cache file unless we assign to the vars.
53634(
53635  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53636    eval ac_val=\$$ac_var
53637    case $ac_val in #(
53638    *${as_nl}*)
53639      case $ac_var in #(
53640      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53642      esac
53643      case $ac_var in #(
53644      _ | IFS | as_nl) ;; #(
53645      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53646      *) { eval $ac_var=; unset $ac_var;} ;;
53647      esac ;;
53648    esac
53649  done
53650
53651  (set) 2>&1 |
53652    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53653    *${as_nl}ac_space=\ *)
53654      # `set' does not quote correctly, so add quotes: double-quote
53655      # substitution turns \\\\ into \\, and sed turns \\ into \.
53656      sed -n \
53657	"s/'/'\\\\''/g;
53658	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53659      ;; #(
53660    *)
53661      # `set' quotes correctly as required by POSIX, so do not add quotes.
53662      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53663      ;;
53664    esac |
53665    sort
53666) |
53667  sed '
53668     /^ac_cv_env_/b end
53669     t clear
53670     :clear
53671     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53672     t end
53673     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53674     :end' >>confcache
53675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53676  if test -w "$cache_file"; then
53677    if test "x$cache_file" != "x/dev/null"; then
53678      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53679$as_echo "$as_me: updating cache $cache_file" >&6;}
53680      if test ! -f "$cache_file" || test -h "$cache_file"; then
53681	cat confcache >"$cache_file"
53682      else
53683        case $cache_file in #(
53684        */* | ?:*)
53685	  mv -f confcache "$cache_file"$$ &&
53686	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53687        *)
53688	  mv -f confcache "$cache_file" ;;
53689	esac
53690      fi
53691    fi
53692  else
53693    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53694$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53695  fi
53696fi
53697rm -f confcache
53698
53699test "x$prefix" = xNONE && prefix=$ac_default_prefix
53700# Let make expand exec_prefix.
53701test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53702
53703# Transform confdefs.h into DEFS.
53704# Protect against shell expansion while executing Makefile rules.
53705# Protect against Makefile macro expansion.
53706#
53707# If the first sed substitution is executed (which looks for macros that
53708# take arguments), then branch to the quote section.  Otherwise,
53709# look for a macro that doesn't take arguments.
53710ac_script='
53711:mline
53712/\\$/{
53713 N
53714 s,\\\n,,
53715 b mline
53716}
53717t clear
53718:clear
53719s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53720t quote
53721s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53722t quote
53723b any
53724:quote
53725s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53726s/\[/\\&/g
53727s/\]/\\&/g
53728s/\$/$$/g
53729H
53730:any
53731${
53732	g
53733	s/^\n//
53734	s/\n/ /g
53735	p
53736}
53737'
53738DEFS=`sed -n "$ac_script" confdefs.h`
53739
53740
53741ac_libobjs=
53742ac_ltlibobjs=
53743U=
53744for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53745  # 1. Remove the extension, and $U if already installed.
53746  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53747  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53748  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53749  #    will be set to the directory where LIBOBJS objects are built.
53750  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53751  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53752done
53753LIBOBJS=$ac_libobjs
53754
53755LTLIBOBJS=$ac_ltlibobjs
53756
53757
53758
53759: "${CONFIG_STATUS=./config.status}"
53760ac_write_fail=0
53761ac_clean_files_save=$ac_clean_files
53762ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53763{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53764$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53765as_write_fail=0
53766cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53767#! $SHELL
53768# Generated by $as_me.
53769# Run this file to recreate the current configuration.
53770# Compiler output produced by configure, useful for debugging
53771# configure, is in config.log if it exists.
53772
53773debug=false
53774ac_cs_recheck=false
53775ac_cs_silent=false
53776
53777SHELL=\${CONFIG_SHELL-$SHELL}
53778export SHELL
53779_ASEOF
53780cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53781## -------------------- ##
53782## M4sh Initialization. ##
53783## -------------------- ##
53784
53785# Be more Bourne compatible
53786DUALCASE=1; export DUALCASE # for MKS sh
53787if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53788  emulate sh
53789  NULLCMD=:
53790  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53791  # is contrary to our usage.  Disable this feature.
53792  alias -g '${1+"$@"}'='"$@"'
53793  setopt NO_GLOB_SUBST
53794else
53795  case `(set -o) 2>/dev/null` in #(
53796  *posix*) :
53797    set -o posix ;; #(
53798  *) :
53799     ;;
53800esac
53801fi
53802
53803
53804as_nl='
53805'
53806export as_nl
53807# Printing a long string crashes Solaris 7 /usr/bin/printf.
53808as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53809as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53810as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53811# Prefer a ksh shell builtin over an external printf program on Solaris,
53812# but without wasting forks for bash or zsh.
53813if test -z "$BASH_VERSION$ZSH_VERSION" \
53814    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53815  as_echo='print -r --'
53816  as_echo_n='print -rn --'
53817elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53818  as_echo='printf %s\n'
53819  as_echo_n='printf %s'
53820else
53821  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53822    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53823    as_echo_n='/usr/ucb/echo -n'
53824  else
53825    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53826    as_echo_n_body='eval
53827      arg=$1;
53828      case $arg in #(
53829      *"$as_nl"*)
53830	expr "X$arg" : "X\\(.*\\)$as_nl";
53831	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53832      esac;
53833      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53834    '
53835    export as_echo_n_body
53836    as_echo_n='sh -c $as_echo_n_body as_echo'
53837  fi
53838  export as_echo_body
53839  as_echo='sh -c $as_echo_body as_echo'
53840fi
53841
53842# The user is always right.
53843if test "${PATH_SEPARATOR+set}" != set; then
53844  PATH_SEPARATOR=:
53845  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53846    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53847      PATH_SEPARATOR=';'
53848  }
53849fi
53850
53851
53852# IFS
53853# We need space, tab and new line, in precisely that order.  Quoting is
53854# there to prevent editors from complaining about space-tab.
53855# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53856# splitting by setting IFS to empty value.)
53857IFS=" ""	$as_nl"
53858
53859# Find who we are.  Look in the path if we contain no directory separator.
53860as_myself=
53861case $0 in #((
53862  *[\\/]* ) as_myself=$0 ;;
53863  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53864for as_dir in $PATH
53865do
53866  IFS=$as_save_IFS
53867  test -z "$as_dir" && as_dir=.
53868    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53869  done
53870IFS=$as_save_IFS
53871
53872     ;;
53873esac
53874# We did not find ourselves, most probably we were run as `sh COMMAND'
53875# in which case we are not to be found in the path.
53876if test "x$as_myself" = x; then
53877  as_myself=$0
53878fi
53879if test ! -f "$as_myself"; then
53880  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53881  exit 1
53882fi
53883
53884# Unset variables that we do not need and which cause bugs (e.g. in
53885# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53886# suppresses any "Segmentation fault" message there.  '((' could
53887# trigger a bug in pdksh 5.2.14.
53888for as_var in BASH_ENV ENV MAIL MAILPATH
53889do eval test x\${$as_var+set} = xset \
53890  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53891done
53892PS1='$ '
53893PS2='> '
53894PS4='+ '
53895
53896# NLS nuisances.
53897LC_ALL=C
53898export LC_ALL
53899LANGUAGE=C
53900export LANGUAGE
53901
53902# CDPATH.
53903(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53904
53905
53906# as_fn_error STATUS ERROR [LINENO LOG_FD]
53907# ----------------------------------------
53908# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53909# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53910# script with STATUS, using 1 if that was 0.
53911as_fn_error ()
53912{
53913  as_status=$1; test $as_status -eq 0 && as_status=1
53914  if test "$4"; then
53915    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53916    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53917  fi
53918  $as_echo "$as_me: error: $2" >&2
53919  as_fn_exit $as_status
53920} # as_fn_error
53921
53922
53923# as_fn_set_status STATUS
53924# -----------------------
53925# Set $? to STATUS, without forking.
53926as_fn_set_status ()
53927{
53928  return $1
53929} # as_fn_set_status
53930
53931# as_fn_exit STATUS
53932# -----------------
53933# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53934as_fn_exit ()
53935{
53936  set +e
53937  as_fn_set_status $1
53938  exit $1
53939} # as_fn_exit
53940
53941# as_fn_unset VAR
53942# ---------------
53943# Portably unset VAR.
53944as_fn_unset ()
53945{
53946  { eval $1=; unset $1;}
53947}
53948as_unset=as_fn_unset
53949# as_fn_append VAR VALUE
53950# ----------------------
53951# Append the text in VALUE to the end of the definition contained in VAR. Take
53952# advantage of any shell optimizations that allow amortized linear growth over
53953# repeated appends, instead of the typical quadratic growth present in naive
53954# implementations.
53955if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53956  eval 'as_fn_append ()
53957  {
53958    eval $1+=\$2
53959  }'
53960else
53961  as_fn_append ()
53962  {
53963    eval $1=\$$1\$2
53964  }
53965fi # as_fn_append
53966
53967# as_fn_arith ARG...
53968# ------------------
53969# Perform arithmetic evaluation on the ARGs, and store the result in the
53970# global $as_val. Take advantage of shells that can avoid forks. The arguments
53971# must be portable across $(()) and expr.
53972if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53973  eval 'as_fn_arith ()
53974  {
53975    as_val=$(( $* ))
53976  }'
53977else
53978  as_fn_arith ()
53979  {
53980    as_val=`expr "$@" || test $? -eq 1`
53981  }
53982fi # as_fn_arith
53983
53984
53985if expr a : '\(a\)' >/dev/null 2>&1 &&
53986   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53987  as_expr=expr
53988else
53989  as_expr=false
53990fi
53991
53992if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53993  as_basename=basename
53994else
53995  as_basename=false
53996fi
53997
53998if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53999  as_dirname=dirname
54000else
54001  as_dirname=false
54002fi
54003
54004as_me=`$as_basename -- "$0" ||
54005$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54006	 X"$0" : 'X\(//\)$' \| \
54007	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54008$as_echo X/"$0" |
54009    sed '/^.*\/\([^/][^/]*\)\/*$/{
54010	    s//\1/
54011	    q
54012	  }
54013	  /^X\/\(\/\/\)$/{
54014	    s//\1/
54015	    q
54016	  }
54017	  /^X\/\(\/\).*/{
54018	    s//\1/
54019	    q
54020	  }
54021	  s/.*/./; q'`
54022
54023# Avoid depending upon Character Ranges.
54024as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54025as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54026as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54027as_cr_digits='0123456789'
54028as_cr_alnum=$as_cr_Letters$as_cr_digits
54029
54030ECHO_C= ECHO_N= ECHO_T=
54031case `echo -n x` in #(((((
54032-n*)
54033  case `echo 'xy\c'` in
54034  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54035  xy)  ECHO_C='\c';;
54036  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54037       ECHO_T='	';;
54038  esac;;
54039*)
54040  ECHO_N='-n';;
54041esac
54042
54043rm -f conf$$ conf$$.exe conf$$.file
54044if test -d conf$$.dir; then
54045  rm -f conf$$.dir/conf$$.file
54046else
54047  rm -f conf$$.dir
54048  mkdir conf$$.dir 2>/dev/null
54049fi
54050if (echo >conf$$.file) 2>/dev/null; then
54051  if ln -s conf$$.file conf$$ 2>/dev/null; then
54052    as_ln_s='ln -s'
54053    # ... but there are two gotchas:
54054    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54055    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54056    # In both cases, we have to default to `cp -pR'.
54057    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54058      as_ln_s='cp -pR'
54059  elif ln conf$$.file conf$$ 2>/dev/null; then
54060    as_ln_s=ln
54061  else
54062    as_ln_s='cp -pR'
54063  fi
54064else
54065  as_ln_s='cp -pR'
54066fi
54067rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54068rmdir conf$$.dir 2>/dev/null
54069
54070
54071# as_fn_mkdir_p
54072# -------------
54073# Create "$as_dir" as a directory, including parents if necessary.
54074as_fn_mkdir_p ()
54075{
54076
54077  case $as_dir in #(
54078  -*) as_dir=./$as_dir;;
54079  esac
54080  test -d "$as_dir" || eval $as_mkdir_p || {
54081    as_dirs=
54082    while :; do
54083      case $as_dir in #(
54084      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54085      *) as_qdir=$as_dir;;
54086      esac
54087      as_dirs="'$as_qdir' $as_dirs"
54088      as_dir=`$as_dirname -- "$as_dir" ||
54089$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54090	 X"$as_dir" : 'X\(//\)[^/]' \| \
54091	 X"$as_dir" : 'X\(//\)$' \| \
54092	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54093$as_echo X"$as_dir" |
54094    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54095	    s//\1/
54096	    q
54097	  }
54098	  /^X\(\/\/\)[^/].*/{
54099	    s//\1/
54100	    q
54101	  }
54102	  /^X\(\/\/\)$/{
54103	    s//\1/
54104	    q
54105	  }
54106	  /^X\(\/\).*/{
54107	    s//\1/
54108	    q
54109	  }
54110	  s/.*/./; q'`
54111      test -d "$as_dir" && break
54112    done
54113    test -z "$as_dirs" || eval "mkdir $as_dirs"
54114  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54115
54116
54117} # as_fn_mkdir_p
54118if mkdir -p . 2>/dev/null; then
54119  as_mkdir_p='mkdir -p "$as_dir"'
54120else
54121  test -d ./-p && rmdir ./-p
54122  as_mkdir_p=false
54123fi
54124
54125
54126# as_fn_executable_p FILE
54127# -----------------------
54128# Test if FILE is an executable regular file.
54129as_fn_executable_p ()
54130{
54131  test -f "$1" && test -x "$1"
54132} # as_fn_executable_p
54133as_test_x='test -x'
54134as_executable_p=as_fn_executable_p
54135
54136# Sed expression to map a string onto a valid CPP name.
54137as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54138
54139# Sed expression to map a string onto a valid variable name.
54140as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54141
54142
54143exec 6>&1
54144## ----------------------------------- ##
54145## Main body of $CONFIG_STATUS script. ##
54146## ----------------------------------- ##
54147_ASEOF
54148test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54149
54150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54151# Save the log message, to keep $0 and so on meaningful, and to
54152# report actual input values of CONFIG_FILES etc. instead of their
54153# values after options handling.
54154ac_log="
54155This file was extended by OpenJDK $as_me jdk9, which was
54156generated by GNU Autoconf 2.69.  Invocation command line was
54157
54158  CONFIG_FILES    = $CONFIG_FILES
54159  CONFIG_HEADERS  = $CONFIG_HEADERS
54160  CONFIG_LINKS    = $CONFIG_LINKS
54161  CONFIG_COMMANDS = $CONFIG_COMMANDS
54162  $ $0 $@
54163
54164on `(hostname || uname -n) 2>/dev/null | sed 1q`
54165"
54166
54167_ACEOF
54168
54169case $ac_config_files in *"
54170"*) set x $ac_config_files; shift; ac_config_files=$*;;
54171esac
54172
54173
54174
54175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54176# Files that config.status was made for.
54177config_files="$ac_config_files"
54178
54179_ACEOF
54180
54181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54182ac_cs_usage="\
54183\`$as_me' instantiates files and other configuration actions
54184from templates according to the current configuration.  Unless the files
54185and actions are specified as TAGs, all are instantiated by default.
54186
54187Usage: $0 [OPTION]... [TAG]...
54188
54189  -h, --help       print this help, then exit
54190  -V, --version    print version number and configuration settings, then exit
54191      --config     print configuration, then exit
54192  -q, --quiet, --silent
54193                   do not print progress messages
54194  -d, --debug      don't remove temporary files
54195      --recheck    update $as_me by reconfiguring in the same conditions
54196      --file=FILE[:TEMPLATE]
54197                   instantiate the configuration file FILE
54198
54199Configuration files:
54200$config_files
54201
54202Report bugs to <build-dev@openjdk.java.net>.
54203OpenJDK home page: <http://openjdk.java.net>."
54204
54205_ACEOF
54206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54207ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54208ac_cs_version="\\
54209OpenJDK config.status jdk9
54210configured by $0, generated by GNU Autoconf 2.69,
54211  with options \\"\$ac_cs_config\\"
54212
54213Copyright (C) 2012 Free Software Foundation, Inc.
54214This config.status script is free software; the Free Software Foundation
54215gives unlimited permission to copy, distribute and modify it."
54216
54217ac_pwd='$ac_pwd'
54218srcdir='$srcdir'
54219AWK='$AWK'
54220test -n "\$AWK" || AWK=awk
54221_ACEOF
54222
54223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54224# The default lists apply if the user does not specify any file.
54225ac_need_defaults=:
54226while test $# != 0
54227do
54228  case $1 in
54229  --*=?*)
54230    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54231    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54232    ac_shift=:
54233    ;;
54234  --*=)
54235    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54236    ac_optarg=
54237    ac_shift=:
54238    ;;
54239  *)
54240    ac_option=$1
54241    ac_optarg=$2
54242    ac_shift=shift
54243    ;;
54244  esac
54245
54246  case $ac_option in
54247  # Handling of the options.
54248  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54249    ac_cs_recheck=: ;;
54250  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54251    $as_echo "$ac_cs_version"; exit ;;
54252  --config | --confi | --conf | --con | --co | --c )
54253    $as_echo "$ac_cs_config"; exit ;;
54254  --debug | --debu | --deb | --de | --d | -d )
54255    debug=: ;;
54256  --file | --fil | --fi | --f )
54257    $ac_shift
54258    case $ac_optarg in
54259    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54260    '') as_fn_error $? "missing file argument" ;;
54261    esac
54262    as_fn_append CONFIG_FILES " '$ac_optarg'"
54263    ac_need_defaults=false;;
54264  --he | --h |  --help | --hel | -h )
54265    $as_echo "$ac_cs_usage"; exit ;;
54266  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54267  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54268    ac_cs_silent=: ;;
54269
54270  # This is an error.
54271  -*) as_fn_error $? "unrecognized option: \`$1'
54272Try \`$0 --help' for more information." ;;
54273
54274  *) as_fn_append ac_config_targets " $1"
54275     ac_need_defaults=false ;;
54276
54277  esac
54278  shift
54279done
54280
54281ac_configure_extra_args=
54282
54283if $ac_cs_silent; then
54284  exec 6>/dev/null
54285  ac_configure_extra_args="$ac_configure_extra_args --silent"
54286fi
54287
54288_ACEOF
54289cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54290if \$ac_cs_recheck; then
54291  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54292  shift
54293  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54294  CONFIG_SHELL='$SHELL'
54295  export CONFIG_SHELL
54296  exec "\$@"
54297fi
54298
54299_ACEOF
54300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54301exec 5>>config.log
54302{
54303  echo
54304  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54305## Running $as_me. ##
54306_ASBOX
54307  $as_echo "$ac_log"
54308} >&5
54309
54310_ACEOF
54311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54312_ACEOF
54313
54314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54315
54316# Handling of arguments.
54317for ac_config_target in $ac_config_targets
54318do
54319  case $ac_config_target in
54320    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54321    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54322    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54323    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54324    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54325
54326  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54327  esac
54328done
54329
54330
54331# If the user did not use the arguments to specify the items to instantiate,
54332# then the envvar interface is used.  Set only those that are not.
54333# We use the long form for the default assignment because of an extremely
54334# bizarre bug on SunOS 4.1.3.
54335if $ac_need_defaults; then
54336  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54337fi
54338
54339# Have a temporary directory for convenience.  Make it in the build tree
54340# simply because there is no reason against having it here, and in addition,
54341# creating and moving files from /tmp can sometimes cause problems.
54342# Hook for its removal unless debugging.
54343# Note that there is a small window in which the directory will not be cleaned:
54344# after its creation but before its name has been assigned to `$tmp'.
54345$debug ||
54346{
54347  tmp= ac_tmp=
54348  trap 'exit_status=$?
54349  : "${ac_tmp:=$tmp}"
54350  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54351' 0
54352  trap 'as_fn_exit 1' 1 2 13 15
54353}
54354# Create a (secure) tmp directory for tmp files.
54355
54356{
54357  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54358  test -d "$tmp"
54359}  ||
54360{
54361  tmp=./conf$$-$RANDOM
54362  (umask 077 && mkdir "$tmp")
54363} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54364ac_tmp=$tmp
54365
54366# Set up the scripts for CONFIG_FILES section.
54367# No need to generate them if there are no CONFIG_FILES.
54368# This happens for instance with `./config.status config.h'.
54369if test -n "$CONFIG_FILES"; then
54370
54371
54372ac_cr=`echo X | tr X '\015'`
54373# On cygwin, bash can eat \r inside `` if the user requested igncr.
54374# But we know of no other shell where ac_cr would be empty at this
54375# point, so we can use a bashism as a fallback.
54376if test "x$ac_cr" = x; then
54377  eval ac_cr=\$\'\\r\'
54378fi
54379ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54380if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54381  ac_cs_awk_cr='\\r'
54382else
54383  ac_cs_awk_cr=$ac_cr
54384fi
54385
54386echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54387_ACEOF
54388
54389
54390{
54391  echo "cat >conf$$subs.awk <<_ACEOF" &&
54392  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54393  echo "_ACEOF"
54394} >conf$$subs.sh ||
54395  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54396ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54397ac_delim='%!_!# '
54398for ac_last_try in false false false false false :; do
54399  . ./conf$$subs.sh ||
54400    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54401
54402  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54403  if test $ac_delim_n = $ac_delim_num; then
54404    break
54405  elif $ac_last_try; then
54406    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54407  else
54408    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54409  fi
54410done
54411rm -f conf$$subs.sh
54412
54413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54414cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54415_ACEOF
54416sed -n '
54417h
54418s/^/S["/; s/!.*/"]=/
54419p
54420g
54421s/^[^!]*!//
54422:repl
54423t repl
54424s/'"$ac_delim"'$//
54425t delim
54426:nl
54427h
54428s/\(.\{148\}\)..*/\1/
54429t more1
54430s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54431p
54432n
54433b repl
54434:more1
54435s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54436p
54437g
54438s/.\{148\}//
54439t nl
54440:delim
54441h
54442s/\(.\{148\}\)..*/\1/
54443t more2
54444s/["\\]/\\&/g; s/^/"/; s/$/"/
54445p
54446b
54447:more2
54448s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54449p
54450g
54451s/.\{148\}//
54452t delim
54453' <conf$$subs.awk | sed '
54454/^[^""]/{
54455  N
54456  s/\n//
54457}
54458' >>$CONFIG_STATUS || ac_write_fail=1
54459rm -f conf$$subs.awk
54460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54461_ACAWK
54462cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54463  for (key in S) S_is_set[key] = 1
54464  FS = ""
54465
54466}
54467{
54468  line = $ 0
54469  nfields = split(line, field, "@")
54470  substed = 0
54471  len = length(field[1])
54472  for (i = 2; i < nfields; i++) {
54473    key = field[i]
54474    keylen = length(key)
54475    if (S_is_set[key]) {
54476      value = S[key]
54477      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54478      len += length(value) + length(field[++i])
54479      substed = 1
54480    } else
54481      len += 1 + keylen
54482  }
54483
54484  print line
54485}
54486
54487_ACAWK
54488_ACEOF
54489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54490if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54491  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54492else
54493  cat
54494fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54495  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54496_ACEOF
54497
54498# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54499# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54500# trailing colons and then remove the whole line if VPATH becomes empty
54501# (actually we leave an empty line to preserve line numbers).
54502if test "x$srcdir" = x.; then
54503  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54504h
54505s///
54506s/^/:/
54507s/[	 ]*$/:/
54508s/:\$(srcdir):/:/g
54509s/:\${srcdir}:/:/g
54510s/:@srcdir@:/:/g
54511s/^:*//
54512s/:*$//
54513x
54514s/\(=[	 ]*\).*/\1/
54515G
54516s/\n//
54517s/^[^=]*=[	 ]*$//
54518}'
54519fi
54520
54521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54522fi # test -n "$CONFIG_FILES"
54523
54524
54525eval set X "  :F $CONFIG_FILES      "
54526shift
54527for ac_tag
54528do
54529  case $ac_tag in
54530  :[FHLC]) ac_mode=$ac_tag; continue;;
54531  esac
54532  case $ac_mode$ac_tag in
54533  :[FHL]*:*);;
54534  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54535  :[FH]-) ac_tag=-:-;;
54536  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54537  esac
54538  ac_save_IFS=$IFS
54539  IFS=:
54540  set x $ac_tag
54541  IFS=$ac_save_IFS
54542  shift
54543  ac_file=$1
54544  shift
54545
54546  case $ac_mode in
54547  :L) ac_source=$1;;
54548  :[FH])
54549    ac_file_inputs=
54550    for ac_f
54551    do
54552      case $ac_f in
54553      -) ac_f="$ac_tmp/stdin";;
54554      *) # Look for the file first in the build tree, then in the source tree
54555	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54556	 # because $ac_f cannot contain `:'.
54557	 test -f "$ac_f" ||
54558	   case $ac_f in
54559	   [\\/$]*) false;;
54560	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54561	   esac ||
54562	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54563      esac
54564      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54565      as_fn_append ac_file_inputs " '$ac_f'"
54566    done
54567
54568    # Let's still pretend it is `configure' which instantiates (i.e., don't
54569    # use $as_me), people would be surprised to read:
54570    #    /* config.h.  Generated by config.status.  */
54571    configure_input='Generated from '`
54572	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54573	`' by configure.'
54574    if test x"$ac_file" != x-; then
54575      configure_input="$ac_file.  $configure_input"
54576      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54577$as_echo "$as_me: creating $ac_file" >&6;}
54578    fi
54579    # Neutralize special characters interpreted by sed in replacement strings.
54580    case $configure_input in #(
54581    *\&* | *\|* | *\\* )
54582       ac_sed_conf_input=`$as_echo "$configure_input" |
54583       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54584    *) ac_sed_conf_input=$configure_input;;
54585    esac
54586
54587    case $ac_tag in
54588    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54589      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54590    esac
54591    ;;
54592  esac
54593
54594  ac_dir=`$as_dirname -- "$ac_file" ||
54595$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54596	 X"$ac_file" : 'X\(//\)[^/]' \| \
54597	 X"$ac_file" : 'X\(//\)$' \| \
54598	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54599$as_echo X"$ac_file" |
54600    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54601	    s//\1/
54602	    q
54603	  }
54604	  /^X\(\/\/\)[^/].*/{
54605	    s//\1/
54606	    q
54607	  }
54608	  /^X\(\/\/\)$/{
54609	    s//\1/
54610	    q
54611	  }
54612	  /^X\(\/\).*/{
54613	    s//\1/
54614	    q
54615	  }
54616	  s/.*/./; q'`
54617  as_dir="$ac_dir"; as_fn_mkdir_p
54618  ac_builddir=.
54619
54620case "$ac_dir" in
54621.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54622*)
54623  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54624  # A ".." for each directory in $ac_dir_suffix.
54625  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54626  case $ac_top_builddir_sub in
54627  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54628  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54629  esac ;;
54630esac
54631ac_abs_top_builddir=$ac_pwd
54632ac_abs_builddir=$ac_pwd$ac_dir_suffix
54633# for backward compatibility:
54634ac_top_builddir=$ac_top_build_prefix
54635
54636case $srcdir in
54637  .)  # We are building in place.
54638    ac_srcdir=.
54639    ac_top_srcdir=$ac_top_builddir_sub
54640    ac_abs_top_srcdir=$ac_pwd ;;
54641  [\\/]* | ?:[\\/]* )  # Absolute name.
54642    ac_srcdir=$srcdir$ac_dir_suffix;
54643    ac_top_srcdir=$srcdir
54644    ac_abs_top_srcdir=$srcdir ;;
54645  *) # Relative name.
54646    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54647    ac_top_srcdir=$ac_top_build_prefix$srcdir
54648    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54649esac
54650ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54651
54652
54653  case $ac_mode in
54654  :F)
54655  #
54656  # CONFIG_FILE
54657  #
54658
54659_ACEOF
54660
54661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54662# If the template does not know about datarootdir, expand it.
54663# FIXME: This hack should be removed a few years after 2.60.
54664ac_datarootdir_hack=; ac_datarootdir_seen=
54665ac_sed_dataroot='
54666/datarootdir/ {
54667  p
54668  q
54669}
54670/@datadir@/p
54671/@docdir@/p
54672/@infodir@/p
54673/@localedir@/p
54674/@mandir@/p'
54675case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54676*datarootdir*) ac_datarootdir_seen=yes;;
54677*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54678  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54679$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54680_ACEOF
54681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54682  ac_datarootdir_hack='
54683  s&@datadir@&$datadir&g
54684  s&@docdir@&$docdir&g
54685  s&@infodir@&$infodir&g
54686  s&@localedir@&$localedir&g
54687  s&@mandir@&$mandir&g
54688  s&\\\${datarootdir}&$datarootdir&g' ;;
54689esac
54690_ACEOF
54691
54692# Neutralize VPATH when `$srcdir' = `.'.
54693# Shell code in configure.ac might set extrasub.
54694# FIXME: do we really want to maintain this feature?
54695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54696ac_sed_extra="$ac_vpsub
54697$extrasub
54698_ACEOF
54699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54700:t
54701/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54702s|@configure_input@|$ac_sed_conf_input|;t t
54703s&@top_builddir@&$ac_top_builddir_sub&;t t
54704s&@top_build_prefix@&$ac_top_build_prefix&;t t
54705s&@srcdir@&$ac_srcdir&;t t
54706s&@abs_srcdir@&$ac_abs_srcdir&;t t
54707s&@top_srcdir@&$ac_top_srcdir&;t t
54708s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54709s&@builddir@&$ac_builddir&;t t
54710s&@abs_builddir@&$ac_abs_builddir&;t t
54711s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54712$ac_datarootdir_hack
54713"
54714eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54715  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54716
54717test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54718  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54719  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54720      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54721  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54722which seems to be undefined.  Please make sure it is defined" >&5
54723$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54724which seems to be undefined.  Please make sure it is defined" >&2;}
54725
54726  rm -f "$ac_tmp/stdin"
54727  case $ac_file in
54728  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54729  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54730  esac \
54731  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54732 ;;
54733
54734
54735
54736  esac
54737
54738done # for ac_tag
54739
54740
54741as_fn_exit 0
54742_ACEOF
54743ac_clean_files=$ac_clean_files_save
54744
54745test $ac_write_fail = 0 ||
54746  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54747
54748
54749# configure is writing to config.log, and then calls config.status.
54750# config.status does its own redirection, appending to config.log.
54751# Unfortunately, on DOS this fails, as config.log is still kept open
54752# by configure, so config.status won't be able to write to it; its
54753# output is simply discarded.  So we exec the FD to /dev/null,
54754# effectively closing config.log, so it can be properly (re)opened and
54755# appended to by config.status.  When coming back to configure, we
54756# need to make the FD available again.
54757if test "$no_create" != yes; then
54758  ac_cs_success=:
54759  ac_config_status_args=
54760  test "$silent" = yes &&
54761    ac_config_status_args="$ac_config_status_args --quiet"
54762  exec 5>/dev/null
54763  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54764  exec 5>>config.log
54765  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54766  # would make configure fail if this is the last instruction.
54767  $ac_cs_success || as_fn_exit 1
54768fi
54769if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54770  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54771$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54772fi
54773
54774
54775# After AC_OUTPUT, we need to do final work
54776
54777
54778  # Try to move config.log (generated by autoconf) to the configure-support directory.
54779  if test -e ./config.log; then
54780    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54781  fi
54782
54783  # Rotate our log file (configure.log)
54784  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54785    $RM -f "$OUTPUT_ROOT/configure.log.old"
54786  fi
54787  if test -e "$OUTPUT_ROOT/configure.log"; then
54788    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54789  fi
54790
54791  # Move configure.log from current directory to the build output root
54792  if test -e ./configure.log; then
54793    echo found it
54794    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54795  fi
54796
54797  # Make the compare script executable
54798  $CHMOD +x $OUTPUT_ROOT/compare.sh
54799
54800
54801# Finally output some useful information to the user
54802
54803  # Finally output some useful information to the user
54804
54805  printf "\n"
54806  printf "====================================================\n"
54807  if test "x$no_create" != "xyes"; then
54808    if test "x$IS_RECONFIGURE" != "xyes"; then
54809      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54810    else
54811      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54812    fi
54813  else
54814    if test "x$IS_RECONFIGURE" != "xyes"; then
54815      printf "A configuration has been successfully checked but not created\n"
54816    else
54817      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54818    fi
54819  fi
54820  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54821    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54822  else
54823    printf "using default settings.\n"
54824  fi
54825
54826  printf "\n"
54827  printf "Configuration summary:\n"
54828  printf "* Debug level:    $DEBUG_LEVEL\n"
54829  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54830  printf "* JDK variant:    $JDK_VARIANT\n"
54831  printf "* JVM variants:   $with_jvm_variants\n"
54832  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54833  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54834
54835  printf "\n"
54836  printf "Tools summary:\n"
54837  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54838    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54839  fi
54840  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54841  if test "x$TOOLCHAIN_VERSION" != "x"; then
54842    print_version=" $TOOLCHAIN_VERSION"
54843  fi
54844  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54845  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54846  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54847
54848  printf "\n"
54849  printf "Build performance summary:\n"
54850  printf "* Cores to use:   $JOBS\n"
54851  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54852  if test "x$CCACHE_STATUS" != "x"; then
54853    printf "* ccache status:  $CCACHE_STATUS\n"
54854  fi
54855  printf "\n"
54856
54857  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54858    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54859    printf "will result in longer build times.\n"
54860    printf "\n"
54861  fi
54862
54863  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54864    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54865    printf "These are not respected, and will be ignored. It is recommended\n"
54866    printf "that you clean your environment. The following variables are set:\n"
54867    printf "$FOUND_ALT_VARIABLES\n"
54868    printf "\n"
54869  fi
54870
54871  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54872    printf "WARNING: Your build output directory is not on a local disk.\n"
54873    printf "This will severely degrade build performance!\n"
54874    printf "It is recommended that you create an output directory on a local disk,\n"
54875    printf "and run the configure script again from that directory.\n"
54876    printf "\n"
54877  fi
54878
54879  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54880    printf "WARNING: The result of this configuration has overridden an older\n"
54881    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54882    printf "proper build. Failure to do so might result in strange build problems.\n"
54883    printf "\n"
54884  fi
54885
54886  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54887    printf "WARNING: The result of this configuration was not saved.\n"
54888    printf "You should run without '--no-create | -n' to create the configuration.\n"
54889    printf "\n"
54890  fi
54891
54892
54893
54894  # Locate config.log.
54895  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54896    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54897  elif test -e "./config.log"; then
54898    CONFIG_LOG_PATH="."
54899  fi
54900
54901  if test -e "$CONFIG_LOG_PATH/config.log"; then
54902    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54903    if test $? -eq 0; then
54904      printf "The following warnings were produced. Repeated here for convenience:\n"
54905      # We must quote sed expression (using []) to stop m4 from eating the [].
54906      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54907      printf "\n"
54908    fi
54909  fi
54910
54911